Commit graph

462 commits

Author SHA1 Message Date
unknown
c8ad5215ea Manual merge.
sql/sql_class.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
tests/client_test.c:
  Manual merge
2004-10-21 18:44:40 +04:00
unknown
506f648b3a A fix and test case for bug#6059 "mysql_stmt_field_count returns
positive numbers when no resultset is available": when sending
result set metadata we need to use virtual select_result::send_fields, 
and not address protocol directly, because select_result descendents may 
intercept result set (it's the case for example for SELECT INTO OUTFILE).


sql/sql_class.h:
  A fix for bug#6059 "mysql_stmt_field_count returns positive numbers 
  when no resultset is available": introducing select_result::field_count()
  method to report actual number of fields in a result set, if any result
  set is sent to client.
sql/sql_prepare.cc:
  A fix for bug#6059 "mysql_stmt_field_count returns 
  positive numbers when no resultset is available": when sending
  result set metadata we need to use virtual select_result::send_fields, 
  and not address protocol directly, because select_result descendents may 
  intercept result set (it's the case for example for SELECT INTO OUTFILE).
  Now we need to always have lex->result set if we're in prepared statements.
tests/client_test.c:
  A test case for Bug#6059 "mysql_stmt_field_count returns positive 
  numbers when no resultset is available"
2004-10-21 18:33:53 +04:00
unknown
560d7bcdd0 Merge with 4.0
BitKeeper/etc/logging_ok:
  auto-union
Docs/Support/texi2html:
  Auto merged
innobase/trx/trx0rec.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
myisam/myisampack.c:
  Auto merged
mysql-test/t/innodb-lock.test:
  Auto merged
mysys/thr_lock.c:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/sql_acl.cc:
  Keep old code
2004-10-20 16:24:28 +03:00
unknown
ed8ec2cf16 Code cleanups (done during review of new code)
Rename innodb_table_locks_old_behavior -> innodb_table_locks
Set innodb_table_locks to off by default to get same behaviour as in MySQL 4.0.20
(This means that Innodb ignore table locks by default, which makes it easier to combine MyISAM and InnoDB to simulate a transaction)


libmysql/libmysql.c:
  Use ulong instead of unsigned long
  Reuse _dig_vec()
myisam/myisampack.c:
  Simplify code
mysql-test/r/innodb-lock.result:
  new test case
mysql-test/t/innodb-lock.test:
  new test case
sql/ha_innodb.cc:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
sql/mysqld.cc:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
  Set this off by default to get same behaviour as in MySQL 4.0.20
sql/set_var.cc:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
sql/sql_class.h:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
2004-10-20 11:24:08 +03:00
unknown
55c1b79459 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/media/sda1/mysql/mysql-4.1-5985


sql/sql_class.h:
  Auto merged
2004-10-14 02:54:44 +04:00
unknown
54b00f5453 A fix and test case for Bug#5985 ""prepare stmt from "select rand(?)"
crashes server." The fix makes Item_func_rand prepared-statements
aware plus it fixes the case when RAND is used in prepared
statements and replication is on (as well as several similar issues).
Until now we did not reset THD before every execution of a prepared
statement, so if some execution had set thd->time_zone_used
or thd->rand_used they would not be reset until next mysql_parse.
Some of post-review fixes done.


mysql-test/r/ps.result:
  A test case for Bug#5985: test results fixed.
mysql-test/t/ps.test:
  A test case for Bug#5985 "prepare stmt from "select rand(?)" crashes
  server."
sql/item_func.cc:
  Actual fix for Bug#5985: Item_func_rand rewritten to be 
  prepared statements aware.
sql/item_func.h:
  Actual fix for Bug#5985: Item_func_rand rewritten to be 
  prepared statements aware.
sql/mysql_priv.h:
  We need a separate call to reset THD state before every execute of
  a prepared statement. Otherwise things like THD->user_var_events
  are never cleaned up and bloat binary log (as the list of events
  grows from execution to execution).
sql/sql_class.cc:
  Statement::end_statement -> THD::end_statement()
  (a leftover from some design change which is not to pushed now, but the
  leftover is to be pushed).
sql/sql_class.h:
  Statement::end_statement -> THD::end_statement()
  (a leftover from some design change which is not to pushed now, but the
  leftover is to be pushed).
sql/sql_lex.cc:
  Move the part responsible for initializing LEX from mysql_init_query
  to lex_start.
sql/sql_lex.h:
  All lex-related initialization is now in lex_start.
  Move thd->select_number to lex->select_number to be able to use it
  easily in lex_start.
sql/sql_parse.cc:
  Split mysql_init_query into two functions: mysql_reset_thd_for_next_query,
  which is used in PS and conventional execution, and lex_start, used only
  when we want to parse something.
  Fix init_connect to use initialized THD.
sql/sql_prepare.cc:
  Deploy mysql_reset_thd_for_next_query to reset THD state before
  execution of a prepared statement.
  Normally this should have been added to just one place, but
  we have to reset thd before assigning placeholders from variables,
  thus we can't do that in execute_stmt (yuck).
2004-10-14 02:53:59 +04:00
unknown
f0ed73d874 Added startup option and settable session variable
innodb_table_locks_old_behavior: do not acquire an
InnoDB table lock for LOCK TABLES, as in mysql-4.0.18
and earlier.


sql/ha_innodb.cc:
  Do not acquire an InnoDB table lock for LOCK TABLES if
  innodb_table_locks_old_behavior is enabled.
sql/mysqld.cc:
  Added innodb_table_locks_old_behavior
sql/set_var.cc:
  Added innodb_table_locks_old_behavior
sql/sql_class.h:
  Added innodb_table_locks_old_behavior
2004-10-13 22:54:21 +03:00
unknown
63af3d3a2e Move Heikki's comment about thd->query comment to proper place
(bad merge from 4.0)


sql/sql_class.h:
  Move a comment to proper place (bad merge from 4.0)
2004-10-13 00:17:37 +04:00
unknown
5ddf724d5e Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.gconcat


sql/item_sum.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2004-10-10 12:35:39 +05:00
unknown
b123f514b6 Blob support for the group_concat() function.
(Bug #4315: GROUP_CONCAT with ORDER BY returns strange results for TEXT fields
 Bug #5564: Strange behaviour with group_concat and distinct
 Bug #5970: group_concat doesn't print warnings)
2004-10-10 12:10:53 +05:00
unknown
acecc4dd9b A small simplification: perform two actions at once, register a
change, and perform it (the new Item changes registry).


sql/item.cc:
  A small simplification: perform two actions at once, register a
  change, and perform it.
sql/item_cmpfunc.cc:
  register_item_tree_change -> change_item_tree
sql/item_func.cc:
  register_item_tree_change -> change_item_tree
sql/item_row.cc:
  register_item_tree_change -> change_item_tree
sql/item_strfunc.cc:
  register_item_tree_change -> change_item_tree
sql/sql_class.h:
  register_item_tree_change -> change_item_tree
sql/sql_select.cc:
  register_item_tree_change -> change_item_tree
2004-10-10 03:10:00 +04:00
unknown
36b3ed27fb Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/media/sda1/mysql/mysql-4.1-5748-anew


sql/item_cmpfunc.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2004-10-08 02:22:40 +04:00
unknown
8fa6f37a29 A fix for Bug#5748 "Prepared statement with BETWEEN and bigint values
crashes mysqld": implementation for a generic item tree modifications
registry. Every item tree modification which should be rolled back for
subsequent execution of a prepared statement or stored procedure should
be saved in the registry. All such modifications are rolled back at once
during cleanup stage of PS.
Actual fix for the bug just adds a call to register modifications to
convert_constant_item.
Post review fixes implemented.


mysql-test/r/ps.result:
  A fix for bug#5748, test results fixed.
mysql-test/t/ps.test:
  A test case for Bug#5748 "Prepared statement with BETWEEN and bigint 
  values crashes mysqld"
sql/item.cc:
  Fix for Bug#5748 "Prepared statement with BETWEEN and bigint values
  crashes mysqld":
  First step in removing up item-specific cleanups: now all such
  tree modifications should be done using the genericm mechanism implemented
  in this changeset.
sql/item.h:
  Fix for Bug#5748 "Prepared statement with BETWEEN and bigint values
  crashes mysqld": no need for an item-specific change record any more.
sql/item_cmpfunc.cc:
  A fix for Bug#5748 "Prepared statement with BETWEEN and bigint 
  values crashes mysqld": register item tree transformation performed by
  convert_constant_item.
sql/sql_class.cc:
  Implementation for item tree transformations registry.
sql/sql_class.h:
  Declarations, necessary for the tree transformations registry.
sql/sql_parse.cc:
  Assert that the item tree transformations registry is not used for 
  conventional execution.
sql/sql_prepare.cc:
  Use of the item tree modifications registry in prepared statements:
  rollback all modifications in the end of statement prepare and execute.
  Also we now always set thd->current_arena to be able to determine that
  this is an execution of prepared statement inside the registry code.
tests/client_test.c:
  A typo fixed.
2004-10-08 02:21:19 +04:00
unknown
bbab9ec678 Merge with 4.0 for 4.1 release
Noteworthy:
- New HANDLER code
- New multi-update-grant-check code
- Table lock code in ha_innodb.cc was not applied


BitKeeper/etc/logging_ok:
  auto-union
BitKeeper/deleted/.del-ctype-latin1_de.c~c5d8f9208bceb98e:
  Auto merged
Build-tools/mysql-copyright-2:
  Auto merged
acinclude.m4:
  Auto merged
client/mysqladmin.c:
  Auto merged
client/mysqldump.c:
  Auto merged
include/config-win.h:
  Auto merged
include/my_global.h:
  Auto merged
include/myisam.h:
  Auto merged
innobase/btr/btr0btr.c:
  Auto merged
innobase/buf/buf0buf.c:
  Auto merged
ltmain.sh:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
innobase/fsp/fsp0fsp.c:
  Auto merged
innobase/include/dict0dict.h:
  Auto merged
innobase/include/row0mysql.h:
  Auto merged
innobase/log/log0log.c:
  Auto merged
innobase/log/log0recv.c:
  Auto merged
innobase/pars/pars0opt.c:
  Auto merged
innobase/row/row0row.c:
  Auto merged
innobase/sync/sync0arr.c:
  Auto merged
innobase/ut/ut0dbg.c:
  Auto merged
myisam/mi_check.c:
  Auto merged
myisam/mi_close.c:
  Auto merged
myisam/mi_create.c:
  Auto merged
myisam/mi_locking.c:
  Auto merged
myisam/myisampack.c:
  Auto merged
mysql-test/r/delete.result:
  Auto merged
mysql-test/r/func_if.result:
  Auto merged
Build-tools/mysql-copyright:
  Merge with 4.0 (too most of the code from 4.0)
Makefile.am:
  merge
client/mysql.cc:
  Used 4.1 code
configure.in:
  merge
innobase/os/os0file.c:
  merge
innobase/row/row0mysql.c:
  merge
mysql-test/r/ctype_latin1_de.result:
  merge
mysql-test/r/flush_table.result:
  merge
mysql-test/r/func_str.result:
  merge
mysql-test/r/handler.result:
  merge
mysql-test/r/multi_update.result:
  merge
mysql-test/r/type_timestamp.result:
  Removed testing of 'new' mode, as this is only relevant for 4.0
mysql-test/r/update.result:
  merge
mysql-test/t/delete.test:
  merge
mysql-test/t/flush_table.test:
  merge
mysql-test/t/func_str.test:
  merge
mysql-test/t/handler.test:
  merge
mysql-test/t/multi_update.test:
  merge
mysql-test/t/type_timestamp.test:
  Removed testing of 'new' mode, as this is only relevant for 4.0
mysql-test/t/update.test:
  merge
mysys/errors.c:
  merge
mysys/my_fstream.c:
  merge
mysys/my_pread.c:
  merge
mysys/my_write.c:
  merge
mysys/mysys_priv.h:
  merge
scripts/mysqlhotcopy.sh:
  merge
sql/field.cc:
  Keep code from 4.1
sql/field.h:
  Keep code from 4.1
sql/ha_innodb.cc:
  Don't merge lock code from 4.0; Heikki will look at this
sql/ha_myisam.cc:
  merge
sql/handler.cc:
  merge
sql/item_cmpfunc.cc:
  merge
sql/item_cmpfunc.h:
  merge
sql/item_strfunc.cc:
  merge
sql/mysql_priv.h:
  merge
sql/mysqld.cc:
  merge
sql/protocol.cc:
  merge
sql/records.cc:
  merge
sql/repl_failsafe.cc:
  merge
mysql-test/r/lock_multi.result:
  merge
mysql-test/t/ctype_latin1_de.test:
  merge
mysql-test/t/func_if.test:
  merge
mysql-test/t/lock_multi.test:
  merge
sql/repl_failsafe.h:
  merge
  Remove unnessessary header protection
sql/slave.h:
  merge
sql/sql_acl.cc:
  merge
sql/sql_base.cc:
  merge
sql/sql_cache.cc:
  auto merge
sql/sql_class.cc:
  merge
sql/sql_class.h:
  merge
sql/sql_delete.cc:
  merge
sql/sql_handler.cc:
  Get new HANDLER code into 4.1
sql/sql_parse.cc:
  Keep old file
sql/sql_repl.cc:
  merge
sql/sql_repl.h:
  merge
sql/sql_show.cc:
  merge
sql/sql_table.cc:
  merge
sql/sql_union.cc:
  Applied the examine_rows bug fix from 4.0 by hand
sql/sql_update.cc:
  New multi-update-grant-check code from 4.0
sql/sql_yacc.yy:
  New multi-update-grant-check code from 4.0
sql/stacktrace.c:
  merge
sql/table.h:
  merge
2004-10-06 19:14:33 +03:00
unknown
7ce31065c6 Merge mysql.com:/home/mydev/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0-bug4286


sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
2004-10-05 11:33:13 +02:00
unknown
48bf825902 A couple of typos fixed.
sql/item.cc:
  A typo fixed in a comment, which is probably not valid any more
sql/sql_class.h:
  no such class Ttem_subselect.
2004-10-04 14:14:30 +04:00
unknown
697cb7b106 BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Reworked the HANDLER functions and interface.
Using a HASH to store information on open tables that
survives FLUSH TABLE.
HANDLER tables alias names must now be unique, though it
is allowed in 4.0 to qualify them with the database name
of the base table.


mysql-test/r/flush_table.result:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Moved pure handler test results to handler.result.
  Added the new test results.
mysql-test/r/handler.result:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Moved pure handler test results from flush_table.result to here.
mysql-test/t/flush_table.test:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Moved pure handler tests to handler.test.
  Added new tests.
mysql-test/t/handler.test:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Moved pure handler tests from flush_table.test to here.
sql/mysql_priv.h:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Reworked the handler interface.
sql/sql_base.cc:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Replaced mysql_ha_close_list() by the better named
  function mysql_ha_flush() with readable options.
sql/sql_class.cc:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Added initialization for the handler tables hash.
  Changed the handler tables clean-up code.
  Unreleted to bug: Changed the order of THD initialization
  to avoid warning messages on Linux with gcc.
sql/sql_class.h:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Added the handler tables HASH to THD.
sql/sql_handler.cc:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Completely reworked the handler functions.
  Added an introducing comment, describing the new functionality.
sql/sql_table.cc:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  replaced mysql_ha_close() by the better named
  function mysql_ha_flush() with readable options.
2004-09-24 18:39:25 +02:00
unknown
412a052a7d Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-memroot


sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2004-09-23 13:52:00 +04:00
unknown
7ba5d931eb Implementation of Monty's idea about clear_alloc_root() optimization and cleanup of work
with memory roots in THD/Statement/Item_arena.
Added assertions preventing memory allocation on bzero'ed MEM_ROOT since it is worked by 
pure luck and was very ineffective.


include/my_sys.h:
  Reimplementation of Monty's optimization of clear_alloc_root().
  Now clear_alloc_root() can be used only for detaching memory associated with MEM_ROOT
  (e.g. to avoid its freeing). It can not be used for MEM_ROOT initialization any longer 
  (it was bad idea anyway since memory allocation on such MEM_ROOT was very ineffective 
  and worked by pure luck).
  Introduced ALLOC_ROOT_MIN_BLOCK_SIZE constant.
mysys/my_alloc.c:
  Added description of init_alloc_root().
  Added assertions to alloc_root() and reset_root_defaults() so now they can only be used
  on previosly initialized MEM_ROOT. (It worked for bzeroed MEM_ROOT before but 
  by pure luck and very inefficiently). Calling free_root() on bzero'ed MEM_ROOT
  is still ok (we can't remove this easily because of static MEM_ROOTs).
  Also now using ALLOC_ROOT_MIN_BLOCK_SIZE constant inside these functions.
sql/opt_range.cc:
  Fixed get_quick_select_for_ref() function to not use bzero'ed MEM_ROOT for allocation.
  Also QUICK_RANGEs created in this function should be created in memory root of QUICK_SELECT.
sql/sql_class.cc:
  Implementation of Monty's idea about clear_alloc_root() optimization and cleanup of work 
  with memory roots in THD/Statement/Item_arena.
  Now we are always initing THD::transaction.mem_root and THD::mem_root in THD constructor 
  (without memory allocation and with minimal block size) and then later change their
  parameters in THD::init_for_queries() (this is partially because we can't allocate anything
  on bzero'ed memory roots anymore).
  Item_arena() constructor is now trivial and is used only then Item_arena is created as backup
  storage for other Item_arena (we use Item_arena(bool) now if it is part of Statement).
  Both trivial Item_arena constructor and destructor are now inline.
  Removed unneeded clear_alloc_root from Item_arena::restore_backup_item_arena().
sql/sql_class.h:
  Both trivial Item_arena constructor and destructor are now inline.
  Commented various Item_arena constructors.
2004-09-23 13:48:17 +04:00
unknown
ccf52b4fd5 A fix and test case for Bug#5315 "mysql_change_user() doesn't free
prepared statements."


include/hash.h:
  New declaration for hash_reset() function. The old version was not used.
libmysql/client_settings.h:
  Declaration for mysql_detach_stmt_list().
libmysql/libmysql.c:
  Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
  add call to mysql_detach_stmt_list(prepared statements) to
  mysql_change_user(): all statements are freed by server, so client
  counterparts need to be marked as not usable.
mysys/hash.c:
  Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
  implementation of hash_reset(), which frees all hash elements
  and prepares the hash for reuse.
sql-common/client.c:
  Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
  implementation of mysql_detach_stmt_list(): zero connection pointer
  in given statement list, thus marking given statements as not usable.
sql/sql_class.cc:
  Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
  reset prepared statements map in THD::change_user().
sql/sql_class.h:
  Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
  implementation of Statement_map::reset().
  A little cleanup of ~Statement_map(): first empty names_hash, as st_hash
  has a free function, which will delete statements.
tests/client_test.c:
  A test case for bug #5315 "mysql_change_user() doesn't free prepared
  statements".
2004-09-22 15:50:07 +04:00
unknown
2e43e47040 moved all ndb thread specific data into new placeholder
new methods to keep "records" up to date
unset flag HA_NOT_EXACT_COUNT to make handler read "records" field, for count() optim and join optimization
new methods to keep "records" up to datecorrect record field in ndbcluster handler
new method for ndbcluster handler to store/retrieve table and thread specific data
changed local hash to store new table_info object, with placeholders for local data, instead of TableImpl
hanged deleteKey to return ponter to deleted object
moved heavy global cache fetch from inline to separate method


mysql-test/r/ndb_alter_table.result:
  correct record field in ndbcluster handler
mysql-test/r/ndb_blob.result:
  correct record field in ndbcluster handler
ndb/include/ndbapi/NdbDictionary.hpp:
  new method for ndbcluster handler to store/retrieve table and thread specific data
ndb/src/ndbapi/DictCache.cpp:
  changed local hash to store new table_info object, with placeholders for local data, instead of TableImpl
ndb/src/ndbapi/DictCache.hpp:
  changed local hash to store new table_info object, with placeholders for local data, instead of TableImpl
ndb/src/ndbapi/Ndb.cpp:
  replaced method DictionaryImpl::getTable with DictionaryImpl::get_local_table_info
ndb/src/ndbapi/NdbDictionary.cpp:
  new method for ndbcluster handler to store/retrieve table and thread specific data
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  changed local hash to store new table_info object, with placeholders for local data, instead of TableImpl
  moved heavy global cache fetch from inline to separate method
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  replaced method DictionaryImpl::getTable with DictionaryImpl::get_local_table_info
ndb/src/ndbapi/NdbLinHash.hpp:
  changed deleteKey to return ponter to deleted object
sql/ha_ndbcluster.cc:
  moved all ndb thread specific data into new placeholder
  new methods to keep "records" up to date
  unset flag HA_NOT_EXACT_COUNT to make handler read "records" field, for count() optim and join optimization
sql/ha_ndbcluster.h:
  new methods to keep "records" up to date
sql/sql_class.h:
  moved all ndb thread specific data into new placeholder
2004-09-14 08:52:21 +00:00
unknown
9106686846 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into build.mysql.com:/users/tulin/mysql-4.1-ndb-merge


sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
2004-09-09 10:41:33 +02:00
unknown
77a8615488 merged
BitKeeper/etc/ignore:
  auto-union
client/mysqlcheck.c:
  Auto merged
myisammrg/myrg_open.c:
  Auto merged
scripts/mysqld_safe.sh:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
2004-09-07 15:18:53 +02:00
unknown
ea971987fc Replacing class Disable_binlog by macros. Patch already approved by Monty.
sql/log.cc:
  removing unneeded class Disable_binlog
sql/sql_class.h:
  removing unneeded class Disable_binlog
sql/sql_table.cc:
  As discussed, class Disable_binlog is removed and replaced by macros.
2004-09-06 22:47:26 +02:00
unknown
e8c2e41841 renamed ha_recovery_logging to ha_enable_transaction
added tests to alter table for "large" alter tables and truncates in ndbcluster
added debug printout in restart() in ndbcluster
added flag THD::transaction.on to enable/disable transaction


mysql-test/r/ndb_alter_table.result:
  added tests to alter table for "large" alter tables and truncates
mysql-test/t/ndb_alter_table.test:
  added tests to alter table for "large" alter tables and truncates
ndb/src/ndbapi/NdbConnection.cpp:
  added debug printout in restart()
sql/ha_ndbcluster.cc:
  added support for large alter table and truncate
sql/handler.cc:
  renamed ha_recovery_logging to ha_enable_transaction
sql/handler.h:
  renamed ha_recovery_logging to ha_enable_transaction
sql/sql_class.cc:
  added flag THD::transaction.on to enable/disable transaction
sql/sql_class.h:
  added flag THD::transaction.on to enable/disable transaction
sql/sql_delete.cc:
  added disable transaction for mysql_truncate
sql/sql_table.cc:
  renamed ha_recovery_logging to ha_enable_transaction
2004-09-03 15:11:09 +00:00
unknown
c62dd0d409 Change Item_arena::state to enum 2004-08-31 14:07:02 +04:00
unknown
205cf8044b Merge: manual resolve
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_class.cc:
  Manual resolve of the merge
2004-08-24 23:07:08 +04:00
unknown
49bd559eb8 Fix for Bug#5034 "prepared "select 1 into @arg15", second
execute crashes server": we were deleting lex->result
after each execute, but prepared statements assumed that
it's left intact.
The fix adds cleanup() method to select_result hierarchy,
so that result objects can be reused.
Plus we now need to delete result objects more wisely.


mysql-test/r/ps.result:
  Test results fixed: test case for bug#5034
mysql-test/t/ps.test:
  A test case for bug#5034, few followups
sql/sql_class.cc:
  - fix warning in THD::THD
  - implementation of cleanup() for select_result hierarchy
  - select_export::send_eof was identical to 
    select_dump::send_eof: moved to the base class select_to_file.
  - Statement::end_statement() to end lex, free items, and
    delete possible select_result
sql/sql_class.h:
  - select_result::cleanup() declaration
  -
sql/sql_insert.cc:
  - implementation of select_insert::cleanup(): currently
    we always create a new instance of select_insert/
    select_create on each execute.
sql/sql_lex.cc:
  - with more complicated logic of freeing lex->result it's 
    easier to have it non-zero only if it points to a valid
    result.
sql/sql_lex.h:
  Now st_lex::st_lex is not empty.
sql/sql_parse.cc:
  mysql_execute_command():
  - delete select_result *result only if it was created in
    this function.
  - use end_statement() to cleanup lex and thd in the end of
    each statement.
  - no need to save THD::lock if this is explain. This save
    apparently left from times when derived tables were 
    materialized here, not in open_and_lock_tables.
sql/sql_prepare.cc:
  - call result->cleanup() in reset_stmt_for_execute
  - now Statement is responsible for freeing its lex->result.
sql/sql_select.cc:
  handle_select():
  - don't delete result, it might be needed
    for next executions
  - result is never null
2004-08-24 20:17:11 +04:00
unknown
d261072f7c Fix to compile with msvc: converted static const int Item_arena::* to enum members, undefine ERROR
include/config-win.h:
  Undefine ERROR #defined by WINGDI
sql/sql_class.cc:
  Fix to compile with msvc: converted static const int Item_arena::* to enum members
sql/sql_class.h:
  Fix to compile with msvc: converted static const int Item_arena::* to enum members
sql/sql_prepare.cc:
  Fix to compile with msvc: converted static const int Item_arena::* to enum members
2004-08-24 14:44:15 +04:00
unknown
282ec5bd28 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/work/mysql-4.1-4912


sql/item_cmpfunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2004-08-21 02:08:20 +04:00
unknown
095b686c09 Fix for bug#4912 "mysqld crashs in case a statement is executed
a second time". The bug was caused by incompatibility of
negations elimination algorithm and PS: during first statement 
execute a subtree with negation was replaced with equivalent 
subtree without NOTs.
The problem was that although this transformation was permanent, 
items of the new subtree were created in execute-local memory.
The patch adds means to check if it is the first execute of a
prepared statement, and if this is the case, to allocate items
in memory of the prepared statement.
The implementation:
- backports Item_arena from 5.0
- adds Item_arena::is_stmt_prepare(), 
  Item_arena::is_first_stmt_execute().
- deletes THD::allocate_temporary_pool_for_ps_preparing(),
  THD::free_temporary_pool_for_ps_preparing(); they
  were redundant.
and adds a few invariants:
- thd->free_list never contains junk (= freed items)
- thd->current_arena is never null. If there is no
  prepared statement, it points at the thd. 
The rest of the patch contains mainly mechanical changes and
cleanups.


mysql-test/r/ps.result:
  Test results updated (test case for Bug#4912)
mysql-test/t/ps.test:
  A test case for Bug#4912 "mysqld crashs in case a statement is 
  executed a second time"
sql/item_cmpfunc.cc:
  current_statement -> current_arena
sql/item_subselect.cc:
  Statement -> Item_arena, current_statement -> current_arena
sql/item_subselect.h:
  Item_subselect does not need to save thd->current_statement.
sql/item_sum.cc:
  Statement -> Item_arena
sql/item_sum.h:
  Statement -> Item_arena
sql/mysql_priv.h:
  Statement -> Item_arena
sql/sql_base.cc:
  current_statement -> current_arena
sql/sql_class.cc:
  - Item_arena
  - convenient set_n_backup_statement, restore_backup_statement
  (nice idea, Sanja)
sql/sql_class.h:
  - Item_arena: backport from 5.0
  - allocate_temporary_pool_for_ps_preparing,
    free_temporary_pool_for_ps_preparing removed.
sql/sql_derived.cc:
  current_statement -> current_arena
sql/sql_lex.cc:
  current_statement -> current_arena
sql/sql_parse.cc:
  Deploy invariant that thd->free_list never contains junk items
  (backport from 5.0).
sql/sql_prepare.cc:
  - backporting Item_arena
  - no need to allocate_temporary_pool_for_ps_preparing().
sql/sql_select.cc:
  Fix for bug#4912 "mysqld crashs in case a statement is 
  executed a second time": if this is the first execute of
  a prepared statement, negation elimination is
  done in memory of the prepared statement.
sql/sql_union.cc:
  Backporting Item_arena from 5.0.
2004-08-21 02:02:46 +04:00
unknown
adf4e7a822 merged
sql/lock.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
2004-08-20 21:56:29 +02:00
unknown
cd8054d431 Making FLUSH TABLES WITH READ LOCK block COMMITs of existing transactions,
in a deadlock-free manner. This splits locking the global read lock in two steps.
This fixes a consequence of this bug, known as:
BUG#4953 'mysqldump --master-data may report incorrect binlog position if using InnoDB'
And a test.


sql/handler.cc:
  making COMMIT wait if FLUSH TABLES WITH READ LOCK happened.
sql/lock.cc:
  an additional stage so that FLUSH TABLES WITH READ LOCK blocks COMMIT:
  make_global_read_lock_block_commit():
  taking the global read lock is TWO steps (2nd step is optional; without
  it, COMMIT of existing transactions will be allowed):
  lock_global_read_lock() THEN make_global_read_lock_block_commit().
sql/mysql_priv.h:
  new argument to wait_if_global_read_lock()
sql/sql_class.h:
  THD::global_read_lock now an uint to reflect the 2 steps of global read lock (does not block COMMIT / does)
sql/sql_db.cc:
  update for new prototype
sql/sql_parse.cc:
  implementing the two steps of global read lock so that FLUSH TABLES WITH READ LOCK can block COMMIT without deadlocking with COMMITs.
2004-08-20 16:35:23 +02:00
unknown
83e6ea37be merged 2004-08-20 01:38:20 +02:00
unknown
04c3915343 merged
BitKeeper/etc/ignore:
  auto-union
include/my_global.h:
  Auto merged
mysys/mf_tempfile.c:
  Auto merged
mysql-test/r/rpl_heap.result:
  Auto merged
mysql-test/t/rpl_heap.test:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
2004-08-20 00:52:43 +02:00
unknown
560d8ea342 sql_class.h:
removing unneeded var left from 4.0


sql/sql_class.h:
  removing unneeded var left from 4.0
2004-08-20 00:01:00 +02:00
unknown
e7157aba3a (manual port from 4.0 - was needed)
Fix for BUG#4971 "CREATE TABLE ... TYPE=HEAP SELECT ... stops slave (wrong DELETE in binlog)":
replacing the no_log argument of mysql_create_table() by some safer method
(temporarily setting OPTION_BIN_LOG to 0) which guarantees that even the automatic
DELETE FROM heap_table does not get into the binlog when a not-yet-existing HEAP table
is opened by mysql_create_table().


mysql-test/r/rpl_heap.result:
  result update
mysql-test/t/rpl_heap.test:
  changing test to test a bug (but anyway, mysql-test-run --manager looks like not working in 4.1 currently,
  so this test is never run).
sql/log.cc:
  new class Disable_binlog used to temporarily disable binlogging for one thread.
sql/mysql_priv.h:
  removing argument no_log from mysql_create_table(); no_log was not perfect as some
  binlogging could still be done by open_unireg_entry() for a HEAP table.
sql/sql_class.h:
  new class Disable_binlog used to temporarily disable binlogging for one thread.
sql/sql_parse.cc:
  removing no_log arg from mysql_create_table()
sql/sql_table.cc:
  removing no_log from mysql_create_table(); instead using new class Disable_binlog.
  Disabling binlogging in some cases, where the binlogging is done later by some other code
  (case of CREATE SELECT and ALTER).
2004-08-19 23:24:35 +02:00
unknown
f758ada4bc cosmetic change
sql/sql_class.h:
  comment
sql/sql_table.cc:
  smarter use of the Disable_binlog object (using a block so that when leaving it either way, the object gets
  destroyed and so properties of the thread get reset).
2004-08-19 10:01:01 +02:00
unknown
95334ac6c7 Fix for BUG#4971 "CREATE TABLE ... TYPE=HEAP SELECT ... stops slave (wrong DELETE in binlog)":
replacing the no_log argument of mysql_create_table() by some safer method
(temporarily setting OPTION_BIN_LOG to 0) which guarantees that even the automatic
DELETE FROM heap_table does not get into the binlog when a not-yet-existing HEAP table
is opened by mysql_create_table().


mysql-test/r/rpl_heap.result:
  result update
mysql-test/t/rpl_heap.test:
  testing a bug
sql/log.cc:
  new class Disable_binlog used to temporarily disable binlogging for one thread.
sql/mysql_priv.h:
  removing argument no_log from mysql_create_table(); no_log was perfect as some
  binlogging could still be done by open_unireg_entry() for a HEAP table.
sql/sql_class.h:
  new class Disable_binlog used to temporarily disable binlogging for one thread.
sql/sql_parse.cc:
  removing no_log
sql/sql_table.cc:
  removing no_log from mysql_create_table(); instead using new class Disable_binlog.
  Disabling binlogging in some cases, where the binlogging is done later by some other code
  (case of CREATE SELECT and ALTER).
2004-08-19 00:29:11 +02:00
unknown
945625ebaa manually merged
BitKeeper/etc/logging_ok:
  auto-union
BitKeeper/deleted/.del-mytest-old.c~5237697b30cf59e4:
  Auto merged
Build-tools/Bootstrap:
  Auto merged
Build-tools/mysql-copyright:
  Auto merged
configure.in:
  Auto merged
BitKeeper/deleted/.del-mysql_fix_privilege_tables.sql:
  Auto merged
VC++Files/innobase/innobase.dsp:
  Auto merged
client/mysql.cc:
  Auto merged
include/my_global.h:
  Auto merged
innobase/dict/dict0crea.c:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
innobase/include/mtr0log.h:
  Auto merged
innobase/include/mtr0log.ic:
  Auto merged
innobase/include/srv0srv.h:
  Auto merged
innobase/include/ut0dbg.h:
  Auto merged
innobase/lock/lock0lock.c:
  Auto merged
innobase/os/os0file.c:
  Auto merged
innobase/row/row0mysql.c:
  Auto merged
innobase/row/row0sel.c:
  Auto merged
innobase/srv/srv0srv.c:
  Auto merged
innobase/ut/ut0dbg.c:
  Auto merged
innobase/ut/ut0mem.c:
  Auto merged
libmysql/Makefile.am:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
libmysql/conf_to_src.c:
  Auto merged
libmysql/dll.c:
  Auto merged
libmysql/errmsg.c:
  Auto merged
libmysql/manager.c:
  Auto merged
libmysql_r/Makefile.am:
  Auto merged
myisam/mi_key.c:
  Auto merged
mysql-test/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/having.result:
  Auto merged
mysql-test/r/heap.result:
  Auto merged
mysql-test/r/type_date.result:
  Auto merged
mysql-test/r/type_float.result:
  Auto merged
mysql-test/t/having.test:
  Auto merged
mysql-test/t/heap.test:
  Auto merged
mysql-test/t/type_date.test:
  Auto merged
mysql-test/t/type_float.test:
  Auto merged
mysql-test/t/type_uint.test:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/share/czech/errmsg.txt:
  Auto merged
sql/share/danish/errmsg.txt:
  Auto merged
sql/share/dutch/errmsg.txt:
  Auto merged
sql/share/english/errmsg.txt:
  Auto merged
sql/share/estonian/errmsg.txt:
  Auto merged
sql/share/french/errmsg.txt:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/share/greek/errmsg.txt:
  Auto merged
sql/share/hungarian/errmsg.txt:
  Auto merged
sql/share/japanese/errmsg.txt:
  Auto merged
sql/share/korean/errmsg.txt:
  Auto merged
sql/share/norwegian-ny/errmsg.txt:
  Auto merged
sql/share/norwegian/errmsg.txt:
  Auto merged
sql/share/polish/errmsg.txt:
  Auto merged
sql/share/portuguese/errmsg.txt:
  Auto merged
sql/share/romanian/errmsg.txt:
  Auto merged
sql/share/russian/errmsg.txt:
  Auto merged
sql/share/slovak/errmsg.txt:
  Auto merged
sql/share/spanish/errmsg.txt:
  Auto merged
sql/share/swedish/errmsg.txt:
  Auto merged
sql/share/ukrainian/errmsg.txt:
  Auto merged
2004-08-18 19:57:55 +02:00
unknown
00e7ec4279 Fix for:
Bug #4810 "deadlock with KILL when the victim was in a wait state"
(I included mutex unlock into exit_cond() for future safety)
and BUG#4827 "KILL while START SLAVE may lead to replication slave crash"


sql/lock.cc:
  we did exit_cond() before unlock(LOCK_open), which led to deadlocks with THD::awake(). Fixing this.
sql/log.cc:
  mutex unlock is now included in exit_cond()
sql/repl_failsafe.cc:
  we did exit_cond() before unlock(LOCK_rpl_status), which led to deadlocks with THD::awake(). Fixing this.
sql/slave.cc:
  we did exit_cond() before unlock(cond_lock), which led to deadlocks with THD::awake(). Fixing this.
  Fixing also that if killed while waiting for slave thread to start, we don't release the mutex
  (that caused a double release of the mutex => crash).
sql/sql_class.h:
  comments about exit_cond()/enter_cond().
  Mutex unlock is now included in exit_cond() so that it's always done in the good order.
sql/sql_table.cc:
  unlock is now included in exit_cond().
2004-07-31 22:33:20 +02:00
unknown
6ce5da27a7 removing assertion (will be moved to 4.1) for non-debug to compile
sql/sql_class.h:
  removing the assertion as I don't want to include assert.h (inclusion of assert.h has already been
  reworked in 4.1, so I'll move the assertion to 4.1). Assertion makes compilation fail if non-debug.
2004-07-31 09:49:32 +02:00
unknown
d475643da8 Avoiding a theoretically possible crash (pthread_mutex_lock(0)) which could (at least in POSIX Threads books)
happen on SMP machines, when a thread is going to wait on a condition and it is KILLed at the
same time.
Cleaning code a bit by adding a test in enter_cond() that we have the mutex (was already the case in all places
where it's called except one which is fixed here).


sql/log.cc:
  safe_mutex_assert_owner() is now in THD::enter_cond()
sql/slave.cc:
  lock mutex before waiting on condition.
sql/sql_class.cc:
  THD::awake(): before locking the mutex, let's test it's not zero;
  in theory indeed, the killer thread may see current_cond non-zero and current_mutex zero
  (order of assignments is not guaranteed by POSIX).
  A comment noting that there is still a small chance a KILL does not work and needs
  being re-issued.
sql/sql_class.h:
  Assert in enter_cond() that we have the mutex.
  It is already the case in all places where we call enter_cond(), so better ensure it there.
2004-07-30 00:53:25 +02:00
unknown
86e4a750e0 Merge gbichot@213.136.52.20:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1-1717


client/mysqltest.c:
  Auto merged
innobase/trx/trx0sys.c:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2004-06-23 23:52:49 +02:00
unknown
8efd5089c0 Fix for bug#4236 "Server crash on attempt to execute non-prepared
statement": check that statement is not null when accessing it's name.


tests/client_test.c:
  A test case for bug#4236
2004-06-22 11:04:41 +04:00
unknown
3220a94519 Robustness feature.
Won't be pushed as is - separate email sent for internal review.
WL#1717 "binlog-innodb consistency".
Now when mysqld starts, if InnoDB does a crash recovery, we use the binlog name
and position retrieved from InnoDB (corresponding to the last transaction
successfully committed by InnoDB) to cut any rolled back transaction from
the binary log. This is triggered by the --innodb-safe-binlog option.
Provided you configure mysqld to fsync() InnoDB at every commit (using
flush_log_at_trx_commit) and to fsync() the binlog at every write
(using --sync-binlog=1), this behaviour guarantees that a master always has
consistency between binlog and InnoDB, whenever the crash happens.
6 tests to verify that it works.


client/mysqltest.c:
  New command require_os (only "unix" accepted for now).
innobase/include/trx0sys.h:
  when InnoDB does crash recovery, we now save the binlog coords it prints, into variables for later use.
innobase/trx/trx0sys.c:
  when InnoDB does crash recovery, we now save the binlog coords it prints, into variables for later use.
mysql-test/mysql-test-run.sh:
  The tests which check that the binlog is cut at restart, need to not delete those binlogs, of course.
  And not delete replication info, so that we can test that the slave does not receive anything
  wrong from the cut binlog.
sql/ha_innodb.cc:
  methods to read from InnoDB the binlog coords stored into it
sql/ha_innodb.h:
  ethods to read from InnoDB the binlog coords stored into it
sql/log.cc:
  Added my_sync() when we create a binlog (my_sync of the binlog and of the index file);
  this is always done, whether --sync-binlog or not (binlog creation is rare, so no speed
  problem, and I like to have the existence of the binlog always reliably recorded, even if
  later content is not).
  If --crash-binlog-innodb, crash between the binlog write and the InnoDB commit.
  New methods:
  - report_pos_in_innodb() to store the binlog name and position into InnoDB (used only when
  we create a new binlog: at startup and at FLUSH LOGS)
  - cut_spurious_tail() to possibly cut the tail of a binlog based on the info we read
  from InnoDB (does something only if InnoDB has just done a crash recovery).
sql/mysql_priv.h:
  new option, to crash (use for testing only)
sql/mysqld.cc:
  New option --innodb-safe-binlog and --crash-binlog-innodb (the latter is for testing, it makes mysqld crash).
  Just after opening the logs and opening the storage engines, cut any wrong statement from the binlog, based
  on info read from InnoDB.
sql/sql_class.h:
  new methods for MYSQL_LOG.
2004-06-20 19:11:02 +02:00
unknown
6aaccbcbf7 WL#1264 "Per-thread time zone support infrastructure".
Added basic per-thread time zone functionality (based on public
domain elsie-code). Now user can select current time zone
(from the list of time zones described in system tables).
All NOW-like functions honor this time zone, values of TIMESTAMP
type are interpreted as values in this time zone, so now
our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH
LOCAL TIME ZONE (or proper PostgresSQL type).
  
WL#1266 "CONVERT_TZ() - basic time with time zone conversion 
function".
  
Fixed problems described in Bug #2336 (Different number of warnings 
when inserting bad datetime as string or as number). This required
reworking of datetime realted warning hadling (they now generated 
at Field object level not in conversion functions).
  
Optimization: Now Field class descendants use table->in_use member
instead of current_thd macro.


include/my_global.h:
  Added macro for reading of 32-bit ints stored in network order from
  unaligned memory location.
include/mysqld_error.h:
  Added error-code for invalid timestamp warning and error-code
  for wrong or unknown time zone specification.
libmysqld/Makefile.am:
  Added main per-thread time zone support file to libmysqld
libmysqld/lib_sql.cc:
  Added initialization of time zones infrastructure to embedded server.
mysql-test/r/connect.result:
  Updated test result since now mysql database contains more
  system tables.
mysql-test/r/date_formats.result:
  Now when truncation occurs during conversion to datetime value we are producing Warnings 
  instead of Notes. Also we are giving more clear warnings about this in some cases.
mysql-test/r/func_sapdb.result:
  New warnings about truncation occured during conversion to datetime value added due
  their better handling.
mysql-test/r/func_time.result:
  New warnings about truncation occured during conversion to datetime value added due
  their better handling.
mysql-test/r/select.result:
  New warnings about truncation occured during conversion to datetime value added due
  their better handling. Also tweaked test a bit to made it less ambigious for reader.
mysql-test/r/system_mysql_db.result:
  Updated test result because new system tables holding time zone descriptions were 
  added.
mysql-test/r/timezone.result:
  Updated timezone.test to use new system variable which shows system time zone.
  Added test of warning which is produced if someone tries to store non-existing (due 
  falling into spring time-gap) datetime value into TIMESTAMP field.
mysql-test/r/type_datetime.result:
  Separated and extended test of values and warnings produced for bad values stored in 
  DATETTIME fields.
mysql-test/r/type_time.result:
  Now we are producing more consistent warning when we are truncating datetime value while
  storing it in TIME field.
mysql-test/r/type_timestamp.result:
  Separated and extended test of values and warnings produced for bad
  values stored in TIMESTAMP fields.
mysql-test/t/select.test:
  Updated test to make it less ambigous for reader.
mysql-test/t/timezone.test:
  Updated timezone.test to use new system variable which shows system time zone.
  Added test of warning which is produced if someone tries to store non-existing (due 
  falling into spring time-gap) datetime value into TIMESTAMP field.
mysql-test/t/type_datetime.test:
  Separated and extended test of values and warnings produced for bad
  values stored in DATETTIME fields.
mysql-test/t/type_timestamp.test:
  Separated and extended test of values and warnings produced for bad
  values stored in TIMESTAMP fields.
scripts/mysql_create_system_tables.sh:
  Added creation of tables with time zone descriptions.
  Also added descriptions of time zones used in tests.
scripts/mysql_fix_privilege_tables.sql:
  Added mysql.time_zone* tables family.
sql/Makefile.am:
  Added files implementing time zone support to server, also added
  rules for building of mysql_tzinfo_to_sql converter and test_time
  test.
sql/field.cc:
  Now we are using per-thread time zone for TIMESTAMP <-> whatever conversion.
  Fixed generation of warnings for datetime types (DATETIME/TIMESTAMP/DATE/...) and
  any other Field to datetime conversion (now we are generating warnings no in lower
  level functions like in str_to_TIME() but in Field methods. This allows generate
  better and more consistent warnings and to reuse code of str_to_TIME() outside of
  server).
  
  Added 3rd parameter to set_warning() method to be able to not increment cut fields
  but still produce a warning. Also added set_datetime_warning() family of auxiliary 
  methods which allow easier generate datetime related warnings.
  Also replaced occurences of current_thd with table->in_use member, added
  asserts for catching all places there we need to set table->in_use
  accordingly. Renamed fix_datetime() function to number_to_TIME() and
  moved it to sql/time.cc there it fits better.
sql/field.h:
  Added comment about places where we can use table->in_use member
  instead of current_thd.
  Added 3rd parameter to Field::set_warning() method and set_datetime_warning()
  family of methods.
sql/field_conv.cc:
  Field::set_warning() method with 2 arguments was replaced with more 
  generic set_warning() method with 3 arguments.
sql/ha_berkeley.cc:
  Now we set table->in_use for temporary tables so we have to use
  table->tmp_table for checking if table is temporary.
sql/item.cc:
  Replaced calls to str_to_time() and str_to_TIME() funcs with their warning
  generating analogs.
sql/item_create.cc:
  Added creation of CONVERT_TZ function as FUNC_ARG3.
sql/item_create.h:
  Added creation of CONVERT_TZ function as FUNC_ARG3.
sql/item_timefunc.cc:
  Added support of per-thread time zone to NOW-like and FROM_UNIXTIME,
  UNIX_TIMESTAMP functions. 
  Added support for CONVERT_TZ function.
  Removed call to str_to_timestamp function which caused non-optimal
  behavior in certain cases. Replaced calls to str_to_time() function 
  with its warning generating analog.
sql/item_timefunc.h:
  Added support of per-thread time zone to NOW-like and
  FROM_UNIXTIME, UNIX_TIMESTAMP functions.
  Added support of CONVERT_TZ function.
sql/lex.h:
  Added support of CONVERT_TZ function.
sql/log.cc:
  Added support for replication of statements depending on time zone.
sql/mysql_priv.h:
  Now including headers with per-thread time zone support functions
  and classes. Added portable replacement of time_t - my_time_t type. 
  Added time zone as one of query distinguishing parameters for
  query cache. 
  Fixed declarations of str_to_TIME, str_to_time and 
  my_system_gmt_sec (former my_gmt_sec) since now they have one more
  out parameter which informs about wrong datetime value or data 
  truncation during conversion.
  Added warning generating version of str_to_TIME() and str_to_time()
  functions.
  Thrown away str_to_datetime/timestamp functions since they are not
  needed any longer. Added number_to_TIME function.
sql/mysqld.cc:
  Added per-thread time zone support initialization.
  Added new startup parameter --default-time-zone.
sql/set_var.cc:
  Added support for per-thread time_zone variable.
  Renamed old timezone variable to system_time_zone.
sql/set_var.h:
  Added support for per-thread time_zone variable.
sql/share/czech/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/danish/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/dutch/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/english/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/estonian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/french/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/german/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/greek/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/hungarian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/italian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/japanese/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/korean/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/norwegian-ny/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/norwegian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/polish/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/portuguese/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/romanian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/russian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/serbian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/slovak/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/spanish/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/swedish/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/ukrainian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/slave.cc:
  In order to support replication of statements using time zones in 4.1 we should 
  ensure that both master and slave have same default time zone.
sql/sql_base.cc:
  Now we are setting TABLE::in_use member for all tables (which assume
  calls to Field::store or val_ methods).
sql/sql_cache.cc:
  Added time zone as one more query distinguishing parameter
  for query cache.
sql/sql_class.cc:
  Added THD::time_zone_used variable indicating that this query
  uses per thread time zone.
sql/sql_class.h:
  Added per-thread time zone variable. Added THD::time_zone_used
  variable indicating that this query uses per thread time zone
  so if this is updating query the time zone should be logged to 
  binlog.
sql/sql_insert.cc:
  We should set TABLE::in_use member pointing to thread which is called
  INSERT DELAYED and not to worker thread.
sql/sql_load.cc:
  Field::set_warning() now has one more argument now.
sql/sql_parse.cc:
  Resetting THD::time_zone_used variable in the end of query
  processing.
sql/sql_select.cc:
  Now we are setting TABLE::in_use member for all tables (which assume
  calls to Field::store or val_ methods).
sql/sql_show.cc:
  Now using per thread time zone for extended show tables.
sql/time.cc:
  Added support for per-thread time zones for TIMESTAMP type and
  reworked generation of warnings for TIMESTAMP and DATETIME types.
  (Introduced new TIME_to_timestamp() function. Removed hours 
  normalisation from former my_gmt_sec() since it was not working 
  and not used anywhere now, but breaks parameter constness, added
  to this function generation of warning if we are falling in spring 
  time-gap. Removed str_to_timestamp and str_to_datetime functions 
  which are no longer used. Moved fix_datetime function from
  sql/field.cc to this file as number_to_TIME() function. Added
  out parameter for str_to_TIME and str_to_time functions which
  indicates if value was truncated during conversion, removed direct 
  generation of warnings from this functions.)
sql/unireg.cc:
  Now we are setting TABLE::in_use member for all tables (which assume
    calls to Field::store or val_ methods).
BitKeeper/etc/ignore:
  Added sql/test_time sql/mysql_tzinfo_to_sql libmysqld/tztime.cc to the ignore list
2004-06-18 10:11:31 +04:00
unknown
27ad8e4078 Merged
sql/sql_class.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysys/my_error.c:
  Hand merged
2004-06-07 12:21:26 +04:00
unknown
deb50a10dc Portability fixes (and a typo after last merge)
innobase/os/os0file.c:
  Fixed typo
sql/sql_class.h:
  Portability fix
2004-06-04 11:02:35 +03:00
unknown
e9c4cea9de Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-ps-merge


sql/lex.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2004-06-04 05:37:14 +04:00