- 09 Jul, 2006 1 commit
-
-
unknown authored
1) Fix for BUG#19630 "stored function inserting into two auto_increment breaks statement-based binlog": a stored function inserting into two such tables may fail to replicate (inserting wrong data in the slave's copy of the second table) if the slave's second table had an internal auto_increment counter different from master's. Because the auto_increment value autogenerated by master for the 2nd table does not go into binlog, only the first does, so the slave lacks information. To fix this, if running in mixed binlogging mode, if the stored function or trigger plans to update two different tables both having auto_increment columns, we switch to row-based for the whole function. We don't have a simple solution for statement-based binlogging mode, there the bug remains and will be documented as a known problem. Re-enabling rpl_switch_stm_row_mixed. 2) Fix for BUG#20630 "Mixed binlogging mode does not work with stored functions, triggers, views", which was a documented limitation (in mixed mode, we didn't detect that a stored function's execution needed row-based binlogging (due to some UUID() call for example); same for triggers, same for views (a view created from a SELECT UUID(), and doing INSERT INTO sometable SELECT theview; would not replicate row-based). This is implemented by, after parsing a routine's body, remembering in sp_head that this routine needs row-based binlogging. Then when this routine is used, the caller is marked to require row-based binlogging too. Same for views: when we parse a view and detect that its SELECT needs row-based binary logging, we mark the calling LEX as such. 3) Fix for BUG#20499 "mixed mode with temporary table breaks binlog": a temporary table containing e.g. UUID has its changes not binlogged, so any query updating a permanent table with data from the temporary table will run wrongly on slave. Solution: in mixed mode we don't switch back from row-based to statement-based when there exists temporary tables. 4) Attempt to test mysqlbinlog on a binlog generated by mysqlbinlog; impossible due to BUG#11312 and BUG#20329, but test is in place for when they are fixed. mysql-test/r/rpl_switch_stm_row_mixed.result: testing BUG#19630 "stored function inserting into two auto_increment breaks statement-based binlog", testing BUG#20930 "Mixed binlogging mode does not work with stored functions, triggers, views. testing BUG#20499 "mixed mode with temporary table breaks binlog". I have carefully checked this big result file, it is correct. mysql-test/t/disabled.def: re-enabling test mysql-test/t/rpl_switch_stm_row_mixed.test: Test for BUG#19630 "stored function inserting into two auto_increment breaks statement-based binlog": we test that it goes row-based, but only when needed; without the bugfix, master and slave's data differed. Test for BUG#20499 "mixed mode with temporary table breaks binlog": without the bugfix, slave had 2 rows, not 3. Test for BUG#20930 "Mixed binlogging mode does not work with stored functions, triggers, views". Making strings used more different, for easier tracking of "by which routine was this binlog line generated". Towards the end, an attempt to test mysqlbinlog on a binlog generated by the mixed mode; attempt failed because of BUG#11312 and BUG#20929. sql/item_create.cc: fix for build without row-based replication sql/set_var.cc: cosmetic: in_sub_stmt is exactly meant to say if we are in stored function/trigger, so better use it. sql/sp.cc: When a routine adds its tables to the top statement's tables, if this routine needs row-based binlogging, mark the entire top statement as well. Same for triggers. Needed for making the mixed replication mode work with stored functions and triggers. sql/sp_head.cc: new enum value for sp_head::m_flags, remembers if, when parsing the routine, we found at least one element (UUID(), UDF) requiring row-based binlogging. sql/sp_head.h: new enum value for sp_head::m_flags (see sp_head.cc). An utility method, intended for attributes of a routine which need to propagate upwards to the caller; so far only used for binlogging information, but open to any other attribute. sql/sql_base.cc: For BUG#19630 "stored function inserting into two auto_increment breaks statement-based binlog": When we come to locking tables, we have collected all tables used by functions, views and triggers, we detect if we're going to update two tables having auto_increment columns. If yes, statement-based binlogging won't work (Intvar_log_event records only one insert_id) so, if in mixed binlogging mode, switch to row-based. For making mixed mode work with stored functions using UUID/UDF: when we come to locking tables, we have parsed the whole body so know if some elements need row-based. Generation of row-based binlog events depends on locked tables, so this is the good place to decide of the binlog format. sql/sql_class.h: Fix for BUG#20499 "mixed mode with temporary table breaks binlog". Making mixed mode work with stored functions/triggers: don't reset back to statement-based if in executing a stored function/trigger. sql/sql_lex.cc: fix for build without row-based replication. binlog_row_based_if_mixed moves from st_lex to Query_tables_list, because that boolean should not be affected when a SELECT reads the INFORMATION_SCHEMA and thus implicitely parses a view or routine's body: this body may contain needing-row-based components like UUID() but the SELECT on INFORMATION_SCHEMA should not be affected by that and should not use row-based; as Query_tables_list is backed-up/reset/restored when parsing the view/routine's body, so does binlog_row_based_if_mixed and the top SELECT is not affected. sql/sql_lex.h: fix for build without row-based replication. binlog_row_based_if_mixed moves from st_lex to Query_tables_list (see sql_lex.cc) sql/sql_parse.cc: For the mixed mode to work with stored functions using UUID and UDF, we need to move the switch-back-from-row-to-statement out of mysql_execute_command() (which is executed for each statement, causing the binlogging mode to change in the middle of the function, which would not work) The switch to row-based is now done in lock_tables(), no need to keep it in mysql_execute_command(); in lock_tables() we also switch back from row-based to statement-based (so in a stored procedure, all statements have their binlogging mode). We must however keep a resetting in mysql_reset_thd_for_next_command() as e.g. CREATE PROCEDURE does not call lock_tables(). sql/sql_view.cc: When a view's body needs row-based binlogging (e.g. the view is created from SELECT UUID()), propagate this fact to the top st_lex. sql/sql_yacc.yy: use TRUE instead of 1, for binlog_row_based_if_mixed.
-
- 03 Jul, 2006 1 commit
-
-
unknown authored
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
-
- 01 Jul, 2006 6 commits
-
-
unknown authored
into dator5.(none):/home/pappa/bug17138 sql/item_sum.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_update.cc: Auto merged
-
unknown authored
into dator5.(none):/home/pappa/bug17138 mysql-test/r/partition.result: manual merge mysql-test/t/partition.test: manual merge
-
unknown authored
into dator5.(none):/home/pappa/bug20583 mysql-test/r/partition.result: Auto merged mysql-test/t/partition.test: Auto merged sql/ha_partition.cc: Auto merged
-
unknown authored
into dator5.(none):/home/pappa/bug17138 BUILD/compile-pentium-gcov: Auto merged sql/ha_ndbcluster.h: Auto merged sql/handler.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_table.cc: Auto merged
-
unknown authored
Last round of review fixes BUILD/compile-pentium-gcov: No change sql/ha_ndbcluster.h: Last round of review changes sql/ha_partition.h: Last round of review changes sql/handler.h: Last round of review changes sql/item_sum.cc: Last round of review changes sql/sql_acl.cc: Last round of review changes sql/sql_insert.cc: Last round of review changes sql/sql_select.cc: Last round of review changes sql/sql_table.cc: Last round of review changes sql/sql_union.cc: Last round of review changes sql/sql_update.cc: Last round of review changes
-
unknown authored
into moonbone.local:/work/merge-5.1
-
- 30 Jun, 2006 9 commits
-
-
unknown authored
mysql-test/t/key.test: Added SHOW CREATE TABLE, which is the proper way to check for table definitions mysql-test/r/key.result: Fixed result after removing wrong bug fix sql/table.cc: Reverted wrong bug fix. The intention with the original code was to show that MySQL treats the first given unique key as a primary key. Clients can use the marked primary key as a real primary key to validate row changes in case of conflicting updates. The ODBC driver (and other drivers) may also use this fact to optimize/check updates and handle conflicts. The marked key also shows what some engines, like InnoDB or NDB, will use as it's internal primary key. For checking if someone has declared a true PRIMARY KEY, one should use 'SHOW CREATE TABLE'
-
unknown authored
into mysql.com:/data0/knielsen/tmp-5.1
-
unknown authored
into mysql.com:/usr/local/mysql/tmp-5.1 scripts/Makefile.am: Auto merged
-
unknown authored
binary disctribution for Falcon. scripts/Makefile.am: Add the make_win_bin_dist script. scripts/make_win_bin_dist: New BitKeeper file ``scripts/make_win_bin_dist''
-
unknown authored
into moonbone.local:/work/merge-5.1 mysql-test/r/ctype_ucs.result: Auto merged mysql-test/r/ctype_utf8.result: Auto merged mysql-test/t/ctype_ucs.test: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_sum.cc: Auto merged sql/opt_range.cc: Auto merged sql/spatial.h: Auto merged sql/sql_select.cc: Auto merged sql/sql_select.h: Auto merged sql/sql_update.cc: Auto merged strings/ctype-mb.c: Auto merged
-
unknown authored
mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/ctype_utf8.result: Auto merged mysql-test/r/func_str.result: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/r/insert_select.result: Auto merged mysql-test/r/key.result: Auto merged mysql-test/r/myisam.result: Auto merged mysql-test/r/select.result: Auto merged mysql-test/r/sp-prelocking.result: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/r/view_grant.result: Auto merged mysql-test/t/func_time.test: Auto merged mysql-test/t/key.test: Auto merged mysql-test/t/myisam.test: Auto merged mysql-test/t/select.test: Auto merged mysql-test/t/sp-prelocking.test: Auto merged mysql-test/t/sp.test: Auto merged mysql-test/t/view_grant.test: Auto merged mysql-test/valgrind.supp: Auto merged mysys/Makefile.am: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_strfunc.cc: Auto merged sql/item_strfunc.h: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/opt_sum.cc: Auto merged sql/slave.cc: Auto merged sql/sp_head.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/table.cc: Auto merged storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Auto merged storage/ndb/src/ndbapi/ndberror.c: Auto merged strings/ctype-mb.c: Auto merged support-files/mysql.spec.sh: Auto merged
-
unknown authored
go from 623 seconds to 11 seconds on AMD64. This is because we have no native atomic implementation on AMD64, so the rwlock-based implementation is used, which is a bit slow. It will be probably be optimized for AMD64 quite soon, but for now this test case will do fewer iterations. unittest/mysys/my_atomic-t.c: 10k iterations instead of 1M no of iterations
-
unknown authored
into mysql.com:/home/cps/mysql/trees/5.1-team
-
unknown authored
mysys/my_pread.c: don't set errno without a real error
-
- 29 Jun, 2006 20 commits
-
-
unknown authored
mysys/my_pread.c: don't set errno without a real error
-
unknown authored
into mysql.com:/home/my/mysql-5.1 sql/ha_ndbcluster.cc: Auto merged
-
unknown authored
(It failed even if test was marked as skipped) sql/ha_ndbcluster.cc: Replaced assert with argument checking, as rpl_ndb_UUID failed on x64
-
unknown authored
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb sql/ha_ndbcluster.cc: Auto merged
-
unknown authored
-
unknown authored
-
unknown authored
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
-
unknown authored
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0 sql/ha_ndbcluster.cc: manual merge
-
unknown authored
-
unknown authored
into mysql.com:/home/cps/mysql/trees/5.1-team
-
unknown authored
mysys/my_pread.c: Fix our implementation of pread/pwrite: we did change the file pointer in our implementation, while the normal preads/pwrites don't. The new code is based on glibc version of pread/pwrite.
-
unknown authored
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
-
unknown authored
into mysql.com:/home/stewart/Documents/MySQL/5.1/ndb storage/ndb/src/kernel/blocks/backup/Backup.cpp: Auto merged
-
unknown authored
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge sql/ha_ndbcluster.cc: Auto merged
-
unknown authored
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb storage/ndb/include/kernel/signaldata/LqhFrag.hpp: manual merge
-
unknown authored
+ adopted signal to be as close as possible to 5.1...
-
unknown authored
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
-
unknown authored
into mysql.com:/home/kgeorge/mysql/5.0/warnings sql/opt_range.cc: Auto merged sql/sql_update.cc: Auto merged sql/item_cmpfunc.h: resolve the conflicts in 4.1->5.0 merge of the gcc 4.1 warnings in favor of 5.0 code sql/spatial.h: resolve the conflicts in 4.1->5.0 merge of the gcc 4.1 warnings in favor of 5.0 code sql/sql_select.h: resolve the conflicts in 4.1->5.0 merge of the gcc 4.1 warnings in favor of 5.0 code
-
unknown authored
into mysql.com:/home/kgeorge/mysql/4.1/warnings
-
unknown authored
Mark events_stress.test as 'big' as it's very slow on some machines BitKeeper/etc/ignore: added server-tools/instance-manager/net_serv.cc mysql-test/t/events_stress.test: Slow test: only run when using --big mysql-test/t/rpl_ndb_auto_inc.test: Fix failing test
-
- 28 Jun, 2006 3 commits
-
-
unknown authored
into mysql.com:/home/my/mysql-5.1 sql/mysqld.cc: Auto merged sql/sql_parse.cc: Auto merged
-
unknown authored
into moonbone.local:/home/evgen/mysql-5.1-new
-
unknown authored
into mysql.com:/home/my/mysql-5.1 BitKeeper/etc/ignore: auto-union sql/ha_ndbcluster_binlog.cc: Auto merged sql/log_event.cc: Auto merged sql/mysqld.cc: Auto merged sql/sql_parse.cc: Auto merged
-