- 25 Feb, 2006 1 commit
-
-
unknown authored
and new binlog format called "mixed" (which is statement-based except if only row-based is correct, in this cset it means if UDF or UUID is used; more cases could be added in later 5.1 release): SET GLOBAL|SESSION BINLOG_FORMAT=row|statement|mixed|default; the global default is statement unless cluster is enabled (then it's row) as in 5.1-alpha. It's not possible to use SET on this variable if a session is currently in row-based mode and has open temporary tables (because CREATE TEMPORARY TABLE was not binlogged so temp table is not known on slave), or if NDB is enabled (because NDB does not support such change on-the-fly, though it will later), of if in a stored function (see below). The added tests test the possibility or impossibility to SET, their effects, and the mixed mode, including in prepared statements and in stored procedures and functions. Caveats: a) The mixed mode will not work for stored functions: in mixed mode, a stored function will always be binlogged as one call and in a statement-based way (e.g. INSERT VALUES(myfunc()) or SELECT myfunc()). b) for the same reason, changing the thread's binlog format inside a stored function is refused with an error message. c) the same problems apply to triggers; implementing b) for triggers will be done later (will ask Dmitri). Additionally, as the binlog format is now changeable by each user for his session, I remove the implication which was done at startup, where row-based automatically set log-bin-trust-routine-creators to 1 (not possible anymore as a user can now switch to stmt-based and do nasty things again), and automatically set --innodb-locks-unsafe-for-binlog to 1 (was anyway theoretically incorrect as it disabled phantom protection). Plus fixes for compiler warnings. mysql-test/r/rpl_row_4_bytes.result: update mysql-test/t/rpl_row_4_bytes.test: don't influence next tests sql/ha_archive.cc: please pay attention to this structure when you change it... sql/ha_berkeley.cc: please pay attention to this structure when you change it... sql/ha_blackhole.cc: please pay attention to this structure when you change it... sql/ha_federated.cc: please pay attention to this structure when you change it... sql/ha_heap.cc: please pay attention to this structure when you change it... sql/ha_innodb.cc: please pay attention to this structure when you change it... sql/ha_myisam.cc: please pay attention to this structure when you change it... sql/ha_myisammrg.cc: please pay attention to this structure when you change it... sql/ha_ndbcluster_binlog.cc: no more global 'binlog_row_based' sql/ha_partition.cc: please pay attention to this structure when you change it... sql/handler.cc: please pay attention to this structure when you change it... sql/handler.h: it's good to initialize statically (to get no compiler warning) even if to a null value. sql/item_func.cc: UDFs require row-based if this is the "mixed" binlog format. sql/item_strfunc.cc: UUID() requires row-based binlogging if this is the "mixed" binlog format sql/log.cc: binlog_row_based -> thd->current_stmt_binlog_row_based sql/log.h: the enum enum_binlog_format moves to log.h from mysqld.cc as we need it in several places. sql/log_event.cc: binlog_row_based -> thd->current_stmt_binlog_row_based sql/log_event.h: this global variable not used anymore sql/mysql_priv.h: these global variables not used anymore sql/mysqld.cc: simplification in the handling of --binlog-format (but with no user-visible change), thanks to the new global system variable. RBR does not anymore turn on --log-bin-trust-function-creators and --innodb-locks-unsafe-for-binlog as these are global options and RBR is now settable per session. sql/partition_info.cc: compiler warnings sql/set_var.cc: new class of thread's variable, to handle the binlog_format (like sys_var_thd_enum except that is_readonly() is overriden for more checks before update). compiler warnings (ok'd by Serg) sql/set_var.h: new class for the thread's binlog_format (see set_var.cc) sql/share/errmsg.txt: some messages for when one can't toggle from one binlog format to another sql/sp_head.cc: binlog_row_based -> thd->current_stmt_binlog_row_based sql/sql_base.cc: binlog_row_based -> thd->current_stmt_binlog_row_based sql/sql_class.cc: When a THD is initialized, we set its current_stmt_binlog_row_based sql/sql_class.h: new THD::variables.binlog_format (the value of the session variable set by SET or inherited from the global value), and THD::current_stmt_binlog_row_based which tells if the current statement does row-based or statement-based binlogging. Both members are needed as the 2nd one cannot be derived only from the first one (the statement's type plays a role too), and the 1st one is needed to reset the 2nd one. sql/sql_delete.cc: binlog_row_based -> thd->current_stmt_binlog_row_based sql/sql_insert.cc: binlog_row_based -> thd->current_stmt_binlog_row_based sql/sql_load.cc: binlog_row_based -> thd->current_stmt_binlog_row_based. sql/sql_parse.cc: when we are done with a statement, we reset the current_stmt_binlog_row_based to the value derived from THD::variables.binlog_format. sql/sql_partition.cc: compiler warning sql/sql_show.cc: compiler warning sql/sql_table.cc: binlog_row_based -> thd->current_stmt_binlog_row_based tests/mysql_client_test.c: compiler warning mysql-test/r/ndb_binlog_basic2.result: new result mysql-test/r/rpl_switch_stm_row_mixed.result: new result mysql-test/t/ndb_binlog_basic2.test: new test to verify that if cluster is enabled, can't change binlog format on the fly. mysql-test/t/rpl_switch_stm_row_mixed.test: test to see if one can switch between SBR, RBR, and "mixed" mode, and when one cannot, and test to see if the switching, and the mixed mode, work properly (using UUID() to test, as using UDFs is not possible in the testsuite for portability reasons).
-
- 22 Feb, 2006 18 commits
-
-
unknown authored
into linux.site:/home/reggie/work/mysql-5.1 sql/share/errmsg.txt: Auto merged
-
unknown authored
We changed the error message to more clearly reflect the fact that we are counting parts and subparts mysql-test/r/partition_mgm_err.result: updated error message sql/share/errmsg.txt: updated error message
-
unknown authored
into mysql.com:/home/kostja/mysql/mysql-5.1-merge sql/ha_ndbcluster_binlog.cc: Auto merged
-
unknown authored
sql/ha_ndbcluster_binlog.cc: A post-merge fix. sql/log_event.cc: A post-merge fix.
-
unknown authored
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-new
-
unknown authored
-
unknown authored
into mysql.com:/home/ndbdev/jmiller/clones/mysql-5.1-new
-
unknown authored
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-new
-
unknown authored
-
unknown authored
configure.in: Merge of the cloned tree (for its tag and other fix/es) inclueded the reset of the version number, this must again be undone in the general tree: 5.1.8-beta is the current version!
-
unknown authored
-
unknown authored
into mysql.com:/home/kostja/mysql/mysql-5.1-merge mysql-test/r/sp-error.result: Auto merged mysql-test/r/sp-security.result: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/t/sp-error.test: Auto merged mysql-test/t/sp-security.test: Auto merged mysql-test/t/sp.test: Auto merged sql/mysql_priv.h: Auto merged sql/sp.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_update.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/share/errmsg.txt: Manual merge sql/sql_base.cc: Manual merge.
-
unknown authored
The problem was that error flag was not reset. mysql-test/r/sp-security.result: Results for test case for BUG#7787. mysql-test/t/sp-security.test: A test case for BUG#7787. sql/sp.cc: Reset errors after sp_find_routine().
-
unknown authored
into mysql.com:/home/cps/mysql/trees/5.1/5.1-virgin-no-debug mysql-test/r/subselect.result: Auto merged sql/sql_select.cc: Auto merged
-
unknown authored
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-new sql/ha_ndbcluster.cc: Auto merged storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp: Auto merged
-
unknown authored
Fix insert performance with mmap storage/myisam/mi_dynrec.c: Fix insert performance with mmap storage/myisam/mi_locking.c: Fix insert performance with mmap storage/myisam/myisamdef.h: Fix insert performance with mmap
-
unknown authored
into mysql.com:/home/hf/work/mysql-5.1.clean
-
unknown authored
into mysql.com:/home/hf/work/mysql-5.1.clean
-
- 21 Feb, 2006 21 commits
-
-
unknown authored
libmysqld/Makefile.am: changed name to partition_info.cc mysql-test/r/partition_mgm_err.result: added drop table for previous test mysql-test/t/partition_mgm_err.test: added drop table for previous test sql/Makefile.am: reformatted a bit changed name of partition_info.cpp to partition_info.cc sql/partition_element.h: updated copyright date sql/partition_info.cc: minor corrections as a result of review sql/partition_info.h: updated copyright date sql/sql_partition.cc: updated file comment and fixed some spacing sql/sql_partition.h: updated copyright date win/cmakefiles/sql: changed name to partition_info.cc
-
unknown authored
into mysql.com:/opt/local/work/mysql-5.0-runtime sql/sql_yacc.yy: Auto merged sql/share/errmsg.txt: SCCS merged
-
unknown authored
-
unknown authored
into mysql.com:/home/ndbdev/jmiller/clones/mysql-5.1-new mysql-test/t/disabled.def: SCCS merged
-
unknown authored
This is a re-clone after tagging, so the version must be set back to 5.1.7-beta. configure.in: This is a re-clone after tagging, so the version must be set back to 5.1.7-beta.
-
unknown authored
into linux.site:/home/reggie/work/mysql-5.1-bug15408 sql/ha_ndbcluster.cc: Auto merged sql/ha_partition.cc: Auto merged sql/handler.h: Auto merged sql/opt_range.cc: Auto merged sql/sql_show.cc: Auto merged
-
unknown authored
into mysql.com:/home/cps/mysql/devel/im/5.0-im-fix-race server-tools/instance-manager/instance_map.cc: Auto merged
-
unknown authored
duration of the whole 'flush instances'. As a consequence, it was possible to query instance map, while it is in the inconsistent state. The patch was reworked after review. server-tools/instance-manager/guardian.cc: do not lock instance map in Guardian_thread::init() server-tools/instance-manager/instance_map.cc: Eliminate race condition: lock instance map and guardian for the duration of the whole "FLUSH INSTANCES" execution. server-tools/instance-manager/instance_map.h: add new method. cleanup interface. add comments. server-tools/instance-manager/manager.cc: use instance_map.flush_instances instead of instance_map.load() and guardian_thread.init()
-
unknown authored
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-new sql/ha_ndbcluster.cc: Auto merged sql/ha_ndbcluster.h: Auto merged sql/ha_ndbcluster_binlog.h: Auto merged storage/ndb/include/ndbapi/NdbDictionary.hpp: Auto merged storage/ndb/src/kernel/blocks/backup/Backup.hpp: Auto merged storage/ndb/src/kernel/blocks/suma/Suma.cpp: Auto merged storage/ndb/src/ndbapi/NdbDictionary.cpp: Auto merged storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Auto merged storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp: Auto merged sql/ha_ndbcluster_binlog.cc: Merge
-
unknown authored
into mysql.com:/home/cps/mysql/devel/im/5.0-im-add-error-message
-
unknown authored
connections correctly". Recommit with the max timeout value in sync with the comment. server-tools/instance-manager/options.cc: add new option to set wait timeout server-tools/instance-manager/priv.h: add a const for max wait timeout
-
unknown authored
into april.(none):/home/svoj/devel/mysql/BUG17116/mysql-5.1-new
-
unknown authored
pushing. the code needs to be more stable.
-
unknown authored
mysql-test/t/disabled.def: enable ndb_dd_backuprestore
-
unknown authored
into mysql.com:/space/pekka/ndb/version/my51
-
unknown authored
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new
-
unknown authored
-
unknown authored
into mysql.com:/space/pekka/ndb/version/my51
-
unknown authored
mysql-test/r/events.result: result fixed
-
unknown authored
post-review fixes mysql-test/r/events_bugs.result: fix result sql/event.cc: fix compilation problem on windows sql/event_executor.cc: show the right host in show processlist (should be event_scheduler@localhost) sql/event_timed.cc: a bit more debug infor fix a problem introduced with previous push :( . clean everything that's whitespace. found because of new test cases which were crashing. sql/sql_show.cc: fix compile problem on windows
-
unknown authored
mysql-test/t/disabled.def: leave ndb_dd_backuprestore disabled until *.result corrected storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp: error code was clobbered storage/ndb/tools/restore/consumer_restore.cpp: surprise - ndb_restore creates events
-