Commit graph

11753 commits

Author SHA1 Message Date
unknown
32b28f9298 WL#1266 "Separate auto-set logic from TIMESTAMP type."
Final version of patch.

Adds support for specifying of DEFAULT NOW() and/or ON UPDATE NOW()
clauses for TIMESTAMP field definition.
Current implementation allows only one such field per table and
uses several unireg types for storing info about this properties of
field. It should be replaced with better implementation when new
.frm format is introduced.


include/mysqld_error.h:
  Added error codes for case when we have more than one column with NOW()
  in DEFAULT or ON UPDATE clauses and for case when we are using ON UPDATE
  clause with wrong type.
mysql-test/r/create.result:
  Added tests for using of DEFAULT NOW() and ON UPDATE NOW() with
  non-TIMESTAMP fields.
mysql-test/r/show_check.result:
  Updated test results to reflect new default look of TIMESTAMP fields
  in SHOW CREATE TABLE.
mysql-test/r/system_mysql_db.result:
  Updated test results to reflect new default look of TIMESTAMP fields
  in SHOW CREATE TABLE.
mysql-test/r/type_ranges.result:
  Updated test results to reflect new default look of TIMESTAMP fields
  in SHOW COLUMNS.
mysql-test/r/type_timestamp.result:
  Added tests for various DEFAULT and ON UPDATE clauses for TIMESTAMP
  fields definitions.
mysql-test/t/create.test:
  Added tests for using of DEFAULT NOW() and ON UPDATE NOW() with
  non-TIMESTAMP fields.
mysql-test/t/type_timestamp.test:
  Added tests for various DEFAULT and ON UPDATE clauses for TIMESTAMP
  fields definitions.
sql/field.cc:
  Added support for various combinations of DEFAULT and ON UPDATE clauses
  for TIMESTAMP field. 
  
  Setting TABLE::timestamp* members for TIMESTAMP fields with auto-set 
  option taking into account their unireg type (which corresponds to 
  various DEFAULT/ON UPDATE values combinations). Replaced 
  TABLE::time_stamp with TABLE::timestamp_default_now/on_update_now
  couple moved their setup to separate method set_timestamp_offsets(),
  which now is called from  open_table instead of Field_timestamp cons.
sql/field.h:
  Added more unireg types for handling of DEFAULT NOW() and ON UPDATE
  NOW() for TIMESTAMP fields.
  Fixed value corresponding to DEFAULT item for TIMESTAMP field.
sql/ha_berkeley.cc:
  Now TIMESTAMP column with auto-set property could be updated during
  INSERT or/and UPDATE independently.
sql/ha_heap.cc:
  Now TIMESTAMP column with auto-set property could be updated during
  INSERT or/and UPDATE independently.
sql/ha_innodb.cc:
  Now TIMESTAMP column with auto-set property could be updated during
  INSERT or/and UPDATE independently.
sql/ha_isam.cc:
  Now TIMESTAMP column with auto-set property could be updated during
  INSERT or/and UPDATE independently.
sql/ha_isammrg.cc:
  Now TIMESTAMP column with auto-set property could be updated during
  INSERT or/and UPDATE independently.
sql/ha_myisam.cc:
  Now TIMESTAMP column with auto-set property could be updated during
  INSERT or/and UPDATE independently.
sql/ha_myisammrg.cc:
  Now TIMESTAMP column with auto-set property could be updated during
  INSERT or/and UPDATE independently.
sql/item_func.h:
  We need to distinguish NOW() from other function for using in 
  DEFAULT and in ON UPDATE clauses.
sql/item_timefunc.h:
  We need to distinguish NOW() from other function for using in 
  DEFAULT and in ON UPDATE clauses.
sql/mysql_priv.h:
  Added parameter for ON UPDATE value to add_field_to_list() function.
sql/share/czech/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/danish/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/dutch/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/english/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/estonian/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/french/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/german/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/greek/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/hungarian/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/italian/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/japanese/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/korean/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/norwegian-ny/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/norwegian/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/polish/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/portuguese/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/romanian/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/russian/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/serbian/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/slovak/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/spanish/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/swedish/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/share/ukrainian/errmsg.txt:
  Added error messages for case when we have more than one column with
  NOW() (CURRENT_TIMESTAMP is just more standard alias) in DEFAULT or 
  ON UPDATE clauses and for case when we are using ON UPDATE clause with
  wrong type.
sql/sql_base.cc:
  Added setup of TABLE::timestamp_default_now/on_update_now pair
  for each statement to open_table().
sql/sql_insert.cc:
  Using TABLE::timestamp_default_now/on_update_now pair instead of
  old TABLE::time_stamp. Added check for case then REPLACE could not
  be converted to UPDATE because of different DEFAULT/ON UPDATE values
  for TIMESTAMP field.
sql/sql_lex.h:
  Added member for value used in ON UPDATE clause to st_lex.
sql/sql_load.cc:
  Using TABLE::timestamp_default_now/on_update_now pair instead of
  old TABLE::time_stamp. We don't need to restore these members
  since they are set up for each statement in open_table().
sql/sql_parse.cc:
  Added handling of DEFAULT NOW() and ON UPDATE NOW() clauses for
  TIMESTAMP fields to add_field_to_list() function.
sql/sql_show.cc:
  Added support for DEFAULT CURRENT_TIMESTAMP (aka NOW() ) and 
  ON UPDATE CURRENT_TIMESTAMP to SHOW CREATE TABLE and SHOW COLUMNS.
sql/sql_table.cc:
  mysql_create_table() function - added check for number of TIMESTAMP 
    fields with auto-set values and replacing of old style TIMESTAMPs
    with their newer analogs.
  mysql_alter_table(): Using TABLE::timestamp_default_now/on_update_now 
    pair instead of old TABLE::time_stamp. We don't need to restore these
    members since they are set up for each statement in open_table().
sql/sql_update.cc:
  Left only setting of TABLE::timestamp_default_now/on_update_now
  to 0 since they should be already set up in open_table().
sql/sql_yacc.yy:
  Added support for DEFAULT NOW() and ON UPDATE NOW() in field
  definitions.
sql/table.h:
  Replaced TABLE::time_stamp withTABLE::timestamp_default_now/timestamp_on_update_now
  pair which allows to distinguish TIMESTAMP's with various DEFAULT/ON UPDATE
  clauses and optimize checks if TIMESTAMP field should be set to NOW()
  in handlers.
sql/unireg.cc:
  Now we are marking only TIMESTAMP fields with NOW() as default or
  as on update value as special field for unireg.
2004-04-02 10:12:53 +04:00
unknown
a62a5fc9c0 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-on-4.1
2004-04-01 23:48:21 +03:00
unknown
382ece835a Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into jabberwock.localdomain:/home/dlenev/src/mysql-4.1-775
2004-04-02 00:48:20 +04:00
unknown
a58b351eeb WL#775 "Add status variable identifying binlog_cache_size shortage"
Added two status variables: 
  binlog_cache_use - counts number of transactions that used somehow
    transaction temporary binary log.
  binlog_cache_disk_use - counts number of transactions that required
    disk I/O for storing info in this this binary log.


include/my_sys.h:
  Added disk_writes member to the IO_CACHE structure for counting number
  of times when IO_CACHE was forced to write to disk.
mysql-test/r/rpl_relayrotate.result:
  Fixed test result since added test for binlog_cache_use and 
  binlog_cache_disk_use status variables.
mysql-test/t/rpl_relayrotate.test:
  Added test for binlog_cache_use and binlog_cache_disk_use status 
  variables.
  Now dropping t1 table on master too.
mysys/mf_iocache.c:
  Added disk_writes member to the IO_CACHE structure for counting number
  of times when IO_CACHE was forced to write to disk.
sql/handler.cc:
  Added support for binlog_cache_use and binlog_cache_disk_use status
  variable. First one is incremented if transaction used somehow 
  transaction temporary binary log (doesn't matter in memory only or 
  with writes to disk), the second one is incremented if this binary 
  log was flushed to disk at some point.
sql/mysql_priv.h:
  Added declaration of status variables binlog_cache_use and 
  binlog_cache_disk_use.
sql/mysqld.cc:
  Added status variables binlog_cache_use and binlog_cache_disk_use.
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-04-02 00:47:20 +04:00
unknown
d4074bbeb3 removed unused field
layout fised
debug information added


sql/item.cc:
  layout fix
  debug info
sql/sql_class.h:
  removed unused field
2004-04-01 23:27:22 +03:00
unknown
0aa510bbdf - install all *.sql files into the "shared" directory for the binary tar.gz
distribution (this is more in line with how "make install" would install
   them) - this should also fix a test failure in the "system_mysql_db_fix"
   test.


BitKeeper/etc/ignore:
  Added cmd-line-utils/libedit/makelist to the ignore list
2004-04-01 17:34:26 +02:00
unknown
54a8eb623a fix for table/field caching mechanism
save moving ON/USING tables conditions to WHERE clause (BUG#2794)


sql/sql_base.cc:
  fix for table/field caching mechanism (global lock of it and right table passed as parameter)
  save moving ON/USING tables conditions to WHERE clause (BUG#2794)
sql/sql_class.cc:
  lock for using field/table cache in Item name resolution
sql/sql_class.h:
  lock for using field/table cache in Item name resolution
sql/sql_insert.cc:
  lock for using field/table cache in Item name resolution
tests/client_test.c:
  Test of PS queries with ON condition
2004-04-01 03:00:38 +03:00
unknown
dead63012a More after-merge fixes for patch fixing bug #2050 2004-04-01 00:19:30 +04:00
unknown
e6d7661547 Merge of fix for bug #2050 and bug #3307
BitKeeper/etc/logging_ok:
  auto-union
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Manual merge
2004-03-31 22:17:10 +04:00
unknown
d2906f0ed0 Fix for Bug #3307 "FLUSH TABLES sometimes breaks prepared statement
table resolution".
Added members to Item_ident for storing original db, table and field
names since those that set later from Field have shorter life-time 
than required by prep. stmt. So we need to restore original names in 
Item_ident::cleanup(). Also now using special construnctor for creation
of Item_field from Field object that ensures that table and field name 
have big enough life-time.

"Fix" for bug #2050 "10 to 1 performance drop with server 4.1.1"
Clean ups in implementation of caching of field number in table.
Added caching of table in which field is found in find_field_in_tables(). 


sql/item.cc:
  Added members to Item_ident for storing original db, table and field
  names since those that set later from Field have shorter life-time 
  than required by prep. stmt. So we need to restore original names in 
  Item_ident::cleanup().
  Added Item_ident::cached_table for caching table there we found 
  our field.
  Added special constructor for creation of Item_field from Field object
  that ensures that table and field name have big enough life-time.
sql/item.h:
  Added members to Item_ident for storing original db, table and field
  names since those that set later from Field have shorter life-time 
  than required by prep. stmt. So we need to restore original names in 
  Item_ident::cleanup().
  Changed type of Item_ident::cached_field_index from int to uint
  (and so NO_CACHED_FIELD_INDEX is UINT_MAX now) because we want to
  save one comparison in find_field_in_table().
  Added Item_ident::cached_table for caching table there we found 
  our field.
  Added special constructor for creation of Item_field from Field object
  that ensures that table and field name have big enough life-time.
sql/mysql_priv.h:
  Changed type of cached_field_index_ptr from int* to uint*
  (and so NO_CACHED_FIELD_INDEX is UINT_MAX now) because we want to
  save one comparison in find_field_in_table().
sql/sql_acl.cc:
  Changed type of find_field_in_table() paremeter to make it 
  faster.
sql/sql_base.cc:
  find_field_in_table(): small optimization and soime clean ups in 
   caching of field index.
  find_field_in_tables(): added aggresive caching of table in which
   field is found in Item_ident::cached_table.
  insert_fields():
   using special construnctor for creation of Item_field from Field 
   object that ensures that table and field name have big enough life-time.
2004-03-31 21:25:55 +04:00
unknown
0dd6f77d47 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.1
into gluh.mysql.r18.ru:/home/gluh/Bugs/mysql-4.1
2004-03-31 14:30:53 +05:00
unknown
48014f2288 Fix for bug #2160: Extra error message for CREATE TABLE LIKE with InnoDB 2004-03-31 14:29:01 +05:00
unknown
9c2e4b0360 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-qc-4.1
2004-03-31 08:24:12 +03:00
unknown
4cd406a929 Added option --set-charset (disable with --skip-set-charset) to mysqldump.
Marked --no-set-names as deprecated, the name is misleading and --no- in front
makes it cumbersome to use with --disable or --skip prefixes.
The old option will still work for the time being.


client/client_priv.h:
  Added option --set-charset (disable with --skip-set-charset) to mysqldump.
2004-03-31 05:36:29 +03:00
unknown
0005e266a2 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-03-31 03:32:57 +03:00
unknown
93c70c0772 simple optimzation
Portability fixes


client/mysqltest.c:
  Fixed that if error number 0 is included in --error, we will not generate an error message
include/mysql.h:
  Portability fix
mysql-test/mysql-test-run.sh:
  Portability fix
mysql-test/r/heap_btree.result:
  Portability fix
mysql-test/r/rpl_error_ignored_table.result:
  Portability fix
mysql-test/t/heap_btree.test:
  Portability fix
mysql-test/t/rpl_error_ignored_table.test:
  Portability fix
sql/sql_base.cc:
  simple optimzation
sql/sql_yacc.yy:
  simple optimzation
2004-03-31 03:32:38 +03:00
unknown
bc5365b4bb Stubs for types/names of placeholders, cursor flags and array execution count
implemented in the client library and server.
Warning: this makes the new client library and server incompatible with all 
previous versions and 5.0.


libmysql/libmysql.c:
  Make client library compatible with future extensions: types of placeholders, 
   names of named parameters, cursors and array execution.
sql/sql_prepare.cc:
  Alpha server side support for future extensions: types of placeholders and names of
  named parameters are sent to client (virtually), cursor flags and execution
  count received in COM_EXECUTE packet are ignored.
2004-03-31 02:27:49 +04:00
unknown
963debbe77 null processing for character_set_results (BUG#3296)
mysql-test/r/query_cache.result:
  test suite for BUG#3296
mysql-test/t/query_cache.test:
  test suite for BUG#3296
sql/sql_cache.cc:
  null processing for character_set_results
2004-03-30 23:38:56 +03:00
unknown
2ac5a256fe Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-03-30 22:20:40 +03:00
unknown
690a413d31 Force clients to recompile if client lib changes (Bug #3009)
sql/lock.cc:
  Added comments
sql/set_var.h:
  Indentation fix
2004-03-30 22:13:25 +03:00
unknown
00967819f3 http://bugs.mysql.com/bug.php?id=3255
Collation gets lost in CREATE TABLE (...) DEFAULT CHARACTER SET xxx COLLATE yyy

This is fixed now.
Test is added into the test suite.
2004-03-30 22:38:52 +05:00
unknown
6b8d6d2a43 ALTER TABLE t1 CONVERT TO should also change the default character set.
Forgot to do it in the previous commit.
2004-03-30 22:18:49 +05:00
unknown
acd4d158cc More different syntaxes for (1) modifying the default charaset/collation
and for (2) converting the columns:

1.  ALTER TABLE t1 [DEFAULT] CHARACTER SET xxx [COLLATE yyy]
2.  ALTER TABLE t1 CONVERT TO CHARACTER SET xxx [COLLATE yyy]
2004-03-30 21:33:45 +05:00
unknown
bc12d57fa7 Fix to get correct metadata when using temporary tables to create result. (Bug #2654)
client/mysqltest.c:
  Added support for --enable_metadata
mysql-test/t/order_by.test:
  Improved comment
scripts/mysqlaccess.sh:
  CGI is required (Bug #2988)
sql/field.cc:
  Fix to get correct metadata when using temporary tables to create result
sql/field.h:
  Fix to get correct metadata when using temporary tables to create result
sql/sql_insert.cc:
  Fix to get correct metadata when using temporary tables to create result
2004-03-30 19:24:28 +03:00
unknown
35a21a9c10 query cache statistic fixed 2004-03-30 18:47:04 +03:00
unknown
b26165d3a2 resolving conflicts 2004-03-30 16:04:08 +05:00
unknown
3004dc7ef2 An improvement of
ChangeSet
  1.1707 04/03/19 12:36:55 ram@gw.mysql.r18.ru +4 -0
  Fix for the bug #2976: NATURAL JOIN produces duplicate columns.
2004-03-30 15:54:26 +05:00
unknown
ceeaa24d18 false/true -> FALSE/TRUE
Fixes after last merge


mysql-test/r/bdb-crash.result:
  fixed bad merge
mysql-test/r/myisam.result:
  after merge fix
mysql-test/r/order_by.result:
  fixed bad merge
mysql-test/t/order_by.test:
  after merge fix
sql/field_conv.cc:
  false/true -> FALSE/TRUE
sql/handler.cc:
  false/true -> FALSE/TRUE
sql/item.cc:
  false/true -> FALSE/TRUE
sql/item_cmpfunc.cc:
  false/true -> FALSE/TRUE
sql/item_sum.cc:
  false/true -> FALSE/TRUE
sql/slave.cc:
  false/true -> FALSE/TRUE
sql/sql_acl.cc:
  false/true -> FALSE/TRUE
sql/sql_cache.cc:
  after merge fix
sql/sql_help.cc:
  false/true -> FALSE/TRUE
sql/sql_olap.cc:
  false/true -> FALSE/TRUE
sql/sql_parse.cc:
  false/true -> FALSE/TRUE
sql/sql_select.cc:
  fix after bad merge
sql/sql_table.cc:
  fix after bad merge
sql/sql_test.cc:
  false/true -> FALSE/TRUE
2004-03-30 02:32:41 +03:00
unknown
db9fde085f Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-03-30 01:43:45 +03:00
unknown
989756ab99 Better comment.
sql/sql_prepare.cc:
  While reviewing Sanja's patch finally understood what is going one here
  (previously marked as 'safety - nasty init' :-) ).
2004-03-30 02:03:42 +04:00
unknown
619e9cbadd Merge mysql.com:/home/my/mysql-4.0 into mysql.com:/home/my/mysql-4.1
mysql-test/t/timezone.test:
  Auto merged
2004-03-30 01:02:21 +03:00
unknown
6b16bf4ffd Fix test results when you are in daylight saving time
mysql-test/t/timezone.test:
  Fix results when you are in daylight saving time
2004-03-30 01:01:31 +03:00
unknown
ff908d18a2 Merge with 4.0 to get lastest bug fixes
include/m_string.h:
  Auto merged
myisam/mi_create.c:
  Auto merged
mysql-test/r/bdb-crash.result:
  Auto merged
sql/handler.h:
  Auto merged
mysql-test/r/grant_cache.result:
  Auto merged
mysql-test/t/grant_cache.test:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
innobase/mem/mem0dbg.c:
  Merge with 4.0
mysql-test/r/myisam.result:
  Merge with 4.0
mysql-test/r/order_by.result:
  Merge with 4.0
mysql-test/t/bdb-crash.test:
  Merge with 4.0
mysql-test/t/myisam.test:
  Merge with 4.0
mysql-test/t/order_by.test:
  Merge with 4.0
sql/ha_berkeley.cc:
  Merge with 4.0 (use local code)
sql/sql_select.cc:
  Merge with 4.0 to get fix for FORCE INDEX ... ORDER BY
2004-03-29 19:21:53 +03:00
unknown
501c3e7a0e Fixed wrong assert (Got failure in ctype_tis620) 2004-03-29 18:59:51 +03:00
unknown
883215956e Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1


sql/sql_insert.cc:
  Auto merged
2004-03-29 17:57:59 +03:00
unknown
1cff3d98b3 Disable INSERT DELAYED for embedded library
sql-bench/crash-me.sh:
  Fixed typo
sql/mysql_priv.h:
  Moved things for embedded library into one section
sql/sql_string.cc:
  Simple optimization
2004-03-29 17:57:07 +03:00
unknown
063eeb7edb Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/my/mysql-4.0
2004-03-29 17:27:25 +03:00
unknown
399845aedd Better error messages for not nullable
SET character_set_xxx=NULL
and
SET collation_xxx=NULL
2004-03-29 18:33:24 +05:00
unknown
5babbd233b Better tests for BINARY 2004-03-29 17:27:30 +05:00
unknown
0d47f003ec Checking Thai sort order and trailing spaces handling 2004-03-29 16:38:38 +05:00
unknown
e43ad539f1 sql_db.cc:
More clear error message.


sql/sql_db.cc:
  More clear error message.
2004-03-29 11:05:27 +05:00
unknown
7e5cd91057 Simplification: MYSQL_RES *result replaced with MYSQL_DATA result;
No need to check for result existence any more, store_result functions
now are shorter.
cli_read_binary_rows rewritten to handle MYSQL_DATA directly.


include/mysql.h:
  MYSQL_RES * pointer replaced with MYSQL_DATA: it saves us at least 2 mallocs
  per store_result and simplifies stored result handling.
  Plus it's done with cursor fetch in mind: cursor fetch will use this
  structure to buffer fetched rows.
libmysql/client_settings.h:
  signature of cli_read_binary_rows changed
libmysql/libmysql.c:
  MYSQL_DATA is now used to handle result.
  cli_read_binary_rows rewritten to use MYSQL_DATA directly.
libmysql/libmysql.def:
  declarations of new calls in the library
libmysqld/lib_sql.cc:
  MYSQL_DATA is now used to handle result.
  cli_read_binary_rows rewritten to use MYSQL_DATA directly.
2004-03-28 17:22:04 +04:00
unknown
f6a8ec5f92 "Fix" for BUG #2050 "10 to 1 performance drop with server 4.1.1".
Actually it is not a bug but right behavior observed as pefomance 
degradation after we have forced Item_field::fix_fields() to 
re-execute each time when we are executing prep stmt.

This patch implements small optimization which heals this bad 
behavior. We are caching field position in TABLE::field array in
Item's member and are using this position for speeding up field
lookups in fix_fields() in case of its re-execution.


sql/item.cc:
  Added cached_field_index member to Item_ident for caching field
  position in TABLE::field array for quicker field lookup in case 
  fix_fields() is executed twice.
sql/item.h:
  Added cached_field_index member to Item_ident for caching field
  position in TABLE::field array for quicker field lookup in case 
  fix_fields() is executed twice.
sql/mysql_priv.h:
  Now find_field_in_table has one more in-out parameter which is used
  for caching field index in TABLE::field array stored for quicker
  field look up.
sql/sql_acl.cc:
  Now find_field_in_table has one more in-out parameter which is used
  for caching field index in TABLE::field array stored for quicker
  field look up.
sql/sql_base.cc:
  Optimization: Now when we are looking up Field by its name we are 
  caching its position in TABLE::field array in Item_ident::cached_field_index,
  so when we will call fix_fields() second time for this item (e.g.
  when we are re-executing prep statement) we can reuse this index
  to speed up this lookup.
sql/table.cc:
  Now we storing in TABLE::name_hash pointers to elements of 
  TABLE::field array, because this allows easily retrieve index
  of field in this array when it is looked up by its name.
sql/table.h:
  Added comment claryfying what we store in TABLE::name_hash.
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-03-28 04:11:54 +04:00
unknown
76385f32b6 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.clean
2004-03-27 15:28:15 +04:00
unknown
8b0d52ab12 Small fix to embedded library
we should call check_user in NO_EMBEDDED_ACCESS_CHECKS case
to do necessary initializations


libmysqld/lib_sql.cc:
  call of check_user added
2004-03-27 15:27:36 +04:00
unknown
a8feb0d6a2 Merge gbichot@213.136.52.20:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1
2004-03-27 01:08:29 +01:00
unknown
ec4a9dc983 A previous changeset by me today about SQL_LOG_BIN had the problem
that it tested the privilege in ::update() whereas it should be
in ::check() (see email from Serg, subject
"Re: bk commit - 4.1 tree (guilhem:1.1706)").
So I add instead a check_func function to sys_var_thd_bit.
I do the same addition to sys_var_thd_ulong, to unify handling
of PSEUDO_THREAD_ID with the one of SQL_LOG_BIN. So class
sys_var_pseudo_thread_id is not needed anymore, removing it.


mysql-test/r/rpl_temporary.result:
  result update
mysql-test/t/rpl_temporary.test:
  tests after new way of fixing; verify that when second variable
  assignment is refused then first is not done.
sql/set_var.cc:
  a check_func (check_log_update) when setting SQL_LOG_BIN,
  and one when setting PSEUDO_THREAD_ID.
  Removing class sys_var_pseudo_thread_id.
  Updates for new prototypes of constructor in sys_var_thd_bit
  and sys_var_thd_ulong.
sql/set_var.h:
  Adding check_func to sys_var_thd_bit.
  Adding check_func to sys_var_thd_ulong, so class sys_var_pseudo_thread_id
  is not needed anymore, removing it.
2004-03-27 01:07:09 +01:00
unknown
04e879e7ae some cleanup of last patch for BUG #2342
mysql-test/t/bdb-crash.test:
  added newline
sql/ha_berkeley.cc:
  added a commet
2004-03-27 02:37:05 +04:00
unknown
67e4f431d6 fixed bug #2342
"Running ANALYZE TABLE on bdb table inside a transaction hangs server thread"


mysql-test/r/bdb-crash.result:
  added test for bug #2342 
  "Running ANALYZE TABLE on bdb table inside a transaction hangs server thread"
mysql-test/t/bdb-crash.test:
  added test for bug #2342 
  "Running ANALYZE TABLE on bdb table inside a transaction hangs server thread"
sql/handler.h:
  added constant HA_ADMIN_REJECT
sql/sql_table.cc:
  added processing of HA_ADMIN_REJECT in ha_berkley::analyze
2004-03-27 02:29:31 +04:00
unknown
2e3950b20d Merge vvagin@bk-internal.mysql.com:/home/bk/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_2342/mysql-4.0
2004-03-27 00:41:48 +04:00