From 8f4d1026de4fdac693da5639e5c6f3f6753075fa Mon Sep 17 00:00:00 2001 From: Jim Winstead Date: Mon, 21 Sep 2009 15:20:14 -0700 Subject: [PATCH 001/132] The mysql command line client ignored the --skip-column-names option when used in conjunction with --vertical. (Bug #47147, patch by Harrison Fisk) --- client/mysql.cc | 3 ++- mysql-test/r/mysql.result | 11 ++++++++--- mysql-test/t/mysql.test | 5 +++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index bafd173343e..c579d0ccaaa 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -3510,7 +3510,8 @@ print_table_data_vertically(MYSQL_RES *result) for (uint off=0; off < mysql_num_fields(result); off++) { field= mysql_fetch_field(result); - tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name); + if (column_names) + tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name); if (cur[off]) { unsigned int i; diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index c02073df677..32917888b81 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -162,8 +162,8 @@ ERROR 1049 (42000) at line 1: Unknown database 'invalid' ERROR 1049 (42000) at line 1: Unknown database 'invalid' Test connect with dbname + hostname Test connect with dbname + _invalid_ hostname -ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) -ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) +ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno) +ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno) The commands reported in the bug report ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) Too long dbname @@ -198,7 +198,7 @@ COUNT (*) 1 COUNT (*) 1 -ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) +ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno) End of 5.0 tests WARNING: --server-arg option not supported in this configuration. Warning (Code 1286): Unknown table engine 'nonexistent' @@ -230,4 +230,9 @@ a: b drop table t1; +Bug #47147: mysql client option --skip-column-names does not apply to vertical output + +*************************** 1. row *************************** +1 + End of tests diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index cffa6392fa3..7b87ae10e59 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -401,5 +401,10 @@ insert into t1 values ('\0b\0'); --exec $MYSQL --xml test -e "select a from t1" drop table t1; +--echo +--echo Bug #47147: mysql client option --skip-column-names does not apply to vertical output +--echo +--exec $MYSQL --skip-column-names --vertical test -e "select 1 as a" + --echo --echo End of tests From 9c23a442b257c0ddb9066930c7bf9b0aac6cacdd Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Fri, 13 Nov 2009 10:30:56 +0000 Subject: [PATCH 002/132] BUG#48738: Backport patch for Bug 34582 to 5.0 codebase. From BUG 34582 commit message: Issuing 'FLUSH LOGS' does not close and reopen indexfile. Instead a SEEK_SET is performed. This patch makes index file to be closed and reopened whenever a rotation happens (FLUSH LOGS is issued or binary log exceeds maximum configured size). --- .../r/binlog_delete_and_flush_index.result | 44 +++++ .../t/binlog_delete_and_flush_index.test | 176 ++++++++++++++++++ sql/log.cc | 10 +- 3 files changed, 226 insertions(+), 4 deletions(-) create mode 100644 mysql-test/r/binlog_delete_and_flush_index.result create mode 100644 mysql-test/t/binlog_delete_and_flush_index.test diff --git a/mysql-test/r/binlog_delete_and_flush_index.result b/mysql-test/r/binlog_delete_and_flush_index.result new file mode 100644 index 00000000000..153900f3081 --- /dev/null +++ b/mysql-test/r/binlog_delete_and_flush_index.result @@ -0,0 +1,44 @@ +RESET MASTER; +CREATE TABLE t1 (a int); +### assertion: index file contains regular entries +SET @index=LOAD_FILE('MYSQLD_DATADIR/master-bin.index'); +master-bin.000001 + +### assertion: show original binlogs +show binary logs; +Log_name File_size +master-bin.000001 # +### assertion: binlog contents from regular entries +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a int) +FLUSH LOGS; +### assertion: index file contains renamed binlog and the new one +SET @index=LOAD_FILE('MYSQLD_DATADIR/master-bin.index'); +master-bin-b34582.000001 +master-bin.000002 + +### assertion: original binlog content still exists, despite we +### renamed and changed the index file +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin-b34582.000001 # Query # # use `test`; CREATE TABLE t1 (a int) +### assertion: user changed binlog index shows correct entries +show binary logs; +Log_name File_size +master-bin-b34582.000001 # +master-bin.000002 # +DROP TABLE t1; +### assertion: purging binlogs up to binlog created after instrumenting index file should work +PURGE BINARY LOGS TO 'master-bin.000002'; +### assertion: show binary logs should only contain latest binlog +show binary logs; +Log_name File_size +master-bin.000002 # +### assertion: assert that binlog files were indeed purged (using file_exists calls) +### assertion: assert that not purged binlog file exists +### assertion: show index file contents and these should match show binary logs issued above +SET @index=LOAD_FILE('MYSQLD_DATADIR/master-bin.index'); +master-bin.000002 + +RESET MASTER; diff --git a/mysql-test/t/binlog_delete_and_flush_index.test b/mysql-test/t/binlog_delete_and_flush_index.test new file mode 100644 index 00000000000..6784043386d --- /dev/null +++ b/mysql-test/t/binlog_delete_and_flush_index.test @@ -0,0 +1,176 @@ +# BUG#34582: FLUSH LOGS does not close and reopen the binlog index +# file +# +# WHAT +# ==== +# +# We want to test that FLUSH LOGS closes and reopens binlog index +# file. +# +# HOW +# === +# +# PREPARE: +# 1. create some binlog events +# 2. show index content, binlog events and binlog contents +# for mysql-bin.000001 +# 3. copy the mysql-bin.000001 to mysql-bin-b34582.000001 +# 4. change the index file so that mysql-bin.000001 is replaced +# with mysql-bin-b34582.000001 +# 5. FLUSH the logs so that new index is closed and reopened +# +# ASSERTIONS: +# 1. index file contents shows mysql-bin-b34582.000001 and +# mysql-bin.000002 +# 1. show binary logs shows current index entries +# 2. binlog contents for mysql-bin-b34582.000001 are displayed +# 3. Purge binlogs up to the latest one succeeds +# 4. SHOW BINARY LOGS presents the latest one only after purging +# 5. Purged binlogs files don't exist in the filesystem +# 6. Not purged binlog file exists in the filesystem +# +# CLEAN UP: +# 1. RESET MASTER +# + +-- source include/have_log_bin.inc + +RESET MASTER; + +-- let $datadir= $MYSQLTEST_VARDIR/log +-- let $index=$datadir/master-bin.index +-- chmod 0666 $index + +# action: issue one command so that binlog gets some event +CREATE TABLE t1 (a int); + +-- echo ### assertion: index file contains regular entries +-- replace_regex /[\\\/].*master/MYSQLD_DATADIR\/master/ +-- eval SET @index=LOAD_FILE('$index') +if (`SELECT convert(@@version_compile_os using latin1) + IN ('Win32','Win64','Windows')`) +{ + -- disable_query_log + -- disable_result_log + -- let $a= `SELECT REPLACE (@index, '$datadir\', '')` + -- enable_result_log + -- enable_query_log + + -- echo $a + +} +if (!`SELECT convert(@@version_compile_os using latin1) + IN ('Win32','Win64','Windows')`) +{ + -- disable_query_log + -- disable_result_log + -- let $a= `SELECT REPLACE (@index, '$datadir/', '')` + -- enable_result_log + -- enable_query_log + + -- echo $a +} + +--echo ### assertion: show original binlogs +-- source include/show_binary_logs.inc + +--echo ### assertion: binlog contents from regular entries +-- source include/show_binlog_events.inc + +# action: copy binlogs to other names and change entries in index file +-- copy_file $datadir/master-bin.000001 $datadir/master-bin-b34582.000001 +-- let newbinfile=$datadir/master-bin-b34582.000001 +let INDEX_FILE=$index; +perl; +$newbinfile= $ENV{'newbinfile'}; +$file= $ENV{'INDEX_FILE'}; +open(FILE, ">$file") || die "Unable to open $file."; +truncate(FILE,0); +print FILE $newbinfile . "\n"; +close ($file); +EOF + +# action: should cause rotation, and creation of new binlogs +FLUSH LOGS; + +# file is not used anymore - remove it (mysql closed on flush logs). +-- remove_file $datadir/master-bin.000001 + +-- echo ### assertion: index file contains renamed binlog and the new one +-- replace_regex /[\\\/].*master/MYSQLD_DATADIR\/master/ +-- eval SET @index=LOAD_FILE('$index') +if (`SELECT convert(@@version_compile_os using latin1) + IN ('Win32','Win64','Windows')`) +{ + -- disable_query_log + -- disable_result_log + -- let $a= `SELECT REPLACE (@index, '$datadir\', '')` + -- enable_result_log + -- enable_query_log + + -- echo $a + +} +if (!`SELECT convert(@@version_compile_os using latin1) + IN ('Win32','Win64','Windows')`) +{ + -- disable_query_log + -- disable_result_log + -- let $a= `SELECT REPLACE (@index, '$datadir/', '')` + -- enable_result_log + -- enable_query_log + + -- echo $a +} + +-- echo ### assertion: original binlog content still exists, despite we +-- echo ### renamed and changed the index file +-- source include/show_binlog_events.inc + +-- echo ### assertion: user changed binlog index shows correct entries +-- source include/show_binary_logs.inc + +DROP TABLE t1; + +-- echo ### assertion: purging binlogs up to binlog created after instrumenting index file should work +-- let $current_binlog= query_get_value(SHOW MASTER STATUS, File, 1) +-- eval PURGE BINARY LOGS TO '$current_binlog' + +-- echo ### assertion: show binary logs should only contain latest binlog +-- source include/show_binary_logs.inc + +-- echo ### assertion: assert that binlog files were indeed purged (using file_exists calls) +-- error 1 +-- file_exists $datadir/master-bin-b34852.000001 + +-- echo ### assertion: assert that not purged binlog file exists +-- file_exists $datadir/$current_binlog + +-- echo ### assertion: show index file contents and these should match show binary logs issued above +-- replace_regex /[\\\/].*master/MYSQLD_DATADIR\/master/ +-- eval SET @index=LOAD_FILE('$index') +if (`SELECT convert(@@version_compile_os using latin1) + IN ('Win32','Win64','Windows')`) +{ + -- disable_query_log + -- disable_result_log + -- let $a= `SELECT REPLACE (@index, '$datadir\', '')` + -- enable_result_log + -- enable_query_log + + -- echo $a + +} +if (!`SELECT convert(@@version_compile_os using latin1) + IN ('Win32','Win64','Windows')`) +{ + -- disable_query_log + -- disable_result_log + -- let $a= `SELECT REPLACE (@index, '$datadir/', '')` + -- enable_result_log + -- enable_query_log + + -- echo $a +} + +RESET MASTER; diff --git a/sql/log.cc b/sql/log.cc index c042651216c..8c0abaeff44 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1635,7 +1635,7 @@ void MYSQL_LOG::new_file(bool need_lock) old_name=name; save_log_type=log_type; name=0; // Don't free name - close(LOG_CLOSE_TO_BE_OPENED); + close(LOG_CLOSE_TO_BE_OPENED | LOG_CLOSE_INDEX); /* Note that at this point, log_type != LOG_CLOSED (important for is_open()). @@ -1649,9 +1649,11 @@ void MYSQL_LOG::new_file(bool need_lock) Format_description_log_event written at server startup, which should trigger temp tables deletion on slaves. */ - - open(old_name, save_log_type, new_name_ptr, - io_cache_type, no_auto_events, max_size, 1); + + /* reopen index binlog file, BUG#34582 */ + if (!open_index_file(index_file_name, 0)) + open(old_name, save_log_type, new_name_ptr, + io_cache_type, no_auto_events, max_size, 1); my_free(old_name,MYF(0)); end: From 87349334004e7f3ae3beeb347661ffba18df3e38 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Tue, 17 Nov 2009 20:02:16 +0100 Subject: [PATCH 003/132] Bug#48846: Too much time spent in ha_partition::records_in_range if not able to prune Problem was that ha_partition::records_in_range called records_in_range for all non pruned partitions, even if an estimate should be given. Solution is to only use 1/3 of the partitions (up to 10) for records_in_range and estimate the total from this subset. (And continue until a non zero return value from the called partitions records_in_range is given, since 0 means no rows will match.) sql/ha_partition.cc: Bug#48846: Too much time spent in ha_partition::records_in_range if not able to prune estimate_rows_upper_bound and records_in_range are very similar (the only difference is the function and its parameters to use) so I created a common function for this. Since these calls from the optimizer are only estimates, it is not neccesary to call them for every partition, it can use a much smaller subset of the used partitions instead, which improves performance for selects. sql/ha_partition.h: Bug#48846: Too much time spent in ha_partition::records_in_range if not able to prune Added two private functions to help some optimizer calls. --- sql/ha_partition.cc | 144 ++++++++++++++++++++++++++++---------------- sql/ha_partition.h | 12 ++++ 2 files changed, 105 insertions(+), 51 deletions(-) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 451631ff373..b854e270029 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -5747,6 +5747,23 @@ const key_map *ha_partition::keys_to_use_for_scanning() DBUG_RETURN(m_file[0]->keys_to_use_for_scanning()); } +#define MAX_PARTS_FOR_OPTIMIZER_CALLS 10 +/* + Prepare start variables for estimating optimizer costs. + + @param[out] num_used_parts Number of partitions after pruning. + @param[out] check_min_num Number of partitions to call. + @param[out] first first used partition. +*/ +void ha_partition::partitions_optimizer_call_preparations(uint *first, + uint *num_used_parts, + uint *check_min_num) +{ + *first= bitmap_get_first_set(&(m_part_info->used_partitions)); + *num_used_parts= bitmap_bits_set(&(m_part_info->used_partitions)); + *check_min_num= min(MAX_PARTS_FOR_OPTIMIZER_CALLS, *num_used_parts); +} + /* Return time for a scan of the table @@ -5760,43 +5777,67 @@ const key_map *ha_partition::keys_to_use_for_scanning() double ha_partition::scan_time() { - double scan_time= 0; - handler **file; + double scan_time= 0.0; + uint first, part_id, num_used_parts, check_min_num, partitions_called= 0; DBUG_ENTER("ha_partition::scan_time"); - for (file= m_file; *file; file++) - if (bitmap_is_set(&(m_part_info->used_partitions), (file - m_file))) - scan_time+= (*file)->scan_time(); + partitions_optimizer_call_preparations(&first, &num_used_parts, &check_min_num); + for (part_id= first; partitions_called < num_used_parts ; part_id++) + { + if (!bitmap_is_set(&(m_part_info->used_partitions), part_id)) + continue; + scan_time+= m_file[part_id]->scan_time(); + partitions_called++; + if (partitions_called >= check_min_num && scan_time != 0.0) + { + DBUG_RETURN(scan_time * + (double) num_used_parts / (double) partitions_called); + } + } DBUG_RETURN(scan_time); } /* - Get time to read + Estimate rows for records_in_range or estimate_rows_upper_bound. - SYNOPSIS - read_time() - index Index number used - ranges Number of ranges - rows Number of rows + @param is_records_in_range call records_in_range instead of + estimate_rows_upper_bound. + @param inx (only for records_in_range) index to use. + @param min_key (only for records_in_range) start of range. + @param max_key (only for records_in_range) end of range. - RETURN VALUE - time for read - - DESCRIPTION - This will be optimised later to include whether or not the index can - be used with partitioning. To achieve we need to add another parameter - that specifies how many of the index fields that are bound in the ranges. - Possibly added as a new call to handlers. + @return Number of rows or HA_POS_ERROR. */ - -double ha_partition::read_time(uint index, uint ranges, ha_rows rows) +ha_rows ha_partition::estimate_rows(bool is_records_in_range, uint inx, + key_range *min_key, key_range *max_key) { - DBUG_ENTER("ha_partition::read_time"); + ha_rows rows, estimated_rows= 0; + uint first, part_id, num_used_parts, check_min_num, partitions_called= 0; + DBUG_ENTER("ha_partition::records_in_range"); - DBUG_RETURN(m_file[0]->read_time(index, ranges, rows)); + partitions_optimizer_call_preparations(&first, &num_used_parts, &check_min_num); + for (part_id= first; partitions_called < num_used_parts ; part_id++) + { + if (!bitmap_is_set(&(m_part_info->used_partitions), part_id)) + continue; + if (is_records_in_range) + rows= m_file[part_id]->records_in_range(inx, min_key, max_key); + else + rows= m_file[part_id]->estimate_rows_upper_bound(); + if (rows == HA_POS_ERROR) + DBUG_RETURN(HA_POS_ERROR); + estimated_rows+= rows; + partitions_called++; + if (partitions_called >= check_min_num && estimated_rows) + { + DBUG_RETURN(estimated_rows * num_used_parts / partitions_called); + } + } + DBUG_RETURN(estimated_rows); } + /* Find number of records in a range @@ -5824,22 +5865,9 @@ double ha_partition::read_time(uint index, uint ranges, ha_rows rows) ha_rows ha_partition::records_in_range(uint inx, key_range *min_key, key_range *max_key) { - handler **file; - ha_rows in_range= 0; DBUG_ENTER("ha_partition::records_in_range"); - file= m_file; - do - { - if (bitmap_is_set(&(m_part_info->used_partitions), (file - m_file))) - { - ha_rows tmp_in_range= (*file)->records_in_range(inx, min_key, max_key); - if (tmp_in_range == HA_POS_ERROR) - DBUG_RETURN(tmp_in_range); - in_range+= tmp_in_range; - } - } while (*(++file)); - DBUG_RETURN(in_range); + DBUG_RETURN(estimate_rows(TRUE, inx, min_key, max_key)); } @@ -5855,22 +5883,36 @@ ha_rows ha_partition::records_in_range(uint inx, key_range *min_key, ha_rows ha_partition::estimate_rows_upper_bound() { - ha_rows rows, tot_rows= 0; - handler **file; DBUG_ENTER("ha_partition::estimate_rows_upper_bound"); - file= m_file; - do - { - if (bitmap_is_set(&(m_part_info->used_partitions), (file - m_file))) - { - rows= (*file)->estimate_rows_upper_bound(); - if (rows == HA_POS_ERROR) - DBUG_RETURN(HA_POS_ERROR); - tot_rows+= rows; - } - } while (*(++file)); - DBUG_RETURN(tot_rows); + DBUG_RETURN(estimate_rows(FALSE, 0, NULL, NULL)); +} + + +/* + Get time to read + + SYNOPSIS + read_time() + index Index number used + ranges Number of ranges + rows Number of rows + + RETURN VALUE + time for read + + DESCRIPTION + This will be optimised later to include whether or not the index can + be used with partitioning. To achieve we need to add another parameter + that specifies how many of the index fields that are bound in the ranges. + Possibly added as a new call to handlers. +*/ + +double ha_partition::read_time(uint index, uint ranges, ha_rows rows) +{ + DBUG_ENTER("ha_partition::read_time"); + + DBUG_RETURN(m_file[0]->read_time(index, ranges, rows)); } diff --git a/sql/ha_partition.h b/sql/ha_partition.h index c08b1f77eca..9f6d9e0a5ba 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -547,6 +547,18 @@ public: ------------------------------------------------------------------------- */ +private: + /* + Helper function to get the minimum number of partitions to use for + the optimizer hints/cost calls. + */ + void partitions_optimizer_call_preparations(uint *num_used_parts, + uint *check_min_num, + uint *first); + ha_rows estimate_rows(bool is_records_in_range, uint inx, + key_range *min_key, key_range *max_key); +public: + /* keys_to_use_for_scanning can probably be implemented as the intersection of all underlying handlers if mixed handlers are used. From f20d15d07faa14a865148e6d965a908138e36bbf Mon Sep 17 00:00:00 2001 From: Jim Winstead Date: Mon, 23 Nov 2009 13:54:27 -0800 Subject: [PATCH 004/132] Fix C99 aliasing violation due to mismatched types that were papered over with a cast. (Bug #48284) --- libmysql/libmysql.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 77ff2a01d7c..98955c8fc89 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -2285,7 +2285,7 @@ mysql_stmt_param_metadata(MYSQL_STMT *stmt) /* Store type of parameter in network buffer. */ -static void store_param_type(char **pos, MYSQL_BIND *param) +static void store_param_type(unsigned char **pos, MYSQL_BIND *param) { uint typecode= param->buffer_type | (param->is_unsigned ? 32768 : 0); int2store(*pos, typecode); @@ -2565,7 +2565,7 @@ int cli_stmt_execute(MYSQL_STMT *stmt) that is sent to the server. */ for (param= stmt->params; param < param_end ; param++) - store_param_type((char**) &net->write_pos, param); + store_param_type(&net->write_pos, param); } for (param= stmt->params; param < param_end; param++) From 595719280eeec7dc9dda340d001de72a728b0ed1 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Sun, 6 Dec 2009 01:11:32 +0000 Subject: [PATCH 005/132] BUG#49479: Slave stops with syntax error: LOAD DATA event without escaped field names When in mixed or statement mode, the master logs LOAD DATA queries by resorting to an Execute_load_query_log_event. This event does not contain the original query, but a rewritten version of it, which includes the table field names. However, the rewrite does not escape the field names. If these names match a reserved keyword, then the slave will stop with a syntax error when executing the event. We fix this by escaping the fields names as it happens already for the table name. mysql-test/extra/rpl_tests/rpl_loaddata.test: Added test case for the reported bug. mysql-test/r/mysqlbinlog.result: Changed result to support escaped field name. mysql-test/suite/binlog/r/binlog_killed_simulate.result: Changed result to support escaped field name. mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Changed result to support escaped field name. mysql-test/suite/binlog/r/binlog_stm_blackhole.result: Changed result to support escaped field name. mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Changed result to support escaped field name. mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result: Changed result to support escaped field name. mysql-test/suite/rpl/r/rpl_loaddata.result: Added result for new test. Changed show slave status positions which are now different because of extra escape character in field names. mysql-test/suite/rpl/r/rpl_loaddata_fatal.result: Changed show slave status positions which are now different because of extra escape character. mysql-test/suite/rpl/r/rpl_loaddata_map.result: Changed result to support escaped field name. mysql-test/suite/rpl/r/rpl_stm_log.result: Changed result to support escaped field name. mysql-test/t/mysqlbinlog.test: Changed positions which is now different because of extra escape character in field names. sql/sql_load.cc: Appended escape characters before and after field names. --- mysql-test/extra/rpl_tests/rpl_loaddata.test | 14 +++++++++ mysql-test/r/mysqlbinlog.result | 30 +++++++++---------- .../binlog/r/binlog_killed_simulate.result | 2 +- .../r/binlog_row_mix_innodb_myisam.result | 2 +- .../binlog/r/binlog_stm_blackhole.result | 2 +- .../r/binlog_stm_mix_innodb_myisam.result | 4 +-- .../suite/rpl/r/rpl_innodb_mixed_dml.result | 2 +- mysql-test/suite/rpl/r/rpl_loaddata.result | 21 +++++++++++-- .../suite/rpl/r/rpl_loaddata_fatal.result | 2 +- .../suite/rpl/r/rpl_loaddata_map.result | 2 +- mysql-test/suite/rpl/r/rpl_stm_log.result | 6 ++-- mysql-test/t/mysqlbinlog.test | 4 +-- sql/sql_load.cc | 6 ++++ 13 files changed, 67 insertions(+), 30 deletions(-) diff --git a/mysql-test/extra/rpl_tests/rpl_loaddata.test b/mysql-test/extra/rpl_tests/rpl_loaddata.test index 7db12600456..649337b2a24 100644 --- a/mysql-test/extra/rpl_tests/rpl_loaddata.test +++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test @@ -219,4 +219,18 @@ source include/diff_tables.inc; -- sync_slave_with_master +# BUG#49479: LOAD DATA INFILE is binlogged without escaping field names +-- source include/master-slave-reset.inc +-- connection master +use test; +CREATE TABLE t1 (`key` TEXT, `text` TEXT); + +LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ','; +SELECT * FROM t1; + +-- sync_slave_with_master +-- connection master +DROP TABLE t1; +-- sync_slave_with_master + # End of 4.1 tests diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 5f32561798b..9d4fde96d18 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -44,16 +44,16 @@ SET TIMESTAMP=1000000000/*!*/; insert into t2 values () /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; DELIMITER ; # End of log file @@ -144,16 +144,16 @@ SET TIMESTAMP=1000000000/*!*/; insert into t2 values () /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; DELIMITER ; # End of log file @@ -359,29 +359,29 @@ SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a varchar(64) character set utf8) /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=7/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=7/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO TABLE `t1` CHARACTER SET koi8r FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO TABLE `t1` CHARACTER SET koi8r FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; drop table t1 diff --git a/mysql-test/suite/binlog/r/binlog_killed_simulate.result b/mysql-test/suite/binlog/r/binlog_killed_simulate.result index df04f5129cf..0e1b5c92d57 100644 --- a/mysql-test/suite/binlog/r/binlog_killed_simulate.result +++ b/mysql-test/suite/binlog/r/binlog_killed_simulate.result @@ -19,7 +19,7 @@ ERROR 70100: Query execution was interrupted show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# -master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a, b) ;file_id=# +master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, `b`) ;file_id=# select (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) is not null; diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result index 4ccc3b5e797..ef98275041c 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result @@ -929,7 +929,7 @@ master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci -master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a, @b) SET b=((@b) + `bug27417`(2)) ;file_id=# +master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @b) SET `b`=((@b) + `bug27417`(2)) ;file_id=# master-bin.000001 # Query # # ROLLBACK drop trigger trg_del_t2; drop table t1,t2,t3,t4,t5; diff --git a/mysql-test/suite/binlog/r/binlog_stm_blackhole.result b/mysql-test/suite/binlog/r/binlog_stm_blackhole.result index 434c1b0896f..b2e6ac854cf 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_blackhole.result +++ b/mysql-test/suite/binlog/r/binlog_stm_blackhole.result @@ -127,7 +127,7 @@ master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole master-bin.000001 # Query # # BEGIN master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=581 -master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) ;file_id=# +master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) ;file_id=# master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; alter table t1 add b int master-bin.000001 # Query # # use `test`; alter table t1 drop b diff --git a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result index de83c7a873d..e2f29295383 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result @@ -628,7 +628,7 @@ master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Intvar # # INSERT_ID=10 -master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a, @b) SET b=((@b) + `bug27417`(2)) ;file_id=# +master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @b) SET `b`=((@b) + `bug27417`(2)) ;file_id=# master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; drop trigger trg_del_t2; @@ -866,7 +866,7 @@ master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci -master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a, @b) SET b=((@b) + `bug27417`(2)) ;file_id=# +master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @b) SET `b`=((@b) + `bug27417`(2)) ;file_id=# master-bin.000001 # Query # # ROLLBACK drop trigger trg_del_t2; drop table t1,t2,t3,t4,t5; diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result index 3a1c2b68b01..fbfebbaa590 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result @@ -885,7 +885,7 @@ master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=# -master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a, b) ;file_id=# +master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, `b`) ;file_id=# master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 diff --git a/mysql-test/suite/rpl/r/rpl_loaddata.result b/mysql-test/suite/rpl/r/rpl_loaddata.result index ca9c14691b0..5c6a67d6f3c 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata.result @@ -36,7 +36,7 @@ set global sql_slave_skip_counter=1; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 2009 # # master-bin.000001 Yes Yes # 0 0 2009 # None 0 No # No 0 0 +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 2025 # # master-bin.000001 Yes Yes # 0 0 2025 # None 0 No # No 0 0 set sql_log_bin=0; delete from t1; set sql_log_bin=1; @@ -46,7 +46,7 @@ change master to master_user='test'; change master to master_user='root'; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 2044 # # master-bin.000001 No No # 0 0 2044 # None 0 No # No 0 0 +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 2060 # # master-bin.000001 No No # 0 0 2060 # None 0 No # No 0 0 set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; @@ -115,3 +115,20 @@ use b48297_db1; Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1 DROP DATABASE b48297_db1; DROP DATABASE b42897_db2; +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +use test; +CREATE TABLE t1 (`key` TEXT, `text` TEXT); +LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ','; +SELECT * FROM t1; +key text +Field A 'Field B' +Field 1 'Field 2' +Field 3 'Field 4' +'Field 5' 'Field 6' +Field 6 'Field 7' +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result index 35696615b5a..ba0aa847cf7 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result @@ -53,7 +53,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 556 +Read_Master_Log_Pos 560 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_map.result b/mysql-test/suite/rpl/r/rpl_loaddata_map.result index 006f84043a4..91624b15ef8 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_map.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_map.result @@ -20,7 +20,7 @@ master-bin.000001 # Query # # use `test`; create table t2 (id int not null prima master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Append_block # # ;file_id=#;block_len=# master-bin.000001 # Append_block # # ;file_id=#;block_len=# -master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (id) ;file_id=# +master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`id`) ;file_id=# ==== Verify results on slave ==== [on slave] select count(*) from t2 /* 5 000 */; diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result index d73b8990041..47556a33e97 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_log.result +++ b/mysql-test/suite/rpl/r/rpl_stm_log.result @@ -25,7 +25,7 @@ master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL) master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581 -master-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (word) ;file_id=1 +master-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=1 show binlog events from 106 limit 1; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM @@ -193,7 +193,7 @@ master-bin.000001 # Query # # use `test`; insert into t1 values (NULL) master-bin.000001 # Query # # use `test`; drop table t1 master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# -master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (word) ;file_id=# +master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=# master-bin.000001 # Rotate # # master-bin.000002;pos=4 show binlog events in 'master-bin.000002'; Log_name Pos Event_type Server_id End_log_pos Info @@ -218,7 +218,7 @@ slave-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL) slave-bin.000001 # Query 1 # use `test`; drop table t1 slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM slave-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581 -slave-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE '../../tmp/SQL_LOAD-2-1-1.data' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (word) ;file_id=1 +slave-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE '../../tmp/SQL_LOAD-2-1-1.data' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=1 slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 show binlog events in 'slave-bin.000002' from 4; diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 78661b1bbc4..687ad62b17c 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -71,7 +71,7 @@ select "--- --position --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=330 $MYSQLD_DATADIR/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=332 $MYSQLD_DATADIR/master-bin.000002 # These are tests for remote binlog. @@ -108,7 +108,7 @@ select "--- --position --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=330 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=332 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 # Bug#7853 mysqlbinlog does not accept input from stdin --disable_query_log diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 8109ca4313e..326a7517ed6 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -640,7 +640,11 @@ static bool write_execute_load_query_log_event(THD *thd, sql_exchange* ex, if (n++) pfields.append(", "); if (item->name) + { + pfields.append("`"); pfields.append(item->name); + pfields.append("`"); + } else item->print(&pfields, QT_ORDINARY); } @@ -660,7 +664,9 @@ static bool write_execute_load_query_log_event(THD *thd, sql_exchange* ex, val= lv++; if (n++) pfields.append(", "); + pfields.append("`"); pfields.append(item->name); + pfields.append("`"); pfields.append("="); val->print(&pfields, QT_ORDINARY); } From 91aa5e248ed2897a7cad0e3060ce1689fee6a5b2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Dec 2009 16:35:00 +0100 Subject: [PATCH 006/132] Raise version number after cloning 5.0.89 --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index e14b4014bea..b206dfbd079 100644 --- a/configure.in +++ b/configure.in @@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb -AM_INIT_AUTOMAKE(mysql, 5.0.89) +AM_INIT_AUTOMAKE(mysql, 5.0.90) AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 @@ -23,7 +23,7 @@ NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0 # ndb version NDB_VERSION_MAJOR=5 NDB_VERSION_MINOR=0 -NDB_VERSION_BUILD=89 +NDB_VERSION_BUILD=90 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? From 45f2e0a7aad762af94eedd70b6fc0b91ae8e3376 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Tue, 15 Dec 2009 23:52:47 +0400 Subject: [PATCH 007/132] Backport from 6.0-codebase. WL#3771 "Audit Plugin Interface" Implement new plug-in type - AUDIT New plug-in: audit_null simply increments counter for how many times it was called. include/Makefile.am: wl3771 add new headers to distribution include/mysql/plugin.h: wl3771 define new AUDIT plugin type Split out fulltext plugin type into its own header include/mysql/plugin.h.pp: wl3771 no real API change, just re-arranged some code include/mysql/plugin_audit.h: wl3771 pluggable audit interface include/mysql/plugin_ftparser.h: wl3771 Split out fulltext plugin type into its own header libmysqld/CMakeLists.txt: wl3771 add sql_audit.cc to build libmysqld/Makefile.am: wl3771 add sql_audit.cc to build plugin/audit_null: wl3771 an example plugin for testing pluggable audit interface plugin/audit_null/Makefile.am: wl3771 an example plugin for testing pluggable audit interface plugin/audit_null/audit_null.c: wl3771 an example plugin for testing pluggable audit interface plugin/audit_null/plug.in: wl3771 an example plugin for testing pluggable audit interface sql/CMakeLists.txt: wl3771 add sql_audit.cc to build sql/Makefile.am: wl3771 add sql_audit.cc to build sql/event_queue.cc: wl3771 release audit resources before waiting sql/log.cc: wl3771 add general audit call for log sql/mysqld.cc: wl3771 add audit initialize/finalize add general audit call for error sql/sql_audit.cc: wl3771 pluggable audit interface implementation sql/sql_audit.h: wl3771 pluggable audit interface implementation sql/sql_class.cc: wl3771 add thd audit init/deinit calls sql/sql_class.h: wl3771 add required data structures for audit to THD sql/sql_connect.cc: wl3771 release audit resources before waiting sql/sql_insert.cc: wl3771 release audit plugins before waiting sql/sql_parse.cc: wl3771 add general audit call for results sql/sql_plugin.cc: wl3771 add declarations for audit plugin type --- include/Makefile.am | 3 +- include/mysql/plugin.h | 234 ++--------------- include/mysql/plugin.h.pp | 12 +- include/mysql/plugin_audit.h | 98 +++++++ include/mysql/plugin_ftparser.h | 211 +++++++++++++++ libmysqld/CMakeLists.txt | 3 +- libmysqld/Makefile.am | 4 +- plugin/audit_null/Makefile.am | 32 +++ plugin/audit_null/audit_null.c | 130 +++++++++ plugin/audit_null/plug.in | 4 + sql/CMakeLists.txt | 2 +- sql/Makefile.am | 4 +- sql/event_queue.cc | 8 + sql/log.cc | 9 + sql/mysqld.cc | 31 ++- sql/sql_audit.cc | 448 ++++++++++++++++++++++++++++++++ sql/sql_audit.h | 78 ++++++ sql/sql_class.cc | 5 + sql/sql_class.h | 15 ++ sql/sql_connect.cc | 2 + sql/sql_insert.cc | 3 + sql/sql_parse.cc | 10 + sql/sql_plugin.cc | 24 +- 23 files changed, 1133 insertions(+), 237 deletions(-) create mode 100644 include/mysql/plugin_audit.h create mode 100644 include/mysql/plugin_ftparser.h create mode 100644 plugin/audit_null/Makefile.am create mode 100644 plugin/audit_null/audit_null.c create mode 100644 plugin/audit_null/plug.in create mode 100644 sql/sql_audit.cc create mode 100644 sql/sql_audit.h diff --git a/include/Makefile.am b/include/Makefile.am index 579eff1afad..5e30342c7eb 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -19,7 +19,8 @@ BUILT_SOURCES = $(HEADERS_GEN_MAKE) link_sources probes_mysql_nodtrace.h HEADERS_GEN_CONFIGURE = mysql_version.h HEADERS_GEN_MAKE = my_config.h HEADERS_ABI = mysql.h mysql_com.h mysql_time.h \ - my_list.h my_alloc.h typelib.h mysql/plugin.h + my_list.h my_alloc.h typelib.h mysql/plugin.h \ + mysql/plugin_audit.h mysql/plugin_ftparser.h pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \ my_xml.h mysql_embed.h mysql/services.h \ mysql/service_my_snprintf.h mysql/service_thd_alloc.h \ diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index f158dc20999..e2713fe1873 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -66,8 +66,9 @@ typedef struct st_mysql_xid MYSQL_XID; #define MYSQL_FTPARSER_PLUGIN 2 /* Full-text parser plugin */ #define MYSQL_DAEMON_PLUGIN 3 /* The daemon/raw plugin type */ #define MYSQL_INFORMATION_SCHEMA_PLUGIN 4 /* The I_S plugin type */ -#define MYSQL_REPLICATION_PLUGIN 5 /* The replication plugin type */ -#define MYSQL_MAX_PLUGIN_TYPE_NUM 6 /* The number of plugin types */ +#define MYSQL_AUDIT_PLUGIN 5 /* The Audit plugin type */ +#define MYSQL_REPLICATION_PLUGIN 6 /* The replication plugin type */ +#define MYSQL_MAX_PLUGIN_TYPE_NUM 7 /* The number of plugin types */ /* We use the following strings to define licenses for plugins */ #define PLUGIN_LICENSE_PROPRIETARY 0 @@ -403,191 +404,7 @@ struct st_mysql_plugin /************************************************************************* API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN) */ - -#define MYSQL_FTPARSER_INTERFACE_VERSION 0x0100 - -/* Parsing modes. Set in MYSQL_FTPARSER_PARAM::mode */ -enum enum_ftparser_mode -{ -/* - Fast and simple mode. This mode is used for indexing, and natural - language queries. - - The parser is expected to return only those words that go into the - index. Stopwords or too short/long words should not be returned. The - 'boolean_info' argument of mysql_add_word() does not have to be set. -*/ - MYSQL_FTPARSER_SIMPLE_MODE= 0, - -/* - Parse with stopwords mode. This mode is used in boolean searches for - "phrase matching." - - The parser is not allowed to ignore words in this mode. Every word - should be returned, including stopwords and words that are too short - or long. The 'boolean_info' argument of mysql_add_word() does not - have to be set. -*/ - MYSQL_FTPARSER_WITH_STOPWORDS= 1, - -/* - Parse in boolean mode. This mode is used to parse a boolean query string. - - The parser should provide a valid MYSQL_FTPARSER_BOOLEAN_INFO - structure in the 'boolean_info' argument to mysql_add_word(). - Usually that means that the parser should recognize boolean operators - in the parsing stream and set appropriate fields in - MYSQL_FTPARSER_BOOLEAN_INFO structure accordingly. As for - MYSQL_FTPARSER_WITH_STOPWORDS mode, no word should be ignored. - Instead, use FT_TOKEN_STOPWORD for the token type of such a word. -*/ - MYSQL_FTPARSER_FULL_BOOLEAN_INFO= 2 -}; - -/* - Token types for boolean mode searching (used for the type member of - MYSQL_FTPARSER_BOOLEAN_INFO struct) - - FT_TOKEN_EOF: End of data. - FT_TOKEN_WORD: Regular word. - FT_TOKEN_LEFT_PAREN: Left parenthesis (start of group/sub-expression). - FT_TOKEN_RIGHT_PAREN: Right parenthesis (end of group/sub-expression). - FT_TOKEN_STOPWORD: Stopword. -*/ - -enum enum_ft_token_type -{ - FT_TOKEN_EOF= 0, - FT_TOKEN_WORD= 1, - FT_TOKEN_LEFT_PAREN= 2, - FT_TOKEN_RIGHT_PAREN= 3, - FT_TOKEN_STOPWORD= 4 -}; - -/* - This structure is used in boolean search mode only. It conveys - boolean-mode metadata to the MySQL search engine for every word in - the search query. A valid instance of this structure must be filled - in by the plugin parser and passed as an argument in the call to - mysql_add_word (the callback function in the MYSQL_FTPARSER_PARAM - structure) when a query is parsed in boolean mode. - - type: The token type. Should be one of the enum_ft_token_type values. - - yesno: Whether the word must be present for a match to occur: - >0 Must be present - <0 Must not be present - 0 Neither; the word is optional but its presence increases the relevance - With the default settings of the ft_boolean_syntax system variable, - >0 corresponds to the '+' operator, <0 corrresponds to the '-' operator, - and 0 means neither operator was used. - - weight_adjust: A weighting factor that determines how much a match - for the word counts. Positive values increase, negative - decrease the - relative word's importance in the query. - - wasign: The sign of the word's weight in the query. If it's non-negative - the match for the word will increase document relevance, if it's - negative - decrease (the word becomes a "noise word", the less of it the - better). - - trunc: Corresponds to the '*' operator in the default setting of the - ft_boolean_syntax system variable. -*/ - -typedef struct st_mysql_ftparser_boolean_info -{ - enum enum_ft_token_type type; - int yesno; - int weight_adjust; - char wasign; - char trunc; - /* These are parser state and must be removed. */ - char prev; - char *quot; -} MYSQL_FTPARSER_BOOLEAN_INFO; - -/* - The following flag means that buffer with a string (document, word) - may be overwritten by the caller before the end of the parsing (that is - before st_mysql_ftparser::deinit() call). If one needs the string - to survive between two successive calls of the parsing function, she - needs to save a copy of it. The flag may be set by MySQL before calling - st_mysql_ftparser::parse(), or it may be set by a plugin before calling - st_mysql_ftparser_param::mysql_parse() or - st_mysql_ftparser_param::mysql_add_word(). -*/ -#define MYSQL_FTFLAGS_NEED_COPY 1 - -/* - An argument of the full-text parser plugin. This structure is - filled in by MySQL server and passed to the parsing function of the - plugin as an in/out parameter. - - mysql_parse: A pointer to the built-in parser implementation of the - server. It's set by the server and can be used by the parser plugin - to invoke the MySQL default parser. If plugin's role is to extract - textual data from .doc, .pdf or .xml content, it might extract - plaintext from the content, and then pass the text to the default - MySQL parser to be parsed. - - mysql_add_word: A server callback to add a new word. When parsing - a document, the server sets this to point at a function that adds - the word to MySQL full-text index. When parsing a search query, - this function will add the new word to the list of words to search - for. The boolean_info argument can be NULL for all cases except - when mode is MYSQL_FTPARSER_FULL_BOOLEAN_INFO. - - ftparser_state: A generic pointer. The plugin can set it to point - to information to be used internally for its own purposes. - - mysql_ftparam: This is set by the server. It is used by MySQL functions - called via mysql_parse() and mysql_add_word() callback. The plugin - should not modify it. - - cs: Information about the character set of the document or query string. - - doc: A pointer to the document or query string to be parsed. - - length: Length of the document or query string, in bytes. - - flags: See MYSQL_FTFLAGS_* constants above. - - mode: The parsing mode. With boolean operators, with stopwords, or - nothing. See enum_ftparser_mode above. -*/ - -typedef struct st_mysql_ftparser_param -{ - int (*mysql_parse)(struct st_mysql_ftparser_param *, - char *doc, int doc_len); - int (*mysql_add_word)(struct st_mysql_ftparser_param *, - char *word, int word_len, - MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info); - void *ftparser_state; - void *mysql_ftparam; - struct charset_info_st *cs; - char *doc; - int length; - int flags; - enum enum_ftparser_mode mode; -} MYSQL_FTPARSER_PARAM; - -/* - Full-text parser descriptor. - - interface_version is, e.g., MYSQL_FTPARSER_INTERFACE_VERSION. - The parsing, initialization, and deinitialization functions are - invoked per SQL statement for which the parser is used. -*/ - -struct st_mysql_ftparser -{ - int interface_version; - int (*parse)(MYSQL_FTPARSER_PARAM *param); - int (*init)(MYSQL_FTPARSER_PARAM *param); - int (*deinit)(MYSQL_FTPARSER_PARAM *param); -}; +#include "plugin_ftparser.h" /************************************************************************* API for Storage Engine plugin. (MYSQL_DAEMON_PLUGIN) @@ -596,6 +413,17 @@ struct st_mysql_ftparser /* handlertons of different MySQL releases are incompatible */ #define MYSQL_DAEMON_INTERFACE_VERSION (MYSQL_VERSION_ID << 8) +/* + Here we define only the descriptor structure, that is referred from + st_mysql_plugin. +*/ + +struct st_mysql_daemon +{ + int interface_version; +}; + + /************************************************************************* API for I_S plugin. (MYSQL_INFORMATION_SCHEMA_PLUGIN) */ @@ -603,6 +431,17 @@ struct st_mysql_ftparser /* handlertons of different MySQL releases are incompatible */ #define MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION (MYSQL_VERSION_ID << 8) +/* + Here we define only the descriptor structure, that is referred from + st_mysql_plugin. +*/ + +struct st_mysql_information_schema +{ + int interface_version; +}; + + /************************************************************************* API for Storage Engine plugin. (MYSQL_STORAGE_ENGINE_PLUGIN) */ @@ -623,25 +462,6 @@ struct st_mysql_storage_engine struct handlerton; -/* - Here we define only the descriptor structure, that is referred from - st_mysql_plugin. -*/ - -struct st_mysql_daemon -{ - int interface_version; -}; - -/* - Here we define only the descriptor structure, that is referred from - st_mysql_plugin. -*/ - -struct st_mysql_information_schema -{ - int interface_version; -}; /* API for Replication plugin. (MYSQL_REPLICATION_PLUGIN) @@ -655,7 +475,7 @@ struct st_mysql_information_schema int interface_version; }; -/* +/************************************************************************* st_mysql_value struct for reading values from mysqld. Used by server variables framework to parse user-provided values. Will be used for arguments when implementing UDFs. diff --git a/include/mysql/plugin.h.pp b/include/mysql/plugin.h.pp index b7dd7bc0032..79e956c3d76 100644 --- a/include/mysql/plugin.h.pp +++ b/include/mysql/plugin.h.pp @@ -76,6 +76,8 @@ struct st_mysql_plugin struct st_mysql_sys_var **system_vars; void * __reserved1; }; +#include "plugin_ftparser.h" +#include "plugin.h" enum enum_ftparser_mode { MYSQL_FTPARSER_SIMPLE_MODE= 0, @@ -122,11 +124,6 @@ struct st_mysql_ftparser int (*init)(MYSQL_FTPARSER_PARAM *param); int (*deinit)(MYSQL_FTPARSER_PARAM *param); }; -struct st_mysql_storage_engine -{ - int interface_version; -}; -struct handlerton; struct st_mysql_daemon { int interface_version; @@ -135,6 +132,11 @@ struct st_mysql_information_schema { int interface_version; }; +struct st_mysql_storage_engine +{ + int interface_version; +}; +struct handlerton; struct Mysql_replication { int interface_version; }; diff --git a/include/mysql/plugin_audit.h b/include/mysql/plugin_audit.h new file mode 100644 index 00000000000..644e0acc8f7 --- /dev/null +++ b/include/mysql/plugin_audit.h @@ -0,0 +1,98 @@ +/* Copyright (C) 2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef _my_audit_h +#define _my_audit_h + +/************************************************************************* + API for Audit plugin. (MYSQL_AUDIT_PLUGIN) +*/ + +#include "plugin.h" + +#define MYSQL_AUDIT_CLASS_MASK_SIZE 1 + +#define MYSQL_AUDIT_INTERFACE_VERSION ( 0x010000 | MYSQL_AUDIT_CLASS_MASK_SIZE ) + + +/* + The first word in every event class struct indicates the specific + class of the event. +*/ +struct mysql_event +{ + int event_class; +}; + + +/************************************************************************* + AUDIT CLASS : GENERAL + + LOG events occurs before emitting to the general query log. + ERROR events occur before transmitting errors to the user. + RESULT events occur after transmitting a resultset to the user. +*/ + +#define MYSQL_AUDIT_GENERAL_CLASS 0 +#define MYSQL_AUDIT_GENERAL_CLASSMASK (1 << MYSQL_AUDIT_GENERAL_CLASS) +#define MYSQL_AUDIT_GENERAL_LOG 0 +#define MYSQL_AUDIT_GENERAL_ERROR 1 +#define MYSQL_AUDIT_GENERAL_RESULT 2 + +struct mysql_event_general +{ + int event_class; + int general_error_code; + unsigned long general_thread_id; + const char *general_user; + unsigned int general_user_length; + const char *general_command; + unsigned int general_command_length; + const char *general_query; + unsigned int general_query_length; + struct charset_info_st *general_charset; + unsigned long long general_time; + unsigned long long general_rows; +}; + + +/************************************************************************* + Here we define the descriptor structure, that is referred from + st_mysql_plugin. + + release_thd() event occurs when the event class consumer is to be + disassociated from the specified THD. This would typically occur + before some operation which may require sleeping - such as when + waiting for the next query from the client. + + event_notify() is invoked whenever an event occurs which is of any + class for which the plugin has interest. The first word of the + mysql_event argument indicates the specific event class and the + remainder of the structure is as required for that class. + + class_mask is an array of bits used to indicate what event classes + that this plugin wants to receive. +*/ + +struct st_mysql_audit +{ + int interface_version; + void (*release_thd)(MYSQL_THD); + void (*event_notify)(MYSQL_THD, const struct mysql_event *); + unsigned long class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE]; +}; + + +#endif diff --git a/include/mysql/plugin_ftparser.h b/include/mysql/plugin_ftparser.h new file mode 100644 index 00000000000..7f9bde3a6a0 --- /dev/null +++ b/include/mysql/plugin_ftparser.h @@ -0,0 +1,211 @@ +/* Copyright (C) 2005 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef _my_plugin_ftparser_h +#define _my_plugin_ftparser_h +#include "plugin.h" + +/************************************************************************* + API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN) +*/ + +#define MYSQL_FTPARSER_INTERFACE_VERSION 0x0100 + +/* Parsing modes. Set in MYSQL_FTPARSER_PARAM::mode */ +enum enum_ftparser_mode +{ +/* + Fast and simple mode. This mode is used for indexing, and natural + language queries. + + The parser is expected to return only those words that go into the + index. Stopwords or too short/long words should not be returned. The + 'boolean_info' argument of mysql_add_word() does not have to be set. +*/ + MYSQL_FTPARSER_SIMPLE_MODE= 0, + +/* + Parse with stopwords mode. This mode is used in boolean searches for + "phrase matching." + + The parser is not allowed to ignore words in this mode. Every word + should be returned, including stopwords and words that are too short + or long. The 'boolean_info' argument of mysql_add_word() does not + have to be set. +*/ + MYSQL_FTPARSER_WITH_STOPWORDS= 1, + +/* + Parse in boolean mode. This mode is used to parse a boolean query string. + + The parser should provide a valid MYSQL_FTPARSER_BOOLEAN_INFO + structure in the 'boolean_info' argument to mysql_add_word(). + Usually that means that the parser should recognize boolean operators + in the parsing stream and set appropriate fields in + MYSQL_FTPARSER_BOOLEAN_INFO structure accordingly. As for + MYSQL_FTPARSER_WITH_STOPWORDS mode, no word should be ignored. + Instead, use FT_TOKEN_STOPWORD for the token type of such a word. +*/ + MYSQL_FTPARSER_FULL_BOOLEAN_INFO= 2 +}; + +/* + Token types for boolean mode searching (used for the type member of + MYSQL_FTPARSER_BOOLEAN_INFO struct) + + FT_TOKEN_EOF: End of data. + FT_TOKEN_WORD: Regular word. + FT_TOKEN_LEFT_PAREN: Left parenthesis (start of group/sub-expression). + FT_TOKEN_RIGHT_PAREN: Right parenthesis (end of group/sub-expression). + FT_TOKEN_STOPWORD: Stopword. +*/ + +enum enum_ft_token_type +{ + FT_TOKEN_EOF= 0, + FT_TOKEN_WORD= 1, + FT_TOKEN_LEFT_PAREN= 2, + FT_TOKEN_RIGHT_PAREN= 3, + FT_TOKEN_STOPWORD= 4 +}; + +/* + This structure is used in boolean search mode only. It conveys + boolean-mode metadata to the MySQL search engine for every word in + the search query. A valid instance of this structure must be filled + in by the plugin parser and passed as an argument in the call to + mysql_add_word (the callback function in the MYSQL_FTPARSER_PARAM + structure) when a query is parsed in boolean mode. + + type: The token type. Should be one of the enum_ft_token_type values. + + yesno: Whether the word must be present for a match to occur: + >0 Must be present + <0 Must not be present + 0 Neither; the word is optional but its presence increases the relevance + With the default settings of the ft_boolean_syntax system variable, + >0 corresponds to the '+' operator, <0 corrresponds to the '-' operator, + and 0 means neither operator was used. + + weight_adjust: A weighting factor that determines how much a match + for the word counts. Positive values increase, negative - decrease the + relative word's importance in the query. + + wasign: The sign of the word's weight in the query. If it's non-negative + the match for the word will increase document relevance, if it's + negative - decrease (the word becomes a "noise word", the less of it the + better). + + trunc: Corresponds to the '*' operator in the default setting of the + ft_boolean_syntax system variable. +*/ + +typedef struct st_mysql_ftparser_boolean_info +{ + enum enum_ft_token_type type; + int yesno; + int weight_adjust; + char wasign; + char trunc; + /* These are parser state and must be removed. */ + char prev; + char *quot; +} MYSQL_FTPARSER_BOOLEAN_INFO; + +/* + The following flag means that buffer with a string (document, word) + may be overwritten by the caller before the end of the parsing (that is + before st_mysql_ftparser::deinit() call). If one needs the string + to survive between two successive calls of the parsing function, she + needs to save a copy of it. The flag may be set by MySQL before calling + st_mysql_ftparser::parse(), or it may be set by a plugin before calling + st_mysql_ftparser_param::mysql_parse() or + st_mysql_ftparser_param::mysql_add_word(). +*/ +#define MYSQL_FTFLAGS_NEED_COPY 1 + +/* + An argument of the full-text parser plugin. This structure is + filled in by MySQL server and passed to the parsing function of the + plugin as an in/out parameter. + + mysql_parse: A pointer to the built-in parser implementation of the + server. It's set by the server and can be used by the parser plugin + to invoke the MySQL default parser. If plugin's role is to extract + textual data from .doc, .pdf or .xml content, it might extract + plaintext from the content, and then pass the text to the default + MySQL parser to be parsed. + + mysql_add_word: A server callback to add a new word. When parsing + a document, the server sets this to point at a function that adds + the word to MySQL full-text index. When parsing a search query, + this function will add the new word to the list of words to search + for. The boolean_info argument can be NULL for all cases except + when mode is MYSQL_FTPARSER_FULL_BOOLEAN_INFO. + + ftparser_state: A generic pointer. The plugin can set it to point + to information to be used internally for its own purposes. + + mysql_ftparam: This is set by the server. It is used by MySQL functions + called via mysql_parse() and mysql_add_word() callback. The plugin + should not modify it. + + cs: Information about the character set of the document or query string. + + doc: A pointer to the document or query string to be parsed. + + length: Length of the document or query string, in bytes. + + flags: See MYSQL_FTFLAGS_* constants above. + + mode: The parsing mode. With boolean operators, with stopwords, or + nothing. See enum_ftparser_mode above. +*/ + +typedef struct st_mysql_ftparser_param +{ + int (*mysql_parse)(struct st_mysql_ftparser_param *, + char *doc, int doc_len); + int (*mysql_add_word)(struct st_mysql_ftparser_param *, + char *word, int word_len, + MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info); + void *ftparser_state; + void *mysql_ftparam; + struct charset_info_st *cs; + char *doc; + int length; + int flags; + enum enum_ftparser_mode mode; +} MYSQL_FTPARSER_PARAM; + +/* + Full-text parser descriptor. + + interface_version is, e.g., MYSQL_FTPARSER_INTERFACE_VERSION. + The parsing, initialization, and deinitialization functions are + invoked per SQL statement for which the parser is used. +*/ + +struct st_mysql_ftparser +{ + int interface_version; + int (*parse)(MYSQL_FTPARSER_PARAM *param); + int (*init)(MYSQL_FTPARSER_PARAM *param); + int (*deinit)(MYSQL_FTPARSER_PARAM *param); +}; + + +#endif + diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index 65b8e12bc26..0f10a51e044 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -131,7 +131,8 @@ SET(LIBMYSQLD_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc ../sql/strfunc.cc ../sql/table.cc ../sql/thr_malloc.cc ../sql/time.cc ../sql/tztime.cc ../sql/uniques.cc ../sql/unireg.cc ../sql/partition_info.cc ../sql/sql_connect.cc - ../sql/scheduler.cc ../sql/event_parse_data.cc + ../sql/scheduler.cc ../sql/sql_audit.cc + ../sql/event_parse_data.cc ../sql/sql_signal.cc ../sql/rpl_handler.cc ${GEN_SOURCES} ${LIB_SOURCES}) diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index ec73741eaaf..06f075d64dd 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -78,8 +78,8 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ debug_sync.cc \ sql_tablespace.cc \ rpl_injector.cc my_user.c partition_info.cc \ - sql_servers.cc event_parse_data.cc sql_signal.cc \ - rpl_handler.cc + sql_servers.cc sql_audit.cc event_parse_data.cc \ + sql_signal.cc rpl_handler.cc libmysqld_int_a_SOURCES= $(libmysqld_sources) nodist_libmysqld_int_a_SOURCES= $(libmysqlsources) $(sqlsources) diff --git a/plugin/audit_null/Makefile.am b/plugin/audit_null/Makefile.am new file mode 100644 index 00000000000..d57a72f8c18 --- /dev/null +++ b/plugin/audit_null/Makefile.am @@ -0,0 +1,32 @@ +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +#Makefile.am example for a plugin + +pkgplugindir= $(pkglibdir)/plugin + +AM_CPPFLAGS = -I$(top_srcdir)/include + +EXTRA_LTLIBRARIES= adt_null.la +pkgplugin_LTLIBRARIES= @plugin_audit_null_shared_target@ +adt_null_la_LDFLAGS= -module -rpath $(pkgplugindir) +adt_null_la_CPPFLAGS= $(AM_CPPFLAGS) -DMYSQL_DYNAMIC_PLUGIN +adt_null_la_SOURCES= audit_null.c + +EXTRA_LIBRARIES= libadtnull.a +noinst_LIBRARIES= @plugin_audit_null_static_target@ +libadtnull_a_SOURCES= audit_null.c + +EXTRA_DIST= plug.in diff --git a/plugin/audit_null/audit_null.c b/plugin/audit_null/audit_null.c new file mode 100644 index 00000000000..52a9df08cf4 --- /dev/null +++ b/plugin/audit_null/audit_null.c @@ -0,0 +1,130 @@ +/* Copyright (C) 2006-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include +#include +#include + +#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8) +#define __attribute__(A) +#endif + +static volatile int number_of_calls; /* for SHOW STATUS, see below */ + + +/* + Initialize the plugin at server start or plugin installation. + + SYNOPSIS + audit_null_plugin_init() + + DESCRIPTION + Does nothing. + + RETURN VALUE + 0 success + 1 failure (cannot happen) +*/ + +static int audit_null_plugin_init(void *arg __attribute__((unused))) +{ + number_of_calls= 0; + return(0); +} + + +/* + Terminate the plugin at server shutdown or plugin deinstallation. + + SYNOPSIS + audit_null_plugin_deinit() + Does nothing. + + RETURN VALUE + 0 success + 1 failure (cannot happen) + +*/ + +static int audit_null_plugin_deinit(void *arg __attribute__((unused))) +{ + printf("audit_null was invoked %u times\n", number_of_calls); + return(0); +} + + +/* + Foo + + SYNOPSIS + audit_null_notify() + thd connection context + + DESCRIPTION +*/ + +static void audit_null_notify(MYSQL_THD thd __attribute__((unused)), + const struct mysql_event *event + __attribute__((unused))) +{ + /* prone to races, oh well */ + number_of_calls++; +} + + +/* + Plugin type-specific descriptor +*/ + +static struct st_mysql_audit audit_null_descriptor= +{ + MYSQL_AUDIT_INTERFACE_VERSION, /* interface version */ + NULL, /* release_thd function */ + audit_null_notify, /* notify function */ + { (unsigned long) -1 } /* class mask */ +}; + +/* + Plugin status variables for SHOW STATUS +*/ + +static struct st_mysql_show_var simple_status[]= +{ + {"audit_null_called", (char *)&number_of_calls, SHOW_INT}, + {0,0,0} +}; + + +/* + Plugin library descriptor +*/ + +mysql_declare_plugin(audit_null) +{ + MYSQL_AUDIT_PLUGIN, /* type */ + &audit_null_descriptor, /* descriptor */ + "NULL_AUDIT", /* name */ + "MySQL AB", /* author */ + "Simple NULL Audit", /* description */ + PLUGIN_LICENSE_GPL, + audit_null_plugin_init, /* init function (when loaded) */ + audit_null_plugin_deinit, /* deinit function (when unloaded) */ + 0x0001, /* version */ + simple_status, /* status variables */ + NULL, /* system variables */ + NULL +} +mysql_declare_plugin_end; + diff --git a/plugin/audit_null/plug.in b/plugin/audit_null/plug.in new file mode 100644 index 00000000000..15b1a48b408 --- /dev/null +++ b/plugin/audit_null/plug.in @@ -0,0 +1,4 @@ +MYSQL_PLUGIN(audit_null, [NULL Audit Plug-in], + [Simple black-hole Audit example plug-in]) +MYSQL_PLUGIN_DYNAMIC(audit_null, [adt_null.la]) +MYSQL_PLUGIN_STATIC(audit_null, [libadtnull.a]) diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 15c2d950ff9..0b9d50ff066 100755 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -73,7 +73,7 @@ SET (SQL_SOURCE event_queue.cc event_db_repository.cc sql_tablespace.cc events.cc ../sql-common/my_user.c partition_info.cc rpl_utility.cc rpl_injector.cc sql_locale.cc - rpl_rli.cc rpl_mi.cc sql_servers.cc + rpl_rli.cc rpl_mi.cc sql_servers.cc sql_audit.cc sql_connect.cc scheduler.cc sql_profile.cc event_parse_data.cc sql_signal.cc rpl_handler.cc diff --git a/sql/Makefile.am b/sql/Makefile.am index 15ee0d588c4..64f743c39f7 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -111,6 +111,7 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \ sql_plugin.h authors.h event_parse_data.h \ event_data_objects.h event_scheduler.h \ sql_partition.h partition_info.h partition_element.h \ + sql_audit.h \ contributors.h sql_servers.h sql_signal.h records.h \ sql_prepare.h rpl_handler.h replication.h @@ -157,7 +158,8 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \ event_queue.cc event_db_repository.cc events.cc \ sql_plugin.cc sql_binlog.cc \ sql_builtin.cc sql_tablespace.cc partition_info.cc \ - sql_servers.cc event_parse_data.cc sql_signal.cc \ + sql_servers.cc sql_audit.cc \ + event_parse_data.cc sql_signal.cc \ rpl_handler.cc nodist_mysqld_SOURCES = mini_client_errors.c pack.c client.c my_time.c my_user.c diff --git a/sql/event_queue.cc b/sql/event_queue.cc index 04d4f858b43..0554e92dde6 100644 --- a/sql/event_queue.cc +++ b/sql/event_queue.cc @@ -16,6 +16,7 @@ #include "mysql_priv.h" #include "event_queue.h" #include "event_data_objects.h" +#include "sql_audit.h" /** @addtogroup Event_Scheduler @@ -581,6 +582,9 @@ Event_queue::get_top_for_execution_if_time(THD *thd, /* There are no events in the queue */ next_activation_at= 0; + /* Release any held audit resources before waiting */ + mysql_audit_release(thd); + /* Wait on condition until signaled. Release LOCK_queue while waiting. */ cond_wait(thd, NULL, queue_empty_msg, SCHED_FUNC, __LINE__); @@ -600,6 +604,10 @@ Event_queue::get_top_for_execution_if_time(THD *thd, */ struct timespec top_time; set_timespec(top_time, next_activation_at - thd->query_start()); + + /* Release any held audit resources before waiting */ + mysql_audit_release(thd); + cond_wait(thd, &top_time, queue_wait_msg, SCHED_FUNC, __LINE__); continue; diff --git a/sql/log.cc b/sql/log.cc index f488dda1e56..ce309a0d1b2 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -28,6 +28,7 @@ #include "sql_repl.h" #include "rpl_filter.h" #include "rpl_rli.h" +#include "sql_audit.h" #include #include @@ -1088,6 +1089,14 @@ bool LOGGER::general_log_write(THD *thd, enum enum_server_command command, user_host_buff; current_time= my_time(0); + + mysql_audit_general(thd, MYSQL_AUDIT_GENERAL_LOG, 0, current_time, + user_host_buff, user_host_len, + command_name[(uint) command].str, + command_name[(uint) command].length, + query, query_length, + thd->variables.character_set_client,0); + while (*current_handler) error|= (*current_handler++)-> log_general(thd, current_time, user_host_buff, diff --git a/sql/mysqld.cc b/sql/mysqld.cc index c72e81d6ba1..6803e0ef8a9 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -26,6 +26,7 @@ #include "mysqld_suffix.h" #include "mysys_err.h" #include "events.h" +#include "sql_audit.h" #include "probes_mysql.h" #include "debug_sync.h" @@ -834,6 +835,7 @@ static void close_server_sock(); static void clean_up_mutexes(void); static void wait_for_signal_thread_to_end(void); static void create_pid_file(); +static void mysqld_exit(int exit_code) __attribute__((noreturn)); static void end_ssl(); #endif @@ -1243,6 +1245,7 @@ void unireg_end(void) #endif } + extern "C" void unireg_abort(int exit_code) { DBUG_ENTER("unireg_abort"); @@ -1253,14 +1256,19 @@ extern "C" void unireg_abort(int exit_code) sql_print_error("Aborting\n"); clean_up(!opt_help && (exit_code || !opt_bootstrap)); /* purecov: inspected */ DBUG_PRINT("quit",("done with cleanup in unireg_abort")); + mysqld_exit(exit_code); +} + +static void mysqld_exit(int exit_code) +{ wait_for_signal_thread_to_end(); + mysql_audit_finalize(); clean_up_mutexes(); my_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0); exit(exit_code); /* purecov: inspected */ } -#endif /*EMBEDDED_LIBRARY*/ - +#endif /* !EMBEDDED_LIBRARY */ void clean_up(bool print_message) { @@ -2917,6 +2925,13 @@ void my_message_sql(uint error, const char *str, myf MyFlags) if (thd) { + mysql_audit_general(thd,MYSQL_AUDIT_GENERAL_ERROR,error,my_time(0), + 0,0,str,str ? strlen(str) : 0, + thd->query(), thd->query_length(), + thd->variables.character_set_client, + thd->warning_info->current_row_for_warning()); + + if (MyFlags & ME_FATALERROR) thd->is_fatal_error= 1; (void) thd->raise_condition(error, @@ -4323,6 +4338,9 @@ int main(int argc, char **argv) thr_kill_signal= SIGINT; #endif + /* Initialize audit interface globals. Audit plugins are inited later. */ + mysql_audit_initialize(); + /* Perform basic logger initialization logger. Should be called after MY_INIT, as it initializes mutexes. Log tables are inited later. @@ -4589,15 +4607,10 @@ int main(int argc, char **argv) } #endif clean_up(1); - wait_for_signal_thread_to_end(); - clean_up_mutexes(); - my_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0); - - exit(0); - return(0); /* purecov: deadcode */ + mysqld_exit(0); } -#endif /* EMBEDDED_LIBRARY */ +#endif /* !EMBEDDED_LIBRARY */ /**************************************************************************** diff --git a/sql/sql_audit.cc b/sql/sql_audit.cc new file mode 100644 index 00000000000..0e9b5302728 --- /dev/null +++ b/sql/sql_audit.cc @@ -0,0 +1,448 @@ +/* Copyright (C) 2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include "mysql_priv.h" +#include "sql_audit.h" + +extern int initialize_audit_plugin(st_plugin_int *plugin); +extern int finalize_audit_plugin(st_plugin_int *plugin); + +#ifndef EMBEDDED_LIBRARY + +unsigned long mysql_global_audit_mask[MYSQL_AUDIT_CLASS_MASK_SIZE]; + +static pthread_mutex_t LOCK_audit_mask; + +static void event_class_dispatch(THD *thd, const struct mysql_event *event); + + +static inline +void set_audit_mask(unsigned long *mask, uint event_class) +{ + mask[0]= 1; + mask[0]<<= event_class; +} + +static inline +void add_audit_mask(unsigned long *mask, const unsigned long *rhs) +{ + mask[0]|= rhs[0]; +} + +static inline +bool check_audit_mask(const unsigned long *lhs, + const unsigned long *rhs) +{ + return !(lhs[0] & rhs[0]); +} + + +typedef void (*audit_handler_t)(THD *thd, uint event_subtype, va_list ap); + +/** + MYSQL_AUDIT_GENERAL_CLASS handler + + @param[in] thd + @param[in] event_subtype + @param[in] error_code + @param[in] ap + +*/ + +static void general_class_handler(THD *thd, uint event_subtype, va_list ap) +{ + mysql_event_general event; + event.event_class= MYSQL_AUDIT_GENERAL_CLASS; + event.general_error_code= va_arg(ap, int); + event.general_thread_id= thd ? thd->thread_id : 0; + event.general_time= va_arg(ap, time_t); + event.general_user= va_arg(ap, const char *); + event.general_user_length= va_arg(ap, unsigned int); + event.general_command= va_arg(ap, const char *); + event.general_command_length= va_arg(ap, unsigned int); + event.general_query= va_arg(ap, const char *); + event.general_query_length= va_arg(ap, unsigned int); + event.general_charset= va_arg(ap, struct charset_info_st *); + event.general_rows= (unsigned long long) va_arg(ap, ha_rows); + event_class_dispatch(thd, (const mysql_event*) &event); +} + + +static audit_handler_t audit_handlers[] = +{ + general_class_handler +}; + +static const uint audit_handlers_count= + (sizeof(audit_handlers) / sizeof(audit_handler_t)); + + +/** + Acquire and lock any additional audit plugins as required + + @param[in] thd + @param[in] plugin + @param[in] arg + + @retval FALSE Always +*/ + +static my_bool acquire_plugins(THD *thd, plugin_ref plugin, void *arg) +{ + uint event_class= *(uint*) arg; + unsigned long event_class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE]; + st_mysql_audit *data= plugin_data(plugin, struct st_mysql_audit *); + + set_audit_mask(event_class_mask, event_class); + + /* Check if this plugin is interested in the event */ + if (check_audit_mask(data->class_mask, event_class_mask)) + return 0; + + /* + Check if this plugin may already be registered. This will fail to + acquire a newly installed plugin on a specific corner case where + one or more event classes already in use by the calling thread + are an event class of which the audit plugin has interest. + */ + if (!check_audit_mask(data->class_mask, thd->audit_class_mask)) + return 0; + + /* Check if we need to initialize the array of acquired plugins */ + if (unlikely(!thd->audit_class_plugins.buffer)) + { + /* specify some reasonable initialization defaults */ + my_init_dynamic_array(&thd->audit_class_plugins, + sizeof(plugin_ref), 16, 16); + } + + /* lock the plugin and add it to the list */ + plugin= my_plugin_lock(NULL, &plugin); + insert_dynamic(&thd->audit_class_plugins, (uchar*) &plugin); + + return 0; +} + + +/** + Notify the audit system of an event + + @param[in] thd + @param[in] event_class + @param[in] event_subtype + @param[in] error_code + +*/ + +void mysql_audit_notify(THD *thd, uint event_class, uint event_subtype, ...) +{ + va_list ap; + audit_handler_t *handlers= audit_handlers + event_class; + unsigned long event_class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE]; + + DBUG_ASSERT(event_class < audit_handlers_count); + + set_audit_mask(event_class_mask, event_class); + /* + Check to see if we have acquired the audit plugins for the + required audit event classes. + */ + if (thd && check_audit_mask(thd->audit_class_mask, event_class_mask)) + { + plugin_foreach(thd, acquire_plugins, MYSQL_AUDIT_PLUGIN, &event_class); + add_audit_mask(thd->audit_class_mask, event_class_mask); + } + + va_start(ap, event_subtype); + (*handlers)(thd, event_subtype, ap); + va_end(ap); +} + + +/** + Release any resources associated with the current thd. + + @param[in] thd + +*/ + +void mysql_audit_release(THD *thd) +{ + plugin_ref *plugins, *plugins_last; + + if (!thd || !(thd->audit_class_plugins.elements)) + return; + + plugins= (plugin_ref*) thd->audit_class_plugins.buffer; + plugins_last= plugins + thd->audit_class_plugins.elements; + for (; plugins < plugins_last; plugins++) + { + st_mysql_audit *data= plugin_data(*plugins, struct st_mysql_audit *); + + /* Check to see if the plugin has a release method */ + if (!(data->release_thd)) + continue; + + /* Tell the plugin to release its resources */ + data->release_thd(thd); + } + + /* Now we actually unlock the plugins */ + plugin_unlock_list(NULL, (plugin_ref*) thd->audit_class_plugins.buffer, + thd->audit_class_plugins.elements); + + /* Reset the state of thread values */ + reset_dynamic(&thd->audit_class_plugins); + bzero(thd->audit_class_mask, sizeof(thd->audit_class_mask)); +} + + +/** + Initialize thd variables used by Audit + + @param[in] thd + +*/ + +void mysql_audit_init_thd(THD *thd) +{ + bzero(&thd->audit_class_plugins, sizeof(thd->audit_class_plugins)); + bzero(thd->audit_class_mask, sizeof(thd->audit_class_mask)); +} + + +/** + Free thd variables used by Audit + + @param[in] thd + @param[in] plugin + @param[in] arg + + @retval FALSE Always +*/ + +void mysql_audit_free_thd(THD *thd) +{ + mysql_audit_release(thd); + DBUG_ASSERT(thd->audit_class_plugins.elements == 0); + delete_dynamic(&thd->audit_class_plugins); +} + + +/** + Initialize Audit global variables +*/ + +void mysql_audit_initialize() +{ + pthread_mutex_init(&LOCK_audit_mask, MY_MUTEX_INIT_FAST); + bzero(mysql_global_audit_mask, sizeof(mysql_global_audit_mask)); +} + + +/** + Finalize Audit global variables +*/ + +void mysql_audit_finalize() +{ + pthread_mutex_destroy(&LOCK_audit_mask); +} + + +/** + Initialize an Audit plug-in + + @param[in] plugin + + @retval FALSE OK + @retval TRUE There was an error. +*/ + +int initialize_audit_plugin(st_plugin_int *plugin) +{ + st_mysql_audit *data= (st_mysql_audit*) plugin->plugin->info; + + if (!data->class_mask || !data->event_notify || + !data->class_mask[0]) + { + sql_print_error("Plugin '%s' has invalid data.", + plugin->name.str); + return 1; + } + + if (plugin->plugin->init && plugin->plugin->init(NULL)) + { + sql_print_error("Plugin '%s' init function returned error.", + plugin->name.str); + return 1; + } + + /* Make the interface info more easily accessible */ + plugin->data= plugin->plugin->info; + + /* Add the bits the plugin is interested in to the global mask */ + pthread_mutex_lock(&LOCK_audit_mask); + add_audit_mask(mysql_global_audit_mask, data->class_mask); + pthread_mutex_unlock(&LOCK_audit_mask); + + return 0; +} + + +/** + Performs a bitwise OR of the installed plugins event class masks + + @param[in] thd + @param[in] plugin + @param[in] arg + + @retval FALSE always +*/ +static my_bool calc_class_mask(THD *thd, plugin_ref plugin, void *arg) +{ + st_mysql_audit *data= plugin_data(plugin, struct st_mysql_audit *); + if ((data= plugin_data(plugin, struct st_mysql_audit *))) + add_audit_mask((unsigned long *) arg, data->class_mask); + return 0; +} + + +/** + Finalize an Audit plug-in + + @param[in] plugin + + @retval FALSE OK + @retval TRUE There was an error. +*/ +int finalize_audit_plugin(st_plugin_int *plugin) +{ + unsigned long event_class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE]; + + if (plugin->plugin->deinit && plugin->plugin->deinit(NULL)) + { + DBUG_PRINT("warning", ("Plugin '%s' deinit function returned error.", + plugin->name.str)); + DBUG_EXECUTE("finalize_audit_plugin", return 1; ); + } + + plugin->data= NULL; + bzero(&event_class_mask, sizeof(event_class_mask)); + + /* Iterate through all the installed plugins to create new mask */ + pthread_mutex_lock(&LOCK_audit_mask); + plugin_foreach(current_thd, calc_class_mask, MYSQL_AUDIT_PLUGIN, + &event_class_mask); + + /* Set the global audit mask */ + bmove(mysql_global_audit_mask, event_class_mask, sizeof(event_class_mask)); + pthread_mutex_unlock(&LOCK_audit_mask); + + return 0; +} + + +/** + Dispatches an event by invoking the plugin's event_notify method. + + @param[in] thd + @param[in] plugin + @param[in] arg + + @retval FALSE always +*/ + +static my_bool plugins_dispatch(THD *thd, plugin_ref plugin, void *arg) +{ + const struct mysql_event *event= (const struct mysql_event *) arg; + unsigned long event_class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE]; + st_mysql_audit *data= plugin_data(plugin, struct st_mysql_audit *); + + set_audit_mask(event_class_mask, event->event_class); + + /* Check to see if the plugin is interested in this event */ + if (check_audit_mask(data->class_mask, event_class_mask)) + return 0; + + /* Actually notify the plugin */ + data->event_notify(thd, event); + + return 0; +} + + +/** + Distributes an audit event to plug-ins + + @param[in] thd + @param[in] event +*/ + +static void event_class_dispatch(THD *thd, const struct mysql_event *event) +{ + /* + Check if we are doing a slow global dispatch. This event occurs when + thd == NULL as it is not associated with any particular thread. + */ + if (unlikely(!thd)) + { + plugin_foreach(thd, plugins_dispatch, MYSQL_AUDIT_PLUGIN, (void*) event); + } + else + { + plugin_ref *plugins, *plugins_last; + + /* Use the cached set of audit plugins */ + plugins= (plugin_ref*) thd->audit_class_plugins.buffer; + plugins_last= plugins + thd->audit_class_plugins.elements; + + for (; plugins < plugins_last; plugins++) + plugins_dispatch(thd, *plugins, (void*) event); + } +} + + +#else /* EMBEDDED_LIBRARY */ + + +void mysql_audit_initialize() +{ +} + + +void mysql_audit_finalize() +{ +} + + +int initialize_audit_plugin(st_plugin_int *plugin) +{ + return 1; +} + + +int finalize_audit_plugin(st_plugin_int *plugin) +{ + return 0; +} + + +void mysql_audit_release(THD *thd) +{ +} + + +#endif /* EMBEDDED_LIBRARY */ diff --git a/sql/sql_audit.h b/sql/sql_audit.h new file mode 100644 index 00000000000..155211e7ba5 --- /dev/null +++ b/sql/sql_audit.h @@ -0,0 +1,78 @@ +#ifndef SQL_AUDIT_INCLUDED +#define SQL_AUDIT_INCLUDED + +/* Copyright (C) 2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include + +extern unsigned long mysql_global_audit_mask[]; + + +extern void mysql_audit_initialize(); +extern void mysql_audit_finalize(); + + +extern void mysql_audit_init_thd(THD *thd); +extern void mysql_audit_free_thd(THD *thd); + + +extern void mysql_audit_notify(THD *thd, uint event_class, + uint event_subtype, ...); +extern void mysql_audit_release(THD *thd); + + + +/** + Call audit plugins of GENERAL audit class. + event_subtype should be set to one of: + MYSQL_AUDIT_GENERAL_LOG + MYSQL_AUDIT_GENERAL_ERROR + MYSQL_AUDIT_GENERAL_RESULT + + @param[in] thd + @param[in] event_subtype Type of general audit event. + @param[in] error_code Error code + @param[in] time time that event occurred + @param[in] user User name + @param[in] userlen User name length + @param[in] cmd Command name + @param[in] cmdlen Command name length + @param[in] query Query string + @param[in] querylen Query string length + @param[in] clientcs Charset of query string + @param[in] rows Number of affected rows +*/ + +static inline +void mysql_audit_general(THD *thd, uint event_subtype, + int error_code, time_t time, + const char *user, uint userlen, + const char *cmd, uint cmdlen, + const char *query, uint querylen, + CHARSET_INFO *clientcs, + ha_rows rows) +{ +#ifndef EMBEDDED_LIBRARY + if (mysql_global_audit_mask[0] & MYSQL_AUDIT_GENERAL_CLASSMASK) + mysql_audit_notify(thd, MYSQL_AUDIT_GENERAL_CLASS, event_subtype, + error_code, time, user, userlen, cmd, cmdlen, + query, querylen, clientcs, rows); +#endif +} + + +#endif /* SQL_AUDIT_INCLUDED */ diff --git a/sql/sql_class.cc b/sql/sql_class.cc index ee5c27c3a00..3e493011925 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -32,6 +32,7 @@ #include "slave.h" #include #include "log_event.h" +#include "sql_audit.h" #include #include #include @@ -519,6 +520,7 @@ THD::THD() dbug_sentry=THD_SENTRY_MAGIC; #endif #ifndef EMBEDDED_LIBRARY + mysql_audit_init_thd(this); net.vio=0; #endif client_capabilities= 0; // minimalistic client @@ -1052,6 +1054,7 @@ THD::~THD() cleanup(); ha_close_connection(this); + mysql_audit_release(this); plugin_thdvar_cleanup(this); DBUG_PRINT("info", ("freeing security context")); @@ -1069,6 +1072,8 @@ THD::~THD() delete rli_fake; rli_fake= NULL; } + + mysql_audit_free_thd(this); #endif free_root(&main_mem_root, MYF(0)); diff --git a/sql/sql_class.h b/sql/sql_class.h index 55bb3e754de..056849db062 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -23,6 +23,7 @@ #pragma interface /* gcc class implementation */ #endif +#include #include "log.h" #include "rpl_tblmap.h" @@ -1803,6 +1804,20 @@ public: partition_info *work_part_info; #endif +#ifndef EMBEDDED_LIBRARY + /** + Array of active audit plugins which have been used by this THD. + This list is later iterated to invoke release_thd() on those + plugins. + */ + DYNAMIC_ARRAY audit_class_plugins; + /** + Array of bits indicating which audit classes have already been + added to the list of audit plugins which are currently in use. + */ + unsigned long audit_class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE]; +#endif + #if defined(ENABLED_DEBUG_SYNC) /* Debug Sync facility. See debug_sync.cc. */ struct st_debug_sync_control *debug_sync_control; diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index 8ecafce6f93..ce17f7f9adf 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -19,6 +19,7 @@ */ #include "mysql_priv.h" +#include "sql_audit.h" #include "probes_mysql.h" #ifdef HAVE_OPENSSL @@ -1160,6 +1161,7 @@ pthread_handler_t handle_one_connection(void *arg) while (!net->error && net->vio != 0 && !(thd->killed == THD::KILL_CONNECTION)) { + mysql_audit_release(thd); if (do_command(thd)) break; } diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 0cf346f9cb3..8ec70cd48df 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -61,6 +61,7 @@ #include "sql_show.h" #include "slave.h" #include "rpl_mi.h" +#include "sql_audit.h" #ifndef EMBEDDED_LIBRARY static bool delayed_get_table(THD *thd, TABLE_LIST *table_list); @@ -2431,6 +2432,7 @@ pthread_handler_t handle_delayed_insert(void *arg) while (!thd->killed) { int error; + mysql_audit_release(thd); #if defined(HAVE_BROKEN_COND_TIMEDWAIT) error=pthread_cond_wait(&di->cond,&di->mutex); #else @@ -2512,6 +2514,7 @@ pthread_handler_t handle_delayed_insert(void *arg) mysql_unlock_tables(thd, lock); ha_autocommit_or_rollback(thd, 0); di->group_count=0; + mysql_audit_release(thd); pthread_mutex_lock(&di->mutex); } if (di->tables_in_use) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index fe31b880d1c..9328b29f182 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -28,6 +28,7 @@ #include "sp_cache.h" #include "events.h" #include "sql_trigger.h" +#include "sql_audit.h" #include "sql_prepare.h" #include "probes_mysql.h" @@ -1483,6 +1484,15 @@ bool dispatch_command(enum enum_server_command command, THD *thd, /* Free tables */ close_thread_tables(thd); + if (!thd->is_error() && !thd->killed_errno()) + { + mysql_audit_general(thd,MYSQL_AUDIT_GENERAL_RESULT,0,my_time(0), + 0,0,0,0, + thd->query(), thd->query_length(), + thd->variables.character_set_client, + thd->warning_info->current_row_for_warning()); + } + log_slow_statement(thd); thd_proc_info(thd, "cleaning up"); diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index d15c97de912..bcaeb452894 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -16,6 +16,7 @@ #include "mysql_priv.h" #include #include +#include #define REPORT_TO_LOG 1 #define REPORT_TO_USER 2 @@ -47,12 +48,16 @@ const LEX_STRING plugin_type_names[MYSQL_MAX_PLUGIN_TYPE_NUM]= { C_STRING_WITH_LEN("FTPARSER") }, { C_STRING_WITH_LEN("DAEMON") }, { C_STRING_WITH_LEN("INFORMATION SCHEMA") }, + { C_STRING_WITH_LEN("AUDIT") }, { C_STRING_WITH_LEN("REPLICATION") }, }; extern int initialize_schema_table(st_plugin_int *plugin); extern int finalize_schema_table(st_plugin_int *plugin); +extern int initialize_audit_plugin(st_plugin_int *plugin); +extern int finalize_audit_plugin(st_plugin_int *plugin); + /* The number of elements in both plugin_type_initialize and plugin_type_deinitialize should equal to the number of plugins @@ -60,12 +65,14 @@ extern int finalize_schema_table(st_plugin_int *plugin); */ plugin_type_init plugin_type_initialize[MYSQL_MAX_PLUGIN_TYPE_NUM]= { - 0,ha_initialize_handlerton,0,0,initialize_schema_table + 0,ha_initialize_handlerton,0,0,initialize_schema_table, + initialize_audit_plugin }; plugin_type_init plugin_type_deinitialize[MYSQL_MAX_PLUGIN_TYPE_NUM]= { - 0,ha_finalize_handlerton,0,0,finalize_schema_table + 0,ha_finalize_handlerton,0,0,finalize_schema_table, + finalize_audit_plugin }; #ifdef HAVE_DLOPEN @@ -87,6 +94,7 @@ static int min_plugin_info_interface_version[MYSQL_MAX_PLUGIN_TYPE_NUM]= MYSQL_FTPARSER_INTERFACE_VERSION, MYSQL_DAEMON_INTERFACE_VERSION, MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION, + MYSQL_AUDIT_INTERFACE_VERSION, MYSQL_REPLICATION_INTERFACE_VERSION, }; static int cur_plugin_info_interface_version[MYSQL_MAX_PLUGIN_TYPE_NUM]= @@ -96,6 +104,7 @@ static int cur_plugin_info_interface_version[MYSQL_MAX_PLUGIN_TYPE_NUM]= MYSQL_FTPARSER_INTERFACE_VERSION, MYSQL_DAEMON_INTERFACE_VERSION, MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION, + MYSQL_AUDIT_INTERFACE_VERSION, MYSQL_REPLICATION_INTERFACE_VERSION, }; @@ -1341,26 +1350,22 @@ end: */ static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv) { + THD thd; TABLE_LIST tables; TABLE *table; READ_RECORD read_record_info; int error; - THD *new_thd; + THD *new_thd= &thd; #ifdef EMBEDDED_LIBRARY bool table_exists; #endif /* EMBEDDED_LIBRARY */ DBUG_ENTER("plugin_load"); - if (!(new_thd= new THD)) - { - sql_print_error("Can't allocate memory for plugin structures"); - delete new_thd; - DBUG_VOID_RETURN; - } new_thd->thread_stack= (char*) &tables; new_thd->store_globals(); new_thd->db= my_strdup("mysql", MYF(0)); new_thd->db_length= 5; + bzero((char*) &thd.net, sizeof(thd.net)); bzero((uchar*)&tables, sizeof(tables)); tables.alias= tables.table_name= (char*)"plugin"; tables.lock_type= TL_READ; @@ -1418,7 +1423,6 @@ static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv) new_thd->version--; // Force close to free memory end: close_thread_tables(new_thd); - delete new_thd; /* Remember that we don't have a THD */ my_pthread_setspecific_ptr(THR_THD, 0); DBUG_VOID_RETURN; From 9130563708cbdbb488e5361af79eb9f4b9dab0ea Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Wed, 16 Dec 2009 15:56:36 +0400 Subject: [PATCH 008/132] Backport from 6.0-codebase. Bug #36098 Audit plugin (wl 3771) feature disabled in 6.0 avoid recusrive locking of LOCK_plugin include/mysql/plugin_audit.h: fix incorrect version sql/log.cc: move the common code to a shared header sql/mysqld.cc: restore the deleted functionality sql/set_var.cc: remove unused parameter sql/sql_audit.h: two inline convenience functions sql/sql_parse.cc: use a simplified convenience call sql/sql_plugin.cc: unlock LOCK_plugin for plugin->init() call, add missing OOM check, issue "unknown variable" error in find_sys_var, not down the stack --- include/mysql/plugin_audit.h | 3 +- sql/log.cc | 20 +++----- sql/mysqld.cc | 9 +--- sql/set_var.cc | 6 +-- sql/sql_audit.h | 89 ++++++++++++++++++++++++++++-------- sql/sql_parse.cc | 8 +--- sql/sql_plugin.cc | 27 ++++++----- 7 files changed, 97 insertions(+), 65 deletions(-) diff --git a/include/mysql/plugin_audit.h b/include/mysql/plugin_audit.h index 644e0acc8f7..8932767075d 100644 --- a/include/mysql/plugin_audit.h +++ b/include/mysql/plugin_audit.h @@ -24,8 +24,7 @@ #define MYSQL_AUDIT_CLASS_MASK_SIZE 1 -#define MYSQL_AUDIT_INTERFACE_VERSION ( 0x010000 | MYSQL_AUDIT_CLASS_MASK_SIZE ) - +#define MYSQL_AUDIT_INTERFACE_VERSION 0x0100 /* The first word in every event class struct indicates the specific diff --git a/sql/log.cc b/sql/log.cc index ce309a0d1b2..267ca90db29 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -43,7 +43,6 @@ /* max size of the log message */ #define MAX_LOG_BUFFER_SIZE 1024 -#define MAX_USER_HOST_SIZE 512 #define MAX_TIME_SIZE 32 #define MY_OFF_T_UNDEF (~(my_off_t)0UL) @@ -1069,7 +1068,6 @@ bool LOGGER::general_log_write(THD *thd, enum enum_server_command command, bool error= FALSE; Log_event_handler **current_handler= general_log_handler_list; char user_host_buff[MAX_USER_HOST_SIZE + 1]; - Security_context *sctx= thd->security_ctx; uint user_host_len= 0; time_t current_time; @@ -1081,21 +1079,15 @@ bool LOGGER::general_log_write(THD *thd, enum enum_server_command command, unlock(); return 0; } - user_host_len= strxnmov(user_host_buff, MAX_USER_HOST_SIZE, - sctx->priv_user ? sctx->priv_user : "", "[", - sctx->user ? sctx->user : "", "] @ ", - sctx->host ? sctx->host : "", " [", - sctx->ip ? sctx->ip : "", "]", NullS) - - user_host_buff; + user_host_len= make_user_name(thd, user_host_buff); current_time= my_time(0); - mysql_audit_general(thd, MYSQL_AUDIT_GENERAL_LOG, 0, current_time, - user_host_buff, user_host_len, - command_name[(uint) command].str, - command_name[(uint) command].length, - query, query_length, - thd->variables.character_set_client,0); + mysql_audit_general_log(thd, current_time, + user_host_buff, user_host_len, + command_name[(uint) command].str, + command_name[(uint) command].length, + query, query_length); while (*current_handler) error|= (*current_handler++)-> diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 6803e0ef8a9..860dc0389d0 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2923,15 +2923,10 @@ void my_message_sql(uint error, const char *str, myf MyFlags) error= ER_UNKNOWN_ERROR; } + mysql_audit_general(thd, MYSQL_AUDIT_GENERAL_ERROR, error, str); + if (thd) { - mysql_audit_general(thd,MYSQL_AUDIT_GENERAL_ERROR,error,my_time(0), - 0,0,str,str ? strlen(str) : 0, - thd->query(), thd->query_length(), - thd->variables.character_set_client, - thd->warning_info->current_row_for_warning()); - - if (MyFlags & ME_FATALERROR) thd->is_fatal_error= 1; (void) thd->raise_condition(error, diff --git a/sql/set_var.cc b/sql/set_var.cc index 7a0325c3e68..86b1ef21032 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -3519,7 +3519,6 @@ void set_var_free() @param str Name of system variable to find @param length Length of variable. zero means that we should use strlen() on the variable - @param no_error Refuse to emit an error, even if one occurred. @retval pointer pointer to variable definitions @@ -3527,7 +3526,7 @@ void set_var_free() 0 Unknown variable (error message is given) */ -sys_var *intern_find_sys_var(const char *str, uint length, bool no_error) +sys_var *intern_find_sys_var(const char *str, uint length) { sys_var *var; @@ -3537,9 +3536,6 @@ sys_var *intern_find_sys_var(const char *str, uint length, bool no_error) */ var= (sys_var*) my_hash_search(&system_variable_hash, (uchar*) str, length ? length : strlen(str)); - if (!(var || no_error)) - my_error(ER_UNKNOWN_SYSTEM_VARIABLE, MYF(0), (char*) str); - return var; } diff --git a/sql/sql_audit.h b/sql/sql_audit.h index 155211e7ba5..c25011d0d59 100644 --- a/sql/sql_audit.h +++ b/sql/sql_audit.h @@ -34,18 +34,21 @@ extern void mysql_audit_notify(THD *thd, uint event_class, uint event_subtype, ...); extern void mysql_audit_release(THD *thd); - +#define MAX_USER_HOST_SIZE 512 +static inline uint make_user_name(THD *thd, char *buf) +{ + Security_context *sctx= thd->security_ctx; + return strxnmov(buf, MAX_USER_HOST_SIZE, + sctx->priv_user ? sctx->priv_user : "", "[", + sctx->user ? sctx->user : "", "] @ ", + sctx->host ? sctx->host : "", " [", + sctx->ip ? sctx->ip : "", "]", NullS) - buf; +} /** - Call audit plugins of GENERAL audit class. - event_subtype should be set to one of: - MYSQL_AUDIT_GENERAL_LOG - MYSQL_AUDIT_GENERAL_ERROR - MYSQL_AUDIT_GENERAL_RESULT + Call audit plugins of GENERAL audit class, MYSQL_AUDIT_GENERAL_LOG subtype. @param[in] thd - @param[in] event_subtype Type of general audit event. - @param[in] error_code Error code @param[in] time time that event occurred @param[in] user User name @param[in] userlen User name length @@ -53,24 +56,74 @@ extern void mysql_audit_release(THD *thd); @param[in] cmdlen Command name length @param[in] query Query string @param[in] querylen Query string length - @param[in] clientcs Charset of query string - @param[in] rows Number of affected rows */ static inline -void mysql_audit_general(THD *thd, uint event_subtype, - int error_code, time_t time, - const char *user, uint userlen, - const char *cmd, uint cmdlen, - const char *query, uint querylen, - CHARSET_INFO *clientcs, - ha_rows rows) +void mysql_audit_general_log(THD *thd, time_t time, + const char *user, uint userlen, + const char *cmd, uint cmdlen, + const char *query, uint querylen) { #ifndef EMBEDDED_LIBRARY if (mysql_global_audit_mask[0] & MYSQL_AUDIT_GENERAL_CLASSMASK) + { + CHARSET_INFO *clientcs= thd ? thd->variables.character_set_client + : global_system_variables.character_set_client; + + mysql_audit_notify(thd, MYSQL_AUDIT_GENERAL_CLASS, MYSQL_AUDIT_GENERAL_LOG, + 0, time, user, userlen, cmd, cmdlen, + query, querylen, clientcs, 0); + } +#endif +} + +/** + Call audit plugins of GENERAL audit class. + event_subtype should be set to one of: + MYSQL_AUDIT_GENERAL_ERROR + MYSQL_AUDIT_GENERAL_RESULT + + @param[in] thd + @param[in] event_subtype Type of general audit event. + @param[in] error_code Error code + @param[in] msg Message +*/ +static inline +void mysql_audit_general(THD *thd, uint event_subtype, + int error_code, const char *msg) +{ +#ifndef EMBEDDED_LIBRARY + if (mysql_global_audit_mask[0] & MYSQL_AUDIT_GENERAL_CLASSMASK) + { + time_t time= my_time(0); + uint msglen= msg ? strlen(msg) : 0; + const char *query, *user; + uint querylen, userlen; + char user_buff[MAX_USER_HOST_SIZE]; + CHARSET_INFO *clientcs; + ha_rows rows; + + if (thd) + { + query= thd->query(); + querylen= thd->query_length(); + user= user_buff; + userlen= make_user_name(thd, user_buff); + clientcs= thd->variables.character_set_client; + rows= thd->warning_info->current_row_for_warning(); + } + else + { + query= user= 0; + querylen= userlen= 0; + clientcs= global_system_variables.character_set_client; + rows= 0; + } + mysql_audit_notify(thd, MYSQL_AUDIT_GENERAL_CLASS, event_subtype, - error_code, time, user, userlen, cmd, cmdlen, + error_code, time, user, userlen, msg, msglen, query, querylen, clientcs, rows); + } #endif } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 9328b29f182..eeaefde6588 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1485,13 +1485,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, close_thread_tables(thd); if (!thd->is_error() && !thd->killed_errno()) - { - mysql_audit_general(thd,MYSQL_AUDIT_GENERAL_RESULT,0,my_time(0), - 0,0,0,0, - thd->query(), thd->query_length(), - thd->variables.character_set_client, - thd->warning_info->current_row_for_warning()); - } + mysql_audit_general(thd, MYSQL_AUDIT_GENERAL_RESULT, 0, 0); log_slow_statement(thd); diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index bcaeb452894..9e8b8785d5a 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -229,7 +229,7 @@ static void reap_plugins(void); /* declared in set_var.cc */ -extern sys_var *intern_find_sys_var(const char *str, uint length, bool no_error); +extern sys_var *intern_find_sys_var(const char *str, uint length); extern bool throw_bounds_warning(THD *thd, bool fixed, bool unsignd, const char *name, longlong val); @@ -1014,6 +1014,9 @@ static int plugin_initialize(struct st_plugin_int *plugin) DBUG_ENTER("plugin_initialize"); safe_mutex_assert_owner(&LOCK_plugin); + DBUG_ASSERT(plugin->state == PLUGIN_IS_UNINITIALIZED); + + pthread_mutex_unlock(&LOCK_plugin); if (plugin_type_initialize[plugin->plugin->type]) { if ((*plugin_type_initialize[plugin->plugin->type])(plugin)) @@ -1033,6 +1036,8 @@ static int plugin_initialize(struct st_plugin_int *plugin) } } + pthread_mutex_lock(&LOCK_plugin); + plugin->state= PLUGIN_IS_READY; if (plugin->plugin->status_vars) @@ -1050,9 +1055,10 @@ static int plugin_initialize(struct st_plugin_int *plugin) {0, 0, SHOW_UNDEF} }; if (add_status_vars(array)) // add_status_vars makes a copy - goto err; + goto err1; #else - add_status_vars(plugin->plugin->status_vars); // add_status_vars makes a copy + if (add_status_vars(plugin->plugin->status_vars)) + goto err1; #endif /* FIX_LATER */ } @@ -1074,6 +1080,8 @@ static int plugin_initialize(struct st_plugin_int *plugin) DBUG_RETURN(0); err: + pthread_mutex_lock(&LOCK_plugin); +err1: DBUG_RETURN(1); } @@ -1686,7 +1694,6 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl } else { - DBUG_ASSERT(tmp->state == PLUGIN_IS_UNINITIALIZED); if (plugin_initialize(tmp)) { my_error(ER_CANT_INITIALIZE_UDF, MYF(0), name->str, @@ -2164,7 +2171,7 @@ sys_var *find_sys_var(THD *thd, const char *str, uint length) pthread_mutex_lock(&LOCK_plugin); rw_rdlock(&LOCK_system_variables_hash); - if ((var= intern_find_sys_var(str, length, false)) && + if ((var= intern_find_sys_var(str, length)) && (pi= var->cast_pluginvar())) { rw_unlock(&LOCK_system_variables_hash); @@ -2183,11 +2190,7 @@ sys_var *find_sys_var(THD *thd, const char *str, uint length) rw_unlock(&LOCK_system_variables_hash); pthread_mutex_unlock(&LOCK_plugin); - /* - If the variable exists but the plugin it is associated with is not ready - then the intern_plugin_lock did not raise an error, so we do it here. - */ - if (pi && !var) + if (!var) my_error(ER_UNKNOWN_SYSTEM_VARIABLE, MYF(0), (char*) str); DBUG_RETURN(var); } @@ -2390,7 +2393,7 @@ static uchar *intern_sys_var_ptr(THD* thd, int offset, bool global_lock) st_bookmark *v= (st_bookmark*) my_hash_element(&bookmark_hash,idx); if (v->version <= thd->variables.dynamic_variables_version || - !(var= intern_find_sys_var(v->key + 1, v->name_len, true)) || + !(var= intern_find_sys_var(v->key + 1, v->name_len)) || !(pi= var->cast_pluginvar()) || v->key[0] != (pi->plugin_var->flags & PLUGIN_VAR_TYPEMASK)) continue; @@ -2483,7 +2486,7 @@ static void cleanup_variables(THD *thd, struct system_variables *vars) { v= (st_bookmark*) my_hash_element(&bookmark_hash, idx); if (v->version > vars->dynamic_variables_version || - !(var= intern_find_sys_var(v->key + 1, v->name_len, true)) || + !(var= intern_find_sys_var(v->key + 1, v->name_len)) || !(pivar= var->cast_pluginvar()) || v->key[0] != (pivar->plugin_var->flags & PLUGIN_VAR_TYPEMASK)) continue; From adc17cd41e21cb68d63b9962a97ad075da02999f Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Wed, 16 Dec 2009 19:31:19 +0200 Subject: [PATCH 009/132] Bug #48866: mysql.test fails under Fedora 12 strmov() is not guaranteed to work correctly on overlapping source and destination buffers. On some OSes it may work, but Fedora 12 has a stpcpy() that's not working correctly on overlapping buffers. Fixed to use the overlap-safe version of strmov instead. Re-vitalized the overlap-safe version of strmov. --- client/mysql.cc | 2 +- include/m_string.h | 9 +++------ strings/strmov.c | 6 +----- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index e4eabe8de33..5ae58baa694 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -4108,7 +4108,7 @@ char *get_arg(char *line, my_bool get_next_arg) if (*ptr == '\\' && ptr[1]) // escaped character { // Remove the backslash - strmov(ptr, ptr+1); + strmov_overlapp(ptr, ptr+1); } else if ((!quoted && *ptr == ' ') || (quoted && *ptr == qtype)) { diff --git a/include/m_string.h b/include/m_string.h index c26d0fb9260..5411d0483ea 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -108,9 +108,7 @@ extern char NEAR _dig_vec_lower[]; /* Defined in strtod.c */ extern const double log_10[309]; -#ifdef BAD_STRING_COMPILER -#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1) -#else +#ifndef strmov #define strmov_overlapp(A,B) strmov(A,B) #define strmake_overlapp(A,B,C) strmake(A,B,C) #endif @@ -171,12 +169,11 @@ extern uint strinstr(const char *str,const char *search); extern uint r_strinstr(reg1 my_string str,int from, reg4 my_string search); extern char *strkey(char *dst,char *head,char *tail,char *flags); extern char *strmake(char *dst,const char *src,uint length); -#ifndef strmake_overlapp -extern char *strmake_overlapp(char *dst,const char *src, uint length); -#endif #ifndef strmov extern char *strmov(char *dst,const char *src); +#else +extern char *strmov_overlapp(char *dst,const char *src); #endif extern char *strnmov(char *dst,const char *src,uint n); extern char *strsuff(const char *src,const char *suffix); diff --git a/strings/strmov.c b/strings/strmov.c index 1393411dd8f..eedf22a4ef1 100644 --- a/strings/strmov.c +++ b/strings/strmov.c @@ -24,13 +24,11 @@ #include #include "m_string.h" -#ifdef BAD_STRING_COMPILER +#ifdef strmov #undef strmov #define strmov strmov_overlapp #endif -#ifndef strmov - #if !defined(MC68000) && !defined(DS90) char *strmov(register char *dst, register const char *src) @@ -53,5 +51,3 @@ char *strmov(dst, src) } #endif - -#endif /* strmov */ From 06a1df91813ea2c39f7312bcf8af972c7e8a926f Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Thu, 17 Dec 2009 15:58:38 -0200 Subject: [PATCH 010/132] Bug#48983: Bad strmake calls (length one too long) The problem is a somewhat common misusage of the strmake function. The strmake(dst, src, len) function writes at most /len/ bytes to the string pointed to by src, not including the trailing null byte. Hence, if /len/ is the exact length of the destination buffer, a one byte buffer overflow can occur if the length of the source string is equal to or greater than /len/. client/mysqldump.c: Make room for the trailing null byte. libmysql/libmysql.c: Add comment, there is enough room in the buffer. Increase buffer length, two strings are concatenated. libmysqld/lib_sql.cc: Make room for the trailing null byte. mysys/default.c: Make room for the trailing null bytes. mysys/mf_pack.c: Make room for the trailing null byte. server-tools/instance-manager/commands.cc: Copy only if overflow isn't possible in both cases. server-tools/instance-manager/listener.cc: Make room for the trailing null byte. sql/log.cc: Make room for the trailing null byte. sql/sp_pcontext.h: Cosmetic fix. sql/sql_acl.cc: MAX_HOSTNAME already specifies space for the trailing null byte. sql/sql_parse.cc: Make room for the trailing null byte. sql/sql_table.cc: Make room for the trailing null byte. --- client/mysqldump.c | 4 ++-- libmysql/libmysql.c | 7 +++++-- libmysqld/lib_sql.cc | 2 +- mysys/default.c | 2 +- mysys/mf_pack.c | 4 ++-- server-tools/instance-manager/commands.cc | 2 +- server-tools/instance-manager/listener.cc | 2 +- sql/log.cc | 8 ++++---- sql/sp_pcontext.h | 2 +- sql/sql_acl.cc | 4 ++-- sql/sql_parse.cc | 2 +- sql/sql_table.cc | 2 +- 12 files changed, 22 insertions(+), 19 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index 1918a657316..9bbf718eebf 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -782,7 +782,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), &err_ptr, &err_len); if (err_len) { - strmake(buff, err_ptr, min(sizeof(buff), err_len)); + strmake(buff, err_ptr, min(sizeof(buff) - 1, err_len)); fprintf(stderr, "Invalid mode to --compatible: %s\n", buff); exit(1); } @@ -3452,7 +3452,7 @@ static ulong find_set(TYPELIB *lib, const char *x, uint length, for (; pos != end && *pos != ','; pos++) ; var_len= (uint) (pos - start); - strmake(buff, start, min(sizeof(buff), var_len)); + strmake(buff, start, min(sizeof(buff) - 1, var_len)); find= find_type(buff, lib, var_len); if (!find) { diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index d287679bebb..62feae1b56e 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -712,7 +712,10 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user, if (!passwd) passwd=""; - /* Store user into the buffer */ + /* + Store user into the buffer. + Advance position as strmake returns a pointer to the closing NUL. + */ end= strmake(end, user, USERNAME_LENGTH) + 1; /* write scrambled password according to server capabilities */ @@ -1252,7 +1255,7 @@ mysql_list_fields(MYSQL *mysql, const char *table, const char *wild) { MYSQL_RES *result; MYSQL_FIELD *fields; - char buff[257],*end; + char buff[258],*end; DBUG_ENTER("mysql_list_fields"); DBUG_PRINT("enter",("table: '%s' wild: '%s'",table,wild ? wild : "")); diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index b0a47727c7c..644d4702e55 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -73,7 +73,7 @@ void embedded_get_error(MYSQL *mysql, MYSQL_DATA *data) NET *net= &mysql->net; struct embedded_query_result *ei= data->embedded_info; net->last_errno= ei->last_errno; - strmake(net->last_error, ei->info, sizeof(net->last_error)); + strmake(net->last_error, ei->info, sizeof(net->last_error) - 1); memcpy(net->sqlstate, ei->sqlstate, sizeof(net->sqlstate)); mysql->server_status= ei->server_status; my_free((gptr) data, MYF(0)); diff --git a/mysys/default.c b/mysys/default.c index 362aa0d4605..0d162dc13d5 100644 --- a/mysys/default.c +++ b/mysys/default.c @@ -605,7 +605,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler, int recursion_level) { char name[FN_REFLEN + 10], buff[4096], curr_gr[4096], *ptr, *end, **tmp_ext; - char *value, option[4096], tmp[FN_REFLEN]; + char *value, option[4096+2], tmp[FN_REFLEN]; static const char includedir_keyword[]= "includedir"; static const char include_keyword[]= "include"; const int max_recursion_level= 10; diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c index d2bac95b391..3053699f457 100644 --- a/mysys/mf_pack.c +++ b/mysys/mf_pack.c @@ -234,7 +234,7 @@ my_bool my_use_symdir=0; /* Set this if you want to use symdirs */ #ifdef USE_SYMDIR void symdirget(char *dir) { - char buff[FN_REFLEN]; + char buff[FN_REFLEN+1]; char *pos=strend(dir); if (dir[0] && pos[-1] != FN_DEVCHAR && my_access(dir, F_OK)) { @@ -246,7 +246,7 @@ void symdirget(char *dir) *pos++=temp; *pos=0; /* Restore old filename */ if (file >= 0) { - if ((length= my_read(file, buff, sizeof(buff), MYF(0))) > 0) + if ((length= my_read(file, buff, sizeof(buff) - 1, MYF(0))) > 0) { for (pos= buff + length ; pos > buff && (iscntrl(pos[-1]) || isspace(pos[-1])) ; diff --git a/server-tools/instance-manager/commands.cc b/server-tools/instance-manager/commands.cc index bb3763ce8c5..5e8ba5087af 100644 --- a/server-tools/instance-manager/commands.cc +++ b/server-tools/instance-manager/commands.cc @@ -651,7 +651,7 @@ Set_option::Set_option(Instance_map *instance_map_arg, instance_name= instance->options.instance_name; /* add prefix for add_option */ - if ((option_len_arg < MAX_OPTION_LEN - 1) || + if ((option_len_arg < MAX_OPTION_LEN - 1) && (option_value_len_arg < MAX_OPTION_LEN - 1)) { strmake(option, option_arg, option_len_arg); diff --git a/server-tools/instance-manager/listener.cc b/server-tools/instance-manager/listener.cc index 36f0cbe85e1..653a807e5fc 100644 --- a/server-tools/instance-manager/listener.cc +++ b/server-tools/instance-manager/listener.cc @@ -331,7 +331,7 @@ create_unix_socket(struct sockaddr_un &unix_socket_address) unix_socket_address.sun_family= AF_UNIX; strmake(unix_socket_address.sun_path, options.socket_file_name, - sizeof(unix_socket_address.sun_path)); + sizeof(unix_socket_address.sun_path) - 1); unlink(unix_socket_address.sun_path); // in case we have stale socket file /* diff --git a/sql/log.cc b/sql/log.cc index c042651216c..4aeab534b23 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -501,7 +501,7 @@ const char *MYSQL_LOG::generate_name(const char *log_name, { char *p = fn_ext(log_name); uint length=(uint) (p-log_name); - strmake(buff,log_name,min(length,FN_REFLEN)); + strmake(buff, log_name, min(length, FN_REFLEN-1)); return (const char*)buff; } return log_name; @@ -1503,7 +1503,7 @@ int MYSQL_LOG::purge_logs_before_date(time_t purge_time) if (stat_area.st_mtime < purge_time) strmake(to_log, log_info.log_file_name, - sizeof(log_info.log_file_name)); + sizeof(log_info.log_file_name) - 1); else break; } @@ -2604,11 +2604,11 @@ bool flush_error_log() if (opt_error_log) { char err_renamed[FN_REFLEN], *end; - end= strmake(err_renamed,log_error_file,FN_REFLEN-4); + end= strmake(err_renamed,log_error_file,FN_REFLEN-5); strmov(end, "-old"); VOID(pthread_mutex_lock(&LOCK_error_log)); #ifdef __WIN__ - char err_temp[FN_REFLEN+4]; + char err_temp[FN_REFLEN+5]; /* On Windows is necessary a temporary file for to rename the current error file. diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h index db8bed349f2..cd3011b2c37 100644 --- a/sql/sp_pcontext.h +++ b/sql/sp_pcontext.h @@ -71,7 +71,7 @@ typedef struct sp_label typedef struct sp_cond_type { enum { number, state, warning, notfound, exception } type; - char sqlstate[6]; + char sqlstate[SQLSTATE_LENGTH+1]; uint mysqlerr; } sp_cond_type_t; diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index f29baad9a84..bf117874552 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -914,7 +914,7 @@ int acl_getroot(THD *thd, USER_RESOURCES *mqh, *mqh= acl_user->user_resource; if (acl_user->host.hostname) - strmake(sctx->priv_host, acl_user->host.hostname, MAX_HOSTNAME); + strmake(sctx->priv_host, acl_user->host.hostname, MAX_HOSTNAME - 1); else *sctx->priv_host= 0; } @@ -1015,7 +1015,7 @@ bool acl_getroot_no_password(Security_context *sctx, char *user, char *host, sctx->priv_user= acl_user->user ? user : (char *) ""; if (acl_user->host.hostname) - strmake(sctx->priv_host, acl_user->host.hostname, MAX_HOSTNAME); + strmake(sctx->priv_host, acl_user->host.hostname, MAX_HOSTNAME - 1); else *sctx->priv_host= 0; } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index f34aa3c3bad..48df40f2614 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -917,7 +917,7 @@ static int check_connection(THD *thd) vio_keepalive(net->vio, TRUE); { /* buff[] needs to big enough to hold the server_version variable */ - char buff[SERVER_VERSION_LENGTH + SCRAMBLE_LENGTH + 64]; + char buff[SERVER_VERSION_LENGTH + 1 + SCRAMBLE_LENGTH + 1 + 64]; ulong client_flags = (CLIENT_LONG_FLAG | CLIENT_CONNECT_WITH_DB | CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index e32c17bc678..9432c5c3f89 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -742,7 +742,7 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info, !(sql_field->charset= get_charset_by_csname(sql_field->charset->csname, MY_CS_BINSORT,MYF(0)))) { - char tmp[64]; + char tmp[65]; strmake(strmake(tmp, save_cs->csname, sizeof(tmp)-4), STRING_WITH_LEN("_bin")); my_error(ER_UNKNOWN_COLLATION, MYF(0), tmp); From f815246486444ca2dc5d408099439e1d973d3a7b Mon Sep 17 00:00:00 2001 From: Magne Mahre Date: Fri, 18 Dec 2009 11:48:34 +0100 Subject: [PATCH 011/132] Backport to 5.1 branch (next-mr revid: 2921) Bug#35589 SET PASSWORD caused a crash Bug#35591 FLUSH PRIVILEGES caused a crash A race condition on the privilege hash tables (proc_priv_hash and func_priv_hash) caused one thread to try to delete elements that had already been deleted by another thread. The bug was caused by reading and saving the pointers to the hash tables outside mutex protection. This led to an inconsistency where a thread copied a pointer to a hash, another thread did the same, the first thread then deleted the hash, and the second then crashed when it in turn tried to delete the deleted hash. The fix is to ensure that operations on the shared hash structures happens under mutex protection (moving the locking up a little) --- sql/sql_acl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 3b81a85c368..b30c012e633 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -3765,11 +3765,11 @@ static my_bool grant_reload_procs_priv(THD *thd) DBUG_RETURN(TRUE); } + rw_wrlock(&LOCK_grant); /* Save a copy of the current hash if we need to undo the grant load */ old_proc_priv_hash= proc_priv_hash; old_func_priv_hash= func_priv_hash; - rw_wrlock(&LOCK_grant); if ((return_val= grant_load_procs_priv(table.table))) { /* Error; Reverting to old hash */ From 877311779d8304bafc3aa24eee2e8af573d7f69f Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Wed, 23 Dec 2009 17:44:03 +0400 Subject: [PATCH 012/132] Bug#47649 crash during CALL procedure If first call of the procedure is failed on the open_table stage stmt_arena->state is set to EXECUTED state. On second call(if no errors on open_table stage) it leads to use of worng memory arena in find_field_in_view() function as thd->stmt_arena->is_stmt_prepare_or_first_sp_execute() returns FALSE for EXECUTED state. The item is created not in its own arena and it leads to crash on further calls of the procedure. The fix: change state of arena only if no errors on open_table stage happens. mysql-test/r/sp.result: test result mysql-test/t/sp.test: test case sql/sp_head.cc: If first call of the procedure is failed on the open_table stage stmt_arena->state is set to EXECUTED state. On second call(if no errors on open_table stage) it leads to use of worng memory arena in find_field_in_view() function as thd->stmt_arena->is_stmt_prepare_or_first_sp_execute() returns FALSE for EXECUTED state. The item is created not in its own arena and it leads to crash on further calls of the procedure. The fix: change state of arena only if no errors on open_table stage happens. --- mysql-test/r/sp.result | 16 ++++++++++++++++ mysql-test/t/sp.test | 19 +++++++++++++++++++ sql/sp_head.cc | 11 +++++++++-- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 83ad7545685..1e6227e7380 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6963,6 +6963,22 @@ CALL p1(); CALL p1(); DROP PROCEDURE p1; DROP TABLE t1; +CREATE TABLE t1 ( f1 integer, primary key (f1)); +CREATE TABLE t2 LIKE t1; +CREATE TEMPORARY TABLE t3 LIKE t1; +CREATE PROCEDURE p1 () BEGIN SELECT f1 FROM t3 AS A WHERE A.f1 IN ( SELECT f1 FROM t3 ) ; +END| +CALL p1; +ERROR HY000: Can't reopen table: 'A' +CREATE VIEW t3 AS SELECT f1 FROM t2 A WHERE A.f1 IN ( SELECT f1 FROM t2 ); +DROP TABLE t3; +CALL p1; +f1 +CALL p1; +f1 +DROP PROCEDURE p1; +DROP TABLE t1, t2; +DROP VIEW t3; # # Bug #46629: Item_in_subselect::val_int(): Assertion `0' # on subquery inside a SP diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 73ba62612b8..5cf050146dd 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -8242,6 +8242,25 @@ while ($tab_count) DROP PROCEDURE p1; DROP TABLE t1; +# +# Bug#47649 crash during CALL procedure +# +CREATE TABLE t1 ( f1 integer, primary key (f1)); +CREATE TABLE t2 LIKE t1; +CREATE TEMPORARY TABLE t3 LIKE t1; +delimiter |; +CREATE PROCEDURE p1 () BEGIN SELECT f1 FROM t3 AS A WHERE A.f1 IN ( SELECT f1 FROM t3 ) ; +END| +delimiter ;| +--error ER_CANT_REOPEN_TABLE +CALL p1; +CREATE VIEW t3 AS SELECT f1 FROM t2 A WHERE A.f1 IN ( SELECT f1 FROM t2 ); +DROP TABLE t3; +CALL p1; +CALL p1; +DROP PROCEDURE p1; +DROP TABLE t1, t2; +DROP VIEW t3; --echo # --echo # Bug #46629: Item_in_subselect::val_int(): Assertion `0' diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 51a731138ca..d74e195048f 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -2773,8 +2773,15 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp, m_lex->mark_as_requiring_prelocking(NULL); } thd->rollback_item_tree_changes(); - /* Update the state of the active arena. */ - thd->stmt_arena->state= Query_arena::EXECUTED; + /* + Update the state of the active arena if no errors on + open_tables stage. + */ + if (!res || !thd->is_error() || + (thd->main_da.sql_errno() != ER_CANT_REOPEN_TABLE && + thd->main_da.sql_errno() != ER_NO_SUCH_TABLE && + thd->main_da.sql_errno() != ER_UPDATE_TABLE_USED)) + thd->stmt_arena->state= Query_arena::EXECUTED; /* Merge here with the saved parent's values From 1f55f5b617d0df650161c58f7d0707abd4ca42e2 Mon Sep 17 00:00:00 2001 From: Satya B Date: Thu, 24 Dec 2009 12:02:29 +0530 Subject: [PATCH 013/132] Bug#49898 - Fix for bug#37408 introduces a linker error the declaration of THR_LOCK_myisam_mmap in mi_static is redundant as it accessible via the extern declaration in include/myisam.h myisam/mi_static.c: Bug#49898 - Fix for bug#37408 introduces a linker error Remove THR_LOCK_myisam_mmap declaration as it is redundant --- myisam/mi_static.c | 1 - 1 file changed, 1 deletion(-) diff --git a/myisam/mi_static.c b/myisam/mi_static.c index b6464e452d7..f75ede48828 100644 --- a/myisam/mi_static.c +++ b/myisam/mi_static.c @@ -41,7 +41,6 @@ my_off_t myisam_max_temp_length= MAX_FILE_SIZE; ulong myisam_bulk_insert_tree_size=8192*1024; ulong myisam_data_pointer_size=4; ulonglong myisam_mmap_size= SIZE_T_MAX, myisam_mmap_used= 0; -pthread_mutex_t THR_LOCK_myisam_mmap; static int always_valid(const char *filename __attribute__((unused))) { From a21a0b47ca46212a528c4402e4b473fe51437422 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Fri, 18 Dec 2009 14:00:30 +0200 Subject: [PATCH 014/132] Bug #31145: ALTER TABLE DROP COLUMN, ADD COLUMN crashes (linux) or freezes (win) the server The check for equality was assuming the field object is always created. If it's not it was de-referencing a NULL pointer. Fixed to use the data in the create object instead. --- mysql-test/r/alter_table.result | 7 +++++++ mysql-test/t/alter_table.test | 12 ++++++++++++ sql/field.cc | 3 +-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 06f4e7fbe8a..004e2031fb1 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -1338,4 +1338,11 @@ ALTER TABLE t1 CHANGE COLUMN f1 f1_no_real_change TIMESTAMP NULL DEFAULT NULL; affected rows: 0 info: Records: 0 Duplicates: 0 Warnings: 0 DROP TABLE t1; +# +# Bug #31145: ALTER TABLE DROP COLUMN, ADD COLUMN crashes (linux) +# or freezes (win) the server +# +CREATE TABLE t1 (a TEXT, id INT, b INT); +ALTER TABLE t1 DROP COLUMN a, ADD COLUMN c TEXT FIRST; +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 5534aa0a234..4989a6c380c 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -1061,4 +1061,16 @@ ALTER TABLE t1 CHANGE COLUMN f1 f1_no_real_change TIMESTAMP NULL DEFAULT NULL; --disable_info DROP TABLE t1; + +--echo # +--echo # Bug #31145: ALTER TABLE DROP COLUMN, ADD COLUMN crashes (linux) +--echo # or freezes (win) the server +--echo # + +CREATE TABLE t1 (a TEXT, id INT, b INT); +ALTER TABLE t1 DROP COLUMN a, ADD COLUMN c TEXT FIRST; + +DROP TABLE t1; + + --echo End of 5.1 tests diff --git a/sql/field.cc b/sql/field.cc index 01ccc338782..d8db3fdbae4 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -8282,8 +8282,7 @@ uint Field_blob::is_equal(Create_field *new_field) return ((new_field->sql_type == get_blob_type_from_length(max_data_length())) && new_field->charset == field_charset && - ((Field_blob *)new_field->field)->max_data_length() == - max_data_length()); + new_field->pack_length == pack_length()); } From 25be2b28d180e34afb8579311e431a6772f40809 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Fri, 18 Dec 2009 17:14:09 -0200 Subject: [PATCH 015/132] Bug#48983: Bad strmake calls (length one too long) MySQL 5.1 specific fixes. --- server-tools/instance-manager/instance_map.cc | 4 ++-- server-tools/instance-manager/options.cc | 4 ++-- server-tools/instance-manager/user_map.cc | 2 +- sql/sql_plugin.cc | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server-tools/instance-manager/instance_map.cc b/server-tools/instance-manager/instance_map.cc index b137370b50a..a923c186b5d 100644 --- a/server-tools/instance-manager/instance_map.cc +++ b/server-tools/instance-manager/instance_map.cc @@ -117,13 +117,13 @@ static void parse_option(const char *option_str, while (*ptr == '-') ++ptr; - strmake(option_name_buf, ptr, MAX_OPTION_LEN + 1); + strmake(option_name_buf, ptr, MAX_OPTION_LEN); eq_pos= strchr(ptr, '='); if (eq_pos) { option_name_buf[eq_pos - ptr]= 0; - strmake(option_value_buf, eq_pos + 1, MAX_OPTION_LEN + 1); + strmake(option_value_buf, eq_pos + 1, MAX_OPTION_LEN); } else { diff --git a/server-tools/instance-manager/options.cc b/server-tools/instance-manager/options.cc index ebca593bb03..6e401bf3ffe 100644 --- a/server-tools/instance-manager/options.cc +++ b/server-tools/instance-manager/options.cc @@ -533,10 +533,10 @@ static int setup_windows_defaults() return 1; } - strmake(base_name, base_name_ptr, FN_REFLEN); + strmake(base_name, base_name_ptr, FN_REFLEN - 1); *base_name_ptr= 0; - strmake(im_name, base_name, FN_REFLEN); + strmake(im_name, base_name, FN_REFLEN - 1); ptr= strrchr(im_name, '.'); if (!ptr) diff --git a/server-tools/instance-manager/user_map.cc b/server-tools/instance-manager/user_map.cc index 49c35c16ca9..85e3f4a2cac 100644 --- a/server-tools/instance-manager/user_map.cc +++ b/server-tools/instance-manager/user_map.cc @@ -25,7 +25,7 @@ User::User(const LEX_STRING *user_name_arg, const char *password) { user_length= (uint8) (strmake(user, user_name_arg->str, - USERNAME_LENGTH + 1) - user); + USERNAME_LENGTH) - user); set_password(password); } diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index bafc601d142..9e35e392d2a 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -2084,7 +2084,7 @@ static int check_func_set(THD *thd, struct st_mysql_sys_var *var, &error, &error_len, ¬_used); if (error_len) { - strmake(buff, error, min(sizeof(buff), error_len)); + strmake(buff, error, min(sizeof(buff) - 1, error_len)); strvalue= buff; goto err; } From b66b3c1635dbda369b1466c7c7ff6103ae09ae66 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Fri, 18 Dec 2009 18:32:55 -0200 Subject: [PATCH 016/132] Bug#30331: Table_locks_waited shows inaccurate values Post-merge fix: wait for statement result before disconnecting. Otherwise, the statement might affect unrelated tests. mysql-test/t/lock_multi.test: Reap statement status. --- mysql-test/t/lock_multi.test | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test index 47b5aa0292b..4df1a0f3478 100644 --- a/mysql-test/t/lock_multi.test +++ b/mysql-test/t/lock_multi.test @@ -626,9 +626,11 @@ let $wait_condition= --source include/wait_condition.inc let $tlwb= `show status like 'Table_locks_waited'`; unlock tables; +connection waiter; +--reap +connection default; drop table t1; disconnect waiter; -connection default; --disable_query_log eval SET @tlwa= SUBSTRING_INDEX('$tlwa', ' ', -1); eval SET @tlwb= SUBSTRING_INDEX('$tlwb', ' ', -1); From 00e6c3a89e1665c00b6553be28cf689996d6c58a Mon Sep 17 00:00:00 2001 From: Staale Smedseng Date: Sun, 20 Dec 2009 19:02:15 +0100 Subject: [PATCH 017/132] Bug#43397 mysql headers redefine pthread_mutex_init unnecessarily Changing an instance of the define that was missed in the original commit due to the fact that it was misspelled. --- include/config-win.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/config-win.h b/include/config-win.h index af4915440b1..da9b1fc00c3 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -160,7 +160,7 @@ typedef uint rf_SetTimer; #define isnan(X) _isnan(X) #define finite(X) _finite(X) -#ifndef UNDEF_THREAD_HACK +#ifndef MYSQL_CLIENT_NO_THREADS #define THREAD #endif #define VOID_SIGHANDLER From 27aba1b56914694ed8e5615f67dc397680842341 Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Mon, 21 Dec 2009 14:14:45 +0800 Subject: [PATCH 018/132] Bug#47638 The rpl_killed_ddl test fails on Windows When the $diff_statement variable for diff_master_slave.inc was put in multiple lines, the rear part of the statement would be missing when being executed on Windows systems. Fixed the problem by always putting the value for $diff_statement in one line. mysql-test/suite/rpl/t/rpl_killed_ddl.test: putting the statement for $diff_statement variable in one line. --- mysql-test/suite/rpl/t/rpl_killed_ddl.test | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mysql-test/suite/rpl/t/rpl_killed_ddl.test b/mysql-test/suite/rpl/t/rpl_killed_ddl.test index 0f2fe5b60fb..61b882efcf3 100644 --- a/mysql-test/suite/rpl/t/rpl_killed_ddl.test +++ b/mysql-test/suite/rpl/t/rpl_killed_ddl.test @@ -158,8 +158,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## EVENT ######## -let $diff_statement= SELECT event_name, event_body, execute_at - FROM information_schema.events where event_name like 'e%'; +let $diff_statement= SELECT event_name, event_body, execute_at FROM information_schema.events where event_name like 'e%'; send CREATE EVENT e2 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY From 6559a46a245264eafd1f87ec65097f83d77142bd Mon Sep 17 00:00:00 2001 From: Satya B Date: Mon, 21 Dec 2009 15:41:38 +0530 Subject: [PATCH 019/132] Applying InnoDB snapshot 5.1-ss6344, part 1. Fixes BUG#49267 Detailed revision comments: r6306 | calvin | 2009-12-14 15:12:46 +0200 (Mon, 14 Dec 2009) | 5 lines branches/5.1: fix bug#49267: innodb-autoinc.test fails on windows because of different case mode There is no change to the InnoDB code, only to fix test case by changing "T1" to "t1". --- mysql-test/r/innodb-autoinc.result | 42 +++++++++++++++--------------- mysql-test/t/innodb-autoinc.test | 34 ++++++++++++------------ 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/mysql-test/r/innodb-autoinc.result b/mysql-test/r/innodb-autoinc.result index 2e0d2c1d776..fe87e11c9ec 100644 --- a/mysql-test/r/innodb-autoinc.result +++ b/mysql-test/r/innodb-autoinc.result @@ -1111,46 +1111,46 @@ c1 c2 3 innodb 4 NULL DROP TABLE t1; -CREATE TABLE T1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) AUTO_INCREMENT=10 ENGINE=InnoDB; -CREATE INDEX i1 on T1(c2); -SHOW CREATE TABLE T1; +CREATE TABLE t1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) AUTO_INCREMENT=10 ENGINE=InnoDB; +CREATE INDEX i1 on t1(c2); +SHOW CREATE TABLE t1; Table Create Table -T1 CREATE TABLE `T1` ( +t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL AUTO_INCREMENT, `c2` int(11) DEFAULT NULL, PRIMARY KEY (`c1`), KEY `i1` (`c2`) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 -INSERT INTO T1 (c2) values (0); -SELECT * FROM T1; +INSERT INTO t1 (c2) values (0); +SELECT * FROM t1; c1 c2 10 0 -DROP TABLE T1; -DROP TABLE IF EXISTS T1; +DROP TABLE t1; +DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 'T1' -CREATE TABLE T1(C1 DOUBLE AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB; -INSERT INTO T1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb'); -INSERT INTO T1(C2) VALUES ('innodb'); -SHOW CREATE TABLE T1; +Note 1051 Unknown table 't1' +CREATE TABLE t1(C1 DOUBLE AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB; +INSERT INTO t1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb'); +INSERT INTO t1(C2) VALUES ('innodb'); +SHOW CREATE TABLE t1; Table Create Table -T1 CREATE TABLE `T1` ( +t1 CREATE TABLE `t1` ( `C1` double NOT NULL AUTO_INCREMENT, `C2` char(10) DEFAULT NULL, PRIMARY KEY (`C1`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 -DROP TABLE T1; -CREATE TABLE T1(C1 FLOAT AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB; -INSERT INTO T1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb'); -INSERT INTO T1(C2) VALUES ('innodb'); -SHOW CREATE TABLE T1; +DROP TABLE t1; +CREATE TABLE t1(C1 FLOAT AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB; +INSERT INTO t1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb'); +INSERT INTO t1(C2) VALUES ('innodb'); +SHOW CREATE TABLE t1; Table Create Table -T1 CREATE TABLE `T1` ( +t1 CREATE TABLE `t1` ( `C1` float NOT NULL AUTO_INCREMENT, `C2` char(10) DEFAULT NULL, PRIMARY KEY (`C1`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 -DROP TABLE T1; +DROP TABLE t1; DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' diff --git a/mysql-test/t/innodb-autoinc.test b/mysql-test/t/innodb-autoinc.test index 4fa5ab022ad..84386280a26 100644 --- a/mysql-test/t/innodb-autoinc.test +++ b/mysql-test/t/innodb-autoinc.test @@ -614,31 +614,31 @@ DROP TABLE t1; # 47125: auto_increment start value is ignored if an index is created # and engine=innodb # -CREATE TABLE T1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) AUTO_INCREMENT=10 ENGINE=InnoDB; -CREATE INDEX i1 on T1(c2); -SHOW CREATE TABLE T1; -INSERT INTO T1 (c2) values (0); -SELECT * FROM T1; -DROP TABLE T1; +CREATE TABLE t1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) AUTO_INCREMENT=10 ENGINE=InnoDB; +CREATE INDEX i1 on t1(c2); +SHOW CREATE TABLE t1; +INSERT INTO t1 (c2) values (0); +SELECT * FROM t1; +DROP TABLE t1; ## # 49032: Use the correct function to read the AUTOINC column value # -DROP TABLE IF EXISTS T1; -CREATE TABLE T1(C1 DOUBLE AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB; -INSERT INTO T1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb'); +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(C1 DOUBLE AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB; +INSERT INTO t1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb'); # Restart the server -- source include/restart_mysqld.inc -INSERT INTO T1(C2) VALUES ('innodb'); -SHOW CREATE TABLE T1; -DROP TABLE T1; -CREATE TABLE T1(C1 FLOAT AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB; -INSERT INTO T1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb'); +INSERT INTO t1(C2) VALUES ('innodb'); +SHOW CREATE TABLE t1; +DROP TABLE t1; +CREATE TABLE t1(C1 FLOAT AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB; +INSERT INTO t1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb'); # Restart the server -- source include/restart_mysqld.inc -INSERT INTO T1(C2) VALUES ('innodb'); -SHOW CREATE TABLE T1; -DROP TABLE T1; +INSERT INTO t1(C2) VALUES ('innodb'); +SHOW CREATE TABLE t1; +DROP TABLE t1; ## # 47720: REPLACE INTO Autoincrement column with negative values From 2f04df4ab040b5821cf552c27741ede58ebec162 Mon Sep 17 00:00:00 2001 From: Satya B Date: Mon, 21 Dec 2009 15:50:32 +0530 Subject: [PATCH 020/132] Applying InnoDB snapshot 5.1-ss6344, part 2. Fixes BUG#41609 but does not address the printouts issue Detailed revision comments: r6310 | marko | 2009-12-15 15:23:54 +0200 (Tue, 15 Dec 2009) | 30 lines branches/5.1: Merge r4922 from branches/zip. This the fix for the first part of Bug #41609 from InnoDB Plugin to the built-in InnoDB in MySQL 5.1. This allows InnoDB Hot Backup to back up a database while the built-in InnoDB in MySQL 5.1 is creating temporary tables. (This fix does not address the printouts about missing .ibd files for temporary tables at InnoDB startup, which was committed to branches/zip in r6252.) rb://219 approved by Sunny Bains. branches/zip: Distinguish temporary tables in MLOG_FILE_CREATE. This addresses Mantis Issue #23 in InnoDB Hot Backup and some of MySQL Bug #41609. In MLOG_FILE_CREATE, we need to distinguish temporary tables, so that InnoDB Hot Backup can work correctly. It turns out that we can do this easily, by using a bit of the previously unused parameter for page number. (The page number parameter of MLOG_FILE_CREATE has been written as 0 ever since MySQL 4.1, which introduced MLOG_FILE_CREATE.) MLOG_FILE_FLAG_TEMP: A flag for indicating a temporary table in the page number parameter of MLOG_FILE_ operations. fil_op_write_log(): Add the parameter log_flags. fil_op_log_parse_or_replay(): Add the parameter log_flags. Do not replay MLOG_FILE_CREATE when MLOG_FILE_FLAG_TEMP is set in log_flags. This only affects ibbackup --apply-log. InnoDB itself never replays file operations. --- storage/innobase/fil/fil0fil.c | 29 +++++++++++++++++------------ storage/innobase/include/fil0fil.h | 10 +++++----- storage/innobase/include/mtr0mtr.h | 6 ++++++ storage/innobase/log/log0recv.c | 7 +++---- 4 files changed, 31 insertions(+), 21 deletions(-) diff --git a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c index 42e5166c9e4..3810fefd3cb 100644 --- a/storage/innobase/fil/fil0fil.c +++ b/storage/innobase/fil/fil0fil.c @@ -1740,6 +1740,8 @@ fil_op_write_log( MLOG_FILE_DELETE, or MLOG_FILE_RENAME */ ulint space_id, /* in: space id */ + ulint log_flags, /* in: redo log flags (stored + in the page number field) */ const char* name, /* in: table name in the familiar 'databasename/tablename' format, or the file path in the case of @@ -1760,8 +1762,8 @@ fil_op_write_log( return; } - log_ptr = mlog_write_initial_log_record_for_file_op(type, space_id, 0, - log_ptr, mtr); + log_ptr = mlog_write_initial_log_record_for_file_op( + type, space_id, log_flags, log_ptr, mtr); /* Let us store the strings as null-terminated for easier readability and handling */ @@ -1810,11 +1812,11 @@ fil_op_log_parse_or_replay( not fir completely between ptr and end_ptr */ byte* end_ptr, /* in: buffer end */ ulint type, /* in: the type of this log record */ - ibool do_replay, /* in: TRUE if we want to replay the - operation, and not just parse the log record */ - ulint space_id) /* in: if do_replay is TRUE, the space id of - the tablespace in question; otherwise - ignored */ + ulint space_id, /* in: the space id of the tablespace in + question, or 0 if the log record should + only be parsed but not replayed */ + ulint log_flags) /* in: redo log flags + (stored in the page number parameter) */ { ulint name_len; ulint new_name_len; @@ -1868,7 +1870,7 @@ fil_op_log_parse_or_replay( printf("new name %s\n", new_name); } */ - if (do_replay == FALSE) { + if (!space_id) { return(ptr); } @@ -1917,6 +1919,8 @@ fil_op_log_parse_or_replay( } else if (fil_get_space_id_for_table(name) != ULINT_UNDEFINED) { /* Do nothing */ + } else if (log_flags & MLOG_FILE_FLAG_TEMP) { + /* Temporary table, do nothing */ } else { /* Create the database directory for name, if it does not exist yet */ @@ -2078,7 +2082,7 @@ try_again: to write any log record */ mtr_start(&mtr); - fil_op_write_log(MLOG_FILE_DELETE, id, path, NULL, &mtr); + fil_op_write_log(MLOG_FILE_DELETE, id, 0, path, NULL, &mtr); mtr_commit(&mtr); #endif mem_free(path); @@ -2349,7 +2353,7 @@ retry: mtr_start(&mtr); - fil_op_write_log(MLOG_FILE_RENAME, id, old_name, new_name, + fil_op_write_log(MLOG_FILE_RENAME, id, 0, old_name, new_name, &mtr); mtr_commit(&mtr); } @@ -2525,8 +2529,9 @@ error_exit2: mtr_start(&mtr); - fil_op_write_log(MLOG_FILE_CREATE, *space_id, tablename, - NULL, &mtr); + fil_op_write_log(MLOG_FILE_CREATE, *space_id, + is_temp ? MLOG_FILE_FLAG_TEMP : 0, + tablename, NULL, &mtr); mtr_commit(&mtr); } diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h index 6b8fd4b03d5..251d6c22547 100644 --- a/storage/innobase/include/fil0fil.h +++ b/storage/innobase/include/fil0fil.h @@ -330,11 +330,11 @@ fil_op_log_parse_or_replay( not fir completely between ptr and end_ptr */ byte* end_ptr, /* in: buffer end */ ulint type, /* in: the type of this log record */ - ibool do_replay, /* in: TRUE if we want to replay the - operation, and not just parse the log record */ - ulint space_id); /* in: if do_replay is TRUE, the space id of - the tablespace in question; otherwise - ignored */ + ulint space_id, /* in: the space id of the tablespace in + question, or 0 if the log record should + only be parsed but not replayed */ + ulint log_flags); /* in: redo log flags + (stored in the page number parameter) */ /*********************************************************************** Deletes a single-table tablespace. The tablespace must be cached in the memory cache. */ diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h index 2a160d27e0c..a6e2976830b 100644 --- a/storage/innobase/include/mtr0mtr.h +++ b/storage/innobase/include/mtr0mtr.h @@ -134,6 +134,12 @@ flag value must give the length also! */ #define MLOG_BIGGEST_TYPE ((byte)46) /* biggest value (used in asserts) */ +/* Flags for MLOG_FILE operations (stored in the page number +parameter, called log_flags in the functions). The page number +parameter was initially written as 0. */ +#define MLOG_FILE_FLAG_TEMP 1 /* identifies TEMPORARY TABLE in + MLOG_FILE_CREATE */ + /******************************************************************* Starts a mini-transaction and creates a mini-transaction handle and buffer in the memory buffer given by the caller. */ diff --git a/storage/innobase/log/log0recv.c b/storage/innobase/log/log0recv.c index aef58b7b576..5d309768064 100644 --- a/storage/innobase/log/log0recv.c +++ b/storage/innobase/log/log0recv.c @@ -939,8 +939,7 @@ recv_parse_or_apply_log_rec_body( case MLOG_FILE_CREATE: case MLOG_FILE_RENAME: case MLOG_FILE_DELETE: - ptr = fil_op_log_parse_or_replay(ptr, end_ptr, type, FALSE, - ULINT_UNDEFINED); + ptr = fil_op_log_parse_or_replay(ptr, end_ptr, type, 0, 0); break; default: ptr = NULL; @@ -1938,8 +1937,8 @@ loop: point to the datadir we should use there */ if (NULL == fil_op_log_parse_or_replay( - body, end_ptr, type, TRUE, - space)) { + body, end_ptr, type, + space, page_no)) { fprintf(stderr, "InnoDB: Error: file op" " log record of type %lu" From 007d77afb9ea5fd7b7a369114f8963ab147fd2c5 Mon Sep 17 00:00:00 2001 From: Serge Kozlov Date: Mon, 21 Dec 2009 14:40:08 +0300 Subject: [PATCH 021/132] Bug#8693, Bug#45521. --- mysql-test/t/disabled.def | 2 -- 1 file changed, 2 deletions(-) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 062667c249e..61e1226c8e3 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -16,11 +16,9 @@ im_daemon_life_cycle : Bug#20294: Instance manager tests fail randomly im_options_set : Bug#20294: Instance manager tests fail randomly im_options_unset : Bug#20294: Instance manager tests fail randomly im_utils : Bug#20294: Instance manager tests fail randomly -rpl_log_pos : Bug#8693 Test 'rpl_log_pos' fails sometimes kill : Bug#29149 Test "kill" fails on Windows ps_7ndb : Bug#38315 "Cluster Failure" in ps_7ndb strict_autoinc_5ndb : Bug#35148 "Error '4009 Cluster Failure' in various tests on various platforms" -rpl_slave_skip : Bug#45521: rpl_slave_skip fails in pb2 loaddata_autocom_ndb : Bug#35148: Error '4009 Cluster Failure' in various tests on various platforms ndb_autodiscover3 : Bug#35148: Error '4009 Cluster Failure' in various tests on various platforms ndb_autodiscover : Bug#45972: ndb.ndb_autodiscover fails occasionally with pb2 From 7344b58c32c07df496c208dad5c1e11c304e8aac Mon Sep 17 00:00:00 2001 From: Ramil Kalimullin Date: Tue, 22 Dec 2009 10:39:29 +0400 Subject: [PATCH 022/132] Fix for bug#49570: Assertion failed: !(order->used & map) on re-execution of prepared statement Problem: some (see eq_ref_table()) ORDER BY/GROUP BY optimization is called before each PS execution. However, we don't properly initialize its stucture every time before the call. Fix: properly initialize the sturture used. mysql-test/r/ps.result: Fix for bug#49570: Assertion failed: !(order->used & map) on re-execution of prepared statement - test result. mysql-test/t/ps.test: Fix for bug#49570: Assertion failed: !(order->used & map) on re-execution of prepared statement - test case. sql/sql_select.cc: Fix for bug#49570: Assertion failed: !(order->used & map) on re-execution of prepared statement - set order->used to 0 before each eq_ref_table() call, as the function relies on that. --- mysql-test/r/ps.result | 22 ++++++++++++++++++++++ mysql-test/t/ps.test | 16 ++++++++++++++++ sql/sql_select.cc | 1 + 3 files changed, 39 insertions(+) diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 8a19b9b17e1..6e017ec7253 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -1916,4 +1916,26 @@ execute stmt; deallocate prepare stmt; drop table t1,t2; # +# +# Bug #49570: Assertion failed: !(order->used & map) +# on re-execution of prepared statement +# +CREATE TABLE t1(a INT PRIMARY KEY); +INSERT INTO t1 VALUES(0), (1); +PREPARE stmt FROM +"SELECT 1 FROM t1 JOIN t1 t2 USING(a) GROUP BY t2.a, t1.a"; +EXECUTE stmt; +1 +1 +1 +EXECUTE stmt; +1 +1 +1 +EXECUTE stmt; +1 +1 +1 +DEALLOCATE PREPARE stmt; +DROP TABLE t1; End of 5.0 tests. diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 8f8e943913f..e207b0f154a 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -1996,4 +1996,20 @@ deallocate prepare stmt; drop table t1,t2; --echo # + +--echo # +--echo # Bug #49570: Assertion failed: !(order->used & map) +--echo # on re-execution of prepared statement +--echo # +CREATE TABLE t1(a INT PRIMARY KEY); +INSERT INTO t1 VALUES(0), (1); +PREPARE stmt FROM + "SELECT 1 FROM t1 JOIN t1 t2 USING(a) GROUP BY t2.a, t1.a"; +EXECUTE stmt; +EXECUTE stmt; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; +DROP TABLE t1; + + --echo End of 5.0 tests. diff --git a/sql/sql_select.cc b/sql/sql_select.cc index d22a23a10d4..d8ec5eff5c1 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -6777,6 +6777,7 @@ static void update_depend_map(JOIN *join, ORDER *order) table_map depend_map; order->item[0]->update_used_tables(); order->depend_map=depend_map=order->item[0]->used_tables(); + order->used= 0; // Not item_sum(), RAND() and no reference to table outside of sub select if (!(order->depend_map & (OUTER_REF_TABLE_BIT | RAND_TABLE_BIT)) && !order->item[0]->with_sum_func) From 081bcb3b8bc861bc5609a4ce92c8eb3528ffc078 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Tue, 22 Dec 2009 13:52:23 +0400 Subject: [PATCH 023/132] Bug#47371 reference by same column name At the end of execution top level join execution we cleanup this join with true argument. It leads to underlying join cleanup(subquery) with true argument too and to tmp_table_param->field array cleanup which is required later. The problem is that Item_func_set_user_var does not set result_filed which leads to unnecessary repeated excution of subquery on final stage. The fix is to set result_field for Item_func_set_user_var. mysql-test/r/count_distinct.result: test result mysql-test/r/user_var.result: test result mysql-test/t/count_distinct.test: test case mysql-test/t/user_var.test: test case sql/item_func.cc: At the end of execution top level join execution we cleanup this join with true argument. It leads to underlying join cleanup(subquery) with true argument too and to tmp_table_param->field array cleanup which is required later. The problem is that Item_func_set_user_var does not set result_filed which leads to unnecessary repeated excution of subquery on final stage. The fix is to set result_field for Item_func_set_user_var. --- mysql-test/r/count_distinct.result | 20 ++++++++++++++++++++ mysql-test/r/user_var.result | 15 +++++++++++++++ mysql-test/t/count_distinct.test | 19 +++++++++++++++++++ mysql-test/t/user_var.test | 20 ++++++++++++++++++++ sql/item_func.cc | 2 +- 5 files changed, 75 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/count_distinct.result b/mysql-test/r/count_distinct.result index a21748359b9..804bc1f4788 100644 --- a/mysql-test/r/count_distinct.result +++ b/mysql-test/r/count_distinct.result @@ -40,6 +40,26 @@ select t2.isbn,city,t1.libname,count(distinct t1.libname) as a from t3 left join isbn city libname a 007 Berkeley Berkeley Public1 2 000 New York New York Public Libra 2 +select t2.isbn,city,@bar:=t1.libname,count(distinct t1.libname) as a +from t3 left join t1 on t3.libname=t1.libname left join t2 +on t3.isbn=t2.isbn group by city having count(distinct +t1.libname) > 1; +isbn city @bar:=t1.libname a +007 Berkeley Berkeley Public1 2 +000 New York New York Public Libra 2 +SELECT @bar; +@bar +Berkeley Public2 +select t2.isbn,city,concat(@bar:=t1.libname),count(distinct t1.libname) as a +from t3 left join t1 on t3.libname=t1.libname left join t2 +on t3.isbn=t2.isbn group by city having count(distinct +t1.libname) > 1; +isbn city concat(@bar:=t1.libname) a +007 Berkeley Berkeley Public1 2 +000 New York New York Public Libra 2 +SELECT @bar; +@bar +Berkeley Public2 drop table t1, t2, t3; create table t1 (f1 int); insert into t1 values (1); diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index bfa95d8f92b..8236dbe94ac 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -363,4 +363,19 @@ SELECT a, b FROM t1 WHERE a=2 AND b=3 GROUP BY a, b; a b 2 3 DROP TABLE t1; +CREATE TABLE t1 (f1 int(11) default NULL, f2 int(11) default NULL); +CREATE TABLE t2 (f1 int(11) default NULL, f2 int(11) default NULL, foo int(11)); +CREATE TABLE t3 (f1 int(11) default NULL, f2 int(11) default NULL); +INSERT INTO t1 VALUES(10, 10); +INSERT INTO t1 VALUES(10, 10); +INSERT INTO t2 VALUES(10, 10, 10); +INSERT INTO t2 VALUES(10, 10, 10); +INSERT INTO t3 VALUES(10, 10); +INSERT INTO t3 VALUES(10, 10); +SELECT MIN(t2.f1), +@bar:= (SELECT MIN(t3.f2) FROM t3 WHERE t3.f2 > foo) +FROM t1,t2 WHERE t1.f1 = t2.f1 ORDER BY t2.f1; +MIN(t2.f1) @bar:= (SELECT MIN(t3.f2) FROM t3 WHERE t3.f2 > foo) +10 NULL +DROP TABLE t1, t2, t3; End of 5.0 tests diff --git a/mysql-test/t/count_distinct.test b/mysql-test/t/count_distinct.test index e63bdabdb95..d0996689aeb 100644 --- a/mysql-test/t/count_distinct.test +++ b/mysql-test/t/count_distinct.test @@ -35,6 +35,25 @@ insert into t1 values ('NYC Lib','New York'); select t2.isbn,city,t1.libname,count(t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city,t1.libname; select t2.isbn,city,t1.libname,count(distinct t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city having count(distinct t1.libname) > 1; select t2.isbn,city,t1.libname,count(distinct t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city having count(distinct concat(t1.libname,'a')) > 1; + +select t2.isbn,city,@bar:=t1.libname,count(distinct t1.libname) as a + from t3 left join t1 on t3.libname=t1.libname left join t2 + on t3.isbn=t2.isbn group by city having count(distinct + t1.libname) > 1; +# +# Wrong result, see bug#49872 +# +SELECT @bar; + +select t2.isbn,city,concat(@bar:=t1.libname),count(distinct t1.libname) as a + from t3 left join t1 on t3.libname=t1.libname left join t2 + on t3.isbn=t2.isbn group by city having count(distinct + t1.libname) > 1; +# +# Wrong result, see bug#49872 +# +SELECT @bar; + drop table t1, t2, t3; # diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index d39b49a0e87..59a5238b35b 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -248,4 +248,24 @@ SELECT @a, @b; SELECT a, b FROM t1 WHERE a=2 AND b=3 GROUP BY a, b; DROP TABLE t1; +# +# Bug#47371: reference by same column name +# +CREATE TABLE t1 (f1 int(11) default NULL, f2 int(11) default NULL); +CREATE TABLE t2 (f1 int(11) default NULL, f2 int(11) default NULL, foo int(11)); +CREATE TABLE t3 (f1 int(11) default NULL, f2 int(11) default NULL); + +INSERT INTO t1 VALUES(10, 10); +INSERT INTO t1 VALUES(10, 10); +INSERT INTO t2 VALUES(10, 10, 10); +INSERT INTO t2 VALUES(10, 10, 10); +INSERT INTO t3 VALUES(10, 10); +INSERT INTO t3 VALUES(10, 10); + +SELECT MIN(t2.f1), +@bar:= (SELECT MIN(t3.f2) FROM t3 WHERE t3.f2 > foo) +FROM t1,t2 WHERE t1.f1 = t2.f1 ORDER BY t2.f1; + +DROP TABLE t1, t2, t3; + --echo End of 5.0 tests diff --git a/sql/item_func.cc b/sql/item_func.cc index d6f315fda50..cb0d6bdbe5f 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -610,7 +610,7 @@ void Item_func::signal_divide_by_null() Item *Item_func::get_tmp_table_item(THD *thd) { - if (!with_sum_func && !const_item() && functype() != SUSERVAR_FUNC) + if (!with_sum_func && !const_item()) return new Item_field(result_field); return copy_or_same(thd); } From 8f0f1d0ddb73283f60adb696f5b46b376aed327e Mon Sep 17 00:00:00 2001 From: Satya B Date: Tue, 22 Dec 2009 18:33:39 +0530 Subject: [PATCH 024/132] Removing rpl.rpl_trigger from experimental list as it is Fixed by BUG#46656 --- mysql-test/collections/default.experimental | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 2c2e9cab626..3894f2a4368 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -20,7 +20,6 @@ ndb.* # joro : NDB tests marked as experiment rpl.rpl_get_master_version_and_clock* # Bug #49191 2009-12-01 Daogang rpl_get_master_version_and_clock failed on PB2: COM_REGISTER_SLAVE failed rpl.rpl_innodb_bug28430* @solaris # Bug#46029 -rpl.rpl_trigger* # Bug#47810 2009-10-04 joro rpl.rpl_trigger.test fails with valgrind errors with the innodb plugin rpl_ndb.* # joro : NDB tests marked as experimental as agreed with bochklin rpl_ndb.rpl_ndb_log # Bug#38998 From 1aed2f4d634e456bf44ad20d3d3fed934960b9c6 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 22 Dec 2009 14:27:41 +0100 Subject: [PATCH 025/132] Raise version number after cloning 5.5.1-m2 --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index a5b2c5c001a..309341b6a2d 100644 --- a/configure.in +++ b/configure.in @@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM # # When changing major version number please also check switch statement # in client/mysqlbinlog.cc:check_master_version(). -AM_INIT_AUTOMAKE(mysql, 5.5.1-m2) +AM_INIT_AUTOMAKE(mysql, 5.5.2-m2) AM_CONFIG_HEADER([include/config.h:config.h.in]) # Request support for automake silent-rules if available. From 2d8869d248188c1bf393fc87d9f0e31adf691c2d Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 22 Dec 2009 17:52:15 +0200 Subject: [PATCH 026/132] Bug #49734: Crash on EXPLAIN EXTENDED UNION ... ORDER BY Several problems fixed : 1. Non constant expressions in UNION ... ORDER BY were not correctly cleaned up in st_select_lex_unit::cleanup() causing crashes in EXPLAIN EXTENDED because of fields quoted by these expressions pointing to the already freed temporary table used to calculate the UNION. Fixed by correctly cleaning up expressions of any depth. 2. Subqueries in the order by part of UNION ... ORDER BY ... caused a crash in EXPLAIN EXTENDED because of a transformation attempt made during EXPLAIN EXTENDED execution. Fixed by not doing the transformation when in EXPLAIN. 3. Fulltext functions caused crash when in the ORDER BY part of an un-parenthesized UNION that gets "promoted" to be valid for the whole union, e.g. SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY MATCHES (a) AGAINST ('abc' IN BOOLEAN MODE). This is a case that demonstrates a more general problem of parts of the query being moved to another level. When doing such transformation late in the optimization run when most of the flags about the contents of the query are already aggregated it's possible to "split" the flags so that they correctly reflect the new queries after the transformation. In specific the ST_SELECT_LEX::ftfunc_list is holding all the free text function for all the parts of the second SELECT in the UNION and we don't know what part of that is in the ORDER BY that we're to move to the UNION level and what part is about the other parts of the second SELECT. Fixed by throwing and error when such statements are about to be processed by adding a check for the presence of MATCH() inside the ORDER BY clause that's going to get promoted to UNION. To workaround this new limitation one must parenthesize the UNION SELECTs and provide a real global ORDER BY for the UNION outside of the parenthesis. --- mysql-test/r/fulltext_order_by.result | 6 +-- mysql-test/r/union.result | 63 +++++++++++++++++++++++++++ mysql-test/t/fulltext_order_by.test | 5 ++- mysql-test/t/union.test | 53 ++++++++++++++++++++++ sql/item.h | 17 ++++++++ sql/item_func.h | 5 +++ sql/sql_select.cc | 2 +- sql/sql_union.cc | 31 ++++++++++++- 8 files changed, 175 insertions(+), 7 deletions(-) diff --git a/mysql-test/r/fulltext_order_by.result b/mysql-test/r/fulltext_order_by.result index bc466b5aba7..bd3e79ec5c2 100644 --- a/mysql-test/r/fulltext_order_by.result +++ b/mysql-test/r/fulltext_order_by.result @@ -126,7 +126,7 @@ group by a.text, b.id, b.betreff order by match(b.betreff) against ('+abc' in boolean mode) desc; -ERROR 42S22: Unknown column 'b.betreff' in 'order clause' +ERROR 42000: Incorrect usage/placement of 'MATCH()' select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join @@ -142,7 +142,7 @@ where match(c.beitrag) against ('+abc' in boolean mode) order by match(b.betreff) against ('+abc' in boolean mode) desc; -ERROR 42S22: Unknown column 'b.betreff' in 'order clause' +ERROR 42000: Incorrect usage/placement of 'MATCH()' select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join @@ -158,7 +158,7 @@ where match(c.beitrag) against ('+abc' in boolean mode) order by match(betreff) against ('+abc' in boolean mode) desc; -text id betreff +ERROR 42000: Incorrect usage/placement of 'MATCH()' (select b.id, b.betreff from t3 b) union (select b.id, b.betreff from t3 b) order by match(betreff) against ('+abc' in boolean mode) desc; diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 44a3812725a..dce32d2ced4 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -1588,3 +1588,66 @@ Warnings: Note 1003 select '0' AS `a` from `test`.`t1` union select '0' AS `a` from `test`.`t1` order by `a` DROP TABLE t1; End of 5.0 tests +# +# Bug #49734: Crash on EXPLAIN EXTENDED UNION ... ORDER BY +# +# +CREATE TABLE t1 (a VARCHAR(10), FULLTEXT KEY a (a)); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1),(2); +# Should not crash +EXPLAIN EXTENDED +SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY a + 12; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +2 UNION t1 ALL NULL NULL NULL NULL 2 100.00 +NULL UNION RESULT ALL NULL NULL NULL NULL NULL NULL Using filesort +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` union select `test`.`t1`.`a` AS `a` from `test`.`t1` order by (`a` + 12) +# Should not crash +SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY a + 12; +a +1 +2 +# Should not crash +EXPLAIN EXTENDED +SELECT * FROM t1 UNION SELECT * FROM t1 +ORDER BY MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE); +ERROR 42000: Incorrect usage/placement of 'MATCH()' +# Should not crash +SELECT * FROM t1 UNION SELECT * FROM t1 +ORDER BY MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE); +ERROR 42000: Incorrect usage/placement of 'MATCH()' +# Should not crash +(SELECT * FROM t1) UNION (SELECT * FROM t1) +ORDER BY MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE); +a +1 +2 +# Should not crash +EXPLAIN EXTENDED +SELECT * FROM t1 UNION SELECT * FROM t1 +ORDER BY (SELECT a FROM t2 WHERE b = 12); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +2 UNION t1 ALL NULL NULL NULL NULL 2 100.00 +3 SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where +NULL UNION RESULT ALL NULL NULL NULL NULL NULL NULL Using filesort +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` union select `test`.`t1`.`a` AS `a` from `test`.`t1` order by (select `test`.`t1`.`a` AS `a` from `test`.`t2` where (`test`.`t2`.`b` = 12)) +# Should not crash +SELECT * FROM t1 UNION SELECT * FROM t1 +ORDER BY (SELECT a FROM t2 WHERE b = 12); +a +1 +2 +# Should not crash +SELECT * FROM t2 UNION SELECT * FROM t2 +ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE)); +b +1 +2 +DROP TABLE t1,t2; +End of 5.1 tests diff --git a/mysql-test/t/fulltext_order_by.test b/mysql-test/t/fulltext_order_by.test index 074aefbf943..814cd4a5954 100644 --- a/mysql-test/t/fulltext_order_by.test +++ b/mysql-test/t/fulltext_order_by.test @@ -80,7 +80,7 @@ CREATE TABLE t3 ( FULLTEXT KEY betreff (betreff) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=996 ; ---error 1054 +--error ER_CANT_USE_OPTION_HERE select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join @@ -100,7 +100,7 @@ group by order by match(b.betreff) against ('+abc' in boolean mode) desc; ---error 1054 +--error ER_CANT_USE_OPTION_HERE select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join @@ -117,6 +117,7 @@ where order by match(b.betreff) against ('+abc' in boolean mode) desc; +--error ER_CANT_USE_OPTION_HERE select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index ec169838d59..91fc9546bbe 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -1102,3 +1102,56 @@ DROP TABLE t1; --echo End of 5.0 tests + + +--echo # +--echo # Bug #49734: Crash on EXPLAIN EXTENDED UNION ... ORDER BY +--echo # +--echo # + +CREATE TABLE t1 (a VARCHAR(10), FULLTEXT KEY a (a)); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1),(2); + +--echo # Should not crash +EXPLAIN EXTENDED +SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY a + 12; + +--echo # Should not crash +SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY a + 12; + + +--echo # Should not crash +--error ER_CANT_USE_OPTION_HERE +EXPLAIN EXTENDED +SELECT * FROM t1 UNION SELECT * FROM t1 + ORDER BY MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE); + +--echo # Should not crash +--error ER_CANT_USE_OPTION_HERE +SELECT * FROM t1 UNION SELECT * FROM t1 + ORDER BY MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE); + +--echo # Should not crash +(SELECT * FROM t1) UNION (SELECT * FROM t1) + ORDER BY MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE); + + +--echo # Should not crash +EXPLAIN EXTENDED +SELECT * FROM t1 UNION SELECT * FROM t1 + ORDER BY (SELECT a FROM t2 WHERE b = 12); + +--echo # Should not crash +SELECT * FROM t1 UNION SELECT * FROM t1 + ORDER BY (SELECT a FROM t2 WHERE b = 12); + +--echo # Should not crash +SELECT * FROM t2 UNION SELECT * FROM t2 + ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE)); + +DROP TABLE t1,t2; + + +--echo End of 5.1 tests diff --git a/sql/item.h b/sql/item.h index b97808ac87f..8f0e5874f3f 100644 --- a/sql/item.h +++ b/sql/item.h @@ -967,6 +967,23 @@ public: return FALSE; } + /** + Find a function of a given type + + @param arg the function type to search (enum Item_func::Functype) + @return + @retval TRUE the function type we're searching for is found + @retval FALSE the function type wasn't found + + @description + This function can be used (together with Item::walk()) to find functions + in an item tree fragment. + */ + virtual bool find_function_processor (uchar *arg) + { + return FALSE; + } + /* For SP local variable returns pointer to Item representing its current value and pointer to current Item otherwise. diff --git a/sql/item_func.h b/sql/item_func.h index 259316b0c41..71168c64e4b 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -212,6 +212,11 @@ public: { return has_timestamp_args(); } + + virtual bool find_function_processor (uchar *arg) + { + return functype() == *(Functype *) arg; + } }; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 6383fe63012..d50bb888850 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -519,7 +519,7 @@ JOIN::prepare(Item ***rref_pointer_array, thd->lex->allow_sum_func= save_allow_sum_func; } - if (!thd->lex->view_prepare_mode) + if (!thd->lex->view_prepare_mode && !(select_options & SELECT_DESCRIBE)) { Item_subselect *subselect; /* Is it subselect? */ diff --git a/sql/sql_union.cc b/sql/sql_union.cc index cbf94ad7181..1760670f9c8 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -335,6 +335,35 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, } } + /* + Disable the usage of fulltext searches in the last union branch. + This is a temporary 5.x limitation because of the way the fulltext + search functions are handled by the optimizer. + This is manifestation of the more general problems of "taking away" + parts of a SELECT statement post-fix_fields(). This is generally not + doable since various flags are collected in various places (e.g. + SELECT_LEX) that carry information about the presence of certain + expressions or constructs in the parts of the query. + When part of the query is taken away it's not clear how to "divide" + the meaning of these accumulated flags and what to carry over to the + recipient query (SELECT_LEX). + */ + if (global_parameters->ftfunc_list->elements && + global_parameters->order_list.elements && + global_parameters != fake_select_lex) + { + ORDER *ord; + Item_func::Functype ft= Item_func::FT_FUNC; + for (ord= (ORDER*)global_parameters->order_list.first; ord; ord= ord->next) + if ((*ord->item)->walk (&Item::find_function_processor, FALSE, + (uchar *) &ft)) + { + my_error (ER_CANT_USE_OPTION_HERE, MYF(0), "MATCH()"); + goto err; + } + } + + create_options= (first_sl->options | thd_arg->options | TMP_TABLE_ALL_COLUMNS); /* @@ -669,7 +698,7 @@ bool st_select_lex_unit::cleanup() { ORDER *ord; for (ord= (ORDER*)global_parameters->order_list.first; ord; ord= ord->next) - (*ord->item)->cleanup(); + (*ord->item)->walk (&Item::cleanup_processor, 0, 0); } } From 28e64daf2ddccbeb754d4204219463eddd44012f Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Tue, 22 Dec 2009 18:59:37 +0100 Subject: [PATCH 027/132] Bug#49742: Partition Pruning not working correctly for RANGE Problem was when calculating the range of partitions for pruning. Solution was to get the calculation correct. I also simplified it a bit for easier understanding. mysql-test/r/partition_pruning.result: Bug#49742: Partition Pruning not working correctly for RANGE Added results. mysql-test/t/partition_pruning.test: Bug#49742: Partition Pruning not working correctly for RANGE Added tests to prevent regressions. sql/sql_partition.cc: Bug#49742: Partition Pruning not working correctly for RANGE Simplified calculation for partition id for ranges. Easier to get right and understand. Added comments. --- mysql-test/r/partition_pruning.result | 612 +++++++++++++++++++++++++- mysql-test/t/partition_pruning.test | 160 +++++++ sql/sql_partition.cc | 47 +- 3 files changed, 793 insertions(+), 26 deletions(-) diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result index 3128c57b2cf..cf0474a3f6b 100644 --- a/mysql-test/r/partition_pruning.result +++ b/mysql-test/r/partition_pruning.result @@ -1,4 +1,614 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +# +# Bug#49742: Partition Pruning not working correctly for RANGE +# +CREATE TABLE t1 (a INT PRIMARY KEY) +PARTITION BY RANGE (a) ( +PARTITION p0 VALUES LESS THAN (1), +PARTITION p1 VALUES LESS THAN (2), +PARTITION p2 VALUES LESS THAN (3), +PARTITION p3 VALUES LESS THAN (4), +PARTITION p4 VALUES LESS THAN (5), +PARTITION p5 VALUES LESS THAN (6), +PARTITION max VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (-1),(0),(1),(2),(3),(4),(5),(6),(7),(8); +SELECT * FROM t1 WHERE a < 1; +a +-1 +0 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 1; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index +SELECT * FROM t1 WHERE a < 2; +a +-1 +0 +1 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 2; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1 index PRIMARY PRIMARY 4 NULL 3 Using where; Using index +SELECT * FROM t1 WHERE a < 3; +a +-1 +0 +1 +2 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index +SELECT * FROM t1 WHERE a < 4; +a +-1 +0 +1 +2 +3 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 4; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3 index PRIMARY PRIMARY 4 NULL 5 Using where; Using index +SELECT * FROM t1 WHERE a < 5; +a +-1 +0 +1 +2 +3 +4 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 5; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3,p4 index PRIMARY PRIMARY 4 NULL 6 Using where; Using index +SELECT * FROM t1 WHERE a < 6; +a +-1 +0 +1 +2 +3 +4 +5 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 6; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3,p4,p5 index PRIMARY PRIMARY 4 NULL 7 Using where; Using index +SELECT * FROM t1 WHERE a < 7; +a +-1 +0 +1 +2 +3 +4 +5 +6 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 7; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a <= 1; +a +-1 +0 +1 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1 index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a <= 2; +a +-1 +0 +1 +2 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 2; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2 index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a <= 3; +a +-1 +0 +1 +2 +3 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3 index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a <= 4; +a +-1 +0 +1 +2 +3 +4 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 4; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3,p4 index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a <= 5; +a +-1 +0 +1 +2 +3 +4 +5 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 5; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3,p4,p5 index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a <= 6; +a +-1 +0 +1 +2 +3 +4 +5 +6 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 6; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a <= 7; +a +-1 +0 +1 +2 +3 +4 +5 +6 +7 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 7; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a = 1; +a +1 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 1; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p1 system PRIMARY NULL NULL NULL 1 +SELECT * FROM t1 WHERE a = 2; +a +2 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 2; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p2 system PRIMARY NULL NULL NULL 1 +SELECT * FROM t1 WHERE a = 3; +a +3 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p3 system PRIMARY NULL NULL NULL 1 +SELECT * FROM t1 WHERE a = 4; +a +4 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 4; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p4 system PRIMARY NULL NULL NULL 1 +SELECT * FROM t1 WHERE a = 5; +a +5 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 5; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p5 system PRIMARY NULL NULL NULL 1 +SELECT * FROM t1 WHERE a = 6; +a +6 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 6; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 max const PRIMARY PRIMARY 4 const 1 Using index +SELECT * FROM t1 WHERE a = 7; +a +7 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 7; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 max const PRIMARY PRIMARY 4 const 1 Using index +SELECT * FROM t1 WHERE a >= 1; +a +1 +2 +3 +4 +5 +6 +7 +8 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 1; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p1,p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a >= 2; +a +2 +3 +4 +5 +6 +7 +8 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 2; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a >= 3; +a +3 +4 +5 +6 +7 +8 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a >= 4; +a +4 +5 +6 +7 +8 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 4; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a >= 5; +a +5 +6 +7 +8 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 5; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a >= 6; +a +6 +7 +8 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 6; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a >= 7; +a +7 +8 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 7; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index +SELECT * FROM t1 WHERE a > 1; +a +2 +3 +4 +5 +6 +7 +8 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 1; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a > 2; +a +3 +4 +5 +6 +7 +8 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 2; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a > 3; +a +4 +5 +6 +7 +8 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a > 4; +a +5 +6 +7 +8 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 4; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a > 5; +a +6 +7 +8 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 5; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index +SELECT * FROM t1 WHERE a > 6; +a +7 +8 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 6; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index +SELECT * FROM t1 WHERE a > 7; +a +8 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 7; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index +DROP TABLE t1; +CREATE TABLE t1 (a INT PRIMARY KEY) +PARTITION BY RANGE (a) ( +PARTITION p0 VALUES LESS THAN (1), +PARTITION p1 VALUES LESS THAN (2), +PARTITION p2 VALUES LESS THAN (3), +PARTITION p3 VALUES LESS THAN (4), +PARTITION p4 VALUES LESS THAN (5), +PARTITION max VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (-1),(0),(1),(2),(3),(4),(5),(6),(7); +SELECT * FROM t1 WHERE a < 1; +a +-1 +0 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 1; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index +SELECT * FROM t1 WHERE a < 2; +a +-1 +0 +1 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 2; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1 index PRIMARY PRIMARY 4 NULL 3 Using where; Using index +SELECT * FROM t1 WHERE a < 3; +a +-1 +0 +1 +2 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index +SELECT * FROM t1 WHERE a < 4; +a +-1 +0 +1 +2 +3 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 4; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3 index PRIMARY PRIMARY 4 NULL 5 Using where; Using index +SELECT * FROM t1 WHERE a < 5; +a +-1 +0 +1 +2 +3 +4 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 5; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3,p4 index PRIMARY PRIMARY 4 NULL 6 Using where; Using index +SELECT * FROM t1 WHERE a < 6; +a +-1 +0 +1 +2 +3 +4 +5 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 6; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 8 Using where; Using index +SELECT * FROM t1 WHERE a <= 1; +a +-1 +0 +1 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1 index PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a <= 2; +a +-1 +0 +1 +2 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 2; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2 index PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a <= 3; +a +-1 +0 +1 +2 +3 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3 index PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a <= 4; +a +-1 +0 +1 +2 +3 +4 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 4; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3,p4 index PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a <= 5; +a +-1 +0 +1 +2 +3 +4 +5 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 5; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 8 Using where; Using index +SELECT * FROM t1 WHERE a <= 6; +a +-1 +0 +1 +2 +3 +4 +5 +6 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 6; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 8 Using where; Using index +SELECT * FROM t1 WHERE a = 1; +a +1 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 1; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p1 system PRIMARY NULL NULL NULL 1 +SELECT * FROM t1 WHERE a = 2; +a +2 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 2; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p2 system PRIMARY NULL NULL NULL 1 +SELECT * FROM t1 WHERE a = 3; +a +3 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p3 system PRIMARY NULL NULL NULL 1 +SELECT * FROM t1 WHERE a = 4; +a +4 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 4; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p4 system PRIMARY NULL NULL NULL 1 +SELECT * FROM t1 WHERE a = 5; +a +5 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 5; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 max const PRIMARY PRIMARY 4 const 1 Using index +SELECT * FROM t1 WHERE a = 6; +a +6 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 6; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 max const PRIMARY PRIMARY 4 const 1 Using index +SELECT * FROM t1 WHERE a >= 1; +a +1 +2 +3 +4 +5 +6 +7 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 1; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p1,p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a >= 2; +a +2 +3 +4 +5 +6 +7 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 2; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a >= 3; +a +3 +4 +5 +6 +7 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a >= 4; +a +4 +5 +6 +7 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 4; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a >= 5; +a +5 +6 +7 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 5; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a >= 6; +a +6 +7 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 6; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index +SELECT * FROM t1 WHERE a > 1; +a +2 +3 +4 +5 +6 +7 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 1; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a > 2; +a +3 +4 +5 +6 +7 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 2; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a > 3; +a +4 +5 +6 +7 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a > 4; +a +5 +6 +7 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 4; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index +SELECT * FROM t1 WHERE a > 5; +a +6 +7 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 5; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index +SELECT * FROM t1 WHERE a > 6; +a +7 +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 6; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index +DROP TABLE t1; # test of RANGE and index CREATE TABLE t1 (a DATE, KEY(a)) PARTITION BY RANGE (TO_DAYS(a)) @@ -1816,7 +2426,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t2 p0,p4 ALL NULL NULL NULL NULL 910 Using where explain partitions select * from t2 where (a > 100 AND a < 600); id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t2 p0,p1,p2,p3 ALL NULL NULL NULL NULL 910 Using where +1 SIMPLE t2 p0,p1,p2 ALL NULL NULL NULL NULL 910 Using where explain partitions select * from t2 where b = 4; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t2 p0,p1,p2,p3,p4 ref b b 5 const 76 Using where diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test index 11e65be45fc..315b8393d93 100644 --- a/mysql-test/t/partition_pruning.test +++ b/mysql-test/t/partition_pruning.test @@ -8,6 +8,166 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; --enable_warnings +--echo # +--echo # Bug#49742: Partition Pruning not working correctly for RANGE +--echo # +CREATE TABLE t1 (a INT PRIMARY KEY) +PARTITION BY RANGE (a) ( +PARTITION p0 VALUES LESS THAN (1), +PARTITION p1 VALUES LESS THAN (2), +PARTITION p2 VALUES LESS THAN (3), +PARTITION p3 VALUES LESS THAN (4), +PARTITION p4 VALUES LESS THAN (5), +PARTITION p5 VALUES LESS THAN (6), +PARTITION max VALUES LESS THAN MAXVALUE); + +INSERT INTO t1 VALUES (-1),(0),(1),(2),(3),(4),(5),(6),(7),(8); + +SELECT * FROM t1 WHERE a < 1; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 1; +SELECT * FROM t1 WHERE a < 2; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 2; +SELECT * FROM t1 WHERE a < 3; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 3; +SELECT * FROM t1 WHERE a < 4; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 4; +SELECT * FROM t1 WHERE a < 5; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 5; +SELECT * FROM t1 WHERE a < 6; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 6; +SELECT * FROM t1 WHERE a < 7; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 7; +SELECT * FROM t1 WHERE a <= 1; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1; +SELECT * FROM t1 WHERE a <= 2; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 2; +SELECT * FROM t1 WHERE a <= 3; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 3; +SELECT * FROM t1 WHERE a <= 4; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 4; +SELECT * FROM t1 WHERE a <= 5; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 5; +SELECT * FROM t1 WHERE a <= 6; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 6; +SELECT * FROM t1 WHERE a <= 7; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 7; +SELECT * FROM t1 WHERE a = 1; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 1; +SELECT * FROM t1 WHERE a = 2; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 2; +SELECT * FROM t1 WHERE a = 3; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 3; +SELECT * FROM t1 WHERE a = 4; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 4; +SELECT * FROM t1 WHERE a = 5; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 5; +SELECT * FROM t1 WHERE a = 6; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 6; +SELECT * FROM t1 WHERE a = 7; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 7; +SELECT * FROM t1 WHERE a >= 1; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 1; +SELECT * FROM t1 WHERE a >= 2; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 2; +SELECT * FROM t1 WHERE a >= 3; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 3; +SELECT * FROM t1 WHERE a >= 4; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 4; +SELECT * FROM t1 WHERE a >= 5; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 5; +SELECT * FROM t1 WHERE a >= 6; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 6; +SELECT * FROM t1 WHERE a >= 7; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 7; +SELECT * FROM t1 WHERE a > 1; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 1; +SELECT * FROM t1 WHERE a > 2; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 2; +SELECT * FROM t1 WHERE a > 3; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 3; +SELECT * FROM t1 WHERE a > 4; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 4; +SELECT * FROM t1 WHERE a > 5; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 5; +SELECT * FROM t1 WHERE a > 6; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 6; +SELECT * FROM t1 WHERE a > 7; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 7; +DROP TABLE t1; + +CREATE TABLE t1 (a INT PRIMARY KEY) +PARTITION BY RANGE (a) ( +PARTITION p0 VALUES LESS THAN (1), +PARTITION p1 VALUES LESS THAN (2), +PARTITION p2 VALUES LESS THAN (3), +PARTITION p3 VALUES LESS THAN (4), +PARTITION p4 VALUES LESS THAN (5), +PARTITION max VALUES LESS THAN MAXVALUE); + +INSERT INTO t1 VALUES (-1),(0),(1),(2),(3),(4),(5),(6),(7); + +SELECT * FROM t1 WHERE a < 1; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 1; +SELECT * FROM t1 WHERE a < 2; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 2; +SELECT * FROM t1 WHERE a < 3; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 3; +SELECT * FROM t1 WHERE a < 4; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 4; +SELECT * FROM t1 WHERE a < 5; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 5; +SELECT * FROM t1 WHERE a < 6; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 6; +SELECT * FROM t1 WHERE a <= 1; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1; +SELECT * FROM t1 WHERE a <= 2; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 2; +SELECT * FROM t1 WHERE a <= 3; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 3; +SELECT * FROM t1 WHERE a <= 4; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 4; +SELECT * FROM t1 WHERE a <= 5; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 5; +SELECT * FROM t1 WHERE a <= 6; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 6; +SELECT * FROM t1 WHERE a = 1; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 1; +SELECT * FROM t1 WHERE a = 2; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 2; +SELECT * FROM t1 WHERE a = 3; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 3; +SELECT * FROM t1 WHERE a = 4; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 4; +SELECT * FROM t1 WHERE a = 5; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 5; +SELECT * FROM t1 WHERE a = 6; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 6; +SELECT * FROM t1 WHERE a >= 1; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 1; +SELECT * FROM t1 WHERE a >= 2; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 2; +SELECT * FROM t1 WHERE a >= 3; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 3; +SELECT * FROM t1 WHERE a >= 4; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 4; +SELECT * FROM t1 WHERE a >= 5; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 5; +SELECT * FROM t1 WHERE a >= 6; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 6; +SELECT * FROM t1 WHERE a > 1; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 1; +SELECT * FROM t1 WHERE a > 2; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 2; +SELECT * FROM t1 WHERE a > 3; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 3; +SELECT * FROM t1 WHERE a > 4; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 4; +SELECT * FROM t1 WHERE a > 5; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 5; +SELECT * FROM t1 WHERE a > 6; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 6; +DROP TABLE t1; + # # Bug#20577: Partitions: use of to_days() function leads to selection failures # diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index e0697f563ea..2f22432c416 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -2878,16 +2878,13 @@ int get_partition_id_range(partition_info *part_info, part_func_value-= 0x8000000000000000ULL; while (max_part_id > min_part_id) { - loc_part_id= (max_part_id + min_part_id + 1) >> 1; + loc_part_id= (max_part_id + min_part_id) / 2; if (range_array[loc_part_id] <= part_func_value) min_part_id= loc_part_id + 1; else - max_part_id= loc_part_id - 1; + max_part_id= loc_part_id; } loc_part_id= max_part_id; - if (part_func_value >= range_array[loc_part_id]) - if (loc_part_id != max_partition) - loc_part_id++; *part_id= (uint32)loc_part_id; if (loc_part_id == max_partition && part_func_value >= range_array[loc_part_id] && @@ -2961,6 +2958,7 @@ uint32 get_partition_id_range_for_endpoint(partition_info *part_info, bool include_endpoint) { longlong *range_array= part_info->range_int_array; + longlong part_end_val; uint max_partition= part_info->no_parts - 1; uint min_part_id= 0, max_part_id= max_partition, loc_part_id; /* Get the partitioning function value for the endpoint */ @@ -2994,46 +2992,45 @@ uint32 get_partition_id_range_for_endpoint(partition_info *part_info, } } - if (unsigned_flag) part_func_value-= 0x8000000000000000ULL; if (left_endpoint && !include_endpoint) part_func_value++; + + /* + Search for the partition containing part_func_value + (including the right endpoint). + */ while (max_part_id > min_part_id) { - loc_part_id= (max_part_id + min_part_id + 1) >> 1; - if (range_array[loc_part_id] <= part_func_value) + loc_part_id= (max_part_id + min_part_id) / 2; + if (range_array[loc_part_id] < part_func_value) min_part_id= loc_part_id + 1; else - max_part_id= loc_part_id - 1; + max_part_id= loc_part_id; } loc_part_id= max_part_id; - if (loc_part_id < max_partition && - part_func_value >= range_array[loc_part_id+1]) - { - loc_part_id++; - } + + /* Adjust for endpoints */ + part_end_val= range_array[loc_part_id]; if (left_endpoint) { - longlong bound= range_array[loc_part_id]; /* In case of PARTITION p VALUES LESS THAN MAXVALUE the maximum value is in the current partition. */ - if (part_func_value > bound || - (part_func_value == bound && - (!part_info->defined_max_value || loc_part_id < max_partition))) + if (part_func_value == part_end_val && + (loc_part_id < max_partition || !part_info->defined_max_value)) loc_part_id++; } else { - if (loc_part_id < max_partition) - { - if (part_func_value == range_array[loc_part_id]) - loc_part_id += test(include_endpoint); - else if (part_func_value > range_array[loc_part_id]) - loc_part_id++; - } + /* if 'WHERE <= X' and partition is LESS THAN (X) include next partition */ + if (include_endpoint && loc_part_id < max_partition && + part_func_value == part_end_val) + loc_part_id++; + + /* Right endpoint, set end after correct partition */ loc_part_id++; } DBUG_RETURN(loc_part_id); From 7a84896d711a30b3412c962633b7596710e1f806 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Tue, 22 Dec 2009 23:22:42 +0100 Subject: [PATCH 028/132] Change RPM file naming: - Suffix like "-m2", "-rc" becomes part of version as "_m2", "_rc". - Release counts from 1, not 0. This is done for both the "generic" RPMs and the "shared-compat" ones. It includes introducing a new version variable "MYSQL_U_SCORE_VERSION" in "configure.in", where the dash is replaced by an underscore: 5.5.1-m2 -> 5.5.1_m2 --- configure.in | 13 +++++++---- support-files/MySQL-shared-compat.spec.sh | 28 +++++++++++++++-------- support-files/mysql.spec.sh | 14 ++++++++---- 3 files changed, 37 insertions(+), 18 deletions(-) diff --git a/configure.in b/configure.in index a5b2c5c001a..2533e43ebf9 100644 --- a/configure.in +++ b/configure.in @@ -31,12 +31,14 @@ NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0 # Remember that regexps needs to quote [ and ] since this is run through m4 # We take some made up examples # -# VERSION 5.1.40sp1-alpha 5.0.34a -# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a -# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34 -# MYSQL_BASE_VERSION 5.1 5.0 -# MYSQL_VERSION_ID 50140 50034 +# VERSION 5.1.40sp1-alpha 5.0.34a 5.5.1-m2 +# MYSQL_U_SCORE_VERSION 5.1.40sp1_alpha 5.0.34a 5.5.1_m2 +# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a 5.5.1 +# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34 5.5.1 +# MYSQL_BASE_VERSION 5.1 5.0 5.5 +# MYSQL_VERSION_ID 50140 50034 50501 # +MYSQL_U_SCORE_VERSION=`echo $VERSION | sed -e "s|-|_|"` MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"` MYSQL_NUMERIC_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"` MYSQL_BASE_VERSION=`echo $MYSQL_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"` @@ -74,6 +76,7 @@ romanian russian serbian slovak spanish swedish ukrainian" ##### ##### +AC_SUBST(MYSQL_U_SCORE_VERSION) AC_SUBST(MYSQL_NO_DASH_VERSION) AC_SUBST(MYSQL_BASE_VERSION) AC_SUBST(MYSQL_VERSION_ID) diff --git a/support-files/MySQL-shared-compat.spec.sh b/support-files/MySQL-shared-compat.spec.sh index 14a98616863..72654a22d87 100644 --- a/support-files/MySQL-shared-compat.spec.sh +++ b/support-files/MySQL-shared-compat.spec.sh @@ -1,3 +1,4 @@ +# Copyright 2003-2008 MySQL AB, 2009 Sun Microsystems, Inc. # # MySQL-shared-compat.spec # @@ -7,8 +8,6 @@ # separate "MySQL-shared" package. This spec file simply repackages two # already existing MySQL-shared RPMs into a single package. # -# Copyright (C) 2003 MySQL AB -# # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation; version 2 of the License. @@ -28,27 +27,27 @@ # # Change this to match the version of the shared libs you want to include # -%define version50 @MYSQL_NO_DASH_VERSION@ +%define version_cur @MYSQL_U_SCORE_VERSION@ %define version41 4.1.17 %define version40 4.0.26 %define version3 3.23.58 Name: MySQL-shared-compat -Packager: MySQL Product Engineering team -Vendor: MySQL AB +Packager: Sun Microsystems, Inc. Product Engineering Team +Vendor: Sun Microsystems, Inc. License: GPL Group: Applications/Databases URL: http://www.mysql.com/ Autoreqprov: on -Version: %{version50} -Release: 0 +Version: %{version_cur} +Release: 1 BuildRoot: %{_tmppath}/%{name}-%{version}-build Obsoletes: MySQL-shared, mysql-shared Provides: MySQL-shared Summary: MySQL shared client libraries for MySQL %{version}, %{version41}, %{version40} and %{version3} # We simply use the "MySQL-shared" subpackages as input sources instead of # rebuilding all from source -Source0: MySQL-shared-%{version50}-0.%{_arch}.rpm +Source0: MySQL-shared-%{version_cur}-1.%{_arch}.rpm Source1: MySQL-shared-%{version41}-1.%{_arch}.rpm Source2: MySQL-shared-%{version40}-0.%{_arch}.rpm Source3: MySQL-shared-%{version3}-1.%{_arch}.rpm @@ -62,7 +61,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This package includes the shared libraries for MySQL %{version3}, -MySQL %{version40}, %{version41} as well as MySQL %{version50}. +MySQL %{version40}, %{version41} as well as MySQL %{version_cur}. Install this package instead of "MySQL-shared", if you have applications installed that are dynamically linked against older versions of the MySQL client library but you want to upgrade to MySQL %{version} without breaking the @@ -84,3 +83,14 @@ rpm2cpio %{SOURCE3} | cpio -iv --make-directories %files %defattr(-, root, root) %{_libdir}/libmysqlclient* + +# The spec file changelog only includes changes made to the spec file +# itself - note that they must be ordered by date (important when +# merging BK trees) +%changelog +* Tue Dec 22 2009 Joerg Bruehe + +- Change RPM file naming: + - Suffix like "-m2", "-rc" becomes part of version as "_m2", "_rc". + - Release counts from 1, not 0. + diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 83d4550466b..271d0c39e55 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -1,4 +1,4 @@ -# Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. +# Copyright 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -50,9 +50,9 @@ %{!?malloc_lib_target:%define WITH_TCMALLOC 0} %if %{STATIC_BUILD} -%define release 0 +%define release 1 %else -%define release 0.glibc23 +%define release 1.glibc23 %endif %define mysql_license GPL %define mysqld_user mysql @@ -86,7 +86,7 @@ Name: MySQL Summary: MySQL: a very fast and reliable SQL database server Group: Applications/Databases -Version: @MYSQL_NO_DASH_VERSION@ +Version: @MYSQL_U_SCORE_VERSION@ Release: %{release} License: Copyright 2000-2008 MySQL AB, @MYSQL_COPYRIGHT_YEAR@ Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Under %{mysql_license} license as shown in the Description field. Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz @@ -882,6 +882,12 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Tue Dec 22 2009 Joerg Bruehe + +- Change RPM file naming: + - Suffix like "-m2", "-rc" becomes part of version as "_m2", "_rc". + - Release counts from 1, not 0. + * Mon Nov 16 2009 Joerg Bruehe - Fix some problems with the directives around "tcmalloc" (experimental), From 83d5ca950ba1b6e1d5cbc2f39352a30ff7bad8b4 Mon Sep 17 00:00:00 2001 From: Satya B Date: Wed, 23 Dec 2009 12:29:34 +0530 Subject: [PATCH 029/132] Applying InnoDB snapshot 5.1-ss6344, Fixes BUG#47814 and also applying 5.1-ss6355 Detailed revision comments: r6324 | jyang | 2009-12-17 06:54:24 +0200 (Thu, 17 Dec 2009) | 8 lines branches/5.1: Fix bug #47814 - Diagnostics are frequently not printed after a long lock wait in InnoDB. Separate out the lock wait timeout check thread from monitor information printing thread. rb://200 Approved by Marko. r6349 | marko | 2009-12-22 11:09:54 +0200 (Tue, 22 Dec 2009) | 3 lines branches/5.1: lock_print_info_summary(): Remove a reference to innobase_mysql_end_print_arbitrary_thd() that should have been removed in r6347 when removing the function. r6350 | marko | 2009-12-22 11:11:09 +0200 (Tue, 22 Dec 2009) | 1 line branches/5.1: Remove an obsolete declaration of LOCK_thread_count. --- storage/innobase/handler/ha_innodb.cc | 4 +- storage/innobase/include/lock0lock.h | 9 +- storage/innobase/include/srv0srv.h | 26 +++- storage/innobase/lock/lock0lock.c | 22 +++- storage/innobase/log/log0log.c | 2 +- storage/innobase/srv/srv0srv.c | 177 ++++++++++++++++++++------ storage/innobase/srv/srv0start.c | 15 ++- 7 files changed, 194 insertions(+), 61 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 2467e7b19b5..a1b8c551845 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -7394,8 +7394,8 @@ innodb_show_status( mutex_enter_noninline(&srv_monitor_file_mutex); rewind(srv_monitor_file); - srv_printf_innodb_monitor(srv_monitor_file, - &trx_list_start, &trx_list_end); + srv_printf_innodb_monitor(srv_monitor_file, FALSE, + &trx_list_start, &trx_list_end); flen = ftell(srv_monitor_file); os_file_set_eof(srv_monitor_file); diff --git a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock0lock.h index 635724bf5a1..beaf17eda01 100644 --- a/storage/innobase/include/lock0lock.h +++ b/storage/innobase/include/lock0lock.h @@ -579,10 +579,15 @@ lock_rec_print( /************************************************************************* Prints info of locks for all transactions. */ -void +ibool lock_print_info_summary( /*====================*/ - FILE* file); /* in: file where to print */ + /* out: FALSE if not able to obtain + kernel mutex and exits without + printing info */ + FILE* file, /* in: file where to print */ + ibool nowait);/* in: whether to wait for the kernel + mutex */ /************************************************************************* Prints info of locks for each transaction. */ diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index 67144a41d3d..3dd4bb961f9 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -146,7 +146,8 @@ extern ibool srv_print_innodb_tablespace_monitor; extern ibool srv_print_verbose_log; extern ibool srv_print_innodb_table_monitor; -extern ibool srv_lock_timeout_and_monitor_active; +extern ibool srv_lock_timeout_active; +extern ibool srv_monitor_active; extern ibool srv_error_monitor_active; extern ulong srv_n_spin_wait_rounds; @@ -427,12 +428,21 @@ srv_release_mysql_thread_if_suspended( que_thr_t* thr); /* in: query thread associated with the MySQL OS thread */ /************************************************************************* -A thread which wakes up threads whose lock wait may have lasted too long. -This also prints the info output by various InnoDB monitors. */ +A thread which wakes up threads whose lock wait may have lasted too +long. */ os_thread_ret_t -srv_lock_timeout_and_monitor_thread( -/*================================*/ +srv_lock_timeout_thread( +/*====================*/ + /* out: a dummy parameter */ + void* arg); /* in: a dummy parameter required by + os_thread_create */ +/************************************************************************* +A thread which prints the info output by various InnoDB monitors. */ + +os_thread_ret_t +srv_monitor_thread( +/*===============*/ /* out: a dummy parameter */ void* arg); /* in: a dummy parameter required by os_thread_create */ @@ -449,10 +459,14 @@ srv_error_monitor_thread( /********************************************************************** Outputs to a file the output of the InnoDB Monitor. */ -void +ibool srv_printf_innodb_monitor( /*======================*/ + /* out: FALSE if not all information printed + due to failure to obtain necessary mutex */ FILE* file, /* in: output stream */ + ibool nowait, /* in: whether to wait for kernel + mutex. */ ulint* trx_start, /* out: file position of the start of the list of active transactions */ ulint* trx_end); /* out: file position of the end of diff --git a/storage/innobase/lock/lock0lock.c b/storage/innobase/lock/lock0lock.c index 80aef45ea35..4cc10931060 100644 --- a/storage/innobase/lock/lock0lock.c +++ b/storage/innobase/lock/lock0lock.c @@ -4192,12 +4192,27 @@ lock_get_n_rec_locks(void) /************************************************************************* Prints info of locks for all transactions. */ -void +ibool lock_print_info_summary( /*====================*/ - FILE* file) /* in: file where to print */ + /* out: FALSE if not able to obtain + kernel mutex and exit without + printing lock info */ + FILE* file, /* in: file where to print */ + ibool nowait) /* in: whether to wait for the kernel + mutex */ { - lock_mutex_enter_kernel(); + + /* if nowait is FALSE, wait on the kernel mutex, + otherwise return immediately if fail to obtain the + mutex. */ + if (!nowait) { + lock_mutex_enter_kernel(); + } else if (mutex_enter_nowait(&kernel_mutex)) { + fputs("FAIL TO OBTAIN KERNEL MUTEX, " + "SKIP LOCK INFO PRINTING\n", file); + return(FALSE); + } if (lock_deadlock_found) { fputs("------------------------\n" @@ -4231,6 +4246,7 @@ lock_print_info_summary( "Total number of lock structs in row lock hash table %lu\n", (ulong) lock_get_n_rec_locks()); #endif /* PRINT_NUM_OF_LOCK_STRUCTS */ + return(TRUE); } /************************************************************************* diff --git a/storage/innobase/log/log0log.c b/storage/innobase/log/log0log.c index b10c348b24d..3300997112b 100644 --- a/storage/innobase/log/log0log.c +++ b/storage/innobase/log/log0log.c @@ -3045,7 +3045,7 @@ loop: if (srv_fast_shutdown < 2 && (srv_error_monitor_active - || srv_lock_timeout_and_monitor_active)) { + || srv_lock_timeout_active || srv_monitor_active)) { mutex_exit(&kernel_mutex); diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index 71e74ab848b..26ea7958d0d 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/srv/srv0srv.c @@ -64,7 +64,8 @@ ulint srv_fatal_semaphore_wait_threshold = 600; in microseconds, in order to reduce the lagging of the purge thread. */ ulint srv_dml_needed_delay = 0; -ibool srv_lock_timeout_and_monitor_active = FALSE; +ibool srv_lock_timeout_active = FALSE; +ibool srv_monitor_active = FALSE; ibool srv_error_monitor_active = FALSE; const char* srv_main_thread_op_info = ""; @@ -122,6 +123,16 @@ ulint srv_log_file_size = ULINT_MAX; /* size in database pages */ ulint srv_log_buffer_size = ULINT_MAX; /* size in database pages */ ulong srv_flush_log_at_trx_commit = 1; +/* Maximum number of times allowed to conditionally acquire +mutex before switching to blocking wait on the mutex */ +#define MAX_MUTEX_NOWAIT 20 + +/* Check whether the number of failed nonblocking mutex +acquisition attempts exceeds maximum allowed value. If so, +srv_printf_innodb_monitor() will request mutex acquisition +with mutex_enter(), which will wait until it gets the mutex. */ +#define MUTEX_NOWAIT(mutex_skipped) ((mutex_skipped) < MAX_MUTEX_NOWAIT) + byte srv_latin1_ordering[256] /* The sort order table of the latin1 character set. The following table is the MySQL order as of Feb 10th, 2002 */ @@ -1626,10 +1637,13 @@ srv_refresh_innodb_monitor_stats(void) /********************************************************************** Outputs to a file the output of the InnoDB Monitor. */ -void +ibool srv_printf_innodb_monitor( /*======================*/ + /* out: FALSE if not all information printed + due to failure to obtain necessary mutex */ FILE* file, /* in: output stream */ + ibool nowait, /* in: whether to wait for the mutex. */ ulint* trx_start, /* out: file position of the start of the list of active transactions */ ulint* trx_end) /* out: file position of the end of @@ -1638,6 +1652,7 @@ srv_printf_innodb_monitor( double time_elapsed; time_t current_time; ulint n_reserved; + ibool ret; mutex_enter(&srv_innodb_monitor_mutex); @@ -1682,24 +1697,31 @@ srv_printf_innodb_monitor( mutex_exit(&dict_foreign_err_mutex); - lock_print_info_summary(file); - if (trx_start) { - long t = ftell(file); - if (t < 0) { - *trx_start = ULINT_UNDEFINED; - } else { - *trx_start = (ulint) t; - } - } - lock_print_info_all_transactions(file); - if (trx_end) { - long t = ftell(file); - if (t < 0) { - *trx_end = ULINT_UNDEFINED; - } else { - *trx_end = (ulint) t; + /* Only if lock_print_info_summary proceeds correctly, + before we call the lock_print_info_all_transactions + to print all the lock information. */ + ret = lock_print_info_summary(file, nowait); + + if (ret) { + if (trx_start) { + long t = ftell(file); + if (t < 0) { + *trx_start = ULINT_UNDEFINED; + } else { + *trx_start = (ulint) t; + } + } + lock_print_info_all_transactions(file); + if (trx_end) { + long t = ftell(file); + if (t < 0) { + *trx_end = ULINT_UNDEFINED; + } else { + *trx_end = (ulint) t; + } } } + fputs("--------\n" "FILE I/O\n" "--------\n", file); @@ -1804,6 +1826,8 @@ srv_printf_innodb_monitor( "============================\n", file); mutex_exit(&srv_innodb_monitor_mutex); fflush(file); + + return(ret); } /********************************************************************** @@ -1883,26 +1907,23 @@ srv_export_innodb_status(void) } /************************************************************************* -A thread which wakes up threads whose lock wait may have lasted too long. -This also prints the info output by various InnoDB monitors. */ +A thread prints the info output by various InnoDB monitors. */ os_thread_ret_t -srv_lock_timeout_and_monitor_thread( -/*================================*/ +srv_monitor_thread( +/*===============*/ /* out: a dummy parameter */ void* arg __attribute__((unused))) /* in: a dummy parameter required by os_thread_create */ { - srv_slot_t* slot; double time_elapsed; time_t current_time; time_t last_table_monitor_time; time_t last_tablespace_monitor_time; time_t last_monitor_time; - ibool some_waits; - double wait_time; - ulint i; + ulint mutex_skipped; + ibool last_srv_print_monitor; #ifdef UNIV_DEBUG_THREAD_CREATION fprintf(stderr, "Lock timeout thread starts, id %lu\n", @@ -1913,13 +1934,15 @@ srv_lock_timeout_and_monitor_thread( last_table_monitor_time = time(NULL); last_tablespace_monitor_time = time(NULL); last_monitor_time = time(NULL); + mutex_skipped = 0; + last_srv_print_monitor = srv_print_innodb_monitor; loop: - srv_lock_timeout_and_monitor_active = TRUE; + srv_monitor_active = TRUE; - /* When someone is waiting for a lock, we wake up every second - and check if a timeout has passed for a lock wait */ + /* Wake up every 5 seconds to see if we need to print + monitor information. */ - os_thread_sleep(1000000); + os_thread_sleep(5000000); current_time = time(NULL); @@ -1929,14 +1952,40 @@ loop: last_monitor_time = time(NULL); if (srv_print_innodb_monitor) { - srv_printf_innodb_monitor(stderr, NULL, NULL); + /* Reset mutex_skipped counter everytime + srv_print_innodb_monitor changes. This is to + ensure we will not be blocked by kernel_mutex + for short duration information printing, + such as requested by sync_array_print_long_waits() */ + if (!last_srv_print_monitor) { + mutex_skipped = 0; + last_srv_print_monitor = TRUE; + } + + if (!srv_printf_innodb_monitor(stderr, + MUTEX_NOWAIT(mutex_skipped), + NULL, NULL)) { + mutex_skipped++; + } else { + /* Reset the counter */ + mutex_skipped = 0; + } + } else { + last_srv_print_monitor = FALSE; } + if (srv_innodb_status) { mutex_enter(&srv_monitor_file_mutex); rewind(srv_monitor_file); - srv_printf_innodb_monitor(srv_monitor_file, NULL, - NULL); + if (!srv_printf_innodb_monitor(srv_monitor_file, + MUTEX_NOWAIT(mutex_skipped), + NULL, NULL)) { + mutex_skipped++; + } else { + mutex_skipped = 0; + } + os_file_set_eof(srv_monitor_file); mutex_exit(&srv_monitor_file_mutex); } @@ -1989,6 +2038,56 @@ loop: } } + if (srv_shutdown_state >= SRV_SHUTDOWN_CLEANUP) { + goto exit_func; + } + + if (srv_print_innodb_monitor + || srv_print_innodb_lock_monitor + || srv_print_innodb_tablespace_monitor + || srv_print_innodb_table_monitor) { + goto loop; + } + + srv_monitor_active = FALSE; + + goto loop; + +exit_func: + srv_monitor_active = FALSE; + + /* We count the number of threads in os_thread_exit(). A created + thread should always use that to exit and not use return() to exit. */ + + os_thread_exit(NULL); + + OS_THREAD_DUMMY_RETURN; +} + +/************************************************************************* +A thread which wakes up threads whose lock wait may have lasted too long. */ + +os_thread_ret_t +srv_lock_timeout_thread( +/*====================*/ + /* out: a dummy parameter */ + void* arg __attribute__((unused))) + /* in: a dummy parameter required by + os_thread_create */ +{ + srv_slot_t* slot; + ibool some_waits; + double wait_time; + ulint i; + +loop: + /* When someone is waiting for a lock, we wake up every second + and check if a timeout has passed for a lock wait */ + + os_thread_sleep(1000000); + + srv_lock_timeout_active = TRUE; + mutex_enter(&kernel_mutex); some_waits = FALSE; @@ -2033,17 +2132,11 @@ loop: goto exit_func; } - if (some_waits || srv_print_innodb_monitor - || srv_print_innodb_lock_monitor - || srv_print_innodb_tablespace_monitor - || srv_print_innodb_table_monitor) { + if (some_waits) { goto loop; } - /* No one was waiting for a lock and no monitor was active: - suspend this thread */ - - srv_lock_timeout_and_monitor_active = FALSE; + srv_lock_timeout_active = FALSE; #if 0 /* The following synchronisation is disabled, since @@ -2053,7 +2146,7 @@ loop: goto loop; exit_func: - srv_lock_timeout_and_monitor_active = FALSE; + srv_lock_timeout_active = FALSE; /* We count the number of threads in os_thread_exit(). A created thread should always use that to exit and not use return() to exit. */ diff --git a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c index ea88039f3dd..a7950473a17 100644 --- a/storage/innobase/srv/srv0start.c +++ b/storage/innobase/srv/srv0start.c @@ -87,8 +87,8 @@ static os_file_t files[1000]; static mutex_t ios_mutex; static ulint ios; -static ulint n[SRV_MAX_N_IO_THREADS + 5]; -static os_thread_id_t thread_ids[SRV_MAX_N_IO_THREADS + 5]; +static ulint n[SRV_MAX_N_IO_THREADS + 6]; +static os_thread_id_t thread_ids[SRV_MAX_N_IO_THREADS + 6]; /* We use this mutex to test the return value of pthread_mutex_trylock on successful locking. HP-UX does NOT return 0, though Linux et al do. */ @@ -1596,15 +1596,20 @@ innobase_start_or_create_for_mysql(void) /* fprintf(stderr, "Max allowed record size %lu\n", page_get_free_space_of_empty() / 2); */ - /* Create the thread which watches the timeouts for lock waits - and prints InnoDB monitor info */ + /* Create the thread which watches the timeouts for lock + waits */ - os_thread_create(&srv_lock_timeout_and_monitor_thread, NULL, + os_thread_create(&srv_lock_timeout_thread, NULL, thread_ids + 2 + SRV_MAX_N_IO_THREADS); /* Create the thread which warns of long semaphore waits */ os_thread_create(&srv_error_monitor_thread, NULL, thread_ids + 3 + SRV_MAX_N_IO_THREADS); + + /* Create the thread which prints InnoDB monitor info */ + os_thread_create(&srv_monitor_thread, NULL, + thread_ids + 4 + SRV_MAX_N_IO_THREADS); + srv_was_started = TRUE; srv_is_being_started = FALSE; From f7c24a2e208b0b606d9671c4cecd90a8eeb1f2e2 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Wed, 23 Dec 2009 13:06:41 +0100 Subject: [PATCH 030/132] The "semisync" plugin file name has lost its introductory "lib", adapt the file lists for the subpackages. This is a part missing from the fix for bug#48351. --- support-files/mysql.spec.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 271d0c39e55..d1f364766ea 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -715,8 +715,8 @@ fi %attr(755, root, root) %{_bindir}/resolveip %attr(755, root, root) %{_libdir}/mysql/plugin/ha_example.so* -%attr(755, root, root) %{_libdir}/mysql/plugin/libsemisync_master.so* -%attr(755, root, root) %{_libdir}/mysql/plugin/libsemisync_slave.so* +%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_master.so* +%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_slave.so* %if %{WITH_TCMALLOC} %attr(755, root, root) %{_libdir}/mysql/%{malloc_lib_target} @@ -849,10 +849,10 @@ fi %{_libdir}/mysql/libz.la %{_libdir}/mysql/plugin/ha_example.a %{_libdir}/mysql/plugin/ha_example.la -%{_libdir}/mysql/plugin/libsemisync_master.a -%{_libdir}/mysql/plugin/libsemisync_master.la -%{_libdir}/mysql/plugin/libsemisync_slave.a -%{_libdir}/mysql/plugin/libsemisync_slave.la +%{_libdir}/mysql/plugin/semisync_master.a +%{_libdir}/mysql/plugin/semisync_master.la +%{_libdir}/mysql/plugin/semisync_slave.a +%{_libdir}/mysql/plugin/semisync_slave.la %files shared %defattr(-, root, root, 0755) @@ -882,6 +882,12 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Wed Dec 23 2009 Joerg Bruehe + +- The "semisync" plugin file name has lost its introductory "lib", + adapt the file lists for the subpackages. + This is a part missing from the fix for bug#48351. + * Tue Dec 22 2009 Joerg Bruehe - Change RPM file naming: From f62540ee25f23b89348068c01d6697714db276d7 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Wed, 23 Dec 2009 13:38:19 +0100 Subject: [PATCH 031/132] Backport a fix from "trunk" into 5.5.1 which came after cloning only. Original comment: revno: 2930 | revision-id: alik@sun.com-20091223120351-m6l2t721tvtsiumu | parent: alik@sun.com-20091223104155-cq3uw9l2yvg6jmgc | committer: Alexander Nozdrin | branch nick: mysql-trunk-bugfixing | timestamp: Wed 2009-12-23 15:03:51 +0300 | message: | Backporting fix for Bug#49834 from mysql-next-mr-bugfixing | into mysql-trunk-bugfixing. | | Original revision: | ------------------------------------------------------------ | revision-id: vvaintroub@mysql.com-20091222115311-bam0xorumd8gvjyo | parent: mattias.jonsson@sun.com-20091221104426-x2e6c93x8iik4fo0 | committer: Vladislav Vaintroub | branch nick: mysql-next-mr-bugfixing | timestamp: Tue 2009-12-22 12:53:11 +0100 | message: | Bug#49834 - fixed a bug introduced by mismerge. | restore original innobase version --- storage/innobase/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt index 3f9808a2022..b63ed840f3c 100644 --- a/storage/innobase/CMakeLists.txt +++ b/storage/innobase/CMakeLists.txt @@ -86,5 +86,10 @@ IF (MYSQL_VERSION_ID GREATER "50137") SET_TARGET_PROPERTIES(ha_innobase PROPERTIES OUTPUT_NAME ha_innodb) ENDIF(LIB_LOCATION) ELSE (MYSQL_VERSION_ID GREATER "50137") - MYSQL_STORAGE_ENGINE(INNODB_PLUGIN) + IF (NOT SOURCE_SUBLIBS) + ADD_DEFINITIONS(-D_WIN32 -DMYSQL_SERVER) + ADD_LIBRARY(innobase STATIC ${INNOBASE_SOURCES}) + # Require mysqld_error.h, which is built as part of the GenError + ADD_DEPENDENCIES(innobase GenError) + ENDIF (NOT SOURCE_SUBLIBS) ENDIF (MYSQL_VERSION_ID GREATER "50137") From d2f61748cd0a63d0c9df989d92cb36fc1c7583c5 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Wed, 23 Dec 2009 17:11:22 +0200 Subject: [PATCH 032/132] Bug #49512 : subquery with aggregate function crash subselect_single_select_engine::exec() When a subquery doesn't need to be evaluated because it returns only aggregate functions and these aggregates can be calculated from the metadata about the table it was not updating all the relevant members of the JOIN structure to reflect that this is a constant query. This caused problems to the enclosing subquery ('<> SOME' in the test case above) trying to read some data about the tables. Fixed by setting const_tables to the number of tables when the SELECT is optimized away. --- mysql-test/r/subselect.result | 13 +++++++++++++ mysql-test/t/subselect.test | 15 +++++++++++++++ sql/sql_select.cc | 1 + 3 files changed, 29 insertions(+) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index f446d8feec3..dc3cff68731 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4602,4 +4602,17 @@ SELECT 1 FROM t1 GROUP BY 1 1 DROP TABLE t1; +# +# Bug #49512 : subquery with aggregate function crash +# subselect_single_select_engine::exec() +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(); +# should not crash +SELECT 1 FROM t1 WHERE a <> SOME +( +SELECT MAX((SELECT a FROM t1 LIMIT 1)) AS d +FROM t1,t1 a +); +1 +DROP TABLE t1; End of 5.1 tests. diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index a4314c45cba..027578fc6bd 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -3585,4 +3585,19 @@ SELECT 1 FROM t1 GROUP BY (SELECT LAST_INSERT_ID() FROM t1 ORDER BY MIN(a) ASC LIMIT 1); DROP TABLE t1; +--echo # +--echo # Bug #49512 : subquery with aggregate function crash +--echo # subselect_single_select_engine::exec() + +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(); + +--echo # should not crash +SELECT 1 FROM t1 WHERE a <> SOME +( + SELECT MAX((SELECT a FROM t1 LIMIT 1)) AS d + FROM t1,t1 a +); +DROP TABLE t1; + --echo End of 5.1 tests. diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 644f0072b7b..d5ce32902c4 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -942,6 +942,7 @@ JOIN::optimize() DBUG_PRINT("info",("Select tables optimized away")); zero_result_cause= "Select tables optimized away"; tables_list= 0; // All tables resolved + const_tables= tables; /* Extract all table-independent conditions and replace the WHERE clause with them. All other conditions were computed by opt_sum_query From 3be15fa67c0d2d5cce990391832c42e4c4050417 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Wed, 23 Dec 2009 22:42:44 +0100 Subject: [PATCH 033/132] Remove the "fix_privilege_tables" manual from the RPM spec file, there is none in 5.5. --- support-files/mysql.spec.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index d1f364766ea..4e7f8cfcfb5 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -673,7 +673,7 @@ fi %doc %attr(644, root, man) %{_mandir}/man8/mysqld.8* %doc %attr(644, root, man) %{_mandir}/man1/mysqld_multi.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqld_safe.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_fix_privilege_tables.1* +#%doc %attr(644, root, man) %{_mandir}/man1/mysql_fix_privilege_tables.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql_install_db.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql_upgrade.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqlhotcopy.1* @@ -887,6 +887,8 @@ fi - The "semisync" plugin file name has lost its introductory "lib", adapt the file lists for the subpackages. This is a part missing from the fix for bug#48351. +- Remove the "fix_privilege_tables" manual, it does not exist in 5.5 + (and likely, the whole script will go, too). * Tue Dec 22 2009 Joerg Bruehe From 416df0eaada5b644931f5b3b15f897a376641a4d Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Thu, 24 Dec 2009 15:20:58 +0000 Subject: [PATCH 034/132] BUG#48738: post-push fix. Multi-platform test improvements, mainly to make the test run gracefully on windows. There was also a syntax error in windows part of the test. --- .../r/binlog_delete_and_flush_index.result | 14 ++- .../t/binlog_delete_and_flush_index.test | 95 ++++--------------- 2 files changed, 29 insertions(+), 80 deletions(-) diff --git a/mysql-test/r/binlog_delete_and_flush_index.result b/mysql-test/r/binlog_delete_and_flush_index.result index 153900f3081..7500c17759c 100644 --- a/mysql-test/r/binlog_delete_and_flush_index.result +++ b/mysql-test/r/binlog_delete_and_flush_index.result @@ -2,7 +2,9 @@ RESET MASTER; CREATE TABLE t1 (a int); ### assertion: index file contains regular entries SET @index=LOAD_FILE('MYSQLD_DATADIR/master-bin.index'); -master-bin.000001 +SELECT @index; +@index +MYSQLD_DATADIR/master-bin.000001 ### assertion: show original binlogs show binary logs; @@ -15,8 +17,10 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a int) FLUSH LOGS; ### assertion: index file contains renamed binlog and the new one SET @index=LOAD_FILE('MYSQLD_DATADIR/master-bin.index'); -master-bin-b34582.000001 -master-bin.000002 +SELECT @index; +@index +MYSQLD_DATADIR/master-bin-b34582.000001 +MYSQLD_DATADIR/master-bin.000002 ### assertion: original binlog content still exists, despite we ### renamed and changed the index file @@ -39,6 +43,8 @@ master-bin.000002 # ### assertion: assert that not purged binlog file exists ### assertion: show index file contents and these should match show binary logs issued above SET @index=LOAD_FILE('MYSQLD_DATADIR/master-bin.index'); -master-bin.000002 +SELECT @index; +@index +MYSQLD_DATADIR/master-bin.000002 RESET MASTER; diff --git a/mysql-test/t/binlog_delete_and_flush_index.test b/mysql-test/t/binlog_delete_and_flush_index.test index 6784043386d..2899b96e317 100644 --- a/mysql-test/t/binlog_delete_and_flush_index.test +++ b/mysql-test/t/binlog_delete_and_flush_index.test @@ -45,31 +45,10 @@ RESET MASTER; CREATE TABLE t1 (a int); -- echo ### assertion: index file contains regular entries --- replace_regex /[\\\/].*master/MYSQLD_DATADIR\/master/ +-- replace_result $datadir MYSQLD_DATADIR -- eval SET @index=LOAD_FILE('$index') -if (`SELECT convert(@@version_compile_os using latin1) - IN ('Win32','Win64','Windows')`) -{ - -- disable_query_log - -- disable_result_log - -- let $a= `SELECT REPLACE (@index, '$datadir\', '')` - -- enable_result_log - -- enable_query_log - - -- echo $a - -} -if (!`SELECT convert(@@version_compile_os using latin1) - IN ('Win32','Win64','Windows')`) -{ - -- disable_query_log - -- disable_result_log - -- let $a= `SELECT REPLACE (@index, '$datadir/', '')` - -- enable_result_log - -- enable_query_log - - -- echo $a -} +-- replace_result $datadir MYSQLD_DATADIR +SELECT @index; --echo ### assertion: show original binlogs -- source include/show_binary_logs.inc @@ -79,17 +58,23 @@ if (!`SELECT convert(@@version_compile_os using latin1) # action: copy binlogs to other names and change entries in index file -- copy_file $datadir/master-bin.000001 $datadir/master-bin-b34582.000001 --- let newbinfile=$datadir/master-bin-b34582.000001 -let INDEX_FILE=$index; +-- let newbinfile= $datadir/master-bin-b34582.000001 +-- let INDEX_FILE= $index perl; -$newbinfile= $ENV{'newbinfile'}; +use File::Spec; +$newbinfile= File::Spec->rel2abs($ENV{'newbinfile'}); $file= $ENV{'INDEX_FILE'}; open(FILE, ">$file") || die "Unable to open $file."; truncate(FILE,0); -print FILE $newbinfile . "\n"; +print FILE "$newbinfile"; close ($file); EOF +# append a new line (platform independent) +-- append_file $index + +EOF + # action: should cause rotation, and creation of new binlogs FLUSH LOGS; @@ -97,31 +82,10 @@ FLUSH LOGS; -- remove_file $datadir/master-bin.000001 -- echo ### assertion: index file contains renamed binlog and the new one --- replace_regex /[\\\/].*master/MYSQLD_DATADIR\/master/ +-- replace_result $datadir MYSQLD_DATADIR -- eval SET @index=LOAD_FILE('$index') -if (`SELECT convert(@@version_compile_os using latin1) - IN ('Win32','Win64','Windows')`) -{ - -- disable_query_log - -- disable_result_log - -- let $a= `SELECT REPLACE (@index, '$datadir\', '')` - -- enable_result_log - -- enable_query_log - - -- echo $a - -} -if (!`SELECT convert(@@version_compile_os using latin1) - IN ('Win32','Win64','Windows')`) -{ - -- disable_query_log - -- disable_result_log - -- let $a= `SELECT REPLACE (@index, '$datadir/', '')` - -- enable_result_log - -- enable_query_log - - -- echo $a -} +-- replace_result $datadir MYSQLD_DATADIR +SELECT @index; -- echo ### assertion: original binlog content still exists, despite we -- echo ### renamed and changed the index file @@ -147,30 +111,9 @@ DROP TABLE t1; -- file_exists $datadir/$current_binlog -- echo ### assertion: show index file contents and these should match show binary logs issued above --- replace_regex /[\\\/].*master/MYSQLD_DATADIR\/master/ +-- replace_result $datadir MYSQLD_DATADIR -- eval SET @index=LOAD_FILE('$index') -if (`SELECT convert(@@version_compile_os using latin1) - IN ('Win32','Win64','Windows')`) -{ - -- disable_query_log - -- disable_result_log - -- let $a= `SELECT REPLACE (@index, '$datadir\', '')` - -- enable_result_log - -- enable_query_log - - -- echo $a - -} -if (!`SELECT convert(@@version_compile_os using latin1) - IN ('Win32','Win64','Windows')`) -{ - -- disable_query_log - -- disable_result_log - -- let $a= `SELECT REPLACE (@index, '$datadir/', '')` - -- enable_result_log - -- enable_query_log - - -- echo $a -} +-- replace_result $datadir MYSQLD_DATADIR +SELECT @index; RESET MASTER; From d54d0d3c3155c69aa4643ccf95e2f553add6aff7 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Fri, 25 Dec 2009 17:02:08 +0100 Subject: [PATCH 035/132] Backport into the 5.5.1-m2 release build: | Bug#49898 - Fix for bug#37408 introduces a linker error | | the declaration of THR_LOCK_myisam_mmap in mi_static | is redundant as it accessible via the extern declaration | in include/myisam.h storage/myisam/mi_static.c: Bug#49898 - Fix for bug#37408 introduces a linker error Remove THR_LOCK_myisam_mmap declaration as it is redundant --- storage/myisam/mi_static.c | 1 - 1 file changed, 1 deletion(-) diff --git a/storage/myisam/mi_static.c b/storage/myisam/mi_static.c index a43a099663b..27485e101ff 100644 --- a/storage/myisam/mi_static.c +++ b/storage/myisam/mi_static.c @@ -41,7 +41,6 @@ my_off_t myisam_max_temp_length= MAX_FILE_SIZE; ulong myisam_bulk_insert_tree_size=8192*1024; ulong myisam_data_pointer_size=4; ulonglong myisam_mmap_size= SIZE_T_MAX, myisam_mmap_used= 0; -pthread_mutex_t THR_LOCK_myisam_mmap; static int always_valid(const char *filename __attribute__((unused))) { From e6e3b4abc3cb1b0b92dc862810d5571b8b20397f Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Mon, 28 Dec 2009 16:59:12 +0300 Subject: [PATCH 036/132] Fixed a build failure in mysql-trunk-merge caused by a bad merge from mysql-5.1-bugteam. --- sql/sp_head.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 130a1d3e742..6b62949f4fe 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -2811,9 +2811,9 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp, open_tables stage. */ if (!res || !thd->is_error() || - (thd->main_da.sql_errno() != ER_CANT_REOPEN_TABLE && - thd->main_da.sql_errno() != ER_NO_SUCH_TABLE && - thd->main_da.sql_errno() != ER_UPDATE_TABLE_USED)) + (thd->stmt_da->sql_errno() != ER_CANT_REOPEN_TABLE && + thd->stmt_da->sql_errno() != ER_NO_SUCH_TABLE && + thd->stmt_da->sql_errno() != ER_UPDATE_TABLE_USED)) thd->stmt_arena->state= Query_arena::EXECUTED; /* From 71061de025de2e9bffaaecdd182ad7f7ccd924d0 Mon Sep 17 00:00:00 2001 From: Kent Boortz Date: Wed, 30 Dec 2009 23:06:14 +0100 Subject: [PATCH 037/132] Removed unwanted Perl DBI dependency --- support-files/mysql.spec.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 8209c4560c6..b6d822d8719 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -65,6 +65,19 @@ # See BUG#998 for details. %define _unpackaged_files_terminate_build 0 +# ------------------------------------------------------------------------------ +# RPM build tools now automatically detects Perl module dependencies. This +# detection gives problems as it is broken in some versions, and it also +# give unwanted dependencies from mandatory scripts in our package. +# Might not be possible to disable in all RPM tool versions, but here we +# try. We keep the "AutoReqProv: no" for the "test" sub package, as disabling +# here might fail, and that package has the most problems. +# See http://fedoraproject.org/wiki/Packaging/Perl#Filtering_Requires:_and_Provides +# http://www.wideopen.com/archives/rpm-list/2002-October/msg00343.html +# ------------------------------------------------------------------------------ +%undefine __perl_provides +%undefine __perl_requires + %define see_base For a description of MySQL see the base MySQL RPM or http://www.mysql.com # On SuSE 9 no separate "debuginfo" package is built. To enable basic @@ -205,7 +218,7 @@ They should be used with caution. %endif %package test -Requires: %{name}-client perl-DBI perl +Requires: %{name}-client perl Summary: MySQL - Test suite Group: Applications/Databases Provides: mysql-test From 2b2ce3d6cb01a36cd35191e8670dcb023420c84e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Dec 2009 11:33:10 +0800 Subject: [PATCH 038/132] Bug #49137 Replication failure on SBR/MBR + multi-table DROP TEMPORARY TABLE In statement-based or mixed-mode replication, use DROP TEMPORARY TABLE to drop multiple tables causes different errors on master and slave, when one or more of these tables do not exist. Because when executed on slave, it would automatically add IF EXISTS to the query to ignore all ER_BAD_TABLE_ERROR errors. To fix the problem, do not add IF EXISTS when executing DROP TEMPORARY TABLE on the slave, and clear the ER_BAD_TABLE_ERROR error after execution if the query does not expect any errors. mysql-test/r/rpl_drop_temp.result: Updated for the patch of bug#49137. mysql-test/t/rpl_drop_temp.test: Added the test file to verify if DROP MULTI TEMPORARY TABLE will cause different errors on master and slave, when one or more of these tables do not exist. sql/log_event.cc: Added code to handle above cases which are removed from sql_parse.cc sql/sql_parse.cc: Remove the code to issue the 'Unknown table' error, if the temporary table does not exist when dropping it on slave. The above cases decribed in comments will be handled later in log_event.cc. --- mysql-test/r/rpl_drop_temp.result | 14 +++++++++++++ mysql-test/t/rpl_drop_temp.test | 33 +++++++++++++++++++++++++++++++ sql/log_event.cc | 12 ++++++++++- sql/sql_parse.cc | 11 ----------- 4 files changed, 58 insertions(+), 12 deletions(-) diff --git a/mysql-test/r/rpl_drop_temp.result b/mysql-test/r/rpl_drop_temp.result index fff179d7056..48a21b1702b 100644 --- a/mysql-test/r/rpl_drop_temp.result +++ b/mysql-test/r/rpl_drop_temp.result @@ -18,3 +18,17 @@ show status like 'Slave_open_temp_tables'; Variable_name Value Slave_open_temp_tables 0 drop database mysqltest; +DROP TEMPORARY TABLE IF EXISTS tmp1; +Warnings: +Note 1051 Unknown table 'tmp1' +CREATE TEMPORARY TABLE t1 ( a int ); +DROP TEMPORARY TABLE t1, t2; +ERROR 42S02: Unknown table 't2' +DROP TEMPORARY TABLE tmp2; +ERROR 42S02: Unknown table 'tmp2' +stop slave; +**** On Master **** +CREATE TEMPORARY TABLE tmp3 (a int); +DROP TEMPORARY TABLE tmp3; +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; +START SLAVE; diff --git a/mysql-test/t/rpl_drop_temp.test b/mysql-test/t/rpl_drop_temp.test index c22bcbe63d0..c2dc8b0ea49 100644 --- a/mysql-test/t/rpl_drop_temp.test +++ b/mysql-test/t/rpl_drop_temp.test @@ -20,5 +20,38 @@ connection slave; show status like 'Slave_open_temp_tables'; connection master; drop database mysqltest; +sync_slave_with_master; + +# +# Bug#49137 +# This test verifies if DROP MULTI TEMPORARY TABLE +# will cause different errors on master and slave, +# when one or more of these tables do not exist. +# + +connection master; +DROP TEMPORARY TABLE IF EXISTS tmp1; +CREATE TEMPORARY TABLE t1 ( a int ); +--error 1051 +DROP TEMPORARY TABLE t1, t2; +--error 1051 +DROP TEMPORARY TABLE tmp2; +sync_slave_with_master; + +connection slave; +stop slave; +wait_for_slave_to_stop; + +--echo **** On Master **** +connection master; +CREATE TEMPORARY TABLE tmp3 (a int); +DROP TEMPORARY TABLE tmp3; + +connection slave; +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; +START SLAVE; + +connection master; +sync_slave_with_master; # End of 4.1 tests diff --git a/sql/log_event.cc b/sql/log_event.cc index 40e29e58ab6..35d53c4fede 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -2103,7 +2103,17 @@ START SLAVE; . Query: '%s'", expected_error, thd->query); compare_errors: - /* + /* + In the slave thread, we may sometimes execute some DROP / * 40005 + TEMPORARY * / TABLE that come from parts of binlogs (likely if we + use RESET SLAVE or CHANGE MASTER TO), while the temporary table + has already been dropped. To ignore such irrelevant "table does + not exist errors", we silently clear the error if TEMPORARY was used. + */ + if (thd->lex->drop_temporary && + thd->net.last_errno == ER_BAD_TABLE_ERROR && !expected_error) + thd->clear_error(); + /* If we expected a non-zero error code, and we don't get the same error code, and none of them should be ignored. */ diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 48df40f2614..61c2d70a563 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4038,17 +4038,6 @@ end_with_restore_list: } else { - /* - If this is a slave thread, we may sometimes execute some - DROP / * 40005 TEMPORARY * / TABLE - that come from parts of binlogs (likely if we use RESET SLAVE or CHANGE - MASTER TO), while the temporary table has already been dropped. - To not generate such irrelevant "table does not exist errors", - we silently add IF EXISTS if TEMPORARY was used. - */ - if (thd->slave_thread) - lex->drop_if_exists= 1; - /* So that DROP TEMPORARY TABLE gets to binlog at commit/rollback */ thd->transaction.all.modified_non_trans_table= TRUE; } From c55a0048cc31d1bd3e7968c00d1f70c30b2a1c75 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Mon, 4 Jan 2010 15:03:09 +0100 Subject: [PATCH 039/132] Ensure that the variable "MYSQL_U_SCORE_VERSION" is expanded whereever it is used (currently, only RPM spec files). --- support-files/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/support-files/Makefile.am b/support-files/Makefile.am index 47e8c395b31..f8f6b1bb5d4 100644 --- a/support-files/Makefile.am +++ b/support-files/Makefile.am @@ -120,6 +120,7 @@ SUFFIXES = .sh -e 's!@''SHARED_LIB_VERSION''@!@SHARED_LIB_VERSION@!' \ -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \ -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \ + -e 's!@''MYSQL_U_SCORE_VERSION''@!@MYSQL_U_SCORE_VERSION@!' \ -e 's!@''MYSQL_COPYRIGHT_YEAR''@!@MYSQL_COPYRIGHT_YEAR@!' \ -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \ -e 's!@''PERL_DBI_VERSION''@!@PERL_DBI_VERSION@!' \ From af27d4e2003a84a28007a99053aefecafd7ecd97 Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Tue, 5 Jan 2010 14:25:29 +0800 Subject: [PATCH 040/132] Bug#48776 row based replication breaks with spatial / geometry types, cause crashes! This bug is the same problem as Bug 49836 for 5.1 versions. mysql-test/suite/rpl/r/rpl_geometry.result: Test case for bug 48776 mysql-test/suite/rpl/t/rpl_geometry.test: Test case for bug 48776 sql/rpl_utility.h: Add missing case MYSQL_TYPE_GEOMETRY --- mysql-test/suite/rpl/r/rpl_geometry.result | 18 +++++++++++++++ mysql-test/suite/rpl/t/rpl_geometry.test | 26 ++++++++++++++++++++++ sql/rpl_utility.h | 1 + 3 files changed, 45 insertions(+) create mode 100644 mysql-test/suite/rpl/r/rpl_geometry.result create mode 100644 mysql-test/suite/rpl/t/rpl_geometry.test diff --git a/mysql-test/suite/rpl/r/rpl_geometry.result b/mysql-test/suite/rpl/r/rpl_geometry.result new file mode 100644 index 00000000000..9b48dba4f22 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_geometry.result @@ -0,0 +1,18 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1(a varchar(100), +b multipoint not null, +c varchar(256)); +insert into t1 set +a='hello', +b=geomfromtext('multipoint(1 1)'), +c='geometry'; +create table t2 (a int(11) not null auto_increment primary key, +b geometrycollection default null, +c decimal(10,0)); +insert into t2(c) values (null); +drop table t1, t2; diff --git a/mysql-test/suite/rpl/t/rpl_geometry.test b/mysql-test/suite/rpl/t/rpl_geometry.test new file mode 100644 index 00000000000..eac98924b98 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_geometry.test @@ -0,0 +1,26 @@ +source include/master-slave.inc; +source include/have_binlog_format_row.inc; + +# +# Bug#48776, Bug#43784 +# +create table t1(a varchar(100), + b multipoint not null, + c varchar(256)); + +insert into t1 set + a='hello', + b=geomfromtext('multipoint(1 1)'), + c='geometry'; + +create table t2 (a int(11) not null auto_increment primary key, + b geometrycollection default null, + c decimal(10,0)); + +insert into t2(c) values (null); + +sync_slave_with_master; + +connection master; +drop table t1, t2; +source include/master-slave-end.inc; diff --git a/sql/rpl_utility.h b/sql/rpl_utility.h index 1f4ca246ff1..d011e9aade8 100644 --- a/sql/rpl_utility.h +++ b/sql/rpl_utility.h @@ -95,6 +95,7 @@ public: case MYSQL_TYPE_LONG_BLOB: case MYSQL_TYPE_DOUBLE: case MYSQL_TYPE_FLOAT: + case MYSQL_TYPE_GEOMETRY: { /* These types store a single byte. From f8758031f37840b4b1cea4f4c3aa8736b7d68f88 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Wed, 6 Jan 2010 00:44:31 +0000 Subject: [PATCH 041/132] BUG#50018: binlog corruption when table has many columns For tables with metadata sizes ranging from 251 to 255 the size of the event data (m_data_size) was being improperly calculated in the Table_map_log_event constructor. This was due to the fact that when writing the Table_map_log_event body (in Table_map_log_event::write_data_body) a call to net_store_length is made for packing the m_field_metadata_size. It happens that net_store_length uses *one* byte for storing m_field_metadata_size when it is smaller than 251 but *three* bytes when it exceeds that value. BUG 42749 had already pinpointed and fix this fact, but the fix was incomplete, as the calculation in the Table_map_log_event constructor considers 255 instead of 251 as the threshold to increment m_data_size by three. Thence, the window for having a mismatch between the number of bytes written and the number of bytes accounted in the event length (m_data_size) was left open for m_field_metadata_size values between 251 and 255. We fix this by changing the condition in the Table_map_log_event constructor to match the one in the net_store_length, ie, increment one byte if m_field_metadata_size < 251 and three if it exceeds this value. mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result: Updated result file. mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test: Changes to the original test case: added slave and moved file into the rpl suite. New test case: replicates two tables one with 250 and another with 252 metadata sizes. This exercises the usage of 1 or 3 bytes while packing the m_field_metadata_size. sql/log_event.cc: Made the m_data_size calculation for the table map log event to match the number of bytes used while packing the m_field_metadata_size value (according to net_store_length function in pack.c). --- .../suite/binlog/r/binlog_tbl_metadata.result | 156 ------ .../suite/binlog/t/binlog_tbl_metadata.test | 199 ------- .../suite/rpl/r/rpl_row_tbl_metadata.result | 437 +++++++++++++++ .../suite/rpl/t/rpl_row_tbl_metadata.test | 520 ++++++++++++++++++ sql/log_event.cc | 6 +- 5 files changed, 960 insertions(+), 358 deletions(-) delete mode 100644 mysql-test/suite/binlog/r/binlog_tbl_metadata.result delete mode 100644 mysql-test/suite/binlog/t/binlog_tbl_metadata.test create mode 100644 mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result create mode 100644 mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test diff --git a/mysql-test/suite/binlog/r/binlog_tbl_metadata.result b/mysql-test/suite/binlog/r/binlog_tbl_metadata.result deleted file mode 100644 index a2f185edc85..00000000000 --- a/mysql-test/suite/binlog/r/binlog_tbl_metadata.result +++ /dev/null @@ -1,156 +0,0 @@ -RESET MASTER; -DROP TABLE IF EXISTS `t1`; -CREATE TABLE `t1` ( -`c1` int(11) NOT NULL AUTO_INCREMENT, -`c2` varchar(30) NOT NULL, -`c3` varchar(30) DEFAULT NULL, -`c4` varchar(30) DEFAULT NULL, -`c5` varchar(30) DEFAULT NULL, -`c6` varchar(30) DEFAULT NULL, -`c7` varchar(30) DEFAULT NULL, -`c8` varchar(30) DEFAULT NULL, -`c9` varchar(30) DEFAULT NULL, -`c10` varchar(30) DEFAULT NULL, -`c11` varchar(30) DEFAULT NULL, -`c12` varchar(30) DEFAULT NULL, -`c13` varchar(30) DEFAULT NULL, -`c14` varchar(30) DEFAULT NULL, -`c15` varchar(30) DEFAULT NULL, -`c16` varchar(30) DEFAULT NULL, -`c17` varchar(30) DEFAULT NULL, -`c18` varchar(30) DEFAULT NULL, -`c19` varchar(30) DEFAULT NULL, -`c20` varchar(30) DEFAULT NULL, -`c21` varchar(30) DEFAULT NULL, -`c22` varchar(30) DEFAULT NULL, -`c23` varchar(30) DEFAULT NULL, -`c24` varchar(30) DEFAULT NULL, -`c25` varchar(30) DEFAULT NULL, -`c26` varchar(30) DEFAULT NULL, -`c27` varchar(30) DEFAULT NULL, -`c28` varchar(30) DEFAULT NULL, -`c29` varchar(30) DEFAULT NULL, -`c30` varchar(30) DEFAULT NULL, -`c31` varchar(30) DEFAULT NULL, -`c32` varchar(30) DEFAULT NULL, -`c33` varchar(30) DEFAULT NULL, -`c34` varchar(30) DEFAULT NULL, -`c35` varchar(30) DEFAULT NULL, -`c36` varchar(30) DEFAULT NULL, -`c37` varchar(30) DEFAULT NULL, -`c38` varchar(30) DEFAULT NULL, -`c39` varchar(30) DEFAULT NULL, -`c40` varchar(30) DEFAULT NULL, -`c41` varchar(30) DEFAULT NULL, -`c42` varchar(30) DEFAULT NULL, -`c43` varchar(30) DEFAULT NULL, -`c44` varchar(30) DEFAULT NULL, -`c45` varchar(30) DEFAULT NULL, -`c46` varchar(30) DEFAULT NULL, -`c47` varchar(30) DEFAULT NULL, -`c48` varchar(30) DEFAULT NULL, -`c49` varchar(30) DEFAULT NULL, -`c50` varchar(30) DEFAULT NULL, -`c51` varchar(30) DEFAULT NULL, -`c52` varchar(30) DEFAULT NULL, -`c53` varchar(30) DEFAULT NULL, -`c54` varchar(30) DEFAULT NULL, -`c55` varchar(30) DEFAULT NULL, -`c56` varchar(30) DEFAULT NULL, -`c57` varchar(30) DEFAULT NULL, -`c58` varchar(30) DEFAULT NULL, -`c59` varchar(30) DEFAULT NULL, -`c60` varchar(30) DEFAULT NULL, -`c61` varchar(30) DEFAULT NULL, -`c62` varchar(30) DEFAULT NULL, -`c63` varchar(30) DEFAULT NULL, -`c64` varchar(30) DEFAULT NULL, -`c65` varchar(30) DEFAULT NULL, -`c66` varchar(30) DEFAULT NULL, -`c67` varchar(30) DEFAULT NULL, -`c68` varchar(30) DEFAULT NULL, -`c69` varchar(30) DEFAULT NULL, -`c70` varchar(30) DEFAULT NULL, -`c71` varchar(30) DEFAULT NULL, -`c72` varchar(30) DEFAULT NULL, -`c73` varchar(30) DEFAULT NULL, -`c74` varchar(30) DEFAULT NULL, -`c75` varchar(30) DEFAULT NULL, -`c76` varchar(30) DEFAULT NULL, -`c77` varchar(30) DEFAULT NULL, -`c78` varchar(30) DEFAULT NULL, -`c79` varchar(30) DEFAULT NULL, -`c80` varchar(30) DEFAULT NULL, -`c81` varchar(30) DEFAULT NULL, -`c82` varchar(30) DEFAULT NULL, -`c83` varchar(30) DEFAULT NULL, -`c84` varchar(30) DEFAULT NULL, -`c85` varchar(30) DEFAULT NULL, -`c86` varchar(30) DEFAULT NULL, -`c87` varchar(30) DEFAULT NULL, -`c88` varchar(30) DEFAULT NULL, -`c89` varchar(30) DEFAULT NULL, -`c90` varchar(30) DEFAULT NULL, -`c91` varchar(30) DEFAULT NULL, -`c92` varchar(30) DEFAULT NULL, -`c93` varchar(30) DEFAULT NULL, -`c94` varchar(30) DEFAULT NULL, -`c95` varchar(30) DEFAULT NULL, -`c96` varchar(30) DEFAULT NULL, -`c97` varchar(30) DEFAULT NULL, -`c98` varchar(30) DEFAULT NULL, -`c99` varchar(30) DEFAULT NULL, -`c100` varchar(30) DEFAULT NULL, -`c101` varchar(30) DEFAULT NULL, -`c102` varchar(30) DEFAULT NULL, -`c103` varchar(30) DEFAULT NULL, -`c104` varchar(30) DEFAULT NULL, -`c105` varchar(30) DEFAULT NULL, -`c106` varchar(30) DEFAULT NULL, -`c107` varchar(30) DEFAULT NULL, -`c108` varchar(30) DEFAULT NULL, -`c109` varchar(30) DEFAULT NULL, -`c110` varchar(30) DEFAULT NULL, -`c111` varchar(30) DEFAULT NULL, -`c112` varchar(30) DEFAULT NULL, -`c113` varchar(30) DEFAULT NULL, -`c114` varchar(30) DEFAULT NULL, -`c115` varchar(30) DEFAULT NULL, -`c116` varchar(30) DEFAULT NULL, -`c117` varchar(30) DEFAULT NULL, -`c118` varchar(30) DEFAULT NULL, -`c119` varchar(30) DEFAULT NULL, -`c120` varchar(30) DEFAULT NULL, -`c121` varchar(30) DEFAULT NULL, -`c122` varchar(30) DEFAULT NULL, -`c123` varchar(30) DEFAULT NULL, -`c124` varchar(30) DEFAULT NULL, -`c125` varchar(30) DEFAULT NULL, -`c126` varchar(30) DEFAULT NULL, -`c127` varchar(30) DEFAULT NULL, -`c128` varchar(30) DEFAULT NULL, -`c129` varchar(30) DEFAULT NULL, -`c130` varchar(30) DEFAULT NULL, -`c131` varchar(30) DEFAULT NULL, -`c132` varchar(30) DEFAULT NULL, -`c133` varchar(30) DEFAULT NULL, -`c134` varchar(30) DEFAULT NULL, -`c135` varchar(30) DEFAULT NULL, -`c136` varchar(30) DEFAULT NULL, -`c137` varchar(30) DEFAULT NULL, -`c138` varchar(30) DEFAULT NULL, -`c139` varchar(30) DEFAULT NULL, -`c140` varchar(30) DEFAULT NULL, -`c141` varchar(30) DEFAULT NULL, -`c142` varchar(30) DEFAULT NULL, -`c143` varchar(30) DEFAULT NULL, -`c144` varchar(30) DEFAULT NULL, -`c145` varchar(30) DEFAULT NULL, -`c146` varchar(30) DEFAULT NULL, -PRIMARY KEY (`c1`) -) ENGINE=InnoDB; -LOCK TABLES `t1` WRITE; -INSERT INTO `t1` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'); -DROP TABLE `t1`; -FLUSH LOGS; -=== Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail. diff --git a/mysql-test/suite/binlog/t/binlog_tbl_metadata.test b/mysql-test/suite/binlog/t/binlog_tbl_metadata.test deleted file mode 100644 index 5e847ab5fbd..00000000000 --- a/mysql-test/suite/binlog/t/binlog_tbl_metadata.test +++ /dev/null @@ -1,199 +0,0 @@ -# -# BUG#42749: infinite loop writing to row based binlog - processlist shows -# "freeing items" -# -# WHY -# === -# -# This bug would make table map event to report data_written one byte less -# than what would actually be written in its body. This would cause one byte shorter -# event end_log_pos. The ultimate impact was that it would make fixing the -# position in MYSQL_BIN_LOG::write_cache bogus or end up in an infinite loop. -# -# HOW -# === -# -# Checking that the patch fixes the problem is done as follows: -# i) a table with several fields is created; -# ii) an insert is performed; -# iii) the logs are flushed; -# iv) mysqlbinlog is used to check if it succeeds. -# -# In step iv), before the bug was fixed, the test case would fail with -# mysqlbinlog reporting that it was unable to succeed in reading the event. -# - --- source include/have_log_bin.inc --- source include/have_innodb.inc --- source include/have_binlog_format_row.inc --- connection default - -RESET MASTER; - --- disable_warnings -DROP TABLE IF EXISTS `t1`; --- enable_warnings - -CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - `c2` varchar(30) NOT NULL, - `c3` varchar(30) DEFAULT NULL, - `c4` varchar(30) DEFAULT NULL, - `c5` varchar(30) DEFAULT NULL, - `c6` varchar(30) DEFAULT NULL, - `c7` varchar(30) DEFAULT NULL, - `c8` varchar(30) DEFAULT NULL, - `c9` varchar(30) DEFAULT NULL, - `c10` varchar(30) DEFAULT NULL, - `c11` varchar(30) DEFAULT NULL, - `c12` varchar(30) DEFAULT NULL, - `c13` varchar(30) DEFAULT NULL, - `c14` varchar(30) DEFAULT NULL, - `c15` varchar(30) DEFAULT NULL, - `c16` varchar(30) DEFAULT NULL, - `c17` varchar(30) DEFAULT NULL, - `c18` varchar(30) DEFAULT NULL, - `c19` varchar(30) DEFAULT NULL, - `c20` varchar(30) DEFAULT NULL, - `c21` varchar(30) DEFAULT NULL, - `c22` varchar(30) DEFAULT NULL, - `c23` varchar(30) DEFAULT NULL, - `c24` varchar(30) DEFAULT NULL, - `c25` varchar(30) DEFAULT NULL, - `c26` varchar(30) DEFAULT NULL, - `c27` varchar(30) DEFAULT NULL, - `c28` varchar(30) DEFAULT NULL, - `c29` varchar(30) DEFAULT NULL, - `c30` varchar(30) DEFAULT NULL, - `c31` varchar(30) DEFAULT NULL, - `c32` varchar(30) DEFAULT NULL, - `c33` varchar(30) DEFAULT NULL, - `c34` varchar(30) DEFAULT NULL, - `c35` varchar(30) DEFAULT NULL, - `c36` varchar(30) DEFAULT NULL, - `c37` varchar(30) DEFAULT NULL, - `c38` varchar(30) DEFAULT NULL, - `c39` varchar(30) DEFAULT NULL, - `c40` varchar(30) DEFAULT NULL, - `c41` varchar(30) DEFAULT NULL, - `c42` varchar(30) DEFAULT NULL, - `c43` varchar(30) DEFAULT NULL, - `c44` varchar(30) DEFAULT NULL, - `c45` varchar(30) DEFAULT NULL, - `c46` varchar(30) DEFAULT NULL, - `c47` varchar(30) DEFAULT NULL, - `c48` varchar(30) DEFAULT NULL, - `c49` varchar(30) DEFAULT NULL, - `c50` varchar(30) DEFAULT NULL, - `c51` varchar(30) DEFAULT NULL, - `c52` varchar(30) DEFAULT NULL, - `c53` varchar(30) DEFAULT NULL, - `c54` varchar(30) DEFAULT NULL, - `c55` varchar(30) DEFAULT NULL, - `c56` varchar(30) DEFAULT NULL, - `c57` varchar(30) DEFAULT NULL, - `c58` varchar(30) DEFAULT NULL, - `c59` varchar(30) DEFAULT NULL, - `c60` varchar(30) DEFAULT NULL, - `c61` varchar(30) DEFAULT NULL, - `c62` varchar(30) DEFAULT NULL, - `c63` varchar(30) DEFAULT NULL, - `c64` varchar(30) DEFAULT NULL, - `c65` varchar(30) DEFAULT NULL, - `c66` varchar(30) DEFAULT NULL, - `c67` varchar(30) DEFAULT NULL, - `c68` varchar(30) DEFAULT NULL, - `c69` varchar(30) DEFAULT NULL, - `c70` varchar(30) DEFAULT NULL, - `c71` varchar(30) DEFAULT NULL, - `c72` varchar(30) DEFAULT NULL, - `c73` varchar(30) DEFAULT NULL, - `c74` varchar(30) DEFAULT NULL, - `c75` varchar(30) DEFAULT NULL, - `c76` varchar(30) DEFAULT NULL, - `c77` varchar(30) DEFAULT NULL, - `c78` varchar(30) DEFAULT NULL, - `c79` varchar(30) DEFAULT NULL, - `c80` varchar(30) DEFAULT NULL, - `c81` varchar(30) DEFAULT NULL, - `c82` varchar(30) DEFAULT NULL, - `c83` varchar(30) DEFAULT NULL, - `c84` varchar(30) DEFAULT NULL, - `c85` varchar(30) DEFAULT NULL, - `c86` varchar(30) DEFAULT NULL, - `c87` varchar(30) DEFAULT NULL, - `c88` varchar(30) DEFAULT NULL, - `c89` varchar(30) DEFAULT NULL, - `c90` varchar(30) DEFAULT NULL, - `c91` varchar(30) DEFAULT NULL, - `c92` varchar(30) DEFAULT NULL, - `c93` varchar(30) DEFAULT NULL, - `c94` varchar(30) DEFAULT NULL, - `c95` varchar(30) DEFAULT NULL, - `c96` varchar(30) DEFAULT NULL, - `c97` varchar(30) DEFAULT NULL, - `c98` varchar(30) DEFAULT NULL, - `c99` varchar(30) DEFAULT NULL, - `c100` varchar(30) DEFAULT NULL, - `c101` varchar(30) DEFAULT NULL, - `c102` varchar(30) DEFAULT NULL, - `c103` varchar(30) DEFAULT NULL, - `c104` varchar(30) DEFAULT NULL, - `c105` varchar(30) DEFAULT NULL, - `c106` varchar(30) DEFAULT NULL, - `c107` varchar(30) DEFAULT NULL, - `c108` varchar(30) DEFAULT NULL, - `c109` varchar(30) DEFAULT NULL, - `c110` varchar(30) DEFAULT NULL, - `c111` varchar(30) DEFAULT NULL, - `c112` varchar(30) DEFAULT NULL, - `c113` varchar(30) DEFAULT NULL, - `c114` varchar(30) DEFAULT NULL, - `c115` varchar(30) DEFAULT NULL, - `c116` varchar(30) DEFAULT NULL, - `c117` varchar(30) DEFAULT NULL, - `c118` varchar(30) DEFAULT NULL, - `c119` varchar(30) DEFAULT NULL, - `c120` varchar(30) DEFAULT NULL, - `c121` varchar(30) DEFAULT NULL, - `c122` varchar(30) DEFAULT NULL, - `c123` varchar(30) DEFAULT NULL, - `c124` varchar(30) DEFAULT NULL, - `c125` varchar(30) DEFAULT NULL, - `c126` varchar(30) DEFAULT NULL, - `c127` varchar(30) DEFAULT NULL, - `c128` varchar(30) DEFAULT NULL, - `c129` varchar(30) DEFAULT NULL, - `c130` varchar(30) DEFAULT NULL, - `c131` varchar(30) DEFAULT NULL, - `c132` varchar(30) DEFAULT NULL, - `c133` varchar(30) DEFAULT NULL, - `c134` varchar(30) DEFAULT NULL, - `c135` varchar(30) DEFAULT NULL, - `c136` varchar(30) DEFAULT NULL, - `c137` varchar(30) DEFAULT NULL, - `c138` varchar(30) DEFAULT NULL, - `c139` varchar(30) DEFAULT NULL, - `c140` varchar(30) DEFAULT NULL, - `c141` varchar(30) DEFAULT NULL, - `c142` varchar(30) DEFAULT NULL, - `c143` varchar(30) DEFAULT NULL, - `c144` varchar(30) DEFAULT NULL, - `c145` varchar(30) DEFAULT NULL, - `c146` varchar(30) DEFAULT NULL, - PRIMARY KEY (`c1`) -) ENGINE=InnoDB; - -LOCK TABLES `t1` WRITE; - -INSERT INTO `t1` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'); - -DROP TABLE `t1`; - -FLUSH LOGS; - --- echo === Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail. - --- let $MYSQLD_DATADIR= `SELECT @@datadir`; --- exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug42749.binlog --- remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug42749.binlog diff --git a/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result b/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result new file mode 100644 index 00000000000..551ece5da9d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result @@ -0,0 +1,437 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +RESET MASTER; +DROP TABLE IF EXISTS `t1`; +### TABLE with field_metadata_size == 290 +CREATE TABLE `t1` ( +`c1` int(11) NOT NULL AUTO_INCREMENT, +`c2` varchar(30) NOT NULL, +`c3` varchar(30) DEFAULT NULL, +`c4` varchar(30) DEFAULT NULL, +`c5` varchar(30) DEFAULT NULL, +`c6` varchar(30) DEFAULT NULL, +`c7` varchar(30) DEFAULT NULL, +`c8` varchar(30) DEFAULT NULL, +`c9` varchar(30) DEFAULT NULL, +`c10` varchar(30) DEFAULT NULL, +`c11` varchar(30) DEFAULT NULL, +`c12` varchar(30) DEFAULT NULL, +`c13` varchar(30) DEFAULT NULL, +`c14` varchar(30) DEFAULT NULL, +`c15` varchar(30) DEFAULT NULL, +`c16` varchar(30) DEFAULT NULL, +`c17` varchar(30) DEFAULT NULL, +`c18` varchar(30) DEFAULT NULL, +`c19` varchar(30) DEFAULT NULL, +`c20` varchar(30) DEFAULT NULL, +`c21` varchar(30) DEFAULT NULL, +`c22` varchar(30) DEFAULT NULL, +`c23` varchar(30) DEFAULT NULL, +`c24` varchar(30) DEFAULT NULL, +`c25` varchar(30) DEFAULT NULL, +`c26` varchar(30) DEFAULT NULL, +`c27` varchar(30) DEFAULT NULL, +`c28` varchar(30) DEFAULT NULL, +`c29` varchar(30) DEFAULT NULL, +`c30` varchar(30) DEFAULT NULL, +`c31` varchar(30) DEFAULT NULL, +`c32` varchar(30) DEFAULT NULL, +`c33` varchar(30) DEFAULT NULL, +`c34` varchar(30) DEFAULT NULL, +`c35` varchar(30) DEFAULT NULL, +`c36` varchar(30) DEFAULT NULL, +`c37` varchar(30) DEFAULT NULL, +`c38` varchar(30) DEFAULT NULL, +`c39` varchar(30) DEFAULT NULL, +`c40` varchar(30) DEFAULT NULL, +`c41` varchar(30) DEFAULT NULL, +`c42` varchar(30) DEFAULT NULL, +`c43` varchar(30) DEFAULT NULL, +`c44` varchar(30) DEFAULT NULL, +`c45` varchar(30) DEFAULT NULL, +`c46` varchar(30) DEFAULT NULL, +`c47` varchar(30) DEFAULT NULL, +`c48` varchar(30) DEFAULT NULL, +`c49` varchar(30) DEFAULT NULL, +`c50` varchar(30) DEFAULT NULL, +`c51` varchar(30) DEFAULT NULL, +`c52` varchar(30) DEFAULT NULL, +`c53` varchar(30) DEFAULT NULL, +`c54` varchar(30) DEFAULT NULL, +`c55` varchar(30) DEFAULT NULL, +`c56` varchar(30) DEFAULT NULL, +`c57` varchar(30) DEFAULT NULL, +`c58` varchar(30) DEFAULT NULL, +`c59` varchar(30) DEFAULT NULL, +`c60` varchar(30) DEFAULT NULL, +`c61` varchar(30) DEFAULT NULL, +`c62` varchar(30) DEFAULT NULL, +`c63` varchar(30) DEFAULT NULL, +`c64` varchar(30) DEFAULT NULL, +`c65` varchar(30) DEFAULT NULL, +`c66` varchar(30) DEFAULT NULL, +`c67` varchar(30) DEFAULT NULL, +`c68` varchar(30) DEFAULT NULL, +`c69` varchar(30) DEFAULT NULL, +`c70` varchar(30) DEFAULT NULL, +`c71` varchar(30) DEFAULT NULL, +`c72` varchar(30) DEFAULT NULL, +`c73` varchar(30) DEFAULT NULL, +`c74` varchar(30) DEFAULT NULL, +`c75` varchar(30) DEFAULT NULL, +`c76` varchar(30) DEFAULT NULL, +`c77` varchar(30) DEFAULT NULL, +`c78` varchar(30) DEFAULT NULL, +`c79` varchar(30) DEFAULT NULL, +`c80` varchar(30) DEFAULT NULL, +`c81` varchar(30) DEFAULT NULL, +`c82` varchar(30) DEFAULT NULL, +`c83` varchar(30) DEFAULT NULL, +`c84` varchar(30) DEFAULT NULL, +`c85` varchar(30) DEFAULT NULL, +`c86` varchar(30) DEFAULT NULL, +`c87` varchar(30) DEFAULT NULL, +`c88` varchar(30) DEFAULT NULL, +`c89` varchar(30) DEFAULT NULL, +`c90` varchar(30) DEFAULT NULL, +`c91` varchar(30) DEFAULT NULL, +`c92` varchar(30) DEFAULT NULL, +`c93` varchar(30) DEFAULT NULL, +`c94` varchar(30) DEFAULT NULL, +`c95` varchar(30) DEFAULT NULL, +`c96` varchar(30) DEFAULT NULL, +`c97` varchar(30) DEFAULT NULL, +`c98` varchar(30) DEFAULT NULL, +`c99` varchar(30) DEFAULT NULL, +`c100` varchar(30) DEFAULT NULL, +`c101` varchar(30) DEFAULT NULL, +`c102` varchar(30) DEFAULT NULL, +`c103` varchar(30) DEFAULT NULL, +`c104` varchar(30) DEFAULT NULL, +`c105` varchar(30) DEFAULT NULL, +`c106` varchar(30) DEFAULT NULL, +`c107` varchar(30) DEFAULT NULL, +`c108` varchar(30) DEFAULT NULL, +`c109` varchar(30) DEFAULT NULL, +`c110` varchar(30) DEFAULT NULL, +`c111` varchar(30) DEFAULT NULL, +`c112` varchar(30) DEFAULT NULL, +`c113` varchar(30) DEFAULT NULL, +`c114` varchar(30) DEFAULT NULL, +`c115` varchar(30) DEFAULT NULL, +`c116` varchar(30) DEFAULT NULL, +`c117` varchar(30) DEFAULT NULL, +`c118` varchar(30) DEFAULT NULL, +`c119` varchar(30) DEFAULT NULL, +`c120` varchar(30) DEFAULT NULL, +`c121` varchar(30) DEFAULT NULL, +`c122` varchar(30) DEFAULT NULL, +`c123` varchar(30) DEFAULT NULL, +`c124` varchar(30) DEFAULT NULL, +`c125` varchar(30) DEFAULT NULL, +`c126` varchar(30) DEFAULT NULL, +`c127` varchar(30) DEFAULT NULL, +`c128` varchar(30) DEFAULT NULL, +`c129` varchar(30) DEFAULT NULL, +`c130` varchar(30) DEFAULT NULL, +`c131` varchar(30) DEFAULT NULL, +`c132` varchar(30) DEFAULT NULL, +`c133` varchar(30) DEFAULT NULL, +`c134` varchar(30) DEFAULT NULL, +`c135` varchar(30) DEFAULT NULL, +`c136` varchar(30) DEFAULT NULL, +`c137` varchar(30) DEFAULT NULL, +`c138` varchar(30) DEFAULT NULL, +`c139` varchar(30) DEFAULT NULL, +`c140` varchar(30) DEFAULT NULL, +`c141` varchar(30) DEFAULT NULL, +`c142` varchar(30) DEFAULT NULL, +`c143` varchar(30) DEFAULT NULL, +`c144` varchar(30) DEFAULT NULL, +`c145` varchar(30) DEFAULT NULL, +`c146` varchar(30) DEFAULT NULL, +PRIMARY KEY (`c1`) +) ENGINE=InnoDB; +LOCK TABLES `t1` WRITE; +INSERT INTO `t1` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'); +DROP TABLE `t1`; +FLUSH LOGS; +=== Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail. +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +### TABLE with field_metadata_size == 250 +CREATE TABLE `t1` ( +`c1` int(11) NOT NULL AUTO_INCREMENT, +`c2` varchar(30) NOT NULL, +`c3` varchar(30) DEFAULT NULL, +`c4` varchar(30) DEFAULT NULL, +`c5` varchar(30) DEFAULT NULL, +`c6` varchar(30) DEFAULT NULL, +`c7` varchar(30) DEFAULT NULL, +`c8` varchar(30) DEFAULT NULL, +`c9` varchar(30) DEFAULT NULL, +`c10` varchar(30) DEFAULT NULL, +`c11` varchar(30) DEFAULT NULL, +`c12` varchar(30) DEFAULT NULL, +`c13` varchar(30) DEFAULT NULL, +`c14` varchar(30) DEFAULT NULL, +`c15` varchar(30) DEFAULT NULL, +`c16` varchar(30) DEFAULT NULL, +`c17` varchar(30) DEFAULT NULL, +`c18` varchar(30) DEFAULT NULL, +`c19` varchar(30) DEFAULT NULL, +`c20` varchar(30) DEFAULT NULL, +`c21` varchar(30) DEFAULT NULL, +`c22` varchar(30) DEFAULT NULL, +`c23` varchar(30) DEFAULT NULL, +`c24` varchar(30) DEFAULT NULL, +`c25` varchar(30) DEFAULT NULL, +`c26` varchar(30) DEFAULT NULL, +`c27` varchar(30) DEFAULT NULL, +`c28` varchar(30) DEFAULT NULL, +`c29` varchar(30) DEFAULT NULL, +`c30` varchar(30) DEFAULT NULL, +`c31` varchar(30) DEFAULT NULL, +`c32` varchar(30) DEFAULT NULL, +`c33` varchar(30) DEFAULT NULL, +`c34` varchar(30) DEFAULT NULL, +`c35` varchar(30) DEFAULT NULL, +`c36` varchar(30) DEFAULT NULL, +`c37` varchar(30) DEFAULT NULL, +`c38` varchar(30) DEFAULT NULL, +`c39` varchar(30) DEFAULT NULL, +`c40` varchar(30) DEFAULT NULL, +`c41` varchar(30) DEFAULT NULL, +`c42` varchar(30) DEFAULT NULL, +`c43` varchar(30) DEFAULT NULL, +`c44` varchar(30) DEFAULT NULL, +`c45` varchar(30) DEFAULT NULL, +`c46` varchar(30) DEFAULT NULL, +`c47` varchar(30) DEFAULT NULL, +`c48` varchar(30) DEFAULT NULL, +`c49` varchar(30) DEFAULT NULL, +`c50` varchar(30) DEFAULT NULL, +`c51` varchar(30) DEFAULT NULL, +`c52` varchar(30) DEFAULT NULL, +`c53` varchar(30) DEFAULT NULL, +`c54` varchar(30) DEFAULT NULL, +`c55` varchar(30) DEFAULT NULL, +`c56` varchar(30) DEFAULT NULL, +`c57` varchar(30) DEFAULT NULL, +`c58` varchar(30) DEFAULT NULL, +`c59` varchar(30) DEFAULT NULL, +`c60` varchar(30) DEFAULT NULL, +`c61` varchar(30) DEFAULT NULL, +`c62` varchar(30) DEFAULT NULL, +`c63` varchar(30) DEFAULT NULL, +`c64` varchar(30) DEFAULT NULL, +`c65` varchar(30) DEFAULT NULL, +`c66` varchar(30) DEFAULT NULL, +`c67` varchar(30) DEFAULT NULL, +`c68` varchar(30) DEFAULT NULL, +`c69` varchar(30) DEFAULT NULL, +`c70` varchar(30) DEFAULT NULL, +`c71` varchar(30) DEFAULT NULL, +`c72` varchar(30) DEFAULT NULL, +`c73` varchar(30) DEFAULT NULL, +`c74` varchar(30) DEFAULT NULL, +`c75` varchar(30) DEFAULT NULL, +`c76` varchar(30) DEFAULT NULL, +`c77` varchar(30) DEFAULT NULL, +`c78` varchar(30) DEFAULT NULL, +`c79` varchar(30) DEFAULT NULL, +`c80` varchar(30) DEFAULT NULL, +`c81` varchar(30) DEFAULT NULL, +`c82` varchar(30) DEFAULT NULL, +`c83` varchar(30) DEFAULT NULL, +`c84` varchar(30) DEFAULT NULL, +`c85` varchar(30) DEFAULT NULL, +`c86` varchar(30) DEFAULT NULL, +`c87` varchar(30) DEFAULT NULL, +`c88` varchar(30) DEFAULT NULL, +`c89` varchar(30) DEFAULT NULL, +`c90` varchar(30) DEFAULT NULL, +`c91` varchar(30) DEFAULT NULL, +`c92` varchar(30) DEFAULT NULL, +`c93` varchar(30) DEFAULT NULL, +`c94` varchar(30) DEFAULT NULL, +`c95` varchar(30) DEFAULT NULL, +`c96` varchar(30) DEFAULT NULL, +`c97` varchar(30) DEFAULT NULL, +`c98` varchar(30) DEFAULT NULL, +`c99` varchar(30) DEFAULT NULL, +`c100` varchar(30) DEFAULT NULL, +`c101` varchar(30) DEFAULT NULL, +`c102` varchar(30) DEFAULT NULL, +`c103` varchar(30) DEFAULT NULL, +`c104` varchar(30) DEFAULT NULL, +`c105` varchar(30) DEFAULT NULL, +`c106` varchar(30) DEFAULT NULL, +`c107` varchar(30) DEFAULT NULL, +`c108` varchar(30) DEFAULT NULL, +`c109` varchar(30) DEFAULT NULL, +`c110` varchar(30) DEFAULT NULL, +`c111` varchar(30) DEFAULT NULL, +`c112` varchar(30) DEFAULT NULL, +`c113` varchar(30) DEFAULT NULL, +`c114` varchar(30) DEFAULT NULL, +`c115` varchar(30) DEFAULT NULL, +`c116` varchar(30) DEFAULT NULL, +`c117` varchar(30) DEFAULT NULL, +`c118` varchar(30) DEFAULT NULL, +`c119` varchar(30) DEFAULT NULL, +`c120` varchar(30) DEFAULT NULL, +`c121` varchar(30) DEFAULT NULL, +`c122` varchar(30) DEFAULT NULL, +`c123` varchar(30) DEFAULT NULL, +`c124` varchar(30) DEFAULT NULL, +`c125` varchar(30) DEFAULT NULL, +`c126` varchar(30) DEFAULT NULL, +PRIMARY KEY (`c1`) +) ENGINE=InnoDB; +### TABLE with field_metadata_size == 251 +CREATE TABLE `t2` ( +`c1` float, +`c2` varchar(30) NOT NULL, +`c3` varchar(30) DEFAULT NULL, +`c4` varchar(30) DEFAULT NULL, +`c5` varchar(30) DEFAULT NULL, +`c6` varchar(30) DEFAULT NULL, +`c7` varchar(30) DEFAULT NULL, +`c8` varchar(30) DEFAULT NULL, +`c9` varchar(30) DEFAULT NULL, +`c10` varchar(30) DEFAULT NULL, +`c11` varchar(30) DEFAULT NULL, +`c12` varchar(30) DEFAULT NULL, +`c13` varchar(30) DEFAULT NULL, +`c14` varchar(30) DEFAULT NULL, +`c15` varchar(30) DEFAULT NULL, +`c16` varchar(30) DEFAULT NULL, +`c17` varchar(30) DEFAULT NULL, +`c18` varchar(30) DEFAULT NULL, +`c19` varchar(30) DEFAULT NULL, +`c20` varchar(30) DEFAULT NULL, +`c21` varchar(30) DEFAULT NULL, +`c22` varchar(30) DEFAULT NULL, +`c23` varchar(30) DEFAULT NULL, +`c24` varchar(30) DEFAULT NULL, +`c25` varchar(30) DEFAULT NULL, +`c26` varchar(30) DEFAULT NULL, +`c27` varchar(30) DEFAULT NULL, +`c28` varchar(30) DEFAULT NULL, +`c29` varchar(30) DEFAULT NULL, +`c30` varchar(30) DEFAULT NULL, +`c31` varchar(30) DEFAULT NULL, +`c32` varchar(30) DEFAULT NULL, +`c33` varchar(30) DEFAULT NULL, +`c34` varchar(30) DEFAULT NULL, +`c35` varchar(30) DEFAULT NULL, +`c36` varchar(30) DEFAULT NULL, +`c37` varchar(30) DEFAULT NULL, +`c38` varchar(30) DEFAULT NULL, +`c39` varchar(30) DEFAULT NULL, +`c40` varchar(30) DEFAULT NULL, +`c41` varchar(30) DEFAULT NULL, +`c42` varchar(30) DEFAULT NULL, +`c43` varchar(30) DEFAULT NULL, +`c44` varchar(30) DEFAULT NULL, +`c45` varchar(30) DEFAULT NULL, +`c46` varchar(30) DEFAULT NULL, +`c47` varchar(30) DEFAULT NULL, +`c48` varchar(30) DEFAULT NULL, +`c49` varchar(30) DEFAULT NULL, +`c50` varchar(30) DEFAULT NULL, +`c51` varchar(30) DEFAULT NULL, +`c52` varchar(30) DEFAULT NULL, +`c53` varchar(30) DEFAULT NULL, +`c54` varchar(30) DEFAULT NULL, +`c55` varchar(30) DEFAULT NULL, +`c56` varchar(30) DEFAULT NULL, +`c57` varchar(30) DEFAULT NULL, +`c58` varchar(30) DEFAULT NULL, +`c59` varchar(30) DEFAULT NULL, +`c60` varchar(30) DEFAULT NULL, +`c61` varchar(30) DEFAULT NULL, +`c62` varchar(30) DEFAULT NULL, +`c63` varchar(30) DEFAULT NULL, +`c64` varchar(30) DEFAULT NULL, +`c65` varchar(30) DEFAULT NULL, +`c66` varchar(30) DEFAULT NULL, +`c67` varchar(30) DEFAULT NULL, +`c68` varchar(30) DEFAULT NULL, +`c69` varchar(30) DEFAULT NULL, +`c70` varchar(30) DEFAULT NULL, +`c71` varchar(30) DEFAULT NULL, +`c72` varchar(30) DEFAULT NULL, +`c73` varchar(30) DEFAULT NULL, +`c74` varchar(30) DEFAULT NULL, +`c75` varchar(30) DEFAULT NULL, +`c76` varchar(30) DEFAULT NULL, +`c77` varchar(30) DEFAULT NULL, +`c78` varchar(30) DEFAULT NULL, +`c79` varchar(30) DEFAULT NULL, +`c80` varchar(30) DEFAULT NULL, +`c81` varchar(30) DEFAULT NULL, +`c82` varchar(30) DEFAULT NULL, +`c83` varchar(30) DEFAULT NULL, +`c84` varchar(30) DEFAULT NULL, +`c85` varchar(30) DEFAULT NULL, +`c86` varchar(30) DEFAULT NULL, +`c87` varchar(30) DEFAULT NULL, +`c88` varchar(30) DEFAULT NULL, +`c89` varchar(30) DEFAULT NULL, +`c90` varchar(30) DEFAULT NULL, +`c91` varchar(30) DEFAULT NULL, +`c92` varchar(30) DEFAULT NULL, +`c93` varchar(30) DEFAULT NULL, +`c94` varchar(30) DEFAULT NULL, +`c95` varchar(30) DEFAULT NULL, +`c96` varchar(30) DEFAULT NULL, +`c97` varchar(30) DEFAULT NULL, +`c98` varchar(30) DEFAULT NULL, +`c99` varchar(30) DEFAULT NULL, +`c100` varchar(30) DEFAULT NULL, +`c101` varchar(30) DEFAULT NULL, +`c102` varchar(30) DEFAULT NULL, +`c103` varchar(30) DEFAULT NULL, +`c104` varchar(30) DEFAULT NULL, +`c105` varchar(30) DEFAULT NULL, +`c106` varchar(30) DEFAULT NULL, +`c107` varchar(30) DEFAULT NULL, +`c108` varchar(30) DEFAULT NULL, +`c109` varchar(30) DEFAULT NULL, +`c110` varchar(30) DEFAULT NULL, +`c111` varchar(30) DEFAULT NULL, +`c112` varchar(30) DEFAULT NULL, +`c113` varchar(30) DEFAULT NULL, +`c114` varchar(30) DEFAULT NULL, +`c115` varchar(30) DEFAULT NULL, +`c116` varchar(30) DEFAULT NULL, +`c117` varchar(30) DEFAULT NULL, +`c118` varchar(30) DEFAULT NULL, +`c119` varchar(30) DEFAULT NULL, +`c120` varchar(30) DEFAULT NULL, +`c121` varchar(30) DEFAULT NULL, +`c122` varchar(30) DEFAULT NULL, +`c123` varchar(30) DEFAULT NULL, +`c124` varchar(30) DEFAULT NULL, +`c125` varchar(30) DEFAULT NULL, +`c126` varchar(30) DEFAULT NULL, +PRIMARY KEY (`c1`) +) ENGINE=InnoDB; +LOCK TABLES `t1` WRITE; +INSERT INTO `t1` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'); +LOCK TABLES `t2` WRITE; +INSERT INTO `t2` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'); +DROP TABLE `t1`; +DROP TABLE `t2`; +FLUSH LOGS; +=== Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail. diff --git a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test new file mode 100644 index 00000000000..4d7ba1e0a81 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test @@ -0,0 +1,520 @@ +# +# BUG#42749: infinite loop writing to row based binlog - processlist shows +# "freeing items" +# +# BUG#50018: binlog corruption when table has many columns +# +# WHY +# === +# +# This bug would make table map event to report data_written one +# byte less than what would actually be written in its body. This +# would cause one byte shorter event end_log_pos. The ultimate +# impact was that it would make fixing the position in +# MYSQL_BIN_LOG::write_cache bogus or end up in an infinite loop. +# +# HOW +# === +# +# Checking that the patch fixes the problem is done as follows: +# +# i) tables with several fields is created (above and below a 251 +# metadata size threshold) +# ii) an insert is performed; +# iii) the logs are flushed; +# iv) mysqlbinlog is used to check if it succeeds. +# +# In step iv), before the bug was fixed, the test case would fail +# with mysqlbinlog reporting that it was unable to succeed in +# reading the event. + +-- source include/master-slave.inc +-- source include/have_log_bin.inc +-- source include/have_innodb.inc +-- source include/have_binlog_format_row.inc +-- connection default + +RESET MASTER; + +-- disable_warnings +DROP TABLE IF EXISTS `t1`; +-- enable_warnings + +-- echo ### TABLE with field_metadata_size == 290 +CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` varchar(30) NOT NULL, + `c3` varchar(30) DEFAULT NULL, + `c4` varchar(30) DEFAULT NULL, + `c5` varchar(30) DEFAULT NULL, + `c6` varchar(30) DEFAULT NULL, + `c7` varchar(30) DEFAULT NULL, + `c8` varchar(30) DEFAULT NULL, + `c9` varchar(30) DEFAULT NULL, + `c10` varchar(30) DEFAULT NULL, + `c11` varchar(30) DEFAULT NULL, + `c12` varchar(30) DEFAULT NULL, + `c13` varchar(30) DEFAULT NULL, + `c14` varchar(30) DEFAULT NULL, + `c15` varchar(30) DEFAULT NULL, + `c16` varchar(30) DEFAULT NULL, + `c17` varchar(30) DEFAULT NULL, + `c18` varchar(30) DEFAULT NULL, + `c19` varchar(30) DEFAULT NULL, + `c20` varchar(30) DEFAULT NULL, + `c21` varchar(30) DEFAULT NULL, + `c22` varchar(30) DEFAULT NULL, + `c23` varchar(30) DEFAULT NULL, + `c24` varchar(30) DEFAULT NULL, + `c25` varchar(30) DEFAULT NULL, + `c26` varchar(30) DEFAULT NULL, + `c27` varchar(30) DEFAULT NULL, + `c28` varchar(30) DEFAULT NULL, + `c29` varchar(30) DEFAULT NULL, + `c30` varchar(30) DEFAULT NULL, + `c31` varchar(30) DEFAULT NULL, + `c32` varchar(30) DEFAULT NULL, + `c33` varchar(30) DEFAULT NULL, + `c34` varchar(30) DEFAULT NULL, + `c35` varchar(30) DEFAULT NULL, + `c36` varchar(30) DEFAULT NULL, + `c37` varchar(30) DEFAULT NULL, + `c38` varchar(30) DEFAULT NULL, + `c39` varchar(30) DEFAULT NULL, + `c40` varchar(30) DEFAULT NULL, + `c41` varchar(30) DEFAULT NULL, + `c42` varchar(30) DEFAULT NULL, + `c43` varchar(30) DEFAULT NULL, + `c44` varchar(30) DEFAULT NULL, + `c45` varchar(30) DEFAULT NULL, + `c46` varchar(30) DEFAULT NULL, + `c47` varchar(30) DEFAULT NULL, + `c48` varchar(30) DEFAULT NULL, + `c49` varchar(30) DEFAULT NULL, + `c50` varchar(30) DEFAULT NULL, + `c51` varchar(30) DEFAULT NULL, + `c52` varchar(30) DEFAULT NULL, + `c53` varchar(30) DEFAULT NULL, + `c54` varchar(30) DEFAULT NULL, + `c55` varchar(30) DEFAULT NULL, + `c56` varchar(30) DEFAULT NULL, + `c57` varchar(30) DEFAULT NULL, + `c58` varchar(30) DEFAULT NULL, + `c59` varchar(30) DEFAULT NULL, + `c60` varchar(30) DEFAULT NULL, + `c61` varchar(30) DEFAULT NULL, + `c62` varchar(30) DEFAULT NULL, + `c63` varchar(30) DEFAULT NULL, + `c64` varchar(30) DEFAULT NULL, + `c65` varchar(30) DEFAULT NULL, + `c66` varchar(30) DEFAULT NULL, + `c67` varchar(30) DEFAULT NULL, + `c68` varchar(30) DEFAULT NULL, + `c69` varchar(30) DEFAULT NULL, + `c70` varchar(30) DEFAULT NULL, + `c71` varchar(30) DEFAULT NULL, + `c72` varchar(30) DEFAULT NULL, + `c73` varchar(30) DEFAULT NULL, + `c74` varchar(30) DEFAULT NULL, + `c75` varchar(30) DEFAULT NULL, + `c76` varchar(30) DEFAULT NULL, + `c77` varchar(30) DEFAULT NULL, + `c78` varchar(30) DEFAULT NULL, + `c79` varchar(30) DEFAULT NULL, + `c80` varchar(30) DEFAULT NULL, + `c81` varchar(30) DEFAULT NULL, + `c82` varchar(30) DEFAULT NULL, + `c83` varchar(30) DEFAULT NULL, + `c84` varchar(30) DEFAULT NULL, + `c85` varchar(30) DEFAULT NULL, + `c86` varchar(30) DEFAULT NULL, + `c87` varchar(30) DEFAULT NULL, + `c88` varchar(30) DEFAULT NULL, + `c89` varchar(30) DEFAULT NULL, + `c90` varchar(30) DEFAULT NULL, + `c91` varchar(30) DEFAULT NULL, + `c92` varchar(30) DEFAULT NULL, + `c93` varchar(30) DEFAULT NULL, + `c94` varchar(30) DEFAULT NULL, + `c95` varchar(30) DEFAULT NULL, + `c96` varchar(30) DEFAULT NULL, + `c97` varchar(30) DEFAULT NULL, + `c98` varchar(30) DEFAULT NULL, + `c99` varchar(30) DEFAULT NULL, + `c100` varchar(30) DEFAULT NULL, + `c101` varchar(30) DEFAULT NULL, + `c102` varchar(30) DEFAULT NULL, + `c103` varchar(30) DEFAULT NULL, + `c104` varchar(30) DEFAULT NULL, + `c105` varchar(30) DEFAULT NULL, + `c106` varchar(30) DEFAULT NULL, + `c107` varchar(30) DEFAULT NULL, + `c108` varchar(30) DEFAULT NULL, + `c109` varchar(30) DEFAULT NULL, + `c110` varchar(30) DEFAULT NULL, + `c111` varchar(30) DEFAULT NULL, + `c112` varchar(30) DEFAULT NULL, + `c113` varchar(30) DEFAULT NULL, + `c114` varchar(30) DEFAULT NULL, + `c115` varchar(30) DEFAULT NULL, + `c116` varchar(30) DEFAULT NULL, + `c117` varchar(30) DEFAULT NULL, + `c118` varchar(30) DEFAULT NULL, + `c119` varchar(30) DEFAULT NULL, + `c120` varchar(30) DEFAULT NULL, + `c121` varchar(30) DEFAULT NULL, + `c122` varchar(30) DEFAULT NULL, + `c123` varchar(30) DEFAULT NULL, + `c124` varchar(30) DEFAULT NULL, + `c125` varchar(30) DEFAULT NULL, + `c126` varchar(30) DEFAULT NULL, + `c127` varchar(30) DEFAULT NULL, + `c128` varchar(30) DEFAULT NULL, + `c129` varchar(30) DEFAULT NULL, + `c130` varchar(30) DEFAULT NULL, + `c131` varchar(30) DEFAULT NULL, + `c132` varchar(30) DEFAULT NULL, + `c133` varchar(30) DEFAULT NULL, + `c134` varchar(30) DEFAULT NULL, + `c135` varchar(30) DEFAULT NULL, + `c136` varchar(30) DEFAULT NULL, + `c137` varchar(30) DEFAULT NULL, + `c138` varchar(30) DEFAULT NULL, + `c139` varchar(30) DEFAULT NULL, + `c140` varchar(30) DEFAULT NULL, + `c141` varchar(30) DEFAULT NULL, + `c142` varchar(30) DEFAULT NULL, + `c143` varchar(30) DEFAULT NULL, + `c144` varchar(30) DEFAULT NULL, + `c145` varchar(30) DEFAULT NULL, + `c146` varchar(30) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB; + +LOCK TABLES `t1` WRITE; + +INSERT INTO `t1` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'); + +DROP TABLE `t1`; + +FLUSH LOGS; + +-- sync_slave_with_master +-- connection master + +-- echo === Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail. + +-- let $MYSQLD_DATADIR= `SELECT @@datadir`; +-- exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug42749.binlog +-- remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug42749.binlog + +-- source include/master-slave-reset.inc +-- connection master + +# Create two tables one with field_metadata_size == 250 +# and another one with field_metadata_size == 252 +# +# Each varchar field takes up to 2 metadata bytes, see: +# +# Field_varstring::do_save_field_metadata (field.cc) +# +# The integer field takes 0 bytes, see: +# +# Field::do_save_field_metadata (field.h) +# +# The float field takes 1 byte, see: +# +# Field_float::do_save_field_metadata (field.cc) +# +# We choose 250 and 252 which are the ones below and above +# the threshold for switching to use 1 or 3 bytes for the +# m_data_size increment. +# + +-- echo ### TABLE with field_metadata_size == 250 + +CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` varchar(30) NOT NULL, + `c3` varchar(30) DEFAULT NULL, + `c4` varchar(30) DEFAULT NULL, + `c5` varchar(30) DEFAULT NULL, + `c6` varchar(30) DEFAULT NULL, + `c7` varchar(30) DEFAULT NULL, + `c8` varchar(30) DEFAULT NULL, + `c9` varchar(30) DEFAULT NULL, + `c10` varchar(30) DEFAULT NULL, + `c11` varchar(30) DEFAULT NULL, + `c12` varchar(30) DEFAULT NULL, + `c13` varchar(30) DEFAULT NULL, + `c14` varchar(30) DEFAULT NULL, + `c15` varchar(30) DEFAULT NULL, + `c16` varchar(30) DEFAULT NULL, + `c17` varchar(30) DEFAULT NULL, + `c18` varchar(30) DEFAULT NULL, + `c19` varchar(30) DEFAULT NULL, + `c20` varchar(30) DEFAULT NULL, + `c21` varchar(30) DEFAULT NULL, + `c22` varchar(30) DEFAULT NULL, + `c23` varchar(30) DEFAULT NULL, + `c24` varchar(30) DEFAULT NULL, + `c25` varchar(30) DEFAULT NULL, + `c26` varchar(30) DEFAULT NULL, + `c27` varchar(30) DEFAULT NULL, + `c28` varchar(30) DEFAULT NULL, + `c29` varchar(30) DEFAULT NULL, + `c30` varchar(30) DEFAULT NULL, + `c31` varchar(30) DEFAULT NULL, + `c32` varchar(30) DEFAULT NULL, + `c33` varchar(30) DEFAULT NULL, + `c34` varchar(30) DEFAULT NULL, + `c35` varchar(30) DEFAULT NULL, + `c36` varchar(30) DEFAULT NULL, + `c37` varchar(30) DEFAULT NULL, + `c38` varchar(30) DEFAULT NULL, + `c39` varchar(30) DEFAULT NULL, + `c40` varchar(30) DEFAULT NULL, + `c41` varchar(30) DEFAULT NULL, + `c42` varchar(30) DEFAULT NULL, + `c43` varchar(30) DEFAULT NULL, + `c44` varchar(30) DEFAULT NULL, + `c45` varchar(30) DEFAULT NULL, + `c46` varchar(30) DEFAULT NULL, + `c47` varchar(30) DEFAULT NULL, + `c48` varchar(30) DEFAULT NULL, + `c49` varchar(30) DEFAULT NULL, + `c50` varchar(30) DEFAULT NULL, + `c51` varchar(30) DEFAULT NULL, + `c52` varchar(30) DEFAULT NULL, + `c53` varchar(30) DEFAULT NULL, + `c54` varchar(30) DEFAULT NULL, + `c55` varchar(30) DEFAULT NULL, + `c56` varchar(30) DEFAULT NULL, + `c57` varchar(30) DEFAULT NULL, + `c58` varchar(30) DEFAULT NULL, + `c59` varchar(30) DEFAULT NULL, + `c60` varchar(30) DEFAULT NULL, + `c61` varchar(30) DEFAULT NULL, + `c62` varchar(30) DEFAULT NULL, + `c63` varchar(30) DEFAULT NULL, + `c64` varchar(30) DEFAULT NULL, + `c65` varchar(30) DEFAULT NULL, + `c66` varchar(30) DEFAULT NULL, + `c67` varchar(30) DEFAULT NULL, + `c68` varchar(30) DEFAULT NULL, + `c69` varchar(30) DEFAULT NULL, + `c70` varchar(30) DEFAULT NULL, + `c71` varchar(30) DEFAULT NULL, + `c72` varchar(30) DEFAULT NULL, + `c73` varchar(30) DEFAULT NULL, + `c74` varchar(30) DEFAULT NULL, + `c75` varchar(30) DEFAULT NULL, + `c76` varchar(30) DEFAULT NULL, + `c77` varchar(30) DEFAULT NULL, + `c78` varchar(30) DEFAULT NULL, + `c79` varchar(30) DEFAULT NULL, + `c80` varchar(30) DEFAULT NULL, + `c81` varchar(30) DEFAULT NULL, + `c82` varchar(30) DEFAULT NULL, + `c83` varchar(30) DEFAULT NULL, + `c84` varchar(30) DEFAULT NULL, + `c85` varchar(30) DEFAULT NULL, + `c86` varchar(30) DEFAULT NULL, + `c87` varchar(30) DEFAULT NULL, + `c88` varchar(30) DEFAULT NULL, + `c89` varchar(30) DEFAULT NULL, + `c90` varchar(30) DEFAULT NULL, + `c91` varchar(30) DEFAULT NULL, + `c92` varchar(30) DEFAULT NULL, + `c93` varchar(30) DEFAULT NULL, + `c94` varchar(30) DEFAULT NULL, + `c95` varchar(30) DEFAULT NULL, + `c96` varchar(30) DEFAULT NULL, + `c97` varchar(30) DEFAULT NULL, + `c98` varchar(30) DEFAULT NULL, + `c99` varchar(30) DEFAULT NULL, + `c100` varchar(30) DEFAULT NULL, + `c101` varchar(30) DEFAULT NULL, + `c102` varchar(30) DEFAULT NULL, + `c103` varchar(30) DEFAULT NULL, + `c104` varchar(30) DEFAULT NULL, + `c105` varchar(30) DEFAULT NULL, + `c106` varchar(30) DEFAULT NULL, + `c107` varchar(30) DEFAULT NULL, + `c108` varchar(30) DEFAULT NULL, + `c109` varchar(30) DEFAULT NULL, + `c110` varchar(30) DEFAULT NULL, + `c111` varchar(30) DEFAULT NULL, + `c112` varchar(30) DEFAULT NULL, + `c113` varchar(30) DEFAULT NULL, + `c114` varchar(30) DEFAULT NULL, + `c115` varchar(30) DEFAULT NULL, + `c116` varchar(30) DEFAULT NULL, + `c117` varchar(30) DEFAULT NULL, + `c118` varchar(30) DEFAULT NULL, + `c119` varchar(30) DEFAULT NULL, + `c120` varchar(30) DEFAULT NULL, + `c121` varchar(30) DEFAULT NULL, + `c122` varchar(30) DEFAULT NULL, + `c123` varchar(30) DEFAULT NULL, + `c124` varchar(30) DEFAULT NULL, + `c125` varchar(30) DEFAULT NULL, + `c126` varchar(30) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB; + +-- echo ### TABLE with field_metadata_size == 251 + +CREATE TABLE `t2` ( + `c1` float, + `c2` varchar(30) NOT NULL, + `c3` varchar(30) DEFAULT NULL, + `c4` varchar(30) DEFAULT NULL, + `c5` varchar(30) DEFAULT NULL, + `c6` varchar(30) DEFAULT NULL, + `c7` varchar(30) DEFAULT NULL, + `c8` varchar(30) DEFAULT NULL, + `c9` varchar(30) DEFAULT NULL, + `c10` varchar(30) DEFAULT NULL, + `c11` varchar(30) DEFAULT NULL, + `c12` varchar(30) DEFAULT NULL, + `c13` varchar(30) DEFAULT NULL, + `c14` varchar(30) DEFAULT NULL, + `c15` varchar(30) DEFAULT NULL, + `c16` varchar(30) DEFAULT NULL, + `c17` varchar(30) DEFAULT NULL, + `c18` varchar(30) DEFAULT NULL, + `c19` varchar(30) DEFAULT NULL, + `c20` varchar(30) DEFAULT NULL, + `c21` varchar(30) DEFAULT NULL, + `c22` varchar(30) DEFAULT NULL, + `c23` varchar(30) DEFAULT NULL, + `c24` varchar(30) DEFAULT NULL, + `c25` varchar(30) DEFAULT NULL, + `c26` varchar(30) DEFAULT NULL, + `c27` varchar(30) DEFAULT NULL, + `c28` varchar(30) DEFAULT NULL, + `c29` varchar(30) DEFAULT NULL, + `c30` varchar(30) DEFAULT NULL, + `c31` varchar(30) DEFAULT NULL, + `c32` varchar(30) DEFAULT NULL, + `c33` varchar(30) DEFAULT NULL, + `c34` varchar(30) DEFAULT NULL, + `c35` varchar(30) DEFAULT NULL, + `c36` varchar(30) DEFAULT NULL, + `c37` varchar(30) DEFAULT NULL, + `c38` varchar(30) DEFAULT NULL, + `c39` varchar(30) DEFAULT NULL, + `c40` varchar(30) DEFAULT NULL, + `c41` varchar(30) DEFAULT NULL, + `c42` varchar(30) DEFAULT NULL, + `c43` varchar(30) DEFAULT NULL, + `c44` varchar(30) DEFAULT NULL, + `c45` varchar(30) DEFAULT NULL, + `c46` varchar(30) DEFAULT NULL, + `c47` varchar(30) DEFAULT NULL, + `c48` varchar(30) DEFAULT NULL, + `c49` varchar(30) DEFAULT NULL, + `c50` varchar(30) DEFAULT NULL, + `c51` varchar(30) DEFAULT NULL, + `c52` varchar(30) DEFAULT NULL, + `c53` varchar(30) DEFAULT NULL, + `c54` varchar(30) DEFAULT NULL, + `c55` varchar(30) DEFAULT NULL, + `c56` varchar(30) DEFAULT NULL, + `c57` varchar(30) DEFAULT NULL, + `c58` varchar(30) DEFAULT NULL, + `c59` varchar(30) DEFAULT NULL, + `c60` varchar(30) DEFAULT NULL, + `c61` varchar(30) DEFAULT NULL, + `c62` varchar(30) DEFAULT NULL, + `c63` varchar(30) DEFAULT NULL, + `c64` varchar(30) DEFAULT NULL, + `c65` varchar(30) DEFAULT NULL, + `c66` varchar(30) DEFAULT NULL, + `c67` varchar(30) DEFAULT NULL, + `c68` varchar(30) DEFAULT NULL, + `c69` varchar(30) DEFAULT NULL, + `c70` varchar(30) DEFAULT NULL, + `c71` varchar(30) DEFAULT NULL, + `c72` varchar(30) DEFAULT NULL, + `c73` varchar(30) DEFAULT NULL, + `c74` varchar(30) DEFAULT NULL, + `c75` varchar(30) DEFAULT NULL, + `c76` varchar(30) DEFAULT NULL, + `c77` varchar(30) DEFAULT NULL, + `c78` varchar(30) DEFAULT NULL, + `c79` varchar(30) DEFAULT NULL, + `c80` varchar(30) DEFAULT NULL, + `c81` varchar(30) DEFAULT NULL, + `c82` varchar(30) DEFAULT NULL, + `c83` varchar(30) DEFAULT NULL, + `c84` varchar(30) DEFAULT NULL, + `c85` varchar(30) DEFAULT NULL, + `c86` varchar(30) DEFAULT NULL, + `c87` varchar(30) DEFAULT NULL, + `c88` varchar(30) DEFAULT NULL, + `c89` varchar(30) DEFAULT NULL, + `c90` varchar(30) DEFAULT NULL, + `c91` varchar(30) DEFAULT NULL, + `c92` varchar(30) DEFAULT NULL, + `c93` varchar(30) DEFAULT NULL, + `c94` varchar(30) DEFAULT NULL, + `c95` varchar(30) DEFAULT NULL, + `c96` varchar(30) DEFAULT NULL, + `c97` varchar(30) DEFAULT NULL, + `c98` varchar(30) DEFAULT NULL, + `c99` varchar(30) DEFAULT NULL, + `c100` varchar(30) DEFAULT NULL, + `c101` varchar(30) DEFAULT NULL, + `c102` varchar(30) DEFAULT NULL, + `c103` varchar(30) DEFAULT NULL, + `c104` varchar(30) DEFAULT NULL, + `c105` varchar(30) DEFAULT NULL, + `c106` varchar(30) DEFAULT NULL, + `c107` varchar(30) DEFAULT NULL, + `c108` varchar(30) DEFAULT NULL, + `c109` varchar(30) DEFAULT NULL, + `c110` varchar(30) DEFAULT NULL, + `c111` varchar(30) DEFAULT NULL, + `c112` varchar(30) DEFAULT NULL, + `c113` varchar(30) DEFAULT NULL, + `c114` varchar(30) DEFAULT NULL, + `c115` varchar(30) DEFAULT NULL, + `c116` varchar(30) DEFAULT NULL, + `c117` varchar(30) DEFAULT NULL, + `c118` varchar(30) DEFAULT NULL, + `c119` varchar(30) DEFAULT NULL, + `c120` varchar(30) DEFAULT NULL, + `c121` varchar(30) DEFAULT NULL, + `c122` varchar(30) DEFAULT NULL, + `c123` varchar(30) DEFAULT NULL, + `c124` varchar(30) DEFAULT NULL, + `c125` varchar(30) DEFAULT NULL, + `c126` varchar(30) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB; + +LOCK TABLES `t1` WRITE; +INSERT INTO `t1` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'); + + +LOCK TABLES `t2` WRITE; +INSERT INTO `t2` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'); + +DROP TABLE `t1`; +DROP TABLE `t2`; + +FLUSH LOGS; + +-- sync_slave_with_master + +-- connection master + +-- echo === Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail. + +-- let $MYSQLD_DATADIR= `SELECT @@datadir`; +-- exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug50018.binlog +-- remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug50018.binlog + +-- source include/master-slave-end.inc diff --git a/sql/log_event.cc b/sql/log_event.cc index c028db3476d..d5a436cb79e 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -7925,10 +7925,10 @@ Table_map_log_event::Table_map_log_event(THD *thd, TABLE *tbl, ulong tid, plus one or three bytes (see pack.c:net_store_length) for number of elements in the field metadata array. */ - if (m_field_metadata_size > 255) - m_data_size+= m_field_metadata_size + 3; - else + if (m_field_metadata_size < 251) m_data_size+= m_field_metadata_size + 1; + else + m_data_size+= m_field_metadata_size + 3; bzero(m_null_bits, num_null_bytes); for (unsigned int i= 0 ; i < m_table->s->fields ; ++i) From 0a64fbc517eef4550e5b0b75246125391f5deca1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 6 Jan 2010 10:36:29 +0800 Subject: [PATCH 042/132] Bug #49137 Replication failure on SBR/MBR + multi-table DROP TEMPORARY TABLE Fixed valgrind failure on PB2. sql/log_event.cc: Added code to fix valgrind failure on PB2. --- sql/log_event.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index 35d53c4fede..ad5c4bfeef8 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -2110,8 +2110,8 @@ compare_errors: has already been dropped. To ignore such irrelevant "table does not exist errors", we silently clear the error if TEMPORARY was used. */ - if (thd->lex->drop_temporary && - thd->net.last_errno == ER_BAD_TABLE_ERROR && !expected_error) + if (thd->net.last_errno == ER_BAD_TABLE_ERROR && + !expected_error && thd->lex->drop_temporary) thd->clear_error(); /* If we expected a non-zero error code, and we don't get the same error From 98b989d7b1f250f4e245b1ca479bacd9b18ae98e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 6 Jan 2010 13:12:40 +0800 Subject: [PATCH 043/132] Bug #49137 Replication failure on SBR/MBR + multi-table DROP TEMPORARY TABLE Fixed valgrind failure on PB2. sql/log_event.cc: Added code to fix valgrind failure on PB2. --- sql/log_event.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index ad5c4bfeef8..76fc2632cd1 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -2110,8 +2110,8 @@ compare_errors: has already been dropped. To ignore such irrelevant "table does not exist errors", we silently clear the error if TEMPORARY was used. */ - if (thd->net.last_errno == ER_BAD_TABLE_ERROR && - !expected_error && thd->lex->drop_temporary) + if (thd->lex->sql_command == SQLCOM_DROP_TABLE && thd->lex->drop_temporary && + thd->net.last_errno == ER_BAD_TABLE_ERROR && !expected_error) thd->clear_error(); /* If we expected a non-zero error code, and we don't get the same error From 9eca4014e34add68eafb7b8d820d7f7920e0b8e1 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Wed, 6 Jan 2010 12:24:51 +0200 Subject: [PATCH 044/132] Addendum to Bug #49734 : fixed an unstable test case. --- mysql-test/r/union.result | 3 --- mysql-test/t/union.test | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index dce32d2ced4..43d7cade227 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -1640,9 +1640,6 @@ Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` union select `test`.`t1 # Should not crash SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY (SELECT a FROM t2 WHERE b = 12); -a -1 -2 # Should not crash SELECT * FROM t2 UNION SELECT * FROM t2 ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE)); diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index 91fc9546bbe..c8d5ea0f8e5 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -1144,8 +1144,10 @@ SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY (SELECT a FROM t2 WHERE b = 12); --echo # Should not crash +--disable_result_log SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY (SELECT a FROM t2 WHERE b = 12); +--enable_result_log --echo # Should not crash SELECT * FROM t2 UNION SELECT * FROM t2 From 585303295fba0ecb01da868adc59de7a04a0d484 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Thu, 7 Jan 2010 17:45:54 +0000 Subject: [PATCH 045/132] BUG#50018: binlog corruption when table has many columns Some improvements on the test case as suggested during review. --- .../suite/rpl/r/rpl_row_tbl_metadata.result | 309 ++------------ .../suite/rpl/t/rpl_row_tbl_metadata.test | 402 +++++------------- 2 files changed, 150 insertions(+), 561 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result b/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result index 551ece5da9d..711d0d063aa 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result +++ b/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result @@ -4,7 +4,6 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -RESET MASTER; DROP TABLE IF EXISTS `t1`; ### TABLE with field_metadata_size == 290 CREATE TABLE `t1` ( @@ -157,9 +156,11 @@ CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=InnoDB; LOCK TABLES `t1` WRITE; -INSERT INTO `t1` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'); -DROP TABLE `t1`; +INSERT INTO `t1`(c2) VALUES ('1'); FLUSH LOGS; +### assertion: the slave replicated event successfully and tables match +Comparing tables master:test.t1 and slave:test.t1 +DROP TABLE `t1`; === Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail. stop slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; @@ -167,271 +168,39 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -### TABLE with field_metadata_size == 250 -CREATE TABLE `t1` ( -`c1` int(11) NOT NULL AUTO_INCREMENT, -`c2` varchar(30) NOT NULL, -`c3` varchar(30) DEFAULT NULL, -`c4` varchar(30) DEFAULT NULL, -`c5` varchar(30) DEFAULT NULL, -`c6` varchar(30) DEFAULT NULL, -`c7` varchar(30) DEFAULT NULL, -`c8` varchar(30) DEFAULT NULL, -`c9` varchar(30) DEFAULT NULL, -`c10` varchar(30) DEFAULT NULL, -`c11` varchar(30) DEFAULT NULL, -`c12` varchar(30) DEFAULT NULL, -`c13` varchar(30) DEFAULT NULL, -`c14` varchar(30) DEFAULT NULL, -`c15` varchar(30) DEFAULT NULL, -`c16` varchar(30) DEFAULT NULL, -`c17` varchar(30) DEFAULT NULL, -`c18` varchar(30) DEFAULT NULL, -`c19` varchar(30) DEFAULT NULL, -`c20` varchar(30) DEFAULT NULL, -`c21` varchar(30) DEFAULT NULL, -`c22` varchar(30) DEFAULT NULL, -`c23` varchar(30) DEFAULT NULL, -`c24` varchar(30) DEFAULT NULL, -`c25` varchar(30) DEFAULT NULL, -`c26` varchar(30) DEFAULT NULL, -`c27` varchar(30) DEFAULT NULL, -`c28` varchar(30) DEFAULT NULL, -`c29` varchar(30) DEFAULT NULL, -`c30` varchar(30) DEFAULT NULL, -`c31` varchar(30) DEFAULT NULL, -`c32` varchar(30) DEFAULT NULL, -`c33` varchar(30) DEFAULT NULL, -`c34` varchar(30) DEFAULT NULL, -`c35` varchar(30) DEFAULT NULL, -`c36` varchar(30) DEFAULT NULL, -`c37` varchar(30) DEFAULT NULL, -`c38` varchar(30) DEFAULT NULL, -`c39` varchar(30) DEFAULT NULL, -`c40` varchar(30) DEFAULT NULL, -`c41` varchar(30) DEFAULT NULL, -`c42` varchar(30) DEFAULT NULL, -`c43` varchar(30) DEFAULT NULL, -`c44` varchar(30) DEFAULT NULL, -`c45` varchar(30) DEFAULT NULL, -`c46` varchar(30) DEFAULT NULL, -`c47` varchar(30) DEFAULT NULL, -`c48` varchar(30) DEFAULT NULL, -`c49` varchar(30) DEFAULT NULL, -`c50` varchar(30) DEFAULT NULL, -`c51` varchar(30) DEFAULT NULL, -`c52` varchar(30) DEFAULT NULL, -`c53` varchar(30) DEFAULT NULL, -`c54` varchar(30) DEFAULT NULL, -`c55` varchar(30) DEFAULT NULL, -`c56` varchar(30) DEFAULT NULL, -`c57` varchar(30) DEFAULT NULL, -`c58` varchar(30) DEFAULT NULL, -`c59` varchar(30) DEFAULT NULL, -`c60` varchar(30) DEFAULT NULL, -`c61` varchar(30) DEFAULT NULL, -`c62` varchar(30) DEFAULT NULL, -`c63` varchar(30) DEFAULT NULL, -`c64` varchar(30) DEFAULT NULL, -`c65` varchar(30) DEFAULT NULL, -`c66` varchar(30) DEFAULT NULL, -`c67` varchar(30) DEFAULT NULL, -`c68` varchar(30) DEFAULT NULL, -`c69` varchar(30) DEFAULT NULL, -`c70` varchar(30) DEFAULT NULL, -`c71` varchar(30) DEFAULT NULL, -`c72` varchar(30) DEFAULT NULL, -`c73` varchar(30) DEFAULT NULL, -`c74` varchar(30) DEFAULT NULL, -`c75` varchar(30) DEFAULT NULL, -`c76` varchar(30) DEFAULT NULL, -`c77` varchar(30) DEFAULT NULL, -`c78` varchar(30) DEFAULT NULL, -`c79` varchar(30) DEFAULT NULL, -`c80` varchar(30) DEFAULT NULL, -`c81` varchar(30) DEFAULT NULL, -`c82` varchar(30) DEFAULT NULL, -`c83` varchar(30) DEFAULT NULL, -`c84` varchar(30) DEFAULT NULL, -`c85` varchar(30) DEFAULT NULL, -`c86` varchar(30) DEFAULT NULL, -`c87` varchar(30) DEFAULT NULL, -`c88` varchar(30) DEFAULT NULL, -`c89` varchar(30) DEFAULT NULL, -`c90` varchar(30) DEFAULT NULL, -`c91` varchar(30) DEFAULT NULL, -`c92` varchar(30) DEFAULT NULL, -`c93` varchar(30) DEFAULT NULL, -`c94` varchar(30) DEFAULT NULL, -`c95` varchar(30) DEFAULT NULL, -`c96` varchar(30) DEFAULT NULL, -`c97` varchar(30) DEFAULT NULL, -`c98` varchar(30) DEFAULT NULL, -`c99` varchar(30) DEFAULT NULL, -`c100` varchar(30) DEFAULT NULL, -`c101` varchar(30) DEFAULT NULL, -`c102` varchar(30) DEFAULT NULL, -`c103` varchar(30) DEFAULT NULL, -`c104` varchar(30) DEFAULT NULL, -`c105` varchar(30) DEFAULT NULL, -`c106` varchar(30) DEFAULT NULL, -`c107` varchar(30) DEFAULT NULL, -`c108` varchar(30) DEFAULT NULL, -`c109` varchar(30) DEFAULT NULL, -`c110` varchar(30) DEFAULT NULL, -`c111` varchar(30) DEFAULT NULL, -`c112` varchar(30) DEFAULT NULL, -`c113` varchar(30) DEFAULT NULL, -`c114` varchar(30) DEFAULT NULL, -`c115` varchar(30) DEFAULT NULL, -`c116` varchar(30) DEFAULT NULL, -`c117` varchar(30) DEFAULT NULL, -`c118` varchar(30) DEFAULT NULL, -`c119` varchar(30) DEFAULT NULL, -`c120` varchar(30) DEFAULT NULL, -`c121` varchar(30) DEFAULT NULL, -`c122` varchar(30) DEFAULT NULL, -`c123` varchar(30) DEFAULT NULL, -`c124` varchar(30) DEFAULT NULL, -`c125` varchar(30) DEFAULT NULL, -`c126` varchar(30) DEFAULT NULL, -PRIMARY KEY (`c1`) -) ENGINE=InnoDB; -### TABLE with field_metadata_size == 251 -CREATE TABLE `t2` ( -`c1` float, -`c2` varchar(30) NOT NULL, -`c3` varchar(30) DEFAULT NULL, -`c4` varchar(30) DEFAULT NULL, -`c5` varchar(30) DEFAULT NULL, -`c6` varchar(30) DEFAULT NULL, -`c7` varchar(30) DEFAULT NULL, -`c8` varchar(30) DEFAULT NULL, -`c9` varchar(30) DEFAULT NULL, -`c10` varchar(30) DEFAULT NULL, -`c11` varchar(30) DEFAULT NULL, -`c12` varchar(30) DEFAULT NULL, -`c13` varchar(30) DEFAULT NULL, -`c14` varchar(30) DEFAULT NULL, -`c15` varchar(30) DEFAULT NULL, -`c16` varchar(30) DEFAULT NULL, -`c17` varchar(30) DEFAULT NULL, -`c18` varchar(30) DEFAULT NULL, -`c19` varchar(30) DEFAULT NULL, -`c20` varchar(30) DEFAULT NULL, -`c21` varchar(30) DEFAULT NULL, -`c22` varchar(30) DEFAULT NULL, -`c23` varchar(30) DEFAULT NULL, -`c24` varchar(30) DEFAULT NULL, -`c25` varchar(30) DEFAULT NULL, -`c26` varchar(30) DEFAULT NULL, -`c27` varchar(30) DEFAULT NULL, -`c28` varchar(30) DEFAULT NULL, -`c29` varchar(30) DEFAULT NULL, -`c30` varchar(30) DEFAULT NULL, -`c31` varchar(30) DEFAULT NULL, -`c32` varchar(30) DEFAULT NULL, -`c33` varchar(30) DEFAULT NULL, -`c34` varchar(30) DEFAULT NULL, -`c35` varchar(30) DEFAULT NULL, -`c36` varchar(30) DEFAULT NULL, -`c37` varchar(30) DEFAULT NULL, -`c38` varchar(30) DEFAULT NULL, -`c39` varchar(30) DEFAULT NULL, -`c40` varchar(30) DEFAULT NULL, -`c41` varchar(30) DEFAULT NULL, -`c42` varchar(30) DEFAULT NULL, -`c43` varchar(30) DEFAULT NULL, -`c44` varchar(30) DEFAULT NULL, -`c45` varchar(30) DEFAULT NULL, -`c46` varchar(30) DEFAULT NULL, -`c47` varchar(30) DEFAULT NULL, -`c48` varchar(30) DEFAULT NULL, -`c49` varchar(30) DEFAULT NULL, -`c50` varchar(30) DEFAULT NULL, -`c51` varchar(30) DEFAULT NULL, -`c52` varchar(30) DEFAULT NULL, -`c53` varchar(30) DEFAULT NULL, -`c54` varchar(30) DEFAULT NULL, -`c55` varchar(30) DEFAULT NULL, -`c56` varchar(30) DEFAULT NULL, -`c57` varchar(30) DEFAULT NULL, -`c58` varchar(30) DEFAULT NULL, -`c59` varchar(30) DEFAULT NULL, -`c60` varchar(30) DEFAULT NULL, -`c61` varchar(30) DEFAULT NULL, -`c62` varchar(30) DEFAULT NULL, -`c63` varchar(30) DEFAULT NULL, -`c64` varchar(30) DEFAULT NULL, -`c65` varchar(30) DEFAULT NULL, -`c66` varchar(30) DEFAULT NULL, -`c67` varchar(30) DEFAULT NULL, -`c68` varchar(30) DEFAULT NULL, -`c69` varchar(30) DEFAULT NULL, -`c70` varchar(30) DEFAULT NULL, -`c71` varchar(30) DEFAULT NULL, -`c72` varchar(30) DEFAULT NULL, -`c73` varchar(30) DEFAULT NULL, -`c74` varchar(30) DEFAULT NULL, -`c75` varchar(30) DEFAULT NULL, -`c76` varchar(30) DEFAULT NULL, -`c77` varchar(30) DEFAULT NULL, -`c78` varchar(30) DEFAULT NULL, -`c79` varchar(30) DEFAULT NULL, -`c80` varchar(30) DEFAULT NULL, -`c81` varchar(30) DEFAULT NULL, -`c82` varchar(30) DEFAULT NULL, -`c83` varchar(30) DEFAULT NULL, -`c84` varchar(30) DEFAULT NULL, -`c85` varchar(30) DEFAULT NULL, -`c86` varchar(30) DEFAULT NULL, -`c87` varchar(30) DEFAULT NULL, -`c88` varchar(30) DEFAULT NULL, -`c89` varchar(30) DEFAULT NULL, -`c90` varchar(30) DEFAULT NULL, -`c91` varchar(30) DEFAULT NULL, -`c92` varchar(30) DEFAULT NULL, -`c93` varchar(30) DEFAULT NULL, -`c94` varchar(30) DEFAULT NULL, -`c95` varchar(30) DEFAULT NULL, -`c96` varchar(30) DEFAULT NULL, -`c97` varchar(30) DEFAULT NULL, -`c98` varchar(30) DEFAULT NULL, -`c99` varchar(30) DEFAULT NULL, -`c100` varchar(30) DEFAULT NULL, -`c101` varchar(30) DEFAULT NULL, -`c102` varchar(30) DEFAULT NULL, -`c103` varchar(30) DEFAULT NULL, -`c104` varchar(30) DEFAULT NULL, -`c105` varchar(30) DEFAULT NULL, -`c106` varchar(30) DEFAULT NULL, -`c107` varchar(30) DEFAULT NULL, -`c108` varchar(30) DEFAULT NULL, -`c109` varchar(30) DEFAULT NULL, -`c110` varchar(30) DEFAULT NULL, -`c111` varchar(30) DEFAULT NULL, -`c112` varchar(30) DEFAULT NULL, -`c113` varchar(30) DEFAULT NULL, -`c114` varchar(30) DEFAULT NULL, -`c115` varchar(30) DEFAULT NULL, -`c116` varchar(30) DEFAULT NULL, -`c117` varchar(30) DEFAULT NULL, -`c118` varchar(30) DEFAULT NULL, -`c119` varchar(30) DEFAULT NULL, -`c120` varchar(30) DEFAULT NULL, -`c121` varchar(30) DEFAULT NULL, -`c122` varchar(30) DEFAULT NULL, -`c123` varchar(30) DEFAULT NULL, -`c124` varchar(30) DEFAULT NULL, -`c125` varchar(30) DEFAULT NULL, -`c126` varchar(30) DEFAULT NULL, -PRIMARY KEY (`c1`) -) ENGINE=InnoDB; -LOCK TABLES `t1` WRITE; -INSERT INTO `t1` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'); -LOCK TABLES `t2` WRITE; -INSERT INTO `t2` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'); -DROP TABLE `t1`; -DROP TABLE `t2`; +### action: generating several tables with different metadata +### sizes (resorting to perl) +### testing table with 249 field metadata size. +### testing table with 250 field metadata size. +### testing table with 251 field metadata size. +### testing table with 252 field metadata size. +### testing table with 253 field metadata size. +### testing table with 254 field metadata size. +### testing table with 255 field metadata size. +### testing table with 256 field metadata size. +### testing table with 257 field metadata size. +### testing table with 258 field metadata size. FLUSH LOGS; -=== Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail. +### assertion: the slave replicated event successfully and tables match for t10 +Comparing tables master:test.t10 and slave:test.t10 +### assertion: the slave replicated event successfully and tables match for t9 +Comparing tables master:test.t9 and slave:test.t9 +### assertion: the slave replicated event successfully and tables match for t8 +Comparing tables master:test.t8 and slave:test.t8 +### assertion: the slave replicated event successfully and tables match for t7 +Comparing tables master:test.t7 and slave:test.t7 +### assertion: the slave replicated event successfully and tables match for t6 +Comparing tables master:test.t6 and slave:test.t6 +### assertion: the slave replicated event successfully and tables match for t5 +Comparing tables master:test.t5 and slave:test.t5 +### assertion: the slave replicated event successfully and tables match for t4 +Comparing tables master:test.t4 and slave:test.t4 +### assertion: the slave replicated event successfully and tables match for t3 +Comparing tables master:test.t3 and slave:test.t3 +### assertion: the slave replicated event successfully and tables match for t2 +Comparing tables master:test.t2 and slave:test.t2 +### assertion: the slave replicated event successfully and tables match for t1 +Comparing tables master:test.t1 and slave:test.t1 +### assertion: check that binlog is not corrupt. Using mysqlbinlog to +### detect failure. Before the patch mysqlbinlog would find +### a corrupted event, thence would fail. diff --git a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test index 4d7ba1e0a81..022988d7ee3 100644 --- a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test +++ b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test @@ -2,7 +2,6 @@ # BUG#42749: infinite loop writing to row based binlog - processlist shows # "freeing items" # -# BUG#50018: binlog corruption when table has many columns # # WHY # === @@ -18,8 +17,7 @@ # # Checking that the patch fixes the problem is done as follows: # -# i) tables with several fields is created (above and below a 251 -# metadata size threshold) +# i) one table with m_field_metadata sized at 290 # ii) an insert is performed; # iii) the logs are flushed; # iv) mysqlbinlog is used to check if it succeeds. @@ -29,12 +27,8 @@ # reading the event. -- source include/master-slave.inc --- source include/have_log_bin.inc -- source include/have_innodb.inc -- source include/have_binlog_format_row.inc --- connection default - -RESET MASTER; -- disable_warnings DROP TABLE IF EXISTS `t1`; @@ -192,13 +186,20 @@ CREATE TABLE `t1` ( ) ENGINE=InnoDB; LOCK TABLES `t1` WRITE; +INSERT INTO `t1`(c2) VALUES ('1'); +FLUSH LOGS; -INSERT INTO `t1` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'); +-- sync_slave_with_master +-- connection master + +-- echo ### assertion: the slave replicated event successfully and tables match +-- let $diff_table_1=master:test.t1 +-- let $diff_table_2=slave:test.t1 +-- source include/diff_tables.inc DROP TABLE `t1`; -FLUSH LOGS; - +-- connection master -- sync_slave_with_master -- connection master @@ -208,313 +209,132 @@ FLUSH LOGS; -- exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug42749.binlog -- remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug42749.binlog +############################################################# +# BUG#50018: binlog corruption when table has many columns +# +# Same test from BUG#42749, but now we generate some SQL which +# creates and inserts into tables with metadata size from 249 +# to 258. +# +# The test works as follows: +# 1. SQL for several CREATE TABLE and INSERTS are generated +# into a file. +# 2. This file is then "sourced" +# 3. The slave is synchronized with the master +# 4. FLUSH LOGS on master +# 5. Compare tables on master and slave. +# 6. run mysqlbinlog on master's binary log +# +# Steps #5 and #6 assert that binary log is not corrupted +# in both cases: when slave is replaying events and when +# mysqlbinlog is used to read the binary log + -- source include/master-slave-reset.inc -- connection master -# Create two tables one with field_metadata_size == 250 -# and another one with field_metadata_size == 252 +# Create several tables with field_metadata_size ranging +# from 249 to 258 (so that we cover 251 and 255 range). +# This should exercise the switch between using 1 or 3 +# bytes to pack m_field_metadata_size. # # Each varchar field takes up to 2 metadata bytes, see: # # Field_varstring::do_save_field_metadata (field.cc) # -# The integer field takes 0 bytes, see: -# -# Field::do_save_field_metadata (field.h) -# # The float field takes 1 byte, see: # # Field_float::do_save_field_metadata (field.cc) # -# We choose 250 and 252 which are the ones below and above -# the threshold for switching to use 1 or 3 bytes for the -# m_data_size increment. -# --- echo ### TABLE with field_metadata_size == 250 +-- let $generated_sql= $MYSQLTEST_VARDIR/tmp/b50018.sql +-- let B50018_FILE= $generated_sql -CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - `c2` varchar(30) NOT NULL, - `c3` varchar(30) DEFAULT NULL, - `c4` varchar(30) DEFAULT NULL, - `c5` varchar(30) DEFAULT NULL, - `c6` varchar(30) DEFAULT NULL, - `c7` varchar(30) DEFAULT NULL, - `c8` varchar(30) DEFAULT NULL, - `c9` varchar(30) DEFAULT NULL, - `c10` varchar(30) DEFAULT NULL, - `c11` varchar(30) DEFAULT NULL, - `c12` varchar(30) DEFAULT NULL, - `c13` varchar(30) DEFAULT NULL, - `c14` varchar(30) DEFAULT NULL, - `c15` varchar(30) DEFAULT NULL, - `c16` varchar(30) DEFAULT NULL, - `c17` varchar(30) DEFAULT NULL, - `c18` varchar(30) DEFAULT NULL, - `c19` varchar(30) DEFAULT NULL, - `c20` varchar(30) DEFAULT NULL, - `c21` varchar(30) DEFAULT NULL, - `c22` varchar(30) DEFAULT NULL, - `c23` varchar(30) DEFAULT NULL, - `c24` varchar(30) DEFAULT NULL, - `c25` varchar(30) DEFAULT NULL, - `c26` varchar(30) DEFAULT NULL, - `c27` varchar(30) DEFAULT NULL, - `c28` varchar(30) DEFAULT NULL, - `c29` varchar(30) DEFAULT NULL, - `c30` varchar(30) DEFAULT NULL, - `c31` varchar(30) DEFAULT NULL, - `c32` varchar(30) DEFAULT NULL, - `c33` varchar(30) DEFAULT NULL, - `c34` varchar(30) DEFAULT NULL, - `c35` varchar(30) DEFAULT NULL, - `c36` varchar(30) DEFAULT NULL, - `c37` varchar(30) DEFAULT NULL, - `c38` varchar(30) DEFAULT NULL, - `c39` varchar(30) DEFAULT NULL, - `c40` varchar(30) DEFAULT NULL, - `c41` varchar(30) DEFAULT NULL, - `c42` varchar(30) DEFAULT NULL, - `c43` varchar(30) DEFAULT NULL, - `c44` varchar(30) DEFAULT NULL, - `c45` varchar(30) DEFAULT NULL, - `c46` varchar(30) DEFAULT NULL, - `c47` varchar(30) DEFAULT NULL, - `c48` varchar(30) DEFAULT NULL, - `c49` varchar(30) DEFAULT NULL, - `c50` varchar(30) DEFAULT NULL, - `c51` varchar(30) DEFAULT NULL, - `c52` varchar(30) DEFAULT NULL, - `c53` varchar(30) DEFAULT NULL, - `c54` varchar(30) DEFAULT NULL, - `c55` varchar(30) DEFAULT NULL, - `c56` varchar(30) DEFAULT NULL, - `c57` varchar(30) DEFAULT NULL, - `c58` varchar(30) DEFAULT NULL, - `c59` varchar(30) DEFAULT NULL, - `c60` varchar(30) DEFAULT NULL, - `c61` varchar(30) DEFAULT NULL, - `c62` varchar(30) DEFAULT NULL, - `c63` varchar(30) DEFAULT NULL, - `c64` varchar(30) DEFAULT NULL, - `c65` varchar(30) DEFAULT NULL, - `c66` varchar(30) DEFAULT NULL, - `c67` varchar(30) DEFAULT NULL, - `c68` varchar(30) DEFAULT NULL, - `c69` varchar(30) DEFAULT NULL, - `c70` varchar(30) DEFAULT NULL, - `c71` varchar(30) DEFAULT NULL, - `c72` varchar(30) DEFAULT NULL, - `c73` varchar(30) DEFAULT NULL, - `c74` varchar(30) DEFAULT NULL, - `c75` varchar(30) DEFAULT NULL, - `c76` varchar(30) DEFAULT NULL, - `c77` varchar(30) DEFAULT NULL, - `c78` varchar(30) DEFAULT NULL, - `c79` varchar(30) DEFAULT NULL, - `c80` varchar(30) DEFAULT NULL, - `c81` varchar(30) DEFAULT NULL, - `c82` varchar(30) DEFAULT NULL, - `c83` varchar(30) DEFAULT NULL, - `c84` varchar(30) DEFAULT NULL, - `c85` varchar(30) DEFAULT NULL, - `c86` varchar(30) DEFAULT NULL, - `c87` varchar(30) DEFAULT NULL, - `c88` varchar(30) DEFAULT NULL, - `c89` varchar(30) DEFAULT NULL, - `c90` varchar(30) DEFAULT NULL, - `c91` varchar(30) DEFAULT NULL, - `c92` varchar(30) DEFAULT NULL, - `c93` varchar(30) DEFAULT NULL, - `c94` varchar(30) DEFAULT NULL, - `c95` varchar(30) DEFAULT NULL, - `c96` varchar(30) DEFAULT NULL, - `c97` varchar(30) DEFAULT NULL, - `c98` varchar(30) DEFAULT NULL, - `c99` varchar(30) DEFAULT NULL, - `c100` varchar(30) DEFAULT NULL, - `c101` varchar(30) DEFAULT NULL, - `c102` varchar(30) DEFAULT NULL, - `c103` varchar(30) DEFAULT NULL, - `c104` varchar(30) DEFAULT NULL, - `c105` varchar(30) DEFAULT NULL, - `c106` varchar(30) DEFAULT NULL, - `c107` varchar(30) DEFAULT NULL, - `c108` varchar(30) DEFAULT NULL, - `c109` varchar(30) DEFAULT NULL, - `c110` varchar(30) DEFAULT NULL, - `c111` varchar(30) DEFAULT NULL, - `c112` varchar(30) DEFAULT NULL, - `c113` varchar(30) DEFAULT NULL, - `c114` varchar(30) DEFAULT NULL, - `c115` varchar(30) DEFAULT NULL, - `c116` varchar(30) DEFAULT NULL, - `c117` varchar(30) DEFAULT NULL, - `c118` varchar(30) DEFAULT NULL, - `c119` varchar(30) DEFAULT NULL, - `c120` varchar(30) DEFAULT NULL, - `c121` varchar(30) DEFAULT NULL, - `c122` varchar(30) DEFAULT NULL, - `c123` varchar(30) DEFAULT NULL, - `c124` varchar(30) DEFAULT NULL, - `c125` varchar(30) DEFAULT NULL, - `c126` varchar(30) DEFAULT NULL, - PRIMARY KEY (`c1`) -) ENGINE=InnoDB; +-- echo ### action: generating several tables with different metadata +-- echo ### sizes (resorting to perl) +-- perl +my $file= $ENV{'B50018_FILE'}; +open(FILE, ">", "$file") or die "Unable to open bug 50018 generated SQL file: $!" ; --- echo ### TABLE with field_metadata_size == 251 +my $tables= ""; +my $ntables= 10; +my $base_ncols= 124; -CREATE TABLE `t2` ( - `c1` float, - `c2` varchar(30) NOT NULL, - `c3` varchar(30) DEFAULT NULL, - `c4` varchar(30) DEFAULT NULL, - `c5` varchar(30) DEFAULT NULL, - `c6` varchar(30) DEFAULT NULL, - `c7` varchar(30) DEFAULT NULL, - `c8` varchar(30) DEFAULT NULL, - `c9` varchar(30) DEFAULT NULL, - `c10` varchar(30) DEFAULT NULL, - `c11` varchar(30) DEFAULT NULL, - `c12` varchar(30) DEFAULT NULL, - `c13` varchar(30) DEFAULT NULL, - `c14` varchar(30) DEFAULT NULL, - `c15` varchar(30) DEFAULT NULL, - `c16` varchar(30) DEFAULT NULL, - `c17` varchar(30) DEFAULT NULL, - `c18` varchar(30) DEFAULT NULL, - `c19` varchar(30) DEFAULT NULL, - `c20` varchar(30) DEFAULT NULL, - `c21` varchar(30) DEFAULT NULL, - `c22` varchar(30) DEFAULT NULL, - `c23` varchar(30) DEFAULT NULL, - `c24` varchar(30) DEFAULT NULL, - `c25` varchar(30) DEFAULT NULL, - `c26` varchar(30) DEFAULT NULL, - `c27` varchar(30) DEFAULT NULL, - `c28` varchar(30) DEFAULT NULL, - `c29` varchar(30) DEFAULT NULL, - `c30` varchar(30) DEFAULT NULL, - `c31` varchar(30) DEFAULT NULL, - `c32` varchar(30) DEFAULT NULL, - `c33` varchar(30) DEFAULT NULL, - `c34` varchar(30) DEFAULT NULL, - `c35` varchar(30) DEFAULT NULL, - `c36` varchar(30) DEFAULT NULL, - `c37` varchar(30) DEFAULT NULL, - `c38` varchar(30) DEFAULT NULL, - `c39` varchar(30) DEFAULT NULL, - `c40` varchar(30) DEFAULT NULL, - `c41` varchar(30) DEFAULT NULL, - `c42` varchar(30) DEFAULT NULL, - `c43` varchar(30) DEFAULT NULL, - `c44` varchar(30) DEFAULT NULL, - `c45` varchar(30) DEFAULT NULL, - `c46` varchar(30) DEFAULT NULL, - `c47` varchar(30) DEFAULT NULL, - `c48` varchar(30) DEFAULT NULL, - `c49` varchar(30) DEFAULT NULL, - `c50` varchar(30) DEFAULT NULL, - `c51` varchar(30) DEFAULT NULL, - `c52` varchar(30) DEFAULT NULL, - `c53` varchar(30) DEFAULT NULL, - `c54` varchar(30) DEFAULT NULL, - `c55` varchar(30) DEFAULT NULL, - `c56` varchar(30) DEFAULT NULL, - `c57` varchar(30) DEFAULT NULL, - `c58` varchar(30) DEFAULT NULL, - `c59` varchar(30) DEFAULT NULL, - `c60` varchar(30) DEFAULT NULL, - `c61` varchar(30) DEFAULT NULL, - `c62` varchar(30) DEFAULT NULL, - `c63` varchar(30) DEFAULT NULL, - `c64` varchar(30) DEFAULT NULL, - `c65` varchar(30) DEFAULT NULL, - `c66` varchar(30) DEFAULT NULL, - `c67` varchar(30) DEFAULT NULL, - `c68` varchar(30) DEFAULT NULL, - `c69` varchar(30) DEFAULT NULL, - `c70` varchar(30) DEFAULT NULL, - `c71` varchar(30) DEFAULT NULL, - `c72` varchar(30) DEFAULT NULL, - `c73` varchar(30) DEFAULT NULL, - `c74` varchar(30) DEFAULT NULL, - `c75` varchar(30) DEFAULT NULL, - `c76` varchar(30) DEFAULT NULL, - `c77` varchar(30) DEFAULT NULL, - `c78` varchar(30) DEFAULT NULL, - `c79` varchar(30) DEFAULT NULL, - `c80` varchar(30) DEFAULT NULL, - `c81` varchar(30) DEFAULT NULL, - `c82` varchar(30) DEFAULT NULL, - `c83` varchar(30) DEFAULT NULL, - `c84` varchar(30) DEFAULT NULL, - `c85` varchar(30) DEFAULT NULL, - `c86` varchar(30) DEFAULT NULL, - `c87` varchar(30) DEFAULT NULL, - `c88` varchar(30) DEFAULT NULL, - `c89` varchar(30) DEFAULT NULL, - `c90` varchar(30) DEFAULT NULL, - `c91` varchar(30) DEFAULT NULL, - `c92` varchar(30) DEFAULT NULL, - `c93` varchar(30) DEFAULT NULL, - `c94` varchar(30) DEFAULT NULL, - `c95` varchar(30) DEFAULT NULL, - `c96` varchar(30) DEFAULT NULL, - `c97` varchar(30) DEFAULT NULL, - `c98` varchar(30) DEFAULT NULL, - `c99` varchar(30) DEFAULT NULL, - `c100` varchar(30) DEFAULT NULL, - `c101` varchar(30) DEFAULT NULL, - `c102` varchar(30) DEFAULT NULL, - `c103` varchar(30) DEFAULT NULL, - `c104` varchar(30) DEFAULT NULL, - `c105` varchar(30) DEFAULT NULL, - `c106` varchar(30) DEFAULT NULL, - `c107` varchar(30) DEFAULT NULL, - `c108` varchar(30) DEFAULT NULL, - `c109` varchar(30) DEFAULT NULL, - `c110` varchar(30) DEFAULT NULL, - `c111` varchar(30) DEFAULT NULL, - `c112` varchar(30) DEFAULT NULL, - `c113` varchar(30) DEFAULT NULL, - `c114` varchar(30) DEFAULT NULL, - `c115` varchar(30) DEFAULT NULL, - `c116` varchar(30) DEFAULT NULL, - `c117` varchar(30) DEFAULT NULL, - `c118` varchar(30) DEFAULT NULL, - `c119` varchar(30) DEFAULT NULL, - `c120` varchar(30) DEFAULT NULL, - `c121` varchar(30) DEFAULT NULL, - `c122` varchar(30) DEFAULT NULL, - `c123` varchar(30) DEFAULT NULL, - `c124` varchar(30) DEFAULT NULL, - `c125` varchar(30) DEFAULT NULL, - `c126` varchar(30) DEFAULT NULL, - PRIMARY KEY (`c1`) -) ENGINE=InnoDB; +for my $i (1..$ntables) +{ + my $ncols= $base_ncols + $i; + my $metadata_size= $ncols_variable * 2 + 1; -LOCK TABLES `t1` WRITE; -INSERT INTO `t1` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'); + print FILE "-- echo ### testing table with " . ($base_ncols*2 + $i) . " field metadata size.\n"; + print FILE "CREATE TABLE t$i (\n"; + for my $n (1..$base_ncols) + { + print FILE "c$n VARCHAR(30) NOT NULL DEFAULT 'BUG#50018',\n"; + } + for my $n (1..$i) + { + print FILE "c" . ($base_ncols+$n) . " FLOAT NOT NULL DEFAULT 0"; + if ($n < $i) + { + print FILE ",\n"; + } + } -LOCK TABLES `t2` WRITE; -INSERT INTO `t2` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'); + print FILE ") Engine=InnoDB;\n"; -DROP TABLE `t1`; -DROP TABLE `t2`; + $tables.= " t$i WRITE"; + if ($i < $ntables) + { + $tables .=","; + } + + print FILE "LOCK TABLES t$i WRITE;\n"; + print FILE "INSERT INTO t$i(c". ($base_ncols+1) . ") VALUES (50018);\n"; +} + +close(FILE); + +EOF + +## we don't need this in the result file +## however, for debugging purposes you +## may want to reactivate query logging +-- disable_query_log +-- source $generated_sql +UNLOCK TABLES; +-- enable_query_log + +-- sync_slave_with_master +-- connection master FLUSH LOGS; --- sync_slave_with_master +-- let $ntables=10 +while($ntables) +{ + -- echo ### assertion: the slave replicated event successfully and tables match for t$ntables + -- let $diff_table_1=master:test.t$ntables + -- let $diff_table_2=slave:test.t$ntables + -- source include/diff_tables.inc --- connection master + -- connection master + -- disable_query_log + -- eval DROP TABLE t$ntables + -- enable_query_log + -- sync_slave_with_master + -- connection master --- echo === Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail. + -- dec $ntables +} +-- echo ### assertion: check that binlog is not corrupt. Using mysqlbinlog to +-- echo ### detect failure. Before the patch mysqlbinlog would find +-- echo ### a corrupted event, thence would fail. -- let $MYSQLD_DATADIR= `SELECT @@datadir`; --- exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug50018.binlog --- remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug50018.binlog +-- exec $MYSQL_BINLOG -v --hex $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug50018.binlog +## clean up +## For debugging purposes you might want not to remove these +-- remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug50018.binlog +-- remove_file $generated_sql -- source include/master-slave-end.inc From c1043021c81a4394b5aa9961d7106c437275b040 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Jan 2010 13:42:23 +0800 Subject: [PATCH 046/132] BUG #28421 Infinite loop on slave relay logs Manually deleteing one or more entries from 'master-bin.index', will cause master infinitely loop to send one binlog file. When starting a dump session, master opens index file and search the binlog file which is being requested by the slave. The position of the binlog file in the index file is recorded. it will be used to find the next binlog file when current binlog file has dumped completely. As only the position is used, it may not get the correct file if some entries has been removed manually from the index file. the master will reopen the current binlog file which has been dump completely and redump it if it can not get the next binlog file's name from index file. It obviously is a logical error. Even though it is allowed to manually change index file, but it is not recommended. so after this patch, master sends a fatal error to slave and close the dump session if a new binlog file has been generated and master can not get it from the index file. --- mysql-test/include/truncate_file.inc | 16 ++++ .../rpl/r/rpl_manual_change_index_file.result | 25 ++++++ .../rpl/t/rpl_manual_change_index_file.test | 85 +++++++++++++++++++ sql/sql_repl.cc | 9 +- 4 files changed, 132 insertions(+), 3 deletions(-) create mode 100644 mysql-test/include/truncate_file.inc create mode 100644 mysql-test/suite/rpl/r/rpl_manual_change_index_file.result create mode 100644 mysql-test/suite/rpl/t/rpl_manual_change_index_file.test diff --git a/mysql-test/include/truncate_file.inc b/mysql-test/include/truncate_file.inc new file mode 100644 index 00000000000..c82108681bd --- /dev/null +++ b/mysql-test/include/truncate_file.inc @@ -0,0 +1,16 @@ +# truncate a giving file, all contents of the file are be cleared + +if (`SELECT 'x$file' = 'x'`) +{ + --echo Please assign a file name to $file!! + exit; +} + +let TRUNCATE_FILE= $file; + +perl; +use Env; +Env::import('TRUNCATE_FILE'); +open FILE, '>', $TRUNCATE_FILE || die "Can not open file $file"; +close FILE; +EOF diff --git a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result new file mode 100644 index 00000000000..9061abca477 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result @@ -0,0 +1,25 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +FLUSH LOGS; +CREATE TABLE t1(c1 INT); +FLUSH LOGS; +call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log'); +Last_IO_Error +Got fatal error 1236 from master when reading data from binary log: 'could not find next log' +CREATE TABLE t2(c1 INT); +FLUSH LOGS; +CREATE TABLE t3(c1 INT); +FLUSH LOGS; +CREATE TABLE t4(c1 INT); +START SLAVE IO_THREAD; +SHOW TABLES; +Tables_in_test +t1 +t2 +t3 +t4 +DROP TABLE t1, t2, t3, t4; diff --git a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test new file mode 100644 index 00000000000..ba3dbd174f4 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test @@ -0,0 +1,85 @@ +source include/master-slave.inc; + +# +# BUG#28421 Infinite loop on slave relay logs +# +# That, manually deleteing one or more entries from 'master-bin.index', will +# cause master infinitely loop to send one binlog file. +# +# Manually changing index file is a illegal action, so when this happen, we +# send a fatal error to slave and close the dump session. + +FLUSH LOGS; +# Now, 2 entries in index file. +# ./master-bin.000001 +# ./master-bin.000002 + +CREATE TABLE t1(c1 INT); +# Now, the current dump file(master-bin.000002) is the second line of index +# file +sync_slave_with_master; +# Now, all events has been replicate to slave. As current dump file +# (master-bin.000002) is the last binlog file, so master is waiting for new +# events. + +connection master; +# Delete './master-bin.000001' from index file. +let $MYSQLD_DATADIR= `SELECT @@DATADIR`; +#remove_file $MYSQLD_DATADIR/master-bin.index; +let $file= $MYSQLD_DATADIR/master-bin.index; +source include/truncate_file.inc; + +if (`SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) NOT IN ('Win32', 'Win64', 'Windows')`) +{ +append_file $MYSQLD_DATADIR/master-bin.index; +./master-bin.000002 +EOF +sleep 0.00000001; +} + +if (`SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) IN ('Win32', 'Win64', 'Windows')`) +{ +append_file $MYSQLD_DATADIR/master-bin.index; +.\master-bin.000002 +EOF +sleep 0.00000001; +} + +# Now, only 1 entry in index file. +# ./master-bin.000002 + +# Generate master-bin.000003, but it is in the second line. +FLUSH LOGS; +# Now, 2 entries in index file. +# ./master-bin.000002 +# ./master-bin.000003 + +# Now, master know that new binlog file(master-bin.000003) has been generated. +# It expects that the new binlog file is in third line of index file, but +# there is no third line in index file. It is so strange that master sends an +# error to slave. +call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log'); +connection slave; +source include/wait_for_slave_io_to_stop.inc; +let $last_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1); +echo Last_IO_Error; +echo $last_error; + +connection master; +CREATE TABLE t2(c1 INT); +FLUSH LOGS; +CREATE TABLE t3(c1 INT); +FLUSH LOGS; +CREATE TABLE t4(c1 INT); + +connection slave; +START SLAVE IO_THREAD; +source include/wait_for_slave_io_to_start.inc; + +connection master; +sync_slave_with_master; +SHOW TABLES; + +connection master; +DROP TABLE t1, t2, t3, t4; +source include/master-slave-end.inc; diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index b8f2e1e39bf..de038f8dc2c 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -711,11 +711,14 @@ impossible position"; thd_proc_info(thd, "Finished reading one binlog; switching to next binlog"); switch (mysql_bin_log.find_next_log(&linfo, 1)) { - case LOG_INFO_EOF: - loop_breaker = (flags & BINLOG_DUMP_NON_BLOCK); - break; case 0: break; + case LOG_INFO_EOF: + if (mysql_bin_log.is_active(log_file_name)) + { + loop_breaker = (flags & BINLOG_DUMP_NON_BLOCK); + break; + } default: errmsg = "could not find next log"; my_errno= ER_MASTER_FATAL_ERROR_READING_BINLOG; From 4ae5679f4720c8c4a5d04b0c4c4661cad1076b2c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Jan 2010 23:32:40 +0800 Subject: [PATCH 047/132] Postfix Recover the right contents of the index file at the end of the test case. --- .../rpl/t/rpl_manual_change_index_file.test | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test index ba3dbd174f4..ecdf10ac2c2 100644 --- a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test +++ b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test @@ -25,7 +25,6 @@ sync_slave_with_master; connection master; # Delete './master-bin.000001' from index file. let $MYSQLD_DATADIR= `SELECT @@DATADIR`; -#remove_file $MYSQLD_DATADIR/master-bin.index; let $file= $MYSQLD_DATADIR/master-bin.index; source include/truncate_file.inc; @@ -45,8 +44,7 @@ EOF sleep 0.00000001; } -# Now, only 1 entry in index file. -# ./master-bin.000002 +# Now, only 1 entry in index file. ./master-bin.000002 # Generate master-bin.000003, but it is in the second line. FLUSH LOGS; @@ -66,6 +64,29 @@ echo Last_IO_Error; echo $last_error; connection master; + +source include/truncate_file.inc; + +if (`SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) NOT IN ('Win32', 'Win64', 'Windows')`) +{ +append_file $MYSQLD_DATADIR/master-bin.index; +./master-bin.000001 +./master-bin.000002 +./master-bin.000003 +EOF +sleep 0.00000001; +} + +if (`SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) IN ('Win32', 'Win64', 'Windows')`) +{ +append_file $MYSQLD_DATADIR/master-bin.index; +.\master-bin.000001 +.\master-bin.000002 +.\master-bin.000003 +EOF +sleep 0.00000001; +} + CREATE TABLE t2(c1 INT); FLUSH LOGS; CREATE TABLE t3(c1 INT); From 107f34ed77aad27b1fca24aaf048d1cbb28978b2 Mon Sep 17 00:00:00 2001 From: Gleb Shchepa Date: Mon, 11 Jan 2010 18:21:22 +0400 Subject: [PATCH 048/132] Bug #49955: ld error message: undefined reference to `strmov_overlapp' 32bit builds with the --enable-assembler flag (enabled by default) fail with an error message: undefined reference to `strmov_overlapp'. Since the fix for bug 48866 we use a home-grown strmov function instead of the ctpcpy function, but the source file for this function was missed in the Makefile.am. The strings/Makefile.am file has been modified to include strmov.c file into ASSEMBLER_x86 and ASSEMBLER_sparc32 sections. strings/Makefile.am: Bug #49955: ld error message: undefined reference to `strmov_overlapp' The strings/Makefile.am file has been modified to include strmov.c file into ASSEMBLER_x86 and ASSEMBLER_sparc32 sections. --- strings/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strings/Makefile.am b/strings/Makefile.am index f0d6585dee4..c4712792c69 100644 --- a/strings/Makefile.am +++ b/strings/Makefile.am @@ -21,13 +21,13 @@ pkglib_LIBRARIES = libmystrings.a # Exact one of ASSEMBLER_X if ASSEMBLER_x86 ASRCS = strings-x86.s longlong2str-x86.s my_strtoll10-x86.s -CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c str_alloc.c longlong2str_asm.c +CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c str_alloc.c longlong2str_asm.c strmov.c else if ASSEMBLER_sparc32 # These file MUST all be on the same line!! Otherwise automake # generats a very broken makefile ASRCS = bmove_upp-sparc.s strappend-sparc.s strend-sparc.s strinstr-sparc.s strmake-sparc.s strmov-sparc.s strnmov-sparc.s strstr-sparc.s -CSRCS = strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c strxmov.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c str_alloc.c +CSRCS = strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c strxmov.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c str_alloc.c strmov.c else #no assembler ASRCS = From 3c9322e73f5b994b7ec13ed73e99ce4bc94694b8 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Mon, 11 Jan 2010 19:23:36 +0100 Subject: [PATCH 049/132] Implement the change of RPM versioning and file naming: - "release" starts from 1 - "level" ("m2", "rc", ...) is included in the RPM version. --- support-files/Makefile.am | 3 ++- support-files/mysql.spec.sh | 14 ++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/support-files/Makefile.am b/support-files/Makefile.am index 77eddea3227..c78f08a39b3 100644 --- a/support-files/Makefile.am +++ b/support-files/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2000-2001, 2003-2006 MySQL AB +# Copyright (C) 2000-2006 MySQL AB, 2008-2010 Sun Microsystems, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public @@ -119,6 +119,7 @@ SUFFIXES = .sh -e 's!@''SHARED_LIB_VERSION''@!@SHARED_LIB_VERSION@!' \ -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \ -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \ + -e 's!@''MYSQL_U_SCORE_VERSION''@!@MYSQL_U_SCORE_VERSION@!' \ -e 's!@''MYSQL_COPYRIGHT_YEAR''@!@MYSQL_COPYRIGHT_YEAR@!' \ -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \ -e 's!@''PERL_DBI_VERSION''@!@PERL_DBI_VERSION@!' \ diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 8209c4560c6..6c586d21a3c 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -1,4 +1,4 @@ -# Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. +# Copyright 2000-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -51,9 +51,9 @@ %{!?_with_cluster:%define CLUSTER_BUILD 0} %if %{STATIC_BUILD} -%define release 0 +%define release 1 %else -%define release 0.glibc23 +%define release 1.glibc23 %endif %define mysql_license GPL %define mysqld_user mysql @@ -87,7 +87,7 @@ Name: MySQL Summary: MySQL: a very fast and reliable SQL database server Group: Applications/Databases -Version: @MYSQL_NO_DASH_VERSION@ +Version: @MYSQL_U_SCORE_VERSION@ Release: %{release} License: Copyright 2000-2008 MySQL AB, @MYSQL_COPYRIGHT_YEAR@ Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Under %{mysql_license} license as shown in the Description field. Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz @@ -882,6 +882,12 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Mon Jan 11 2010 Joerg Bruehe + +- Change RPM file naming: + - Suffix like "-m2", "-rc" becomes part of version as "_m2", "_rc". + - Release counts from 1, not 0. + * Mon Aug 24 2009 Jonathan Perkin - Add conditionals for bundled zlib and innodb plugin From 71465af9d40b85c38cebdeed393925302003785b Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Tue, 12 Jan 2010 12:41:18 +0100 Subject: [PATCH 050/132] Implement the change of RPM versioning and file naming: - "release" starts from 1 - "level" ("m2", "rc", ...) is included in the RPM version. --- configure.in | 13 ++++++++----- support-files/Makefile.am | 3 ++- support-files/mysql.spec.sh | 14 ++++++++++---- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/configure.in b/configure.in index b206dfbd079..405ebddadbe 100644 --- a/configure.in +++ b/configure.in @@ -30,12 +30,14 @@ NDB_VERSION_STATUS="" # Remember that regexps needs to quote [ and ] since this is run through m4 # We take some made up examples # -# VERSION 5.1.40sp1-alpha 5.0.34a -# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a -# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34 -# MYSQL_BASE_VERSION 5.1 5.0 -# MYSQL_VERSION_ID 50140 50034 +# VERSION 5.1.40sp1-alpha 5.0.34a 5.5.1-m2 +# MYSQL_U_SCORE_VERSION 5.1.40sp1_alpha 5.0.34a 5.5.1_m2 +# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a 5.5.1 +# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34 5.5.1 +# MYSQL_BASE_VERSION 5.1 5.0 5.5 +# MYSQL_VERSION_ID 50140 50034 50501 # +MYSQL_U_SCORE_VERSION=`echo $VERSION | sed -e "s|-|_|"` MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"` MYSQL_NUMERIC_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"` MYSQL_BASE_VERSION=`echo $MYSQL_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"` @@ -78,6 +80,7 @@ romanian russian serbian slovak spanish swedish ukrainian" ##### ##### +AC_SUBST(MYSQL_U_SCORE_VERSION) AC_SUBST(MYSQL_NO_DASH_VERSION) AC_SUBST(MYSQL_BASE_VERSION) AC_SUBST(MYSQL_VERSION_ID) diff --git a/support-files/Makefile.am b/support-files/Makefile.am index b9d6fde742a..4cb8bb4645d 100644 --- a/support-files/Makefile.am +++ b/support-files/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2000-2001, 2003-2006 MySQL AB +# Copyright (C) 2000-2006 MySQL AB, 2008-2010 Sun Microsystems, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public @@ -104,6 +104,7 @@ SUFFIXES = .sh -e 's!@''SHARED_LIB_VERSION''@!@SHARED_LIB_VERSION@!' \ -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \ -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \ + -e 's!@''MYSQL_U_SCORE_VERSION''@!@MYSQL_U_SCORE_VERSION@!' \ -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \ -e 's!@''PERL_DBI_VERSION''@!@PERL_DBI_VERSION@!' \ -e 's!@''PERL_DBD_VERSION''@!@PERL_DBD_VERSION@!' \ diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 584c0abc777..98f715da94d 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -1,4 +1,4 @@ -# Copyright (C) 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. +# Copyright (C) 2000-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,9 +28,9 @@ %{!?_with_yassl:%define YASSL_BUILD 0} %if %{STATIC_BUILD} -%define release 0 +%define release 1 %else -%define release 0.glibc23 +%define release 1.glibc23 %endif %define license GPL %define mysqld_user mysql @@ -64,7 +64,7 @@ Name: MySQL Summary: MySQL: a very fast and reliable SQL database server Group: Applications/Databases -Version: @MYSQL_NO_DASH_VERSION@ +Version: @MYSQL_U_SCORE_VERSION@ Release: %{release} License: %{license} Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz @@ -818,6 +818,12 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Mon Jan 11 2010 Joerg Bruehe + +- Change RPM file naming: + - Suffix like "-m2", "-rc" becomes part of version as "_m2", "_rc". + - Release counts from 1, not 0. + * Fri Nov 07 2008 Joerg Bruehe - Correct yesterday's fix, so that it also works for the last flag. From c8b5804f295ea109f56f29de8c350133f9070a6a Mon Sep 17 00:00:00 2001 From: Martin Hansson Date: Tue, 12 Jan 2010 15:16:26 +0100 Subject: [PATCH 051/132] Bug#48157: crash in Item_field::used_tables MySQL handles the join syntax "JOIN ... USING( field1, ... )" and natural joins by building the same parse tree as a corresponding join with an "ON t1.field1 = t2.field1 ..." expression would produce. This parse tree was not cleaned up properly in the following scenario. If a thread tries to lock some tables and finds that the tables were dropped and re-created while waiting for the lock, it cleans up column references in the statement by means a per-statement free list. But if the statement was part of a stored procedure, column references on the stored procedure's free list weren't cleaned up and thus contained pointers to freed objects. Fixed by adding a call to clean up the current prepared statement's free list. mysql-test/r/sp_sync.result: Bug#48157: Test case mysql-test/t/sp_sync.test: Bug#48157: Test result sql/item.h: Bug#48157: Commented field. sql/sql_parse.cc: Bug#48157: Commented function. sql/sql_update.cc: Bug#48157: fix --- mysql-test/r/sp_sync.result | 23 ++++++++++++++++ mysql-test/t/sp_sync.test | 55 +++++++++++++++++++++++++++++++++++++ sql/item.h | 7 +++++ sql/sql_parse.cc | 6 ++-- sql/sql_update.cc | 6 +++- 5 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 mysql-test/r/sp_sync.result create mode 100644 mysql-test/t/sp_sync.test diff --git a/mysql-test/r/sp_sync.result b/mysql-test/r/sp_sync.result new file mode 100644 index 00000000000..afa37e70531 --- /dev/null +++ b/mysql-test/r/sp_sync.result @@ -0,0 +1,23 @@ +Tests of syncronization of stored procedure execution. +# +# Bug#48157: crash in Item_field::used_tables +# +CREATE TABLE t1 AS SELECT 1 AS a, 1 AS b; +CREATE TABLE t2 AS SELECT 1 AS a, 1 AS b; +CREATE PROCEDURE p1() +BEGIN +UPDATE t1 JOIN t2 USING( a, b ) SET t1.b = 1, t2.b = 1; +END| +LOCK TABLES t1 WRITE, t2 WRITE; +SET DEBUG_SYNC = 'multi_update_reopen_tables SIGNAL parked WAIT_FOR go'; +CALL p1(); +DROP TABLE t1, t2; +SET DEBUG_SYNC = 'now WAIT_FOR parked'; +CREATE TABLE t1 AS SELECT 1 AS a, 1 AS b; +CREATE TABLE t2 AS SELECT 1 AS a, 1 AS b; +SET DEBUG_SYNC = 'now SIGNAL go'; +# Without the DEBUG_SYNC supplied in the same patch as this test in the +# code, this test statement will hang. +DROP TABLE t1, t2; +DROP PROCEDURE p1; +SET DEBUG_SYNC = 'RESET'; diff --git a/mysql-test/t/sp_sync.test b/mysql-test/t/sp_sync.test new file mode 100644 index 00000000000..98903989cd5 --- /dev/null +++ b/mysql-test/t/sp_sync.test @@ -0,0 +1,55 @@ +--echo Tests of syncronization of stored procedure execution. + +--source include/have_debug_sync.inc + +--echo # +--echo # Bug#48157: crash in Item_field::used_tables +--echo # + +CREATE TABLE t1 AS SELECT 1 AS a, 1 AS b; +CREATE TABLE t2 AS SELECT 1 AS a, 1 AS b; + +DELIMITER |; + +CREATE PROCEDURE p1() +BEGIN + UPDATE t1 JOIN t2 USING( a, b ) SET t1.b = 1, t2.b = 1; +END| + +DELIMITER ;| + +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); + +connection con1; +LOCK TABLES t1 WRITE, t2 WRITE; + +connection con2; +LET $ID= `select connection_id()`; +SET DEBUG_SYNC = 'multi_update_reopen_tables SIGNAL parked WAIT_FOR go'; +--send CALL p1() + +connection con1; +let $wait_condition= SELECT 1 FROM information_schema.processlist WHERE ID = $ID AND +state = "Locked"; +--source include/wait_condition.inc +DROP TABLE t1, t2; +SET DEBUG_SYNC = 'now WAIT_FOR parked'; +CREATE TABLE t1 AS SELECT 1 AS a, 1 AS b; +CREATE TABLE t2 AS SELECT 1 AS a, 1 AS b; +SET DEBUG_SYNC = 'now SIGNAL go'; + +connection con2; +--reap + +disconnect con1; +disconnect con2; +connection default; + +--echo # Without the DEBUG_SYNC supplied in the same patch as this test in the +--echo # code, this test statement will hang. +DROP TABLE t1, t2; +DROP PROCEDURE p1; + +SET DEBUG_SYNC = 'RESET'; + diff --git a/sql/item.h b/sql/item.h index 8f0e5874f3f..88e90924fcc 100644 --- a/sql/item.h +++ b/sql/item.h @@ -506,6 +506,13 @@ public: char * name; /* Name from select */ /* Original item name (if it was renamed)*/ char * orig_name; + /** + Intrusive list pointer for free list. If not null, points to the next + Item on some Query_arena's free list. For instance, stored procedures + have their own Query_arena's. + + @see Query_arena::free_list + */ Item *next; uint32 max_length; uint name_length; /* Length of name */ diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 69c9ddc7806..48743a2d48f 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -615,8 +615,10 @@ void free_items(Item *item) DBUG_VOID_RETURN; } -/* This works because items are allocated with sql_alloc() */ - +/** + This works because items are allocated with sql_alloc(). + @note The function also handles null pointers (empty list). +*/ void cleanup_items(Item *item) { DBUG_ENTER("cleanup_items"); diff --git a/sql/sql_update.cc b/sql/sql_update.cc index c988d746500..26f40c7fa9f 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -23,6 +23,7 @@ #include "sql_select.h" #include "sp_head.h" #include "sql_trigger.h" +#include "debug_sync.h" /* Return 0 if row hasn't changed */ @@ -1143,8 +1144,11 @@ reopen_tables: items from 'fields' list, so the cleanup above is necessary to. */ cleanup_items(thd->free_list); - + cleanup_items(thd->stmt_arena->free_list); close_tables_for_reopen(thd, &table_list); + + DEBUG_SYNC(thd, "multi_update_reopen_tables"); + goto reopen_tables; } From 71fd38e488d1d10210c9c5370f56d682d9884814 Mon Sep 17 00:00:00 2001 From: Gleb Shchepa Date: Wed, 13 Jan 2010 08:16:36 +0400 Subject: [PATCH 052/132] Bug #50096: CONCAT_WS inside procedure returning wrong data Selecting of the CONCAT_WS(......) result into a user variable may return wrong data. Item_func_concat_ws::val_str contains a number of memory allocation-saving optimization tricks. After the fix for bug 46815 the control flow has been changed to a branch that is commented as "This is quite uncommon!": one of places where we are trying to concatenate strings inplace. However, that "uncommon" place didn't care about PS parameters, that have another trick in Item_sp_variable::val_str(): they use the intermediate Item_sp_variable::str_value field, where they may store a reference to an external argument's buffer. The Item_func_concat_ws::val_str function has been modified to take into account val_str functions (such as Item_sp_variable::val_str) that return a pointer to an internal Item member variable that may reference to a buffer provided. mysql-test/r/func_concat.result: Added test case for bug #50096. mysql-test/t/func_concat.test: Added test case for bug #50096. sql/item_strfunc.cc: Bug #50096: CONCAT_WS inside procedure returning wrong data The Item_func_concat_ws::val_str function has been modified to take into account val_str functions (such as Item_sp_variable::val_str) that return a pointer to an internal Item member variable that may reference to a buffer provided. --- mysql-test/r/func_concat.result | 11 +++++++++++ mysql-test/t/func_concat.test | 13 +++++++++++++ sql/item_strfunc.cc | 4 ++-- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/func_concat.result b/mysql-test/r/func_concat.result index 75b4888fbb2..c4c2b46c6c2 100644 --- a/mysql-test/r/func_concat.result +++ b/mysql-test/r/func_concat.result @@ -1,4 +1,5 @@ DROP TABLE IF EXISTS t1; +DROP PROCEDURE IF EXISTS p1; CREATE TABLE t1 ( number INT NOT NULL, alpha CHAR(6) NOT NULL ); INSERT INTO t1 VALUES (1413006,'idlfmv'), (1413065,'smpsfz'),(1413127,'sljrhx'),(1413304,'qerfnd'); @@ -119,4 +120,14 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 index NULL PRIMARY 102 NULL 3 Using index 1 SIMPLE t1 eq_ref PRIMARY,a PRIMARY 318 func,const,const 1 DROP TABLE t1, t2; +# +# Bug #50096: CONCAT_WS inside procedure returning wrong data +# +CREATE PROCEDURE p1(a varchar(255), b int, c int) +SET @query = CONCAT_WS(",", a, b, c); +CALL p1("abcde", "0", "1234"); +SELECT @query; +@query +abcde,0,1234 +DROP PROCEDURE p1; # End of 5.1 tests diff --git a/mysql-test/t/func_concat.test b/mysql-test/t/func_concat.test index 1c7e5823fb2..e24b4354b61 100644 --- a/mysql-test/t/func_concat.test +++ b/mysql-test/t/func_concat.test @@ -4,6 +4,7 @@ --disable_warnings DROP TABLE IF EXISTS t1; +DROP PROCEDURE IF EXISTS p1; --enable_warnings CREATE TABLE t1 ( number INT NOT NULL, alpha CHAR(6) NOT NULL ); @@ -111,4 +112,16 @@ EXPLAIN SELECT CONCAT('gui_', t2.a), t1.d FROM t2 DROP TABLE t1, t2; +--echo # +--echo # Bug #50096: CONCAT_WS inside procedure returning wrong data +--echo # + +CREATE PROCEDURE p1(a varchar(255), b int, c int) + SET @query = CONCAT_WS(",", a, b, c); + +CALL p1("abcde", "0", "1234"); +SELECT @query; + +DROP PROCEDURE p1; + --echo # End of 5.1 tests diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index b6d3f45f4c2..ecd839d8378 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -677,8 +677,8 @@ String *Item_func_concat_ws::val_str(String *str) res->length() + sep_str->length() + res2->length()) { /* We have room in str; We can't get any errors here */ - if (str == res2) - { // This is quote uncommon! + if (str->ptr() == res2->ptr()) + { // This is quite uncommon! str->replace(0,0,*sep_str); str->replace(0,0,*res); } From 495810cd1f8ceb19e7126daa5ab92660c8f942b0 Mon Sep 17 00:00:00 2001 From: Ramil Kalimullin Date: Wed, 13 Jan 2010 09:20:45 +0400 Subject: [PATCH 053/132] Fix for bug#50227: Pre-auth buffer-overflow in mySQL through yaSSL Problem: copying issuer's (or subject's) name tags into an internal buffer from incoming stream we didn't check the buffer overflow. That may lead to memory overrun, crash etc. Fix: ensure we don't overrun the buffer. Note: there's no simple test case (exploit needed). extra/yassl/taocrypt/include/asn.hpp: Fix for bug#50227: Pre-auth buffer-overflow in mySQL through yaSSL - CertDecoder::AddTag() introduced. extra/yassl/taocrypt/src/asn.cpp: Fix for bug#50227: Pre-auth buffer-overflow in mySQL through yaSSL - copying data from incoming stream to the issuer_ or subject_ buffers ensure we don't overrun them. - code cleanup. --- extra/yassl/taocrypt/include/asn.hpp | 1 + extra/yassl/taocrypt/src/asn.cpp | 123 +++++++++++++++------------ 2 files changed, 69 insertions(+), 55 deletions(-) diff --git a/extra/yassl/taocrypt/include/asn.hpp b/extra/yassl/taocrypt/include/asn.hpp index 1c1850cb47e..168b8a8c755 100644 --- a/extra/yassl/taocrypt/include/asn.hpp +++ b/extra/yassl/taocrypt/include/asn.hpp @@ -305,6 +305,7 @@ private: bool ValidateSignature(SignerList*); bool ConfirmSignature(Source&); void GetKey(); + char* AddTag(char*, const char*, const char*, word32, word32); void GetName(NameType); void GetValidity(); void GetDate(DateType); diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp index 78200841bda..f87b466502e 100644 --- a/extra/yassl/taocrypt/src/asn.cpp +++ b/extra/yassl/taocrypt/src/asn.cpp @@ -652,6 +652,23 @@ word32 CertDecoder::GetDigest() } +char *CertDecoder::AddTag(char *ptr, const char *buf_end, + const char *tag_name, word32 tag_name_length, + word32 tag_value_length) +{ + if (ptr + tag_name_length + tag_value_length > buf_end) + return 0; + + memcpy(ptr, tag_name, tag_name_length); + ptr+= tag_name_length; + + memcpy(ptr, source_.get_current(), tag_value_length); + ptr+= tag_value_length; + + return ptr; +} + + // process NAME, either issuer or subject void CertDecoder::GetName(NameType nt) { @@ -659,11 +676,21 @@ void CertDecoder::GetName(NameType nt) SHA sha; word32 length = GetSequence(); // length of all distinguished names - assert (length < ASN_NAME_MAX); + + if (length >= ASN_NAME_MAX) + goto err; length += source_.get_index(); - char* ptr = (nt == ISSUER) ? issuer_ : subject_; - word32 idx = 0; + char *ptr, *buf_end; + + if (nt == ISSUER) { + ptr= issuer_; + buf_end= ptr + sizeof(issuer_) - 1; // 1 byte for trailing 0 + } + else { + ptr= subject_; + buf_end= ptr + sizeof(subject_) - 1; // 1 byte for trailing 0 + } while (source_.get_index() < length) { GetSet(); @@ -685,47 +712,36 @@ void CertDecoder::GetName(NameType nt) byte id = source_.next(); b = source_.next(); // strType word32 strLen = GetLength(source_); - bool copy = false; - if (id == COMMON_NAME) { - memcpy(&ptr[idx], "/CN=", 4); - idx += 4; - copy = true; - } - else if (id == SUR_NAME) { - memcpy(&ptr[idx], "/SN=", 4); - idx += 4; - copy = true; - } - else if (id == COUNTRY_NAME) { - memcpy(&ptr[idx], "/C=", 3); - idx += 3; - copy = true; - } - else if (id == LOCALITY_NAME) { - memcpy(&ptr[idx], "/L=", 3); - idx += 3; - copy = true; - } - else if (id == STATE_NAME) { - memcpy(&ptr[idx], "/ST=", 4); - idx += 4; - copy = true; - } - else if (id == ORG_NAME) { - memcpy(&ptr[idx], "/O=", 3); - idx += 3; - copy = true; - } - else if (id == ORGUNIT_NAME) { - memcpy(&ptr[idx], "/OU=", 4); - idx += 4; - copy = true; - } - - if (copy) { - memcpy(&ptr[idx], source_.get_current(), strLen); - idx += strLen; + switch (id) { + case COMMON_NAME: + if (!(ptr= AddTag(ptr, buf_end, "/CN=", 4, strLen))) + goto err; + break; + case SUR_NAME: + if (!(ptr= AddTag(ptr, buf_end, "/SN=", 4, strLen))) + goto err; + break; + case COUNTRY_NAME: + if (!(ptr= AddTag(ptr, buf_end, "/C=", 3, strLen))) + goto err; + break; + case LOCALITY_NAME: + if (!(ptr= AddTag(ptr, buf_end, "/L=", 3, strLen))) + goto err; + break; + case STATE_NAME: + if (!(ptr= AddTag(ptr, buf_end, "/ST=", 4, strLen))) + goto err; + break; + case ORG_NAME: + if (!(ptr= AddTag(ptr, buf_end, "/O=", 3, strLen))) + goto err; + break; + case ORGUNIT_NAME: + if (!(ptr= AddTag(ptr, buf_end, "/OU=", 4, strLen))) + goto err; + break; } sha.Update(source_.get_current(), strLen); @@ -739,23 +755,20 @@ void CertDecoder::GetName(NameType nt) source_.advance(oidSz + 1); word32 length = GetLength(source_); - if (email) { - memcpy(&ptr[idx], "/emailAddress=", 14); - idx += 14; - - memcpy(&ptr[idx], source_.get_current(), length); - idx += length; - } + if (email && !(ptr= AddTag(ptr, buf_end, "/emailAddress=", 14, length))) + goto err; source_.advance(length); } } - ptr[idx++] = 0; + *ptr= 0; - if (nt == ISSUER) - sha.Final(issuerHash_); - else - sha.Final(subjectHash_); + sha.Final(nt == ISSUER ? issuerHash_ : subjectHash_); + + return; + +err: + source_.SetError(CONTENT_E); } From 4dc7be62a997a0176e300878d4b5e93865606029 Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Wed, 13 Jan 2010 10:00:03 +0100 Subject: [PATCH 054/132] BUG#49222: Mark RAND() as unsafe Problem: When RAND() is binlogged in statement mode, the seed is binlogged too, so the replication slave generates the same sequence of random numbers. This makes replication work in many cases, but not in all cases: the order of rows is not guaranteed for, e.g., UPDATE or INSERT...SELECT statements, so the row data will be different if master and slave retrieve the rows in different orders. Fix: Mark RAND() as unsafe. It will generate a warning if binlog_format=STATEMENT and switch to row-logging if binlog_format=ROW. mysql-test/extra/rpl_tests/rpl_row_func003.test: updated test case to ignore new warnings mysql-test/suite/binlog/r/binlog_unsafe.result: updated result file mysql-test/suite/binlog/t/binlog_unsafe.test: Added test for RAND(). Also clarified some old comments. mysql-test/suite/rpl/r/rpl_misc_functions.result: updated result file mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result: updated test case to ignore new warnings mysql-test/suite/rpl/r/rpl_optimize.result: updated result file mysql-test/suite/rpl/r/rpl_row_func003.result: updated result file mysql-test/suite/rpl/t/rpl_misc_functions.test: updated test case to ignore new warnings mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test: updated test case to ignore new warnings mysql-test/suite/rpl/t/rpl_optimize.test: updated test case to ignore new warnings mysql-test/suite/rpl/t/rpl_trigger.test: updated test case to ignore new warnings mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result: updated result file sql/item_create.cc: Mark RAND() unsafe. --- .../extra/rpl_tests/rpl_row_func003.test | 6 +++++ .../suite/binlog/r/binlog_unsafe.result | 3 +++ mysql-test/suite/binlog/t/binlog_unsafe.test | 24 +++++++++++-------- .../suite/rpl/r/rpl_misc_functions.result | 1 + .../r/rpl_nondeterministic_functions.result | 1 + mysql-test/suite/rpl/r/rpl_optimize.result | 1 + mysql-test/suite/rpl/r/rpl_row_func003.result | 1 + .../suite/rpl/t/rpl_misc_functions.test | 8 +++++++ .../rpl/t/rpl_nondeterministic_functions.test | 4 ++++ mysql-test/suite/rpl/t/rpl_optimize.test | 4 +++- mysql-test/suite/rpl/t/rpl_trigger.test | 2 ++ .../suite/rpl_ndb/r/rpl_ndb_func003.result | 1 + sql/item_create.cc | 10 ++++++++ 13 files changed, 55 insertions(+), 11 deletions(-) diff --git a/mysql-test/extra/rpl_tests/rpl_row_func003.test b/mysql-test/extra/rpl_tests/rpl_row_func003.test index 8ee2d863527..b77465de39e 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_func003.test +++ b/mysql-test/extra/rpl_tests/rpl_row_func003.test @@ -18,6 +18,8 @@ # Vs slave. # ############################################################################# +CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); + # Begin clean up test section connection master; --disable_warnings @@ -43,10 +45,12 @@ RETURN tmp; END| delimiter ;| +--disable_warnings INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); sleep 6; INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); sleep 6; +--enable_warnings #Select in this test are used for debugging #select * from test.t1; @@ -56,7 +60,9 @@ sleep 6; connection master; SET AUTOCOMMIT=0; START TRANSACTION; +--disable_warnings INSERT INTO test.t1 VALUES (null,test.f1()); +--enable_warnings ROLLBACK; SET AUTOCOMMIT=1; #select * from test.t1; diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result index 8bbf993a727..6b2a83c9483 100644 --- a/mysql-test/suite/binlog/r/binlog_unsafe.result +++ b/mysql-test/suite/binlog/r/binlog_unsafe.result @@ -379,6 +379,9 @@ Note 1592 Statement may not be safe to log in statement format. INSERT INTO t1 VALUES (VERSION()); Warnings: Note 1592 Statement may not be safe to log in statement format. +INSERT INTO t1 VALUES (RAND()); +Warnings: +Note 1592 Statement may not be safe to log in statement format. DELETE FROM t1; SET TIMESTAMP=1000000; INSERT INTO t1 VALUES diff --git a/mysql-test/suite/binlog/t/binlog_unsafe.test b/mysql-test/suite/binlog/t/binlog_unsafe.test index 1acb4d090ca..5e399f3e602 100644 --- a/mysql-test/suite/binlog/t/binlog_unsafe.test +++ b/mysql-test/suite/binlog/t/binlog_unsafe.test @@ -47,6 +47,8 @@ # BUG#34768: nondeterministic INSERT using LIMIT logged in stmt mode if binlog_format=mixed # BUG#41980, SBL, INSERT .. SELECT .. LIMIT = ERROR, even when @@SQL_LOG_BIN is 0 # BUG#42640: mysqld crashes when unsafe statements are executed (STRICT_TRANS_TABLES mode) +# BUG#47995: Mark user functions as unsafe +# BUG#49222: Mare RAND() unsafe # # ==== Related test cases ==== # @@ -391,6 +393,7 @@ SET @@SESSION.SQL_MODE = @save_sql_mode; # # BUG#47995: Mark user functions as unsafe +# BUG#49222: Mare RAND() unsafe # # Test that the system functions that are supposed to be marked unsafe # generate a warning. Each INSERT statement below should generate a @@ -400,27 +403,28 @@ SET @@SESSION.SQL_MODE = @save_sql_mode; CREATE TABLE t1 (a VARCHAR(1000)); INSERT INTO t1 VALUES (CURRENT_USER()); #marked unsafe before BUG#47995 INSERT INTO t1 VALUES (FOUND_ROWS()); #marked unsafe before BUG#47995 -INSERT INTO t1 VALUES (GET_LOCK('tmp', 1)); -INSERT INTO t1 VALUES (IS_FREE_LOCK('tmp')); -INSERT INTO t1 VALUES (IS_USED_LOCK('tmp')); -INSERT INTO t1 VALUES (LOAD_FILE('../../std_data/words2.dat')); #marked unsafe before BUG#47995 +INSERT INTO t1 VALUES (GET_LOCK('tmp', 1)); #marked unsafe in BUG#47995 +INSERT INTO t1 VALUES (IS_FREE_LOCK('tmp')); #marked unsafe in BUG#47995 +INSERT INTO t1 VALUES (IS_USED_LOCK('tmp')); #marked unsafe in BUG#47995 +INSERT INTO t1 VALUES (LOAD_FILE('../../std_data/words2.dat')); #marked unsafe in BUG#39701 INSERT INTO t1 VALUES (MASTER_POS_WAIT('dummy arg', 4711, 1)); -INSERT INTO t1 VALUES (RELEASE_LOCK('tmp')); +INSERT INTO t1 VALUES (RELEASE_LOCK('tmp')); #marked unsafe in BUG#47995 INSERT INTO t1 VALUES (ROW_COUNT()); #marked unsafe before BUG#47995 INSERT INTO t1 VALUES (SESSION_USER()); #marked unsafe before BUG#47995 -INSERT INTO t1 VALUES (SLEEP(1)); -INSERT INTO t1 VALUES (SYSDATE()); +INSERT INTO t1 VALUES (SLEEP(1)); #marked unsafe in BUG#47995 +INSERT INTO t1 VALUES (SYSDATE()); #marked unsafe in BUG#47995 INSERT INTO t1 VALUES (SYSTEM_USER()); #marked unsafe before BUG#47995 INSERT INTO t1 VALUES (USER()); #marked unsafe before BUG#47995 INSERT INTO t1 VALUES (UUID()); #marked unsafe before BUG#47995 INSERT INTO t1 VALUES (UUID_SHORT()); #marked unsafe before BUG#47995 -INSERT INTO t1 VALUES (VERSION()); +INSERT INTO t1 VALUES (VERSION()); #marked unsafe in BUG#47995 +INSERT INTO t1 VALUES (RAND()); #marked unsafe in BUG#49222 DELETE FROM t1; # Since we replicate the TIMESTAMP variable, functions affected by the # TIMESTAMP variable are safe to replicate. So we check that the -# following following functions depend on the TIMESTAMP variable and -# don't generate a warning. +# following following functions that depend on the TIMESTAMP variable +# are not unsafe and don't generate a warning. SET TIMESTAMP=1000000; INSERT INTO t1 VALUES diff --git a/mysql-test/suite/rpl/r/rpl_misc_functions.result b/mysql-test/suite/rpl/r/rpl_misc_functions.result index 28b777822e4..6d69235927e 100644 --- a/mysql-test/suite/rpl/r/rpl_misc_functions.result +++ b/mysql-test/suite/rpl/r/rpl_misc_functions.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); create table t1(id int, i int, r1 int, r2 int, p varchar(100)); insert into t1 values(1, connection_id(), 0, 0, ""); insert into t1 values(2, 0, rand()*1000, rand()*1000, ""); diff --git a/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result b/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result index c4842a284cd..3b9b741e040 100644 --- a/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result +++ b/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); CREATE TABLE t1 (a VARCHAR(1000)); INSERT INTO t1 VALUES (CONNECTION_ID()); INSERT INTO t1 VALUES (CONNECTION_ID()); diff --git a/mysql-test/suite/rpl/r/rpl_optimize.result b/mysql-test/suite/rpl/r/rpl_optimize.result index 79891169fbc..1ae94a3ca36 100644 --- a/mysql-test/suite/rpl/r/rpl_optimize.result +++ b/mysql-test/suite/rpl/r/rpl_optimize.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); create table t1 (a int not null auto_increment primary key, b int, key(b)); INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); INSERT INTO t1 (a) SELECT null FROM t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_func003.result b/mysql-test/suite/rpl/r/rpl_row_func003.result index a5fd46a2ce3..94d01b50ce5 100644 --- a/mysql-test/suite/rpl/r/rpl_row_func003.result +++ b/mysql-test/suite/rpl/r/rpl_row_func003.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); DROP FUNCTION IF EXISTS test.f1; DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=INNODB; diff --git a/mysql-test/suite/rpl/t/rpl_misc_functions.test b/mysql-test/suite/rpl/t/rpl_misc_functions.test index d2e61d579e3..b84042160cd 100644 --- a/mysql-test/suite/rpl/t/rpl_misc_functions.test +++ b/mysql-test/suite/rpl/t/rpl_misc_functions.test @@ -3,12 +3,16 @@ # source include/master-slave.inc; +CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); + create table t1(id int, i int, r1 int, r2 int, p varchar(100)); insert into t1 values(1, connection_id(), 0, 0, ""); # don't put rand and password in the same query, to see if they replicate # independently # Pure rand test +--disable_warnings insert into t1 values(2, 0, rand()*1000, rand()*1000, ""); +--enable_warnings # change the rand suite on the master (we do this because otherwise password() # benefits from the fact that the above rand() is well replicated : # it picks the same sequence element, which hides a possible bug in password() replication. @@ -19,7 +23,9 @@ set sql_log_bin=1; # Pure password test insert into t1 values(3, 0, 0, 0, password('does_this_work?')); # "altogether now" +--disable_warnings insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?')); +--enable_warnings select * into outfile 'rpl_misc_functions.outfile' from t1; let $MYSQLD_DATADIR= `select @@datadir`; sync_slave_with_master; @@ -73,11 +79,13 @@ DELIMITER ;| # Exercise the functions and procedures then compare the results on # the master to those on the slave. +--disable_warnings CALL test_replication_sp1(); CALL test_replication_sp2(); INSERT INTO t1 (col_a) VALUES (test_replication_sf()); INSERT INTO t1 (col_a) VALUES (test_replication_sf()); INSERT INTO t1 (col_a) VALUES (test_replication_sf()); +--enable_warnings --sync_slave_with_master diff --git a/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test b/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test index a30eb3be374..9ff2e2d081e 100644 --- a/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test +++ b/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test @@ -17,6 +17,8 @@ --source include/master-slave.inc +CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); + CREATE TABLE t1 (a VARCHAR(1000)); # We replicate the connection_id in the query_log_event @@ -41,7 +43,9 @@ INSERT INTO t1 VALUES (UTC_TIMESTAMP()); # We replicate the random seed in a rand_log_event +--disable_warnings INSERT INTO t1 VALUES (RAND()); +--enable_warnings # We replicate the last_insert_id in an intvar_log_event INSERT INTO t1 VALUES (LAST_INSERT_ID()); diff --git a/mysql-test/suite/rpl/t/rpl_optimize.test b/mysql-test/suite/rpl/t/rpl_optimize.test index f4582ba1167..87eb9dce818 100644 --- a/mysql-test/suite/rpl/t/rpl_optimize.test +++ b/mysql-test/suite/rpl/t/rpl_optimize.test @@ -13,6 +13,8 @@ -- source include/not_ndb_default.inc -- source include/master-slave.inc +CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); + create table t1 (a int not null auto_increment primary key, b int, key(b)); INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); INSERT INTO t1 (a) SELECT null FROM t1; @@ -30,8 +32,8 @@ INSERT INTO t1 (a) SELECT null FROM t1; INSERT INTO t1 (a) SELECT null FROM t1; save_master_pos; # a few updates to force OPTIMIZE to do something -update t1 set b=(a/2*rand()); --disable_warnings +update t1 set b=(a/2*rand()); delete from t1 order by b limit 10000; --enable_warnings diff --git a/mysql-test/suite/rpl/t/rpl_trigger.test b/mysql-test/suite/rpl/t/rpl_trigger.test index 4b40fbea719..e296da01bad 100644 --- a/mysql-test/suite/rpl/t/rpl_trigger.test +++ b/mysql-test/suite/rpl/t/rpl_trigger.test @@ -40,10 +40,12 @@ insert into t3 values(100,"log",0,0,0); SET @@RAND_SEED1=658490765, @@RAND_SEED2=635893186; # Emulate that we have rows 2-9 deleted on the slave +--disable_warnings insert into t1 values(1,1,rand()),(NULL,2,rand()); insert into t2 (b) values(last_insert_id()); insert into t2 values(3,0),(NULL,0); insert into t2 values(NULL,0),(500,0); +--enable_warnings select a,b, truncate(rand_value,4) from t1; select * from t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result index ad72a3fb244..7e750f2ce2a 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); DROP FUNCTION IF EXISTS test.f1; DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=NDB; diff --git a/sql/item_create.cc b/sql/item_create.cc index 53aa8081da1..c309ccc06ca 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -4178,6 +4178,16 @@ Create_func_rand::create_native(THD *thd, LEX_STRING name, if (item_list != NULL) arg_count= item_list->elements; + /* + When RAND() is binlogged, the seed is binlogged too. So the + sequence of random numbers is the same on a replication slave as + on the master. However, if several RAND() values are inserted + into a table, the order in which the rows are modified may differ + between master and slave, because the order is undefined. Hence, + the statement is unsafe to log in statement format. + */ + thd->lex->set_stmt_unsafe(); + switch (arg_count) { case 0: { From c4ec2de72413235d5f4027758d9601b74223b01c Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Wed, 13 Jan 2010 12:43:07 +0200 Subject: [PATCH 055/132] version change --- .bzr-mysql/default.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bzr-mysql/default.conf b/.bzr-mysql/default.conf index f044f8e62da..e613cefc614 100644 --- a/.bzr-mysql/default.conf +++ b/.bzr-mysql/default.conf @@ -1,4 +1,4 @@ [MYSQL] post_commit_to = "commits@lists.mysql.com" post_push_to = "commits@lists.mysql.com" -tree_name = "mysql-5.1" +tree_name = "mysql-5.1-bugteam" From b3dd4d9486ca00e555823f81185fe9db83a44db5 Mon Sep 17 00:00:00 2001 From: Kristofer Pettersson Date: Wed, 13 Jan 2010 12:39:00 +0100 Subject: [PATCH 056/132] Bug#33982 debug assertion and crash reloading grant tables after sighup or kill In certain rare cases when a process was interrupted during a FLUSH PRIVILEGES operation the diagnostic area would be set to an error state but the function responsible for the operation would still signal success. This would lead to a debug assertion error later on when the server would attempt to reset the DA before sending the error message. This patch fixes the issue by assuring that reload_acl_and_cache() always fails if an error condition is raised. The second issue was that a KILL could cause a console error message which referred to a DA state without first making sure that such a state existed. This patch fixes this issue in two different palces by first checking DA state before fetching the error message. sql/sql_acl.cc: * Make sure that there is an error to print before attempting to do so. * Minor style change: change 1 to TRUE for clarity. sql/sql_parse.cc: * Always fail reload_acl_and_cache() if the query was killed. sql/sql_servers.cc: * Make sure that there is an error to print before attempting to do so. --- sql/sql_acl.cc | 15 ++++++++++----- sql/sql_parse.cc | 9 ++++++--- sql/sql_servers.cc | 10 ++++++++-- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 7d8f8ea71b3..7ba1a657578 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -310,7 +310,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) { TABLE *table; READ_RECORD read_record_info; - my_bool return_val= 1; + my_bool return_val= TRUE; bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE; char tmp_name[NAME_LEN+1]; int password_length; @@ -623,7 +623,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) init_check_host(); initialized=1; - return_val=0; + return_val= FALSE; end: thd->variables.sql_mode= old_sql_mode; @@ -674,7 +674,7 @@ my_bool acl_reload(THD *thd) DYNAMIC_ARRAY old_acl_hosts,old_acl_users,old_acl_dbs; MEM_ROOT old_mem; bool old_initialized; - my_bool return_val= 1; + my_bool return_val= TRUE; DBUG_ENTER("acl_reload"); if (thd->locked_tables) @@ -701,8 +701,13 @@ my_bool acl_reload(THD *thd) if (simple_open_n_lock_tables(thd, tables)) { - sql_print_error("Fatal error: Can't open and lock privilege tables: %s", - thd->main_da.message()); + /* + Execution might have been interrupted; only print the error message + if an error condition has been raised. + */ + if (thd->main_da.is_error()) + sql_print_error("Fatal error: Can't open and lock privilege tables: %s", + thd->main_da.message()); goto end; } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 69c9ddc7806..2c466d31e7c 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6787,13 +6787,13 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables, thd->store_globals(); lex_start(thd); } - + if (thd) { bool reload_acl_failed= acl_reload(thd); bool reload_grants_failed= grant_reload(thd); bool reload_servers_failed= servers_reload(thd); - + if (reload_acl_failed || reload_grants_failed || reload_servers_failed) { result= 1; @@ -6949,7 +6949,10 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables, if (options & REFRESH_USER_RESOURCES) reset_mqh((LEX_USER *) NULL, 0); /* purecov: inspected */ *write_to_binlog= tmp_write_to_binlog; - return result; + /* + If the query was killed then this function must fail. + */ + return result || thd->killed; } diff --git a/sql/sql_servers.cc b/sql/sql_servers.cc index f8a8dea18ff..1655426bb4a 100644 --- a/sql/sql_servers.cc +++ b/sql/sql_servers.cc @@ -241,8 +241,14 @@ bool servers_reload(THD *thd) if (simple_open_n_lock_tables(thd, tables)) { - sql_print_error("Can't open and lock privilege tables: %s", - thd->main_da.message()); + /* + Execution might have been interrupted; only print the error message + if an error condition has been raised. + */ + if (thd->main_da.is_error()) + sql_print_error("Can't open and lock privilege tables: %s", + thd->main_da.message()); + return_val= FALSE; goto end; } From 7ecd6c6d0269d1b8580f87cbdda1924d7ab0d499 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Thu, 14 Jan 2010 10:24:02 +0200 Subject: [PATCH 057/132] version change --- .bzr-mysql/default.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bzr-mysql/default.conf b/.bzr-mysql/default.conf index 557df1b1ffe..f79c1cd6319 100644 --- a/.bzr-mysql/default.conf +++ b/.bzr-mysql/default.conf @@ -1,4 +1,4 @@ [MYSQL] post_commit_to = "commits@lists.mysql.com" post_push_to = "commits@lists.mysql.com" -tree_name = "mysql-5.0-bugteam" +tree_name = "mysql-5.0" From 5ae7b3c99634609b2890253590ccf82c5fb4f085 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Thu, 14 Jan 2010 10:49:40 +0000 Subject: [PATCH 058/132] BUG#50018: binlog corruption when table has many columns Small fix in the test case. Changed the UNLOCK tables to happen after each insert. --- mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test index 022988d7ee3..be5ebb661ca 100644 --- a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test +++ b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test @@ -290,6 +290,7 @@ for my $i (1..$ntables) print FILE "LOCK TABLES t$i WRITE;\n"; print FILE "INSERT INTO t$i(c". ($base_ncols+1) . ") VALUES (50018);\n"; + print FILE "UNLOCK TABLES;"; } close(FILE); @@ -301,7 +302,6 @@ EOF ## may want to reactivate query logging -- disable_query_log -- source $generated_sql -UNLOCK TABLES; -- enable_query_log -- sync_slave_with_master From 32aa612819ff756b284e639de50627b3d6d7fa0d Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Thu, 14 Jan 2010 14:26:51 +0000 Subject: [PATCH 059/132] Fix for BUG#49481 and BUG#49482. BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on delete: cant find record BUG#49482: RBR: Replication may break on deletes when MyISAM tables + char field are used When using MyISAM tables, despite the fact that the null bit is set for some fields, their old value is still in the row. This can cause the comparison of records to fail when the slave is doing an index or range scan. We fix this by avoiding memcmp for MyISAM tables when comparing records. Additionally, when comparing field by field, we first check if both fields are not null and if so, then we compare them. If just one field is null we return failure immediately. If both fields are null, we move on to the next field. --- .../suite/rpl/r/rpl_myisam_null_values.result | 24 +++++++++ .../suite/rpl/t/rpl_myisam_null_values.test | 53 +++++++++++++++++++ sql/log_event.cc | 39 +++++++++++++- sql/log_event_old.cc | 39 +++++++++++++- 4 files changed, 153 insertions(+), 2 deletions(-) create mode 100644 mysql-test/suite/rpl/r/rpl_myisam_null_values.result create mode 100644 mysql-test/suite/rpl/t/rpl_myisam_null_values.test diff --git a/mysql-test/suite/rpl/r/rpl_myisam_null_values.result b/mysql-test/suite/rpl/r/rpl_myisam_null_values.result new file mode 100644 index 00000000000..574528a8d79 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_myisam_null_values.result @@ -0,0 +1,24 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (c1 BIT, c2 INT); +INSERT INTO `t1` VALUES ( 1, 1 ); +UPDATE t1 SET c1=NULL where c2=1; +Comparing tables master:test.t1 and slave:test.t1 +DELETE FROM t1 WHERE c2=1 LIMIT 1; +Comparing tables master:test.t1 and slave:test.t1 +DROP TABLE t1; +CREATE TABLE t1 (c1 CHAR); +INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; +SELECT * FROM t1; +c1 +w +# should trigger switch to row due to LIMIT +UPDATE t1 SET c1=NULL WHERE c1='w' LIMIT 2; +Comparing tables master:test.t1 and slave:test.t1 +DELETE FROM t1 LIMIT 2; +Comparing tables master:test.t1 and slave:test.t1 +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/t/rpl_myisam_null_values.test b/mysql-test/suite/rpl/t/rpl_myisam_null_values.test new file mode 100644 index 00000000000..d9ec95fc510 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_myisam_null_values.test @@ -0,0 +1,53 @@ +# BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on delete cant find record +# BUG#49482: RBR: Replication may break on deletes when MyISAM tables + char field are used + +-- source include/master-slave.inc +-- source include/have_binlog_format_mixed_or_row.inc + +-- connection master +CREATE TABLE t1 (c1 BIT, c2 INT); +INSERT INTO `t1` VALUES ( 1, 1 ); +UPDATE t1 SET c1=NULL where c2=1; +-- sync_slave_with_master + +-- let $diff_table_1=master:test.t1 +-- let $diff_table_2=slave:test.t1 +-- source include/diff_tables.inc + +-- connection master +DELETE FROM t1 WHERE c2=1 LIMIT 1; +-- sync_slave_with_master + +-- let $diff_table_1=master:test.t1 +-- let $diff_table_2=slave:test.t1 +-- source include/diff_tables.inc + +-- connection master +DROP TABLE t1; +-- sync_slave_with_master + +-- connection master + +CREATE TABLE t1 (c1 CHAR); + +INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; +SELECT * FROM t1; +-- echo # should trigger switch to row due to LIMIT +UPDATE t1 SET c1=NULL WHERE c1='w' LIMIT 2; +-- sync_slave_with_master + +-- let $diff_table_1=master:test.t1 +-- let $diff_table_2=slave:test.t1 +-- source include/diff_tables.inc + +-- connection master +DELETE FROM t1 LIMIT 2; +-- sync_slave_with_master + +-- let $diff_table_1=master:test.t1 +-- let $diff_table_2=slave:test.t1 +-- source include/diff_tables.inc + +-- connection master +DROP TABLE t1; +-- sync_slave_with_master diff --git a/sql/log_event.cc b/sql/log_event.cc index 6b21087b6aa..61f5e93e29e 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -8724,6 +8724,24 @@ static bool record_compare(TABLE *table) } } + /** + Check if we are using MyISAM. + + If this is a myisam table, then we cannot do a memcmp + right away because some NULL fields can still contain + an old value in the row - they are not shown to the user + because the null bit is set, however, the contents are + not cleared. As such, plain memory comparison cannot be + assured to work. See: BUG#49482 and BUG#49481. + + On top of this, we do not store field contents for null + fields in the binlog, so this is extra important when + comparing records fetched from binlog and from storage + engine. + */ + if (table->file->ht->db_type == DB_TYPE_MYISAM) + goto record_compare_field_by_field; + if (table->s->blob_fields + table->s->varchar_fields == 0) { result= cmp_record(table,record[1]); @@ -8739,14 +8757,33 @@ static bool record_compare(TABLE *table) goto record_compare_exit; } +record_compare_field_by_field: + /* Compare updated fields */ for (Field **ptr=table->field ; *ptr ; ptr++) { - if ((*ptr)->cmp_binary_offset(table->s->rec_buff_length)) + Field *f= *ptr; + + /* if just one of the fields is null then there is no match */ + if ((f->is_null_in_record(table->record[0])) == + !(f->is_null_in_record(table->record[1]))) { result= TRUE; goto record_compare_exit; } + + /* if both fields are not null then we can compare */ + if (!(f->is_null_in_record(table->record[0])) && + !(f->is_null_in_record(table->record[1]))) + { + if (f->cmp_binary_offset(table->s->rec_buff_length)) + { + result= TRUE; + goto record_compare_exit; + } + } + + /* if both fields are null then there is a match. compare next field */ } record_compare_exit: diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc index 357bc78b1cd..72a6e159535 100644 --- a/sql/log_event_old.cc +++ b/sql/log_event_old.cc @@ -351,6 +351,24 @@ static bool record_compare(TABLE *table) } } + /** + Check if we are using MyISAM. + + If this is a myisam table, then we cannot do a memcmp + right away because some NULL fields can still contain + an old value in the row - they are not shown to the user + because the null bit is set, however, the contents are + not cleared. As such, plain memory comparison cannot be + assured to work. See: BUG#49482 and BUG#49481. + + On top of this, we do not store field contents for null + fields in the binlog, so this is extra important when + comparing records fetched from binlog and from storage + engine. + */ + if (table->file->ht->db_type == DB_TYPE_MYISAM) + goto record_compare_field_by_field; + if (table->s->blob_fields + table->s->varchar_fields == 0) { result= cmp_record(table,record[1]); @@ -366,14 +384,33 @@ static bool record_compare(TABLE *table) goto record_compare_exit; } +record_compare_field_by_field: + /* Compare updated fields */ for (Field **ptr=table->field ; *ptr ; ptr++) { - if ((*ptr)->cmp_binary_offset(table->s->rec_buff_length)) + Field *f= *ptr; + + /* if just one of the fields is null then there is no match */ + if ((f->is_null_in_record(table->record[0])) == + !(f->is_null_in_record(table->record[1]))) { result= TRUE; goto record_compare_exit; } + + /* if both fields are not null then we can compare */ + if (!(f->is_null_in_record(table->record[0])) && + !(f->is_null_in_record(table->record[1]))) + { + if (f->cmp_binary_offset(table->s->rec_buff_length)) + { + result= TRUE; + goto record_compare_exit; + } + } + + /* if both fields are null then there is a match. compare next field */ } record_compare_exit: From 85c1e30375ec7c3aa9755d44d13bd4e0281c218b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Jan 2010 10:35:35 +0100 Subject: [PATCH 060/132] Raise version number after cloning 5.0.90 --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 405ebddadbe..503bf660b2c 100644 --- a/configure.in +++ b/configure.in @@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb -AM_INIT_AUTOMAKE(mysql, 5.0.90) +AM_INIT_AUTOMAKE(mysql, 5.0.91) AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 @@ -23,7 +23,7 @@ NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0 # ndb version NDB_VERSION_MAJOR=5 NDB_VERSION_MINOR=0 -NDB_VERSION_BUILD=90 +NDB_VERSION_BUILD=91 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? From 7a7147c5b4cca1bfd1bfbecd4883d3968526b162 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Fri, 15 Jan 2010 16:09:20 +0200 Subject: [PATCH 061/132] Bug #46175: NULL read_view and consistent read assertion The optimizer must not continue executing the current query if e.g. the storage engine reports an error. This is somewhat hard to implement with Item::val_xxx() because they do not have means to return error code. This is why we need to check the thread's error state after a call to one of the Item::val_xxx() methods. Fixed store_key_item::copy_inner() to return an error state if an error happened during the call to Item::save_in_field() because it calls Item::val_xxx(). Also added similar checks to related places. --- sql/item.cc | 2 +- sql/sql_select.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sql/item.cc b/sql/item.cc index b35a6ae3d6e..68c10c32b50 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -5141,7 +5141,7 @@ int Item::save_in_field(Field *field, bool no_conversions) field->set_notnull(); error=field->store(nr, unsigned_flag); } - return error; + return error ? error : (field->table->in_use->is_error() ? 2 : 0); } diff --git a/sql/sql_select.h b/sql/sql_select.h index c9cd3ecba42..dd99d358bac 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -709,6 +709,12 @@ public: my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set); int res= item->save_in_field(to_field, 1); + /* + Item::save_in_field() may call Item::val_xxx(). And if this is a subquery + we need to check for errors executing it and react accordingly + */ + if (!res && table->in_use->is_error()) + res= 2; dbug_tmp_restore_column_map(table->write_set, old_map); null_key= to_field->is_null() || item->null_value; return (err != 0 || res > 2 ? STORE_KEY_FATAL : (store_key_result) res); @@ -742,6 +748,12 @@ protected: if (!err) err= res; } + /* + Item::save_in_field() may call Item::val_xxx(). And if this is a subquery + we need to check for errors executing it and react accordingly + */ + if (!err && to_field->table->in_use->is_error()) + err= 2; } null_key= to_field->is_null() || item->null_value; return (err > 2 ? STORE_KEY_FATAL : (store_key_result) err); From 2fdaf377a2ff60147c2545f7fbc3c1b43635b1f4 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Jan 2010 18:03:48 +0100 Subject: [PATCH 062/132] Raise version number after cloning 5.1.43 --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 38eb511ac18..e939194697b 100644 --- a/configure.in +++ b/configure.in @@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM # # When changing major version number please also check switch statement # in mysqlbinlog::check_master_version(). -AM_INIT_AUTOMAKE(mysql, 5.1.43) +AM_INIT_AUTOMAKE(mysql, 5.1.44) AM_CONFIG_HEADER([include/config.h:config.h.in]) # Request support for automake silent-rules if available. From 377d710296c3b0c85ea4cdc018d1d8e08bfa022a Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 16 Jan 2010 15:44:24 +0800 Subject: [PATCH 063/132] BUG#47418 RBR fails, failure with mixup of base/temporary/view 'CREATE TABLE IF NOT EXISTS ... SELECT' statement were causing 'CREATE TEMPORARY TABLE ...' to be written to the binary log in row-based mode (a.k.a. RBR), when there was a temporary table with the same name. Because the 'CREATE TABLE ... SELECT' statement was executed as 'INSERT ... SELECT' into the temporary table. Since in RBR mode no other statements related to temporary tables are written into binary log, this sometimes broke replication. This patch changes behavior of 'CREATE TABLE [IF NOT EXISTS] ... SELECT ...'. it ignores existence of temporary table with the same name as table being created and is interpreted as attempt to create/insert into base table. This makes behavior of 'CREATE TABLE [IF NOT EXISTS] ... SELECT' consistent with how ordinary 'CREATE TABLE' and 'CREATE TABLE ... LIKE' behave. --- mysql-test/r/create.result | 7 +-- mysql-test/r/ps_ddl.result | 8 +-- .../rpl/r/rpl_create_if_not_exists.result | 34 ++++++++++++ .../suite/rpl/t/rpl_create_if_not_exists.test | 53 +++++++++++++++++++ mysql-test/t/create.test | 9 ++-- mysql-test/t/ps_ddl.test | 9 ++-- sql/sql_parse.cc | 2 + sql/sql_prepare.cc | 2 + 8 files changed, 106 insertions(+), 18 deletions(-) diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index b829ef30fb1..cfdf2565c9c 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -820,16 +820,13 @@ i drop table t1; create temporary table t1 (j int); create table if not exists t1 select 1; -Warnings: -Note 1050 Table 't1' already exists select * from t1; j -1 drop temporary table t1; select * from t1; -ERROR 42S02: Table 'test.t1' doesn't exist +1 +1 drop table t1; -ERROR 42S02: Unknown table 't1' create table t1 (i int); insert into t1 values (1), (2); lock tables t1 read; diff --git a/mysql-test/r/ps_ddl.result b/mysql-test/r/ps_ddl.result index c7e8812320c..375f31ef9c4 100644 --- a/mysql-test/r/ps_ddl.result +++ b/mysql-test/r/ps_ddl.result @@ -1695,23 +1695,23 @@ SUCCESS drop table t2; create temporary table t2 (a int); execute stmt; -ERROR 42S01: Table 't2' already exists call p_verify_reprepare_count(1); SUCCESS execute stmt; ERROR 42S01: Table 't2' already exists -call p_verify_reprepare_count(0); +call p_verify_reprepare_count(1); SUCCESS drop temporary table t2; execute stmt; -call p_verify_reprepare_count(1); +ERROR 42S01: Table 't2' already exists +call p_verify_reprepare_count(0); SUCCESS drop table t2; execute stmt; -call p_verify_reprepare_count(0); +call p_verify_reprepare_count(1); SUCCESS drop table t2; diff --git a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result index 12a956a6ce6..fc53aca5136 100644 --- a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result +++ b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result @@ -31,3 +31,37 @@ SHOW EVENTS in mysqltest; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation mysqltest e root@localhost SYSTEM ONE TIME # NULL NULL NULL NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci DROP DATABASE IF EXISTS mysqltest; +-------------BUG#47418------------- +USE test; +DROP TABLE IF EXISTS t3; +CREATE TABLE t3(c1 INTEGER); +INSERT INTO t3 VALUES(33); +CREATE TEMPORARY TABLE t1(c1 INTEGER); +CREATE TEMPORARY TABLE t2(c1 INTEGER); +INSERT INTO t1 VALUES(1); +INSERT INTO t2 VALUES(1); +CREATE TABLE IF NOT EXISTS t1(c1 INTEGER) SELECT c1 FROM t3; +CREATE TABLE t2(c1 INTEGER) SELECT c1 FROM t3; +SELECT * FROM t1; +c1 +1 +SELECT * FROM t2; +c1 +1 +SELECT * FROM t1; +c1 +33 +SELECT * FROM t2; +c1 +33 +DROP TEMPORARY TABLE t1; +DROP TEMPORARY TABLE t2; +SELECT * FROM t1; +c1 +33 +SELECT * FROM t2; +c1 +33 +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; diff --git a/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test b/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test index 5faf95a4d84..114f71af873 100644 --- a/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test +++ b/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test @@ -67,4 +67,57 @@ SHOW EVENTS in mysqltest; connection master; DROP DATABASE IF EXISTS mysqltest; + +# +# BUG#47418 RBR fails, failure with mixup of base/temporary/view TABLE DDL +# +# Before the patch for this bug, 'CREATE TABLE IF NOT EXIST ... SELECT' +# statement was binlogged as a TEMPORARY table if the object existed as +# a temporary table. This was caused by that the temporary table was opened +# and the results of the 'SELECT' was inserted into the temporary table if +# a temporary table existed with the same name. +# +# After the patch for this bug, the base table is created and the results of +# the 'SELECT' are inserted into it, even though a temporary table exists with +# the same name, and the statement is still binlogged as a base table. +# + +echo -------------BUG#47418-------------; +connection master; +USE test; +DROP TABLE IF EXISTS t3; +--enable_warnings +CREATE TABLE t3(c1 INTEGER); +INSERT INTO t3 VALUES(33); + +CREATE TEMPORARY TABLE t1(c1 INTEGER); +CREATE TEMPORARY TABLE t2(c1 INTEGER); +INSERT INTO t1 VALUES(1); +INSERT INTO t2 VALUES(1); + +CREATE TABLE IF NOT EXISTS t1(c1 INTEGER) SELECT c1 FROM t3; +CREATE TABLE t2(c1 INTEGER) SELECT c1 FROM t3; + +# In these two statements, t1 and t2 are the temporary table. there is only +# value '1' in them. The records of t2 are not inserted into them. +SELECT * FROM t1; +SELECT * FROM t2; +sync_slave_with_master; + +# In these two statements, t1 and t2 are the base table. The recoreds of t2 +# are inserted into it when CREATE TABLE ... SELECT was executed. +SELECT * FROM t1; +SELECT * FROM t2; + +connection master; +DROP TEMPORARY TABLE t1; +DROP TEMPORARY TABLE t2; +#In these two statements, t1 and t2 are the base table. +SELECT * FROM t1; +SELECT * FROM t2; + +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; + source include/master-slave-end.inc; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 5ffa1b93929..692721b5955 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -721,16 +721,15 @@ drop table t1; # Base vs temporary tables dillema (a.k.a. bug#24508 "Inconsistent # results of CREATE TABLE ... SELECT when temporary table exists"). # In this situation we either have to create non-temporary table and -# insert data in it or insert data in temporary table without creation -# of permanent table. Since currently temporary tables always shadow -# permanent tables we adopt second approach. +# insert data in it or insert data in temporary table without creation of +# permanent table. After patch for Bug#47418, we create the base table and +# instert data into it, even though a temporary table exists with the same +# name. create temporary table t1 (j int); create table if not exists t1 select 1; select * from t1; drop temporary table t1; ---error ER_NO_SUCH_TABLE select * from t1; ---error ER_BAD_TABLE_ERROR drop table t1; diff --git a/mysql-test/t/ps_ddl.test b/mysql-test/t/ps_ddl.test index fee235cd36c..1543c757908 100644 --- a/mysql-test/t/ps_ddl.test +++ b/mysql-test/t/ps_ddl.test @@ -1445,18 +1445,19 @@ call p_verify_reprepare_count(0); drop table t2; # Temporary table with name of table to be created exists create temporary table t2 (a int); +# Temporary table and base table are not in the same name space. +execute stmt; +call p_verify_reprepare_count(1); --error ER_TABLE_EXISTS_ERROR execute stmt; call p_verify_reprepare_count(1); +drop temporary table t2; --error ER_TABLE_EXISTS_ERROR execute stmt; call p_verify_reprepare_count(0); -drop temporary table t2; -execute stmt; -call p_verify_reprepare_count(1); drop table t2; execute stmt; -call p_verify_reprepare_count(0); +call p_verify_reprepare_count(1); drop table t2; # View with name of table to be created exists # Attention: diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index eaea6e55b09..c3070c4a756 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2659,6 +2659,8 @@ mysql_execute_command(THD *thd) { lex->link_first_table_back(create_table, link_to_local); create_table->create= TRUE; + /* Base table and temporary table are not in the same name space. */ + create_table->skip_temporary= 1; } if (!(res= open_and_lock_tables(thd, lex->query_tables))) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index e2a24f7da1e..5979f2ca17e 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1596,6 +1596,8 @@ static bool mysql_test_create_table(Prepared_statement *stmt) { lex->link_first_table_back(create_table, link_to_local); create_table->create= TRUE; + /* Base table and temporary table are not in the same name space. */ + create_table->skip_temporary= true; } if (open_normal_and_derived_tables(stmt->thd, lex->query_tables, 0)) From 5ba1dd04748561ae2a9942f9f228c8c6a52de72b Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Mon, 18 Jan 2010 17:50:46 +0200 Subject: [PATCH 064/132] Bug #45989 take 2 : memory leak after explain encounters an error in the query. Fixes a leak after materializing a GROUP BY subquery to a temp table when the subquery has a blob column in the SELECT list. Fixed by correctly destructing temporary buffers after doing the conversion. --- mysql-test/r/subselect.result | 12 ++++++++++++ mysql-test/t/subselect.test | 17 +++++++++++++++++ sql/sql_select.cc | 2 ++ 3 files changed, 31 insertions(+) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index f446d8feec3..99d1f18b010 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4602,4 +4602,16 @@ SELECT 1 FROM t1 GROUP BY 1 1 DROP TABLE t1; +# +# Bug #45989 take 2 : memory leak after explain encounters an +# error in the query +# +CREATE TABLE t1(a LONGTEXT); +INSERT INTO t1 VALUES (repeat('a',@@global.max_allowed_packet)); +INSERT INTO t1 VALUES (repeat('b',@@global.max_allowed_packet)); +EXPLAIN EXTENDED SELECT DISTINCT 1 FROM t1, +(SELECT DISTINCTROW a AS away FROM t1 GROUP BY a WITH ROLLUP) AS d1 +WHERE t1.a = d1.a; +ERROR 42S22: Unknown column 'd1.a' in 'where clause' +DROP TABLE t1; End of 5.1 tests. diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index a4314c45cba..eca86de1e82 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -3585,4 +3585,21 @@ SELECT 1 FROM t1 GROUP BY (SELECT LAST_INSERT_ID() FROM t1 ORDER BY MIN(a) ASC LIMIT 1); DROP TABLE t1; +--echo # +--echo # Bug #45989 take 2 : memory leak after explain encounters an +--echo # error in the query +--echo # + +CREATE TABLE t1(a LONGTEXT); +INSERT INTO t1 VALUES (repeat('a',@@global.max_allowed_packet)); +INSERT INTO t1 VALUES (repeat('b',@@global.max_allowed_packet)); + +--error ER_BAD_FIELD_ERROR +EXPLAIN EXTENDED SELECT DISTINCT 1 FROM t1, +(SELECT DISTINCTROW a AS away FROM t1 GROUP BY a WITH ROLLUP) AS d1 +WHERE t1.a = d1.a; + +DROP TABLE t1; + + --echo End of 5.1 tests. diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 644f0072b7b..24876ffec14 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5824,6 +5824,8 @@ JOIN::make_simple_join(JOIN *parent, TABLE *tmp_table) const_table_map= 0; tmp_table_param.field_count= tmp_table_param.sum_func_count= tmp_table_param.func_count= 0; + if (tmp_table_param.copy_field) + delete [] tmp_table_param.copy_field; tmp_table_param.copy_field= tmp_table_param.copy_field_end=0; first_record= sort_and_group=0; send_records= (ha_rows) 0; From eab2be0aeed0459c505578a716f8b0ae88a8f365 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Mon, 18 Jan 2010 17:49:18 +0100 Subject: [PATCH 065/132] Bug#47343: InnoDB fails to clean-up after lock wait timeout on REORGANIZE PARTITION There were several problems which lead to this this, all related to bad error handling. 1) There was several bugs preventing the ddl-log to be used for cleaning up created files on error. 2) The error handling after the copy partition rows did not close and unlock the tables, resulting in deletion of partitions which were in use, which lead InnoDB to put the partition to drop in a background queue. sql/ha_partition.cc: Bug#47343: InnoDB fails to clean-up after lock wait timeout on REORGANIZE PARTITION Better error handling, if partition has been created/opened/locked then make sure it is unlocked and closed before returning error. The delete of the newly created partition is handled by the ddl-log. sql/sql_parse.cc: Bug#47343: InnoDB fails to clean-up after lock wait timeout on REORGANIZE PARTITION Fix a bug found when experimenting, thd could really be NULL here, as mentioned in the function header. sql/sql_partition.cc: Bug#47343: InnoDB fails to clean-up after lock wait timeout on REORGANIZE PARTITION Used the correct .frm shadow name to put into the ddl-log. Really use the ddl-log to handle errors. sql/sql_table.cc: Bug#47343: InnoDB fails to clean-up after lock wait timeout on REORGANIZE PARTITION Fixes of the ddl-log when used as error recovery (no crash). When executing an entry from memory (not read from disk) the name_len was not set correctly. --- mysql-test/r/partition_innodb.result | 44 ++++++++++++++++ mysql-test/t/partition_innodb-master.opt | 1 + mysql-test/t/partition_innodb.test | 45 ++++++++++++++++- sql/ha_partition.cc | 64 +++++++++++++++++------- sql/sql_parse.cc | 2 +- sql/sql_partition.cc | 8 ++- sql/sql_table.cc | 23 +++++++-- 7 files changed, 158 insertions(+), 29 deletions(-) create mode 100644 mysql-test/t/partition_innodb-master.opt diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index b8cfa25349d..f2f6ef138ff 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -274,3 +274,47 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB PARTITION BY list(a) (PARTITION p1 VALUES IN (1)); CREATE INDEX i1 ON t1 (a); DROP TABLE t1; +# +# Bug#47343: InnoDB fails to clean-up after lock wait timeout on +# REORGANIZE PARTITION +# +CREATE TABLE t1 ( +a INT, +b DATE NOT NULL, +PRIMARY KEY (a, b) +) ENGINE=InnoDB +PARTITION BY RANGE (a) ( +PARTITION pMAX VALUES LESS THAN MAXVALUE +) ; +INSERT INTO t1 VALUES (1, '2001-01-01'), (2, '2002-02-02'), (3, '2003-03-03'); +START TRANSACTION; +SELECT * FROM t1 FOR UPDATE; +a b +1 2001-01-01 +2 2002-02-02 +3 2003-03-03 +# Connection con1 +ALTER TABLE t1 REORGANIZE PARTITION pMAX INTO +(PARTITION p3 VALUES LESS THAN (3), +PARTITION pMAX VALUES LESS THAN MAXVALUE); +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SHOW WARNINGS; +Level Code Message +Error 1205 Lock wait timeout exceeded; try restarting transaction +ALTER TABLE t1 REORGANIZE PARTITION pMAX INTO +(PARTITION p3 VALUES LESS THAN (3), +PARTITION pMAX VALUES LESS THAN MAXVALUE); +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SHOW WARNINGS; +Level Code Message +Error 1205 Lock wait timeout exceeded; try restarting transaction +t1.frm +t1.par +# Connection default +SELECT * FROM t1; +a b +1 2001-01-01 +2 2002-02-02 +3 2003-03-03 +COMMIT; +DROP TABLE t1; diff --git a/mysql-test/t/partition_innodb-master.opt b/mysql-test/t/partition_innodb-master.opt new file mode 100644 index 00000000000..462f8fbe828 --- /dev/null +++ b/mysql-test/t/partition_innodb-master.opt @@ -0,0 +1 @@ +--innodb_lock_wait_timeout=1 diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index aba28b76f01..b7fe4477a13 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -5,6 +5,8 @@ drop table if exists t1; --enable_warnings +let $MYSQLD_DATADIR= `SELECT @@datadir`; + # # Bug#47029: Crash when reorganize partition with subpartition # @@ -296,6 +298,47 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB PARTITION BY list(a) (PARTITION p1 VALUES IN (1)); CREATE INDEX i1 ON t1 (a); DROP TABLE t1; -let $MYSQLD_DATADIR= `SELECT @@datadir`; + # Before the fix it should show extra file like #sql-2405_2.par --list_files $MYSQLD_DATADIR/test/ * + +--echo # +--echo # Bug#47343: InnoDB fails to clean-up after lock wait timeout on +--echo # REORGANIZE PARTITION +--echo # +CREATE TABLE t1 ( + a INT, + b DATE NOT NULL, + PRIMARY KEY (a, b) +) ENGINE=InnoDB +PARTITION BY RANGE (a) ( + PARTITION pMAX VALUES LESS THAN MAXVALUE +) ; + +INSERT INTO t1 VALUES (1, '2001-01-01'), (2, '2002-02-02'), (3, '2003-03-03'); + +START TRANSACTION; +SELECT * FROM t1 FOR UPDATE; + +connect (con1, localhost, root,,); +--echo # Connection con1 +--error ER_LOCK_WAIT_TIMEOUT +ALTER TABLE t1 REORGANIZE PARTITION pMAX INTO +(PARTITION p3 VALUES LESS THAN (3), + PARTITION pMAX VALUES LESS THAN MAXVALUE); +SHOW WARNINGS; +--error ER_LOCK_WAIT_TIMEOUT +ALTER TABLE t1 REORGANIZE PARTITION pMAX INTO +(PARTITION p3 VALUES LESS THAN (3), + PARTITION pMAX VALUES LESS THAN MAXVALUE); +SHOW WARNINGS; + +#Contents of the 'test' database directory: +--list_files $MYSQLD_DATADIR/test + +disconnect con1; +connection default; +--echo # Connection default +SELECT * FROM t1; +COMMIT; +DROP TABLE t1; diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index b854e270029..555a0b97ddd 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1215,17 +1215,28 @@ int ha_partition::prepare_new_partition(TABLE *tbl, partition_element *p_elem) { int error; - bool create_flag= FALSE; DBUG_ENTER("prepare_new_partition"); if ((error= set_up_table_before_create(tbl, part_name, create_info, 0, p_elem))) - goto error; + goto error_create; if ((error= file->ha_create(part_name, tbl, create_info))) - goto error; - create_flag= TRUE; + { + /* + Added for safety, InnoDB reports HA_ERR_FOUND_DUPP_KEY + if the table/partition already exists. + If we return that error code, then print_error would try to + get_dup_key on a non-existing partition. + So return a more reasonable error code. + */ + if (error == HA_ERR_FOUND_DUPP_KEY) + error= HA_ERR_TABLE_EXIST; + goto error_create; + } + DBUG_PRINT("info", ("partition %s created", part_name)); if ((error= file->ha_open(tbl, part_name, m_mode, m_open_test_lock))) - goto error; + goto error_open; + DBUG_PRINT("info", ("partition %s opened", part_name)); /* Note: if you plan to add another call that may return failure, better to do it before external_lock() as cleanup_new_partition() @@ -1233,12 +1244,15 @@ int ha_partition::prepare_new_partition(TABLE *tbl, Otherwise see description for cleanup_new_partition(). */ if ((error= file->ha_external_lock(ha_thd(), m_lock_type))) - goto error; + goto error_external_lock; + DBUG_PRINT("info", ("partition %s external locked", part_name)); DBUG_RETURN(0); -error: - if (create_flag) - VOID(file->ha_delete_table(part_name)); +error_external_lock: + VOID(file->close()); +error_open: + VOID(file->ha_delete_table(part_name)); +error_create: DBUG_RETURN(error); } @@ -1272,19 +1286,23 @@ error: void ha_partition::cleanup_new_partition(uint part_count) { - handler **save_m_file= m_file; DBUG_ENTER("ha_partition::cleanup_new_partition"); - if (m_added_file && m_added_file[0]) + if (m_added_file) { - m_file= m_added_file; + THD *thd= ha_thd(); + handler **file= m_added_file; + while ((part_count > 0) && (*file)) + { + (*file)->ha_external_lock(thd, F_UNLCK); + (*file)->close(); + + /* Leave the (*file)->ha_delete_table(part_name) to the ddl-log */ + + file++; + part_count--; + } m_added_file= NULL; - - external_lock(ha_thd(), F_UNLCK); - /* delete_table also needed, a bit more complex */ - close(); - - m_file= save_m_file; } DBUG_VOID_RETURN; } @@ -1590,7 +1608,15 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info, part_elem->part_state= PART_TO_BE_DROPPED; } m_new_file= new_file_array; - DBUG_RETURN(copy_partitions(copied, deleted)); + if ((error= copy_partitions(copied, deleted))) + { + /* + Close and unlock the new temporary partitions. + They will later be deleted through the ddl-log. + */ + cleanup_new_partition(part_count); + } + DBUG_RETURN(error); } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index eaea6e55b09..7eabc1887f9 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6954,7 +6954,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables, /* If the query was killed then this function must fail. */ - return result || thd->killed; + return result || (thd ? thd->killed : 0); } diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index e0697f563ea..441adc9ddd9 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -5708,8 +5708,7 @@ static bool write_log_drop_partition(ALTER_PARTITION_PARAM_TYPE *lpt) part_info->first_log_entry= NULL; build_table_filename(path, sizeof(path) - 1, lpt->db, lpt->table_name, "", 0); - build_table_filename(tmp_path, sizeof(tmp_path) - 1, lpt->db, - lpt->table_name, "#", 0); + build_table_shadow_filename(tmp_path, sizeof(tmp_path) - 1, lpt); pthread_mutex_lock(&LOCK_gdl); if (write_log_dropped_partitions(lpt, &next_entry, (const char*)path, FALSE)) @@ -5765,8 +5764,7 @@ static bool write_log_add_change_partition(ALTER_PARTITION_PARAM_TYPE *lpt) build_table_filename(path, sizeof(path) - 1, lpt->db, lpt->table_name, "", 0); - build_table_filename(tmp_path, sizeof(tmp_path) - 1, lpt->db, - lpt->table_name, "#", 0); + build_table_shadow_filename(tmp_path, sizeof(tmp_path) - 1, lpt); pthread_mutex_lock(&LOCK_gdl); if (write_log_dropped_partitions(lpt, &next_entry, (const char*)path, FALSE)) @@ -5991,7 +5989,7 @@ void handle_alter_part_error(ALTER_PARTITION_PARAM_TYPE *lpt, partition_info *part_info= lpt->part_info; DBUG_ENTER("handle_alter_part_error"); - if (!part_info->first_log_entry && + if (part_info->first_log_entry && execute_ddl_log_entry(current_thd, part_info->first_log_entry->entry_pos)) { diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 3b7354111ba..0e36ecfcb46 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -647,7 +647,7 @@ static bool read_ddl_log_file_entry(uint entry_no) Write one entry from ddl log file SYNOPSIS write_ddl_log_file_entry() - entry_no Entry number to read + entry_no Entry number to write RETURN VALUES TRUE Error FALSE Success @@ -748,10 +748,10 @@ static uint read_ddl_log_header() else successful_open= TRUE; } - entry_no= uint4korr(&file_entry_buf[DDL_LOG_NUM_ENTRY_POS]); - global_ddl_log.name_len= uint4korr(&file_entry_buf[DDL_LOG_NAME_LEN_POS]); if (successful_open) { + entry_no= uint4korr(&file_entry_buf[DDL_LOG_NUM_ENTRY_POS]); + global_ddl_log.name_len= uint4korr(&file_entry_buf[DDL_LOG_NAME_LEN_POS]); global_ddl_log.io_size= uint4korr(&file_entry_buf[DDL_LOG_IO_SIZE_POS]); DBUG_ASSERT(global_ddl_log.io_size <= sizeof(global_ddl_log.file_entry_buf)); @@ -832,6 +832,7 @@ static bool init_ddl_log() goto end; global_ddl_log.io_size= IO_SIZE; + global_ddl_log.name_len= FN_LEN; create_ddl_log_file_name(file_name); if ((global_ddl_log.file_id= my_create(file_name, CREATE_MODE, @@ -884,6 +885,13 @@ static int execute_ddl_log_action(THD *thd, DDL_LOG_ENTRY *ddl_log_entry) { DBUG_RETURN(FALSE); } + DBUG_PRINT("ddl_log", + ("execute type %c next %u name '%s' from_name '%s' handler '%s'", + ddl_log_entry->action_type, + ddl_log_entry->next_entry, + ddl_log_entry->name, + ddl_log_entry->from_name, + ddl_log_entry->handler_name)); handler_name.str= (char*)ddl_log_entry->handler_name; handler_name.length= strlen(ddl_log_entry->handler_name); init_sql_alloc(&mem_root, TABLE_ALLOC_BLOCK_SIZE, 0); @@ -1091,6 +1099,15 @@ bool write_ddl_log_entry(DDL_LOG_ENTRY *ddl_log_entry, DBUG_RETURN(TRUE); } error= FALSE; + DBUG_PRINT("ddl_log", + ("write type %c next %u name '%s' from_name '%s' handler '%s'", + (char) global_ddl_log.file_entry_buf[DDL_LOG_ACTION_TYPE_POS], + ddl_log_entry->next_entry, + (char*) &global_ddl_log.file_entry_buf[DDL_LOG_NAME_POS], + (char*) &global_ddl_log.file_entry_buf[DDL_LOG_NAME_POS + + FN_LEN], + (char*) &global_ddl_log.file_entry_buf[DDL_LOG_NAME_POS + + (2*FN_LEN)])); if (write_ddl_log_file_entry((*active_entry)->entry_pos)) { error= TRUE; From d1d16f9c3f4310f3ab11fc85b47866d79243a471 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Tue, 19 Jan 2010 00:10:00 +0000 Subject: [PATCH 066/132] Fix for BUG#49481 and BUG#49482 reverted. PB2 run uncovered issue that needs further analysis. --- .../suite/rpl/r/rpl_myisam_null_values.result | 24 --------- .../suite/rpl/t/rpl_myisam_null_values.test | 53 ------------------- sql/log_event.cc | 39 +------------- sql/log_event_old.cc | 39 +------------- 4 files changed, 2 insertions(+), 153 deletions(-) delete mode 100644 mysql-test/suite/rpl/r/rpl_myisam_null_values.result delete mode 100644 mysql-test/suite/rpl/t/rpl_myisam_null_values.test diff --git a/mysql-test/suite/rpl/r/rpl_myisam_null_values.result b/mysql-test/suite/rpl/r/rpl_myisam_null_values.result deleted file mode 100644 index 574528a8d79..00000000000 --- a/mysql-test/suite/rpl/r/rpl_myisam_null_values.result +++ /dev/null @@ -1,24 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE t1 (c1 BIT, c2 INT); -INSERT INTO `t1` VALUES ( 1, 1 ); -UPDATE t1 SET c1=NULL where c2=1; -Comparing tables master:test.t1 and slave:test.t1 -DELETE FROM t1 WHERE c2=1 LIMIT 1; -Comparing tables master:test.t1 and slave:test.t1 -DROP TABLE t1; -CREATE TABLE t1 (c1 CHAR); -INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; -SELECT * FROM t1; -c1 -w -# should trigger switch to row due to LIMIT -UPDATE t1 SET c1=NULL WHERE c1='w' LIMIT 2; -Comparing tables master:test.t1 and slave:test.t1 -DELETE FROM t1 LIMIT 2; -Comparing tables master:test.t1 and slave:test.t1 -DROP TABLE t1; diff --git a/mysql-test/suite/rpl/t/rpl_myisam_null_values.test b/mysql-test/suite/rpl/t/rpl_myisam_null_values.test deleted file mode 100644 index d9ec95fc510..00000000000 --- a/mysql-test/suite/rpl/t/rpl_myisam_null_values.test +++ /dev/null @@ -1,53 +0,0 @@ -# BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on delete cant find record -# BUG#49482: RBR: Replication may break on deletes when MyISAM tables + char field are used - --- source include/master-slave.inc --- source include/have_binlog_format_mixed_or_row.inc - --- connection master -CREATE TABLE t1 (c1 BIT, c2 INT); -INSERT INTO `t1` VALUES ( 1, 1 ); -UPDATE t1 SET c1=NULL where c2=1; --- sync_slave_with_master - --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 --- source include/diff_tables.inc - --- connection master -DELETE FROM t1 WHERE c2=1 LIMIT 1; --- sync_slave_with_master - --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 --- source include/diff_tables.inc - --- connection master -DROP TABLE t1; --- sync_slave_with_master - --- connection master - -CREATE TABLE t1 (c1 CHAR); - -INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; -SELECT * FROM t1; --- echo # should trigger switch to row due to LIMIT -UPDATE t1 SET c1=NULL WHERE c1='w' LIMIT 2; --- sync_slave_with_master - --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 --- source include/diff_tables.inc - --- connection master -DELETE FROM t1 LIMIT 2; --- sync_slave_with_master - --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 --- source include/diff_tables.inc - --- connection master -DROP TABLE t1; --- sync_slave_with_master diff --git a/sql/log_event.cc b/sql/log_event.cc index 61f5e93e29e..6b21087b6aa 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -8724,24 +8724,6 @@ static bool record_compare(TABLE *table) } } - /** - Check if we are using MyISAM. - - If this is a myisam table, then we cannot do a memcmp - right away because some NULL fields can still contain - an old value in the row - they are not shown to the user - because the null bit is set, however, the contents are - not cleared. As such, plain memory comparison cannot be - assured to work. See: BUG#49482 and BUG#49481. - - On top of this, we do not store field contents for null - fields in the binlog, so this is extra important when - comparing records fetched from binlog and from storage - engine. - */ - if (table->file->ht->db_type == DB_TYPE_MYISAM) - goto record_compare_field_by_field; - if (table->s->blob_fields + table->s->varchar_fields == 0) { result= cmp_record(table,record[1]); @@ -8757,33 +8739,14 @@ static bool record_compare(TABLE *table) goto record_compare_exit; } -record_compare_field_by_field: - /* Compare updated fields */ for (Field **ptr=table->field ; *ptr ; ptr++) { - Field *f= *ptr; - - /* if just one of the fields is null then there is no match */ - if ((f->is_null_in_record(table->record[0])) == - !(f->is_null_in_record(table->record[1]))) + if ((*ptr)->cmp_binary_offset(table->s->rec_buff_length)) { result= TRUE; goto record_compare_exit; } - - /* if both fields are not null then we can compare */ - if (!(f->is_null_in_record(table->record[0])) && - !(f->is_null_in_record(table->record[1]))) - { - if (f->cmp_binary_offset(table->s->rec_buff_length)) - { - result= TRUE; - goto record_compare_exit; - } - } - - /* if both fields are null then there is a match. compare next field */ } record_compare_exit: diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc index 72a6e159535..357bc78b1cd 100644 --- a/sql/log_event_old.cc +++ b/sql/log_event_old.cc @@ -351,24 +351,6 @@ static bool record_compare(TABLE *table) } } - /** - Check if we are using MyISAM. - - If this is a myisam table, then we cannot do a memcmp - right away because some NULL fields can still contain - an old value in the row - they are not shown to the user - because the null bit is set, however, the contents are - not cleared. As such, plain memory comparison cannot be - assured to work. See: BUG#49482 and BUG#49481. - - On top of this, we do not store field contents for null - fields in the binlog, so this is extra important when - comparing records fetched from binlog and from storage - engine. - */ - if (table->file->ht->db_type == DB_TYPE_MYISAM) - goto record_compare_field_by_field; - if (table->s->blob_fields + table->s->varchar_fields == 0) { result= cmp_record(table,record[1]); @@ -384,33 +366,14 @@ static bool record_compare(TABLE *table) goto record_compare_exit; } -record_compare_field_by_field: - /* Compare updated fields */ for (Field **ptr=table->field ; *ptr ; ptr++) { - Field *f= *ptr; - - /* if just one of the fields is null then there is no match */ - if ((f->is_null_in_record(table->record[0])) == - !(f->is_null_in_record(table->record[1]))) + if ((*ptr)->cmp_binary_offset(table->s->rec_buff_length)) { result= TRUE; goto record_compare_exit; } - - /* if both fields are not null then we can compare */ - if (!(f->is_null_in_record(table->record[0])) && - !(f->is_null_in_record(table->record[1]))) - { - if (f->cmp_binary_offset(table->s->rec_buff_length)) - { - result= TRUE; - goto record_compare_exit; - } - } - - /* if both fields are null then there is a match. compare next field */ } record_compare_exit: From 81391bd00c5b3e577fc88e142406eb288a26a0ff Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Tue, 19 Jan 2010 13:03:40 +0400 Subject: [PATCH 067/132] Bug#49501 Inefficient information_schema check (system collation) added check_length optimization for I_S_NAME comparison sql/event_data_objects.cc: added check_length optimization for I_S_NAME comparison sql/events.cc: added check_length optimization for I_S_NAME comparison sql/mysql_priv.h: added check_length optimization for I_S_NAME comparison sql/repl_failsafe.cc: added check_length optimization for I_S_NAME comparison sql/sql_db.cc: added check_length optimization for I_S_NAME comparison sql/sql_parse.cc: added check_length optimization for I_S_NAME comparison sql/sql_show.cc: added check_length optimization for I_S_NAME comparison sql/sql_view.cc: added check_length optimization for I_S_NAME comparison sql/table.cc: added check_length optimization for I_S_NAME comparison --- sql/event_data_objects.cc | 2 +- sql/events.cc | 15 +++++++++------ sql/mysql_priv.h | 8 ++++++-- sql/repl_failsafe.cc | 2 +- sql/sql_db.cc | 5 ++--- sql/sql_parse.cc | 40 ++++++++++++++++++++++----------------- sql/sql_show.cc | 9 ++++----- sql/sql_view.cc | 4 ++-- sql/table.cc | 5 +---- 9 files changed, 49 insertions(+), 41 deletions(-) diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index f2ec0e8cf64..92e237a17b7 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -1401,7 +1401,7 @@ Event_job_data::execute(THD *thd, bool drop) #endif if (check_access(thd, EVENT_ACL, dbname.str, - 0, 0, 0, is_schema_db(dbname.str))) + 0, 0, 0, is_schema_db(dbname.str, dbname.length))) { /* This aspect of behavior is defined in the worklog, diff --git a/sql/events.cc b/sql/events.cc index 458ad61718d..790e6a61699 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -415,7 +415,8 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, DBUG_ASSERT(parse_data->expression || parse_data->execute_at); if (check_access(thd, EVENT_ACL, parse_data->dbname.str, 0, 0, 0, - is_schema_db(parse_data->dbname.str))) + is_schema_db(parse_data->dbname.str, + parse_data->dbname.length))) DBUG_RETURN(TRUE); if (check_db_dir_existence(parse_data->dbname.str)) @@ -526,7 +527,8 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, DBUG_RETURN(TRUE); if (check_access(thd, EVENT_ACL, parse_data->dbname.str, 0, 0, 0, - is_schema_db(parse_data->dbname.str))) + is_schema_db(parse_data->dbname.str, + parse_data->dbname.length))) DBUG_RETURN(TRUE); if (new_dbname) /* It's a rename */ @@ -548,7 +550,7 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, access it. */ if (check_access(thd, EVENT_ACL, new_dbname->str, 0, 0, 0, - is_schema_db(new_dbname->str))) + is_schema_db(new_dbname->str, new_dbname->length))) DBUG_RETURN(TRUE); /* Check that the target database exists */ @@ -653,7 +655,7 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) DBUG_RETURN(TRUE); if (check_access(thd, EVENT_ACL, dbname.str, 0, 0, 0, - is_schema_db(dbname.str))) + is_schema_db(dbname.str, dbname.length))) DBUG_RETURN(TRUE); /* @@ -811,7 +813,7 @@ Events::show_create_event(THD *thd, LEX_STRING dbname, LEX_STRING name) DBUG_RETURN(TRUE); if (check_access(thd, EVENT_ACL, dbname.str, 0, 0, 0, - is_schema_db(dbname.str))) + is_schema_db(dbname.str, dbname.length))) DBUG_RETURN(TRUE); /* @@ -869,7 +871,8 @@ Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */) if (thd->lex->sql_command == SQLCOM_SHOW_EVENTS) { DBUG_ASSERT(thd->lex->select_lex.db); - if (!is_schema_db(thd->lex->select_lex.db) && // There is no events in I_S + if (!is_schema_db(thd->lex->select_lex.db, // There is no events in I_S + strlen(thd->lex->select_lex.db)) && check_access(thd, EVENT_ACL, thd->lex->select_lex.db, 0, 0, 0, 0)) DBUG_RETURN(1); db= thd->lex->select_lex.db; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index c04b1f5ae38..2be3b8f1f20 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1415,8 +1415,12 @@ bool get_schema_tables_result(JOIN *join, enum enum_schema_table_state executed_place); enum enum_schema_tables get_schema_table_idx(ST_SCHEMA_TABLE *schema_table); -#define is_schema_db(X) \ - !my_strcasecmp(system_charset_info, INFORMATION_SCHEMA_NAME.str, (X)) +inline bool is_schema_db(const char *name, size_t len) +{ + return (INFORMATION_SCHEMA_NAME.length == len && + !my_strcasecmp(system_charset_info, + INFORMATION_SCHEMA_NAME.str, name)); +} /* sql_prepare.cc */ diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index c6a05e93bf4..dda84ca8a37 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -905,7 +905,7 @@ bool load_master_data(THD* thd) if (!rpl_filter->db_ok(db) || !rpl_filter->db_ok_with_wild_table(db) || !strcmp(db,"mysql") || - is_schema_db(db)) + is_schema_db(db, strlen(db))) { *cur_table_res = 0; continue; diff --git a/sql/sql_db.cc b/sql/sql_db.cc index e760fae41f6..22ecaa17a0c 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -618,7 +618,7 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info, DBUG_ENTER("mysql_create_db"); /* do not create 'information_schema' db */ - if (!my_strcasecmp(system_charset_info, db, INFORMATION_SCHEMA_NAME.str)) + if (is_schema_db(db, strlen(db))) { my_error(ER_DB_CREATE_EXISTS, MYF(0), db); DBUG_RETURN(-1); @@ -1557,8 +1557,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch) } } - if (my_strcasecmp(system_charset_info, new_db_name->str, - INFORMATION_SCHEMA_NAME.str) == 0) + if (is_schema_db(new_db_name->str, new_db_name->length)) { /* Switch the current database to INFORMATION_SCHEMA. */ diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index c3070c4a756..f0fb58e9c3e 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1305,8 +1305,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, table_list.alias= table_list.table_name= conv_name.str; packet= arg_end + 1; - if (!my_strcasecmp(system_charset_info, table_list.db, - INFORMATION_SCHEMA_NAME.str)) + if (is_schema_db(table_list.db, table_list.db_length)) { ST_SCHEMA_TABLE *schema_table= find_schema_table(thd, table_list.alias); if (schema_table) @@ -1368,7 +1367,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, break; } if (check_access(thd, CREATE_ACL, db.str , 0, 1, 0, - is_schema_db(db.str))) + is_schema_db(db.str, db.length))) break; general_log_print(thd, command, "%.*s", db.length, db.str); bzero(&create_info, sizeof(create_info)); @@ -1387,7 +1386,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd, my_error(ER_WRONG_DB_NAME, MYF(0), db.str ? db.str : "NULL"); break; } - if (check_access(thd, DROP_ACL, db.str, 0, 1, 0, is_schema_db(db.str))) + if (check_access(thd, DROP_ACL, db.str, 0, 1, 0, + is_schema_db(db.str, db.length))) break; if (thd->locked_tables || thd->active_transaction()) { @@ -2852,7 +2852,7 @@ end_with_restore_list: &first_table->grant.privilege, 0, 0, test(first_table->schema_table)) || check_access(thd,INSERT_ACL | CREATE_ACL,select_lex->db,&priv,0,0, - is_schema_db(select_lex->db))|| + is_schema_db(select_lex->db, strlen(select_lex->db)))|| check_merge_table_access(thd, first_table->db, (TABLE_LIST *) create_info.merge_list.first)) @@ -3590,7 +3590,7 @@ end_with_restore_list: } #endif if (check_access(thd,CREATE_ACL,lex->name.str, 0, 1, 0, - is_schema_db(lex->name.str))) + is_schema_db(lex->name.str, lex->name.length))) break; res= mysql_create_db(thd,(lower_case_table_names == 2 ? alias : lex->name.str), &create_info, 0); @@ -3625,7 +3625,7 @@ end_with_restore_list: } #endif if (check_access(thd,DROP_ACL,lex->name.str,0,1,0, - is_schema_db(lex->name.str))) + is_schema_db(lex->name.str, lex->name.length))) break; if (thd->locked_tables || thd->active_transaction()) { @@ -3659,9 +3659,12 @@ end_with_restore_list: my_error(ER_WRONG_DB_NAME, MYF(0), db->str); break; } - if (check_access(thd, ALTER_ACL, db->str, 0, 1, 0, is_schema_db(db->str)) || - check_access(thd, DROP_ACL, db->str, 0, 1, 0, is_schema_db(db->str)) || - check_access(thd, CREATE_ACL, db->str, 0, 1, 0, is_schema_db(db->str))) + if (check_access(thd, ALTER_ACL, db->str, 0, 1, 0, + is_schema_db(db->str, db->length)) || + check_access(thd, DROP_ACL, db->str, 0, 1, 0, + is_schema_db(db->str, db->length)) || + check_access(thd, CREATE_ACL, db->str, 0, 1, 0, + is_schema_db(db->str, db->length))) { res= 1; break; @@ -3704,7 +3707,8 @@ end_with_restore_list: break; } #endif - if (check_access(thd, ALTER_ACL, db->str, 0, 1, 0, is_schema_db(db->str))) + if (check_access(thd, ALTER_ACL, db->str, 0, 1, 0, + is_schema_db(db->str, db->length))) break; if (thd->locked_tables || thd->active_transaction()) { @@ -3860,7 +3864,8 @@ end_with_restore_list: first_table ? &first_table->grant.privilege : 0, first_table ? 0 : 1, 0, first_table ? (bool) first_table->schema_table : - select_lex->db ? is_schema_db(select_lex->db) : 0)) + select_lex->db ? + is_schema_db(select_lex->db, strlen(select_lex->db)) : 0)) goto error; if (thd->security_ctx->user) // If not replication @@ -4203,7 +4208,8 @@ end_with_restore_list: } if (check_access(thd, CREATE_PROC_ACL, lex->sphead->m_db.str, 0, 0, 0, - is_schema_db(lex->sphead->m_db.str))) + is_schema_db(lex->sphead->m_db.str, + lex->sphead->m_db.length))) goto create_sp_error; if (end_active_trans(thd)) @@ -4858,7 +4864,8 @@ create_sp_error: res= mysql_xa_recover(thd); break; case SQLCOM_ALTER_TABLESPACE: - if (check_access(thd, ALTER_ACL, thd->db, 0, 1, 0, thd->db ? is_schema_db(thd->db) : 0)) + if (check_access(thd, ALTER_ACL, thd->db, 0, 1, 0, + thd->db ? is_schema_db(thd->db, thd->db_length) : 0)) break; if (!(res= mysql_alter_tablespace(thd, lex->alter_tablespace_info))) my_ok(thd); @@ -5297,7 +5304,7 @@ static bool check_show_access(THD *thd, TABLE_LIST *table) if (check_access(thd, SELECT_ACL, dst_db_name, &thd->col_access, FALSE, FALSE, - is_schema_db(dst_db_name))) + is_schema_db(dst_db_name, strlen(dst_db_name)))) return TRUE; if (!thd->col_access && check_grant_db(thd, dst_db_name)) @@ -6262,8 +6269,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd, ptr->force_index= test(table_options & TL_OPTION_FORCE_INDEX); ptr->ignore_leaves= test(table_options & TL_OPTION_IGNORE_LEAVES); ptr->derived= table->sel; - if (!ptr->derived && !my_strcasecmp(system_charset_info, ptr->db, - INFORMATION_SCHEMA_NAME.str)) + if (!ptr->derived && is_schema_db(ptr->db, ptr->db_length)) { ST_SCHEMA_TABLE *schema_table= find_schema_table(thd, ptr->table_name); if (!schema_table || diff --git a/sql/sql_show.cc b/sql/sql_show.cc index e55000c0f65..d4da29085b5 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -826,8 +826,7 @@ bool mysqld_show_create_db(THD *thd, char *dbname, DBUG_RETURN(TRUE); } #endif - if (!my_strcasecmp(system_charset_info, dbname, - INFORMATION_SCHEMA_NAME.str)) + if (is_schema_db(dbname, strlen(dbname))) { dbname= INFORMATION_SCHEMA_NAME.str; create.default_table_charset= system_charset_info; @@ -2780,8 +2779,8 @@ int make_db_list(THD *thd, List *files, */ if (lookup_field_vals->db_value.str) { - if (!my_strcasecmp(system_charset_info, INFORMATION_SCHEMA_NAME.str, - lookup_field_vals->db_value.str)) + if (is_schema_db(lookup_field_vals->db_value.str, + lookup_field_vals->db_value.length)) { *with_i_schema= 1; if (files->push_back(i_s_name_copy)) @@ -5228,7 +5227,7 @@ copy_event_to_schema_table(THD *thd, TABLE *sch_table, TABLE *event_table) */ if (thd->lex->sql_command != SQLCOM_SHOW_EVENTS && check_access(thd, EVENT_ACL, et.dbname.str, 0, 0, 1, - is_schema_db(et.dbname.str))) + is_schema_db(et.dbname.str, et.dbname.length))) DBUG_RETURN(0); /* ->field[0] is EVENT_CATALOG and is by default NULL */ diff --git a/sql/sql_view.cc b/sql/sql_view.cc index eca3922f17a..83cebf1e3da 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -268,11 +268,11 @@ bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view, table (i.e. user will not get some privileges by view creation) */ if ((check_access(thd, CREATE_VIEW_ACL, view->db, &view->grant.privilege, - 0, 0, is_schema_db(view->db)) || + 0, 0, is_schema_db(view->db, view->db_length)) || check_grant(thd, CREATE_VIEW_ACL, view, 0, 1, 0)) || (mode != VIEW_CREATE_NEW && (check_access(thd, DROP_ACL, view->db, &view->grant.privilege, - 0, 0, is_schema_db(view->db)) || + 0, 0, is_schema_db(view->db, view->db_length)) || check_grant(thd, DROP_ACL, view, 0, 1, 0)))) goto err; diff --git a/sql/table.cc b/sql/table.cc index 752b6ba0bd4..c06ecf99926 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -212,10 +212,7 @@ TABLE_CATEGORY get_table_category(const LEX_STRING *db, const LEX_STRING *name) DBUG_ASSERT(db != NULL); DBUG_ASSERT(name != NULL); - if ((db->length == INFORMATION_SCHEMA_NAME.length) && - (my_strcasecmp(system_charset_info, - INFORMATION_SCHEMA_NAME.str, - db->str) == 0)) + if (is_schema_db(db->str, db->length)) { return TABLE_CATEGORY_INFORMATION; } From 2fa49930cab5e070b5abaadbc2ab2b0899bc41b5 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 19 Jan 2010 14:48:41 +0200 Subject: [PATCH 068/132] revert of the fix for bug #45989: pushed by mistake. --- mysql-test/r/subselect.result | 12 ------------ mysql-test/t/subselect.test | 17 ----------------- sql/sql_select.cc | 2 -- 3 files changed, 31 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 99d1f18b010..f446d8feec3 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4602,16 +4602,4 @@ SELECT 1 FROM t1 GROUP BY 1 1 DROP TABLE t1; -# -# Bug #45989 take 2 : memory leak after explain encounters an -# error in the query -# -CREATE TABLE t1(a LONGTEXT); -INSERT INTO t1 VALUES (repeat('a',@@global.max_allowed_packet)); -INSERT INTO t1 VALUES (repeat('b',@@global.max_allowed_packet)); -EXPLAIN EXTENDED SELECT DISTINCT 1 FROM t1, -(SELECT DISTINCTROW a AS away FROM t1 GROUP BY a WITH ROLLUP) AS d1 -WHERE t1.a = d1.a; -ERROR 42S22: Unknown column 'd1.a' in 'where clause' -DROP TABLE t1; End of 5.1 tests. diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index eca86de1e82..a4314c45cba 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -3585,21 +3585,4 @@ SELECT 1 FROM t1 GROUP BY (SELECT LAST_INSERT_ID() FROM t1 ORDER BY MIN(a) ASC LIMIT 1); DROP TABLE t1; ---echo # ---echo # Bug #45989 take 2 : memory leak after explain encounters an ---echo # error in the query ---echo # - -CREATE TABLE t1(a LONGTEXT); -INSERT INTO t1 VALUES (repeat('a',@@global.max_allowed_packet)); -INSERT INTO t1 VALUES (repeat('b',@@global.max_allowed_packet)); - ---error ER_BAD_FIELD_ERROR -EXPLAIN EXTENDED SELECT DISTINCT 1 FROM t1, -(SELECT DISTINCTROW a AS away FROM t1 GROUP BY a WITH ROLLUP) AS d1 -WHERE t1.a = d1.a; - -DROP TABLE t1; - - --echo End of 5.1 tests. diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 24876ffec14..644f0072b7b 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5824,8 +5824,6 @@ JOIN::make_simple_join(JOIN *parent, TABLE *tmp_table) const_table_map= 0; tmp_table_param.field_count= tmp_table_param.sum_func_count= tmp_table_param.func_count= 0; - if (tmp_table_param.copy_field) - delete [] tmp_table_param.copy_field; tmp_table_param.copy_field= tmp_table_param.copy_field_end=0; first_record= sort_and_group=0; send_records= (ha_rows) 0; From 4839c42619304989a44dc8f57a800f311ae93bb4 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Tue, 19 Jan 2010 17:02:51 +0100 Subject: [PATCH 069/132] post-push patch for bug#47343. Missing ha_rnd_end in copy_partitions, found due to a DBUG_ASSERT in mysql-pe sql/ha_partition.cc: Post-push patch for bug#47343 Must call ha_rnd_end since ha_rnd_init has been called. --- sql/ha_partition.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 555a0b97ddd..7b9ecd7d902 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1705,6 +1705,7 @@ int ha_partition::copy_partitions(ulonglong * const copied, } DBUG_RETURN(FALSE); error: + m_reorged_file[reorg_part]->ha_rnd_end(); DBUG_RETURN(result); } From 985c06d0a9bd230cbab2e3cbfb7fbf744ea7ee3e Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Wed, 20 Jan 2010 19:08:16 +0000 Subject: [PATCH 070/132] BUG#46364 MyISAM transbuffer problems (NTM problem) It is well-known that due to concurrency issues, a slave can become inconsistent when a transaction contains updates to both transaction and non-transactional tables in statement and mixed modes. In a nutshell, the current code-base tries to preserve causality among the statements by writing non-transactional statements to the txn-cache which is flushed upon commit. However, modifications done to non-transactional tables on behalf of a transaction become immediately visible to other connections but may not immediately get into the binary log and therefore consistency may be broken. In general, it is impossible to automatically detect causality/dependency among statements by just analyzing the statements sent to the server. This happen because dependency may be hidden in the application code and it is necessary to know a priori all the statements processed in the context of a transaction such as in a procedure. Moreover, even for the few cases that we could automatically address in the server, the computation effort required could make the approach infeasible. So, in this patch we introduce the option - "--binlog-direct-non-transactional-updates" that can be used to bypass the current behavior in order to write directly to binary log statements that change non-transactional tables. mysql-test/extra/rpl_tests/rpl_mixing_engines.inc: Backported this from Celosia to improve the test cases related to the NTM issue. sql/log.cc: Checks the --binlog-direct-non-transactional-updates before choosing to either use the trxn-cache or not. sql/mysqld.cc: Introduces the option --binlog-direct-non-transactional-updates. sql/set_var.cc: Introduces the option --binlog-direct-non-transactional-updates. sql/sql_class.h: Introduces the option --binlog-direct-non-transactional-updates. --- .../extra/rpl_tests/rpl_mixing_engines.inc | 554 +++++++ .../suite/rpl/r/rpl_stm_binlog_direct.result | 1360 +++++++++++++++++ .../rpl/t/rpl_stm_binlog_direct-master.opt | 1 + .../suite/rpl/t/rpl_stm_binlog_direct.test | 230 +++ sql/log.cc | 23 +- sql/mysqld.cc | 7 +- sql/set_var.cc | 2 + sql/sql_class.h | 1 + 8 files changed, 2170 insertions(+), 8 deletions(-) create mode 100644 mysql-test/extra/rpl_tests/rpl_mixing_engines.inc create mode 100644 mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result create mode 100644 mysql-test/suite/rpl/t/rpl_stm_binlog_direct-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test diff --git a/mysql-test/extra/rpl_tests/rpl_mixing_engines.inc b/mysql-test/extra/rpl_tests/rpl_mixing_engines.inc new file mode 100644 index 00000000000..6dde3e079a1 --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_mixing_engines.inc @@ -0,0 +1,554 @@ +################################################################################ +# This is an auxiliary file used by rpl_mixing_engines.test, and that it +# executes SQL statements according to a format string, as specified in +# rpl_mixing_engines.test. In addition, it accepts the special format +# strings 'configure' and 'clean', used before and after everything else. +################################################################################ + +if (`SELECT HEX(@commands) = HEX('configure')`) +{ + connection master; + + SET SQL_LOG_BIN=0; + eval CREATE TABLE nt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; + eval CREATE TABLE nt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; + eval CREATE TABLE nt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; + eval CREATE TABLE nt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; + eval CREATE TABLE nt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; + eval CREATE TABLE nt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; + eval CREATE TABLE tt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; + eval CREATE TABLE tt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; + eval CREATE TABLE tt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; + eval CREATE TABLE tt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; + eval CREATE TABLE tt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; + eval CREATE TABLE tt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; + eval SET SQL_LOG_BIN=1; + + connection slave; + + SET SQL_LOG_BIN=0; + eval CREATE TABLE nt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; + eval CREATE TABLE nt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; + eval CREATE TABLE nt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; + eval CREATE TABLE nt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; + eval CREATE TABLE nt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; + eval CREATE TABLE nt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; + eval CREATE TABLE tt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; + eval CREATE TABLE tt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; + eval CREATE TABLE tt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; + eval CREATE TABLE tt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; + eval CREATE TABLE tt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; + eval CREATE TABLE tt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; + SET SQL_LOG_BIN=1; + + connection master; + + INSERT INTO nt_1(trans_id, stmt_id) VALUES(1,1); + INSERT INTO nt_2(trans_id, stmt_id) VALUES(1,1); + INSERT INTO nt_3(trans_id, stmt_id) VALUES(1,1); + INSERT INTO nt_4(trans_id, stmt_id) VALUES(1,1); + INSERT INTO nt_5(trans_id, stmt_id) VALUES(1,1); + INSERT INTO nt_6(trans_id, stmt_id) VALUES(1,1); + + INSERT INTO tt_1(trans_id, stmt_id) VALUES(1,1); + INSERT INTO tt_2(trans_id, stmt_id) VALUES(1,1); + INSERT INTO tt_3(trans_id, stmt_id) VALUES(1,1); + INSERT INTO tt_4(trans_id, stmt_id) VALUES(1,1); + INSERT INTO tt_5(trans_id, stmt_id) VALUES(1,1); + INSERT INTO tt_6(trans_id, stmt_id) VALUES(1,1); + + DELIMITER |; + + CREATE PROCEDURE pc_i_tt_5_suc (IN p_trans_id INTEGER, IN p_stmt_id INTEGER) + BEGIN + DECLARE in_stmt_id INTEGER; + SELECT max(stmt_id) INTO in_stmt_id FROM tt_5 WHERE trans_id= p_trans_id; + SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; + INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); + INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); + END| + + CREATE PROCEDURE pc_i_nt_5_suc (IN p_trans_id INTEGER, IN p_stmt_id INTEGER) + BEGIN + DECLARE in_stmt_id INTEGER; + SELECT max(stmt_id) INTO in_stmt_id FROM nt_5 WHERE trans_id= p_trans_id; + SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; + INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); + INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); + END| + + CREATE FUNCTION fc_i_tt_5_suc (p_trans_id INTEGER, p_stmt_id INTEGER) RETURNS VARCHAR(64) + BEGIN + DECLARE in_stmt_id INTEGER; + SELECT max(stmt_id) INTO in_stmt_id FROM tt_5 WHERE trans_id= p_trans_id; + SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; + INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); + INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); + RETURN "fc_i_tt_5_suc"; + END| + + CREATE FUNCTION fc_i_nt_5_suc (p_trans_id INTEGER, p_stmt_id INTEGER) RETURNS VARCHAR(64) + BEGIN + DECLARE in_stmt_id INTEGER; + SELECT max(stmt_id) INTO in_stmt_id FROM nt_5 WHERE trans_id= p_trans_id; + SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; + INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); + INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); + RETURN "fc_i_nt_5_suc"; + END| + + CREATE TRIGGER tr_i_tt_3_to_nt_3 AFTER INSERT ON tt_3 FOR EACH ROW + BEGIN + DECLARE in_stmt_id INTEGER; + SELECT max(stmt_id) INTO in_stmt_id FROM nt_3 WHERE trans_id= NEW.trans_id; + SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id; + INSERT INTO nt_3(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); + INSERT INTO nt_3(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); + END| + + CREATE TRIGGER tr_i_nt_4_to_tt_4 AFTER INSERT ON nt_4 FOR EACH ROW + BEGIN + DECLARE in_stmt_id INTEGER; + SELECT max(stmt_id) INTO in_stmt_id FROM tt_4 WHERE trans_id= NEW.trans_id; + SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id; + INSERT INTO tt_4(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); + INSERT INTO tt_4(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); + END| + + CREATE TRIGGER tr_i_tt_5_to_tt_6 AFTER INSERT ON tt_5 FOR EACH ROW + BEGIN + DECLARE in_stmt_id INTEGER; + SELECT max(stmt_id) INTO in_stmt_id FROM tt_6 WHERE trans_id= NEW.trans_id; + SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id, 1), 1) INTO in_stmt_id; + INSERT INTO tt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); + INSERT INTO tt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); + END| + + CREATE TRIGGER tr_i_nt_5_to_nt_6 AFTER INSERT ON nt_5 FOR EACH ROW + BEGIN + DECLARE in_stmt_id INTEGER; + SELECT max(stmt_id) INTO in_stmt_id FROM nt_6 WHERE trans_id= NEW.trans_id; + SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id; + INSERT INTO nt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); + INSERT INTO nt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); + END| + + DELIMITER ;| + + let $pos_trans_command= query_get_value("SHOW MASTER STATUS", Position, 1); + + let $trans_id= 7; + let $tb_id= 1; + let $stmt_id= 1; + let $commands= ''; + + SET @commands= ''; +} + +if (`SELECT HEX(@commands) = HEX('clean')`) +{ + connection master; + + DROP TABLE tt_1; + DROP TABLE tt_2; + DROP TABLE tt_3; + DROP TABLE tt_4; + DROP TABLE tt_5; + DROP TABLE tt_6; + + DROP TABLE nt_1; + DROP TABLE nt_2; + DROP TABLE nt_3; + DROP TABLE nt_4; + DROP TABLE nt_5; + DROP TABLE nt_6; + + DROP PROCEDURE pc_i_tt_5_suc; + DROP PROCEDURE pc_i_nt_5_suc; + DROP FUNCTION fc_i_tt_5_suc; + DROP FUNCTION fc_i_nt_5_suc; + + sync_slave_with_master; + + SET @commands= ''; +} + +while (`SELECT HEX(@commands) != HEX('')`) +{ + --disable_query_log + SET @command= SUBSTRING_INDEX(@commands, ' ', 1); + let $command= `SELECT @command`; + --eval SET @check_commands= '$commands' + if (`SELECT HEX(@check_commands) = HEX('''')`) + { + let $commands= `SELECT @commands`; + } + --echo -b-b-b-b-b-b-b-b-b-b-b- >> $command << -b-b-b-b-b-b-b-b-b-b-b- + let $pos_command= query_get_value("SHOW MASTER STATUS", Position, 1); + --enable_query_log + if (`SELECT HEX(@command) = HEX('B')`) + { + eval BEGIN; + } + if (`SELECT HEX(@command) = HEX('T')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval INSERT INTO tt_1(trans_id, stmt_id) VALUES ($trans_id, $stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('T-trig')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval INSERT INTO tt_5(trans_id, stmt_id) VALUES ($trans_id, $stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('T-func')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval SELECT fc_i_tt_5_suc ($trans_id, $stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('T-proc')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval CALL pc_i_tt_5_suc ($trans_id, $stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('eT')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + let $old_trans_id= `SELECT max(trans_id) from tt_1`; + let $old_stmt_id= `SELECT max(stmt_id) from tt_1 where trans_id= $old_trans_id`; + --error ER_DUP_ENTRY, ER_DUP_KEY + eval INSERT INTO tt_1(trans_id, stmt_id) VALUES ($old_trans_id, $old_stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('Te')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + let $old_trans_id= `SELECT max(trans_id) from tt_1`; + let $old_stmt_id= `SELECT max(stmt_id) from tt_1 where trans_id= $old_trans_id`; + --error ER_DUP_ENTRY, ER_DUP_KEY + eval INSERT INTO tt_1(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('Te-trig')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + let $old_trans_id= `SELECT max(trans_id) from tt_5`; + let $old_stmt_id= `SELECT max(stmt_id) from tt_5 where trans_id= $old_trans_id`; + --error ER_DUP_ENTRY, ER_DUP_KEY + eval INSERT INTO tt_5(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('Te-func')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + let $old_trans_id= `SELECT max(trans_id) from tt_1`; + let $old_stmt_id= `SELECT max(stmt_id) from tt_1 where trans_id= $old_trans_id`; + --error ER_DUP_ENTRY, ER_DUP_KEY + eval INSERT INTO tt_1(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, ''), ($old_trans_id, $old_stmt_id, fc_i_tt_5_suc ($trans_id, $stmt_id)); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('N')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval INSERT INTO nt_1(trans_id, stmt_id) VALUES ($trans_id, $stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('N-trig')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval INSERT INTO nt_5(trans_id, stmt_id) VALUES ($trans_id, $stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('N-func')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval SELECT fc_i_nt_5_suc ($trans_id, $stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('N-proc')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval CALL pc_i_nt_5_suc ($trans_id, $stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('eN')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + let $old_trans_id= `SELECT max(trans_id) from nt_1`; + let $old_stmt_id= `SELECT max(stmt_id) from nt_1 where trans_id= $old_trans_id`; + --error ER_DUP_ENTRY, ER_DUP_KEY + eval INSERT INTO nt_1(trans_id, stmt_id) VALUES ($old_trans_id, $old_stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('Ne')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + let $old_trans_id= `SELECT max(trans_id) from nt_1`; + let $old_stmt_id= `SELECT max(stmt_id) from nt_1 where trans_id= $old_trans_id`; + --error ER_DUP_ENTRY, ER_DUP_KEY + eval INSERT INTO nt_1(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('Ne-trig')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + let $old_trans_id= `SELECT max(trans_id) from nt_5`; + let $old_stmt_id= `SELECT max(stmt_id) from nt_5 where trans_id= $old_trans_id`; + --error ER_DUP_ENTRY, ER_DUP_KEY + eval INSERT INTO nt_5(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('Ne-func')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + let $old_trans_id= `SELECT max(trans_id) from nt_1`; + let $old_stmt_id= `SELECT max(stmt_id) from nt_1 where trans_id= $old_trans_id`; + --error ER_DUP_ENTRY, ER_DUP_KEY + eval INSERT INTO nt_1(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, ''), ($old_trans_id, $old_stmt_id, fc_i_nt_5_suc ($trans_id, $stmt_id)); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('tN')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval INSERT INTO nt_1(trans_id, stmt_id, info) SELECT $trans_id, $stmt_id, COUNT(*) FROM tt_1; + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('tNe')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + let $old_trans_id= `SELECT max(trans_id) from nt_1`; + let $old_stmt_id= `SELECT max(stmt_id) from nt_1 where trans_id= $old_trans_id`; + --error ER_DUP_ENTRY, ER_DUP_KEY + eval INSERT INTO nt_1(trans_id, stmt_id, info) SELECT $trans_id, $stmt_id, COUNT(*) FROM tt_1 UNION SELECT $old_trans_id, $old_stmt_id, COUNT(*) FROM tt_1; + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('nT')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval INSERT INTO tt_1(trans_id, stmt_id, info) SELECT $trans_id, $stmt_id, COUNT(*) FROM nt_1; + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('nTe')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + let $old_trans_id= `SELECT max(trans_id) from tt_1`; + let $old_stmt_id= `SELECT max(stmt_id) from tt_1 where trans_id= $old_trans_id`; + --error ER_DUP_ENTRY, ER_DUP_KEY + eval INSERT INTO tt_1(trans_id, stmt_id, info) SELECT $trans_id, $stmt_id, COUNT(*) FROM nt_1 UNION SELECT $old_trans_id, $old_stmt_id, COUNT(*) FROM nt_1; + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('NT')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval UPDATE nt_3, tt_3 SET nt_3.info= "new text $trans_id --> $stmt_id", tt_3.info= "new text $trans_id --> $stmt_id" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1; + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('NT-trig')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval INSERT INTO nt_4(trans_id, stmt_id) VALUES ($trans_id, $stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('NT-func')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval INSERT INTO nt_5(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, fc_i_tt_5_suc($trans_id, $stmt_id)); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('NeT-trig')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + let $old_trans_id= `SELECT max(trans_id) from nt_4`; + let $old_stmt_id= `SELECT max(stmt_id) from nt_4 where trans_id= $old_trans_id`; + --error ER_DUP_ENTRY, ER_DUP_KEY + eval INSERT INTO nt_4(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('NeT-func')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + let $old_trans_id= `SELECT max(trans_id) from nt_5`; + let $old_stmt_id= `SELECT max(stmt_id) from nt_5 where trans_id= $old_trans_id`; + --error ER_DUP_ENTRY, ER_DUP_KEY + eval INSERT INTO nt_5(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, ''), ($old_trans_id, $old_stmt_id, fc_i_tt_5_suc ($trans_id, $stmt_id)); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('TN')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval UPDATE tt_4, nt_4 SET tt_4.info= "new text $trans_id --> $stmt_id", nt_4.info= "new text $trans_id --> $stmt_id" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1; + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('TN-trig')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval INSERT INTO tt_3(trans_id, stmt_id) VALUES ($trans_id, $stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('TN-func')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + eval INSERT INTO tt_5(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, fc_i_nt_5_suc($trans_id, $stmt_id)); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('TeN-trig')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + let $old_trans_id= `SELECT max(trans_id) from tt_3`; + let $old_stmt_id= `SELECT max(stmt_id) from tt_3 where trans_id= $old_trans_id`; + --error ER_DUP_ENTRY, ER_DUP_KEY + eval INSERT INTO tt_3(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('TeN-func')`) + { + #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) + let $old_trans_id= `SELECT max(trans_id) from tt_5`; + let $old_stmt_id= `SELECT max(stmt_id) from tt_5 where trans_id= $old_trans_id`; + --error ER_DUP_ENTRY, ER_DUP_KEY + eval INSERT INTO tt_5(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, ''), ($old_trans_id, $old_stmt_id, fc_i_nt_5_suc ($trans_id, $stmt_id)); + inc $stmt_id; + } + if (`SELECT HEX(@command) = HEX('CS-T->T')`) + { + --eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=$engine_type SELECT * FROM tt_1; + } + if (`SELECT HEX(@command) = HEX('CS-N->N')`) + { + --eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1; + } + if (`SELECT HEX(@command) = HEX('CS-T->N')`) + { + --eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=$engine_type SELECT * FROM nt_1; + } + if (`SELECT HEX(@command) = HEX('CS-N->T')`) + { + --eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1; + } + if (`SELECT HEX(@command) = HEX('CSe-T->T')`) + { + --error ER_DUP_ENTRY, ER_DUP_KEY + --eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=$engine_type SELECT stmt_id FROM tt_1; + } + if (`SELECT HEX(@command) = HEX('CSe-N->N')`) + { + --error ER_DUP_ENTRY, ER_DUP_KEY + --eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=MyIsam SELECT stmt_id FROM nt_1; + } + if (`SELECT HEX(@command) = HEX('CSe-T->N')`) + { + --error ER_DUP_ENTRY, ER_DUP_KEY + --eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=$engine_type SELECT stmt_id FROM nt_1; + } + if (`SELECT HEX(@command) = HEX('CSe-N->T')`) + { + --error ER_DUP_ENTRY, ER_DUP_KEY + --eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=MyIsam SELECT stmt_id FROM tt_1; + } + if (`SELECT HEX(@command) = HEX('CT')`) + { + --eval CREATE TEMPORARY TABLE tt_xx_$tb_id (a int) engine=$engine_type; + } + if (`SELECT HEX(@command) = HEX('IS-T<-N')`) + { + --eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1; + } + if (`SELECT HEX(@command) = HEX('ISe-T<-N')`) + { + --error ER_DUP_ENTRY, ER_DUP_KEY + --eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1; + } + if (`SELECT HEX(@command) = HEX('IS-N<-T')`) + { + --eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1; + } + if (`SELECT HEX(@command) = HEX('ISe-N<-T')`) + { + --error ER_DUP_ENTRY, ER_DUP_KEY + --eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1; + } + if (`SELECT HEX(@command) = HEX('IS-T<-T')`) + { + --eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1; + } + if (`SELECT HEX(@command) = HEX('ISe-T<-T')`) + { + --error ER_DUP_ENTRY, ER_DUP_KEY + --eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1; + } + if (`SELECT HEX(@command) = HEX('IS-N<-N')`) + { + --eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1; + } + if (`SELECT HEX(@command) = HEX('ISe-N<-N')`) + { + --error ER_DUP_ENTRY, ER_DUP_KEY + --eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1; + } + if (`SELECT HEX(@command) = HEX('trunc-CS-T')`) + { + eval TRUNCATE TABLE tt_xx_$tb_id; + } + if (`SELECT HEX(@command) = HEX('trunc-CS-N')`) + { + eval TRUNCATE TABLE nt_xx_$tb_id; + } + if (`SELECT HEX(@command) = HEX('trunc-CT')`) + { + eval TRUNCATE TABLE tt_xx_$tb_id; + } + if (`SELECT HEX(@command) = HEX('drop-CS')`) + { + --disable_warnings + eval DROP TABLE IF EXISTS tt_xx_$tb_id, nt_xx_$tb_id; + inc $tb_id; + --enable_warnings + } + if (`SELECT HEX(@command) = HEX('drop-CT')`) + { + --disable_warnings + eval DROP TEMPORARY TABLE IF EXISTS tt_xx_$tb_id; + inc $tb_id; + --enable_warnings + } + if (`SELECT HEX(@command) = HEX('C')`) + { + --error 0, ER_GET_ERRMSG + eval COMMIT; + } + if (`SELECT HEX(@command) = HEX('R')`) + { + --error 0, ER_GET_ERRMSG + eval ROLLBACK; + } + if (`SELECT HEX(@command) = HEX('S1')`) + { + eval SAVEPOINT s1; + } + if (`SELECT HEX(@command) = HEX('R1')`) + { + eval ROLLBACK TO s1; + } + --disable_query_log + SET @commands= LTRIM(SUBSTRING(@commands, LENGTH(@command) + 1)); + inc $stmt_id; + + let $binlog_start= $pos_command; + --source include/show_binlog_events.inc + --echo -e-e-e-e-e-e-e-e-e-e-e- >> $command << -e-e-e-e-e-e-e-e-e-e-e- + if (`SELECT HEX(@commands) = HEX('')`) + { + let $binlog_start= $pos_trans_command; + --echo -b-b-b-b-b-b-b-b-b-b-b- >> $commands << -b-b-b-b-b-b-b-b-b-b-b- + --source include/show_binlog_events.inc + --echo -e-e-e-e-e-e-e-e-e-e-e- >> $commands << -e-e-e-e-e-e-e-e-e-e-e- + --echo + let $pos_trans_command= query_get_value("SHOW MASTER STATUS", Position, 1); + let $stmt_id= 1; + inc $trans_id; + let $commands= ''; + } +} diff --git a/mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result b/mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result new file mode 100644 index 00000000000..818e383e2f1 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result @@ -0,0 +1,1360 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +set @@session.binlog_direct_non_transactional_updates= TRUE; +######################################################################### +# CONFIGURATION +######################################################################### +SET @commands= 'configure'; +SET SQL_LOG_BIN=0; +CREATE TABLE nt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; +CREATE TABLE nt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; +CREATE TABLE nt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; +CREATE TABLE nt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; +CREATE TABLE nt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; +CREATE TABLE nt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; +CREATE TABLE tt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; +CREATE TABLE tt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; +CREATE TABLE tt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; +CREATE TABLE tt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; +CREATE TABLE tt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; +CREATE TABLE tt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; +SET SQL_LOG_BIN=1; +SET SQL_LOG_BIN=0; +CREATE TABLE nt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; +CREATE TABLE nt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; +CREATE TABLE nt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; +CREATE TABLE nt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; +CREATE TABLE nt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; +CREATE TABLE nt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; +CREATE TABLE tt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; +CREATE TABLE tt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; +CREATE TABLE tt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; +CREATE TABLE tt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; +CREATE TABLE tt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; +CREATE TABLE tt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; +SET SQL_LOG_BIN=1; +INSERT INTO nt_1(trans_id, stmt_id) VALUES(1,1); +INSERT INTO nt_2(trans_id, stmt_id) VALUES(1,1); +INSERT INTO nt_3(trans_id, stmt_id) VALUES(1,1); +INSERT INTO nt_4(trans_id, stmt_id) VALUES(1,1); +INSERT INTO nt_5(trans_id, stmt_id) VALUES(1,1); +INSERT INTO nt_6(trans_id, stmt_id) VALUES(1,1); +INSERT INTO tt_1(trans_id, stmt_id) VALUES(1,1); +INSERT INTO tt_2(trans_id, stmt_id) VALUES(1,1); +INSERT INTO tt_3(trans_id, stmt_id) VALUES(1,1); +INSERT INTO tt_4(trans_id, stmt_id) VALUES(1,1); +INSERT INTO tt_5(trans_id, stmt_id) VALUES(1,1); +INSERT INTO tt_6(trans_id, stmt_id) VALUES(1,1); +CREATE PROCEDURE pc_i_tt_5_suc (IN p_trans_id INTEGER, IN p_stmt_id INTEGER) +BEGIN +DECLARE in_stmt_id INTEGER; +SELECT max(stmt_id) INTO in_stmt_id FROM tt_5 WHERE trans_id= p_trans_id; +SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; +INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); +INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); +END| +CREATE PROCEDURE pc_i_nt_5_suc (IN p_trans_id INTEGER, IN p_stmt_id INTEGER) +BEGIN +DECLARE in_stmt_id INTEGER; +SELECT max(stmt_id) INTO in_stmt_id FROM nt_5 WHERE trans_id= p_trans_id; +SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; +INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); +INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); +END| +CREATE FUNCTION fc_i_tt_5_suc (p_trans_id INTEGER, p_stmt_id INTEGER) RETURNS VARCHAR(64) +BEGIN +DECLARE in_stmt_id INTEGER; +SELECT max(stmt_id) INTO in_stmt_id FROM tt_5 WHERE trans_id= p_trans_id; +SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; +INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); +INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); +RETURN "fc_i_tt_5_suc"; +END| +CREATE FUNCTION fc_i_nt_5_suc (p_trans_id INTEGER, p_stmt_id INTEGER) RETURNS VARCHAR(64) +BEGIN +DECLARE in_stmt_id INTEGER; +SELECT max(stmt_id) INTO in_stmt_id FROM nt_5 WHERE trans_id= p_trans_id; +SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; +INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); +INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); +RETURN "fc_i_nt_5_suc"; +END| +CREATE TRIGGER tr_i_tt_3_to_nt_3 AFTER INSERT ON tt_3 FOR EACH ROW +BEGIN +DECLARE in_stmt_id INTEGER; +SELECT max(stmt_id) INTO in_stmt_id FROM nt_3 WHERE trans_id= NEW.trans_id; +SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id; +INSERT INTO nt_3(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); +INSERT INTO nt_3(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); +END| +CREATE TRIGGER tr_i_nt_4_to_tt_4 AFTER INSERT ON nt_4 FOR EACH ROW +BEGIN +DECLARE in_stmt_id INTEGER; +SELECT max(stmt_id) INTO in_stmt_id FROM tt_4 WHERE trans_id= NEW.trans_id; +SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id; +INSERT INTO tt_4(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); +INSERT INTO tt_4(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); +END| +CREATE TRIGGER tr_i_tt_5_to_tt_6 AFTER INSERT ON tt_5 FOR EACH ROW +BEGIN +DECLARE in_stmt_id INTEGER; +SELECT max(stmt_id) INTO in_stmt_id FROM tt_6 WHERE trans_id= NEW.trans_id; +SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id, 1), 1) INTO in_stmt_id; +INSERT INTO tt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); +INSERT INTO tt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); +END| +CREATE TRIGGER tr_i_nt_5_to_nt_6 AFTER INSERT ON nt_5 FOR EACH ROW +BEGIN +DECLARE in_stmt_id INTEGER; +SELECT max(stmt_id) INTO in_stmt_id FROM nt_6 WHERE trans_id= NEW.trans_id; +SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id; +INSERT INTO nt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); +INSERT INTO nt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); +END| +SET @commands= ''; +######################################################################### +# 1 - BINLOG ORDER +######################################################################### + + + + +# +#3) Generates in the binlog what follows: +# --> STMT "N B T C" entries, format S. +# +SET @commands= 'B T N C'; +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (7, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (7, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (7, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (7, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T N C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (7, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (7, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T N C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (8, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_5(trans_id, stmt_id) VALUES (8, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (8, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (8, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T N-trig C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (8, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (8, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T N-trig C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (9, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_nt_5_suc (9, 4); +fc_i_nt_5_suc (9, 4) +fc_i_nt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(9,4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (9, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T N-func C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(9,4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (9, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T N-func C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (10, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_nt_5_suc (10, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1) + 1) +-e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (10, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T N-proc C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (10, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T N-proc C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_5(trans_id, stmt_id) VALUES (11, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (11, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (11, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (11, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (11, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (11, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_5(trans_id, stmt_id) VALUES (12, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_5(trans_id, stmt_id) VALUES (12, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (12, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (12, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-trig C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (12, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (12, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-trig C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_5(trans_id, stmt_id) VALUES (13, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_nt_5_suc (13, 4); +fc_i_nt_5_suc (13, 4) +fc_i_nt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(13,4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (13, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-func C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(13,4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (13, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-func C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_5(trans_id, stmt_id) VALUES (14, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_nt_5_suc (14, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',14), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',14), NAME_CONST('in_stmt_id',1) + 1) +-e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (14, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-proc C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',14), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',14), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (14, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-proc C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_tt_5_suc (15, 2); +fc_i_tt_5_suc (15, 2) +fc_i_tt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (15, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (15, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(15,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-func N C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (15, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(15,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T-func N C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_tt_5_suc (16, 2); +fc_i_tt_5_suc (16, 2) +fc_i_tt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_5(trans_id, stmt_id) VALUES (16, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (16, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(16,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-trig C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (16, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(16,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-trig C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_tt_5_suc (17, 2); +fc_i_tt_5_suc (17, 2) +fc_i_tt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_nt_5_suc (17, 4); +fc_i_nt_5_suc (17, 4) +fc_i_nt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(17,4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(17,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-func C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(17,4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(17,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-func C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_tt_5_suc (18, 2); +fc_i_tt_5_suc (18, 2) +fc_i_tt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_nt_5_suc (18, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1) + 1) +-e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(18,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-proc C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(18,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-proc C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_tt_5_suc (19, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (19, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (19, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',19), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',19), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (19, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',19), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',19), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_tt_5_suc (20, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_5(trans_id, stmt_id) VALUES (20, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (20, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',20), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',20), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-trig C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (20, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',20), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',20), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-trig C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_tt_5_suc (21, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_nt_5_suc (21, 4); +fc_i_nt_5_suc (21, 4) +fc_i_nt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(21,4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',21), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',21), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-func C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(21,4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',21), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',21), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-func C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_tt_5_suc (22, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_nt_5_suc (22, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1) + 1) +-e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-proc C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-proc C << -e-e-e-e-e-e-e-e-e-e-e- + + + + + +# +#3.e) Generates in the binlog what follows if T-* fails: +# --> STMT "N" entry, format S. +# Otherwise, what follows if N-* fails and a N-Table is changed: +# --> STMT "N B T C" entries, format S. +# +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> eT << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (10, 2); +Got one of the listed errors +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> eT << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (23, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (23, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B eT N C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (23, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> B eT N C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> Te << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (24, 2), (10, 2); +Got one of the listed errors +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> Te << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (24, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (24, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B Te N C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (24, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> B Te N C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (25, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> eN << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (24, 4); +Got one of the listed errors +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> eN << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (25, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T eN C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (25, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T eN C << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (26, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> Ne << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (26, 4), (24, 4); +Got one of the listed errors +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (26, 4), (24, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> Ne << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- +COMMIT; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (26, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T Ne C << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (26, 4), (24, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (26, 2) +master-bin.000001 # Xid # # COMMIT /* XID */ +-e-e-e-e-e-e-e-e-e-e-e- >> B T Ne C << -e-e-e-e-e-e-e-e-e-e-e- + + + + + +# +#4) Generates in the binlog what follows: +# --> STMT "N B T R" entries, format S. +# +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (27, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (27, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (27, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (27, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T N R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (27, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (27, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T N R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (28, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_5(trans_id, stmt_id) VALUES (28, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (28, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (28, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T N-trig R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (28, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (28, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T N-trig R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (29, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_nt_5_suc (29, 4); +fc_i_nt_5_suc (29, 4) +fc_i_nt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(29,4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (29, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T N-func R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(29,4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (29, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T N-func R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (30, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_nt_5_suc (30, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',30), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',30), NAME_CONST('in_stmt_id',1) + 1) +-e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (30, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T N-proc R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',30), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',30), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (30, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T N-proc R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_5(trans_id, stmt_id) VALUES (31, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (31, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (31, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (31, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (31, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (31, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_5(trans_id, stmt_id) VALUES (32, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_5(trans_id, stmt_id) VALUES (32, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (32, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (32, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-trig R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (32, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (32, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-trig R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_5(trans_id, stmt_id) VALUES (33, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_nt_5_suc (33, 4); +fc_i_nt_5_suc (33, 4) +fc_i_nt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(33,4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (33, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-func R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(33,4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (33, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-func R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_5(trans_id, stmt_id) VALUES (34, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_nt_5_suc (34, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',34), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',34), NAME_CONST('in_stmt_id',1) + 1) +-e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (34, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-proc R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',34), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',34), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (34, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-proc R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_tt_5_suc (35, 2); +fc_i_tt_5_suc (35, 2) +fc_i_tt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (35, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (35, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(35,2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-func N R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (35, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(35,2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T-func N R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_tt_5_suc (36, 2); +fc_i_tt_5_suc (36, 2) +fc_i_tt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_5(trans_id, stmt_id) VALUES (36, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (36, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(36,2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-trig R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (36, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(36,2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-trig R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_tt_5_suc (37, 2); +fc_i_tt_5_suc (37, 2) +fc_i_tt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_nt_5_suc (37, 4); +fc_i_nt_5_suc (37, 4) +fc_i_nt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(37,4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(37,2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-func R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(37,4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(37,2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-func R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_tt_5_suc (38, 2); +fc_i_tt_5_suc (38, 2) +fc_i_tt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_nt_5_suc (38, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',38), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',38), NAME_CONST('in_stmt_id',1) + 1) +-e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(38,2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-proc R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',38), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',38), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(38,2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-proc R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_tt_5_suc (39, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (39, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (39, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',39), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',39), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (39, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',39), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',39), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_tt_5_suc (40, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_5(trans_id, stmt_id) VALUES (40, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (40, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-trig R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (40, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-trig R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_tt_5_suc (41, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- +SELECT fc_i_nt_5_suc (41, 4); +fc_i_nt_5_suc (41, 4) +fc_i_nt_5_suc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(41,4) +-e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',41), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',41), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-func R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(41,4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',41), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',41), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-func R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_tt_5_suc (42, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- +CALL pc_i_nt_5_suc (42, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1) + 1) +-e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-proc R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-proc R << -e-e-e-e-e-e-e-e-e-e-e- + + + + + +# +#4.e) Generates in the binlog what follows if T* fails: +# --> STMT "B N C" entry, format S. +# Otherwise, what follows if N* fails and a N-Table is changed: +# --> STMT "N" entries, format S. +# +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> eT << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (26, 2); +Got one of the listed errors +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> eT << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (43, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (43, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B eT N R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (43, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> B eT N R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> Te << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (44, 2), (26, 2); +Got one of the listed errors +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> Te << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (44, 4); +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (44, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B Te N R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (44, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> B Te N R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (45, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> eN << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (44, 4); +Got one of the listed errors +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> eN << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T eN R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B T eN R << -e-e-e-e-e-e-e-e-e-e-e- + +-b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- +BEGIN; +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO tt_1(trans_id, stmt_id) VALUES (46, 2); +Log_name Pos Event_type Server_id End_log_pos Info +-e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> Ne << -b-b-b-b-b-b-b-b-b-b-b- +INSERT INTO nt_1(trans_id, stmt_id) VALUES (46, 4), (44, 4); +Got one of the listed errors +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (46, 4), (44, 4) +-e-e-e-e-e-e-e-e-e-e-e- >> Ne << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (46, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- +-b-b-b-b-b-b-b-b-b-b-b- >> B T Ne R << -b-b-b-b-b-b-b-b-b-b-b- +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (46, 4), (44, 4) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (46, 2) +master-bin.000001 # Query # # ROLLBACK +-e-e-e-e-e-e-e-e-e-e-e- >> B T Ne R << -e-e-e-e-e-e-e-e-e-e-e- + +################################################################################### +# CHECK CONSISTENCY +################################################################################### +################################################################################### +# CLEAN +################################################################################### diff --git a/mysql-test/suite/rpl/t/rpl_stm_binlog_direct-master.opt b/mysql-test/suite/rpl/t/rpl_stm_binlog_direct-master.opt new file mode 100644 index 00000000000..561902d0bd9 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_binlog_direct-master.opt @@ -0,0 +1 @@ +--binlog-direct-non-transactional-updates diff --git a/mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test b/mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test new file mode 100644 index 00000000000..f0c36c7b40c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test @@ -0,0 +1,230 @@ +################################################################################ +# This test case checks if the option "binlog-direct-non-transactional-updates" +# makes non-transactional changes in the statement format to be written to the +# binary log as soon as the statement commits. +# +# In what follows, we use the include file rpl_mixing_engines.inc to generate +# sql commands from a format string. The format string consists of a sequence of +# 'codes' separated by spaces. Before it set of commands, we paste the expected +# sequence in the binary log. The following codes exist: +# +# - Define the scope of a transaction: +# B - Begin. +# C - Commit. +# R - Rollback. +# +# - Change only T-Tables: +# T - Updates a T-Table. +# T-trig - Updates T-Tables through a trigger. +# T-func - Updates T-Tables through a function. +# T-proc - Updates T-Tables through a procedure. +# eT - Fails while updating the first tuple in a T-Table. +# Te - Fails while updating an n-tuple (n > 1) in a T-Table. +# Te-trig - Fails while updating an n-tuple (n > 1) in a T-Table. +# Te-func - Fails while updating an n-tuple (n > 1) in a T-Table. +# +# - Change only N-Tables +# N - Updates a N-Table. +# N-trig - Updates N-Tables through a trigger. +# N-func - Updates N-Tables through a function. +# N-proc - Updates N-Tables through a procedure. +# eN - Fails while updating the first tuple in a N-Table. +# Ne - Fails while updating an n-tuple (n > 1) in a N-Table. +# Ne-trig - Fails while updating an n-tuple (n > 1) in a N-Table. +# Ne-func - Fails while updating an n-tuple (n > 1) in a N-Table. +################################################################################ + +--source include/have_binlog_format_statement.inc +--source include/master-slave.inc +--source include/have_innodb.inc + +set @@session.binlog_direct_non_transactional_updates= TRUE; + +--echo ######################################################################### +--echo # CONFIGURATION +--echo ######################################################################### + +--let $engine_type= Innodb +SET @commands= 'configure'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +--echo ######################################################################### +--echo # 1 - BINLOG ORDER +--echo ######################################################################### +connection master; + +--echo +--echo +--echo +--echo +--echo # +--echo #3) Generates in the binlog what follows: +--echo # --> STMT "N B T C" entries, format S. +--echo # +SET @commands= 'B T N C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T N-trig C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T N-func C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T N-proc C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-trig N C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-trig N-trig C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-trig N-func C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-trig N-proc C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-func N C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-func N-trig C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-func N-func C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-func N-proc C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-proc N C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-proc N-trig C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-proc N-func C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-proc N-proc C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + + +--echo +--echo +--echo +--echo +--echo # +--echo #3.e) Generates in the binlog what follows if T-* fails: +--echo # --> STMT "N" entry, format S. +--echo # Otherwise, what follows if N-* fails and a N-Table is changed: +--echo # --> STMT "N B T C" entries, format S. +--echo # +SET @commands= 'B eT N C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B Te N C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T eN C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T Ne C'; +--source extra/rpl_tests/rpl_mixing_engines.inc + + +--echo +--echo +--echo +--echo +--echo # +--echo #4) Generates in the binlog what follows: +--echo # --> STMT "N B T R" entries, format S. +--echo # +SET @commands= 'B T N R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T N-trig R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T N-func R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T N-proc R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-trig N R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-trig N-trig R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-trig N-func R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-trig N-proc R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-func N R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-func N-trig R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-func N-func R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-func N-proc R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-proc N R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-proc N-trig R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-proc N-func R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T-proc N-proc R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + + +--echo +--echo +--echo +--echo +--echo # +--echo #4.e) Generates in the binlog what follows if T* fails: +--echo # --> STMT "B N C" entry, format S. +--echo # Otherwise, what follows if N* fails and a N-Table is changed: +--echo # --> STMT "N" entries, format S. +--echo # +SET @commands= 'B eT N R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B Te N R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T eN R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + +SET @commands= 'B T Ne R'; +--source extra/rpl_tests/rpl_mixing_engines.inc + + +--echo ################################################################################### +--echo # CHECK CONSISTENCY +--echo ################################################################################### +connection master; +sync_slave_with_master; + +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/test-nmt-master.sql +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/test-nmt-slave.sql +--diff_files $MYSQLTEST_VARDIR/tmp/test-nmt-master.sql $MYSQLTEST_VARDIR/tmp/test-nmt-slave.sql + +--echo ################################################################################### +--echo # CLEAN +--echo ################################################################################### +SET @commands= 'clean'; +--source extra/rpl_tests/rpl_mixing_engines.inc diff --git a/sql/log.cc b/sql/log.cc index 36d57271a7d..bc9efd75ea2 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -4284,12 +4284,20 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info) #if defined(USING_TRANSACTIONS) /* Should we write to the binlog cache or to the binlog on disk? + Write to the binlog cache if: - - it is already not empty (meaning we're in a transaction; note that the - present event could be about a non-transactional table, but still we need - to write to the binlog cache in that case to handle updates to mixed - trans/non-trans table types the best possible in binlogging) - - or if the event asks for it (cache_stmt == TRUE). + 1 - a transactional engine/table is updated (stmt_has_updated_trans_table == TRUE); + 2 - or the event asks for it (cache_stmt == TRUE); + 3 - or the cache is already not empty (meaning we're in a transaction; + note that the present event could be about a non-transactional table, but + still we need to write to the binlog cache in that case to handle updates + to mixed trans/non-trans table types). + + Write to the binlog on disk if only a non-transactional engine is + updated and: + 1 - the binlog cache is empty or; + 2 - --binlog-direct-non-transactional-updates is set and we are about to + use the statement format. When using the row format (cache_stmt == TRUE). */ if (opt_using_transactions && thd) { @@ -4300,8 +4308,9 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info) (binlog_trx_data*) thd_get_ha_data(thd, binlog_hton); IO_CACHE *trans_log= &trx_data->trans_log; my_off_t trans_log_pos= my_b_tell(trans_log); - if (event_info->get_cache_stmt() || trans_log_pos != 0 || - stmt_has_updated_trans_table(thd)) + if (event_info->get_cache_stmt() || stmt_has_updated_trans_table(thd) || + (!thd->variables.binlog_direct_non_trans_update && + trans_log_pos != 0)) { DBUG_PRINT("info", ("Using trans_log: cache: %d, trans_log_pos: %lu", event_info->get_cache_stmt(), diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 7bb357827c8..242acd28ecc 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5727,7 +5727,8 @@ enum options_mysqld OPT_SLAVE_EXEC_MODE, OPT_GENERAL_LOG_FILE, OPT_SLOW_QUERY_LOG_FILE, - OPT_IGNORE_BUILTIN_INNODB + OPT_IGNORE_BUILTIN_INNODB, + OPT_BINLOG_DIRECT_NON_TRANS_UPDATE }; @@ -7071,6 +7072,10 @@ The minimum value for this variable is 4096.", (uchar**) &max_system_variables.net_wait_timeout, 0, GET_ULONG, REQUIRED_ARG, NET_WAIT_TIMEOUT, 1, IF_WIN(INT_MAX32/1000, LONG_TIMEOUT), 0, 1, 0}, + {"binlog-direct-non-transactional-updates", OPT_BINLOG_DIRECT_NON_TRANS_UPDATE, + "Causes updates to non-transactional engines using statement format to be written directly to binary log. Before using this option make sure that there are no dependencies between transactional and non-transactional tables such as in the statement INSERT INTO t_myisam SELECT * FROM t_innodb; otherwise, slaves may diverge from the master.", + (uchar**) &global_system_variables.binlog_direct_non_trans_update, (uchar**) &max_system_variables.binlog_direct_non_trans_update, 0, GET_BOOL, NO_ARG, 0, + 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; diff --git a/sql/set_var.cc b/sql/set_var.cc index 3c6b259045d..e06ad9dcc59 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -181,6 +181,8 @@ static sys_var_long_ptr sys_binlog_cache_size(&vars, "binlog_cache_size", &binlog_cache_size); static sys_var_thd_binlog_format sys_binlog_format(&vars, "binlog_format", &SV::binlog_format); +static sys_var_thd_bool sys_binlog_direct_non_trans_update(&vars, "binlog_direct_non_transactional_updates", + &SV::binlog_direct_non_trans_update); static sys_var_thd_ulong sys_bulk_insert_buff_size(&vars, "bulk_insert_buffer_size", &SV::bulk_insert_buff_size); static sys_var_const_os sys_character_sets_dir(&vars, diff --git a/sql/sql_class.h b/sql/sql_class.h index 8acc03f929d..56d31be79c7 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -353,6 +353,7 @@ struct system_variables ulong ndb_index_stat_cache_entries; ulong ndb_index_stat_update_freq; ulong binlog_format; // binlog format for this thd (see enum_binlog_format) + my_bool binlog_direct_non_trans_update; /* In slave thread we need to know in behalf of which thread the query is being run to replicate temp tables properly From c730af0ecf1ab0e3ea76bcd5e1d20451bcc661dd Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Wed, 20 Jan 2010 23:22:43 +0300 Subject: [PATCH 071/132] Fix manual merge error. --- mysql-test/r/mysqlbinlog.result | 34 ++++++++++++++++----------------- mysql-test/t/mysqlbinlog.test | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 0d1af602b54..097e51a78de 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -59,7 +59,7 @@ SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -68,7 +68,7 @@ SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -77,7 +77,7 @@ SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -86,7 +86,7 @@ SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -113,7 +113,7 @@ BEGIN /*!*/; use test/*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -260,7 +260,7 @@ SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -269,7 +269,7 @@ SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -278,7 +278,7 @@ SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -287,7 +287,7 @@ SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -314,7 +314,7 @@ BEGIN /*!*/; use test/*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -564,7 +564,7 @@ SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -574,7 +574,7 @@ SET @@session.collation_database=7/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -584,7 +584,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -593,7 +593,7 @@ SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -603,7 +603,7 @@ SET @@session.collation_database=7/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -613,7 +613,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -622,7 +622,7 @@ SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; -LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO TABLE `t1` CHARACTER SET koi8r FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO TABLE `t1` CHARACTER SET koi8r FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index bcd03c1baac..55593bed124 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -71,7 +71,7 @@ select "--- --position --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=1072 $MYSQLD_DATADIR/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=1074 $MYSQLD_DATADIR/master-bin.000002 # These are tests for remote binlog. # They should return the same as previous test. @@ -107,7 +107,7 @@ select "--- --position --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=1072 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=1074 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 # Bug#7853 mysqlbinlog does not accept input from stdin From 45d2799a15a2bdde386b113cd6fcab915d4984d2 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Wed, 20 Jan 2010 22:21:18 -0200 Subject: [PATCH 072/132] Apply patch on behalf of the NDB team: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 3321 Magnus Blåudd 2010-01-05 BUG#44840 - ndbapi compiler warning - type qualifier ignored for function return type - Remove the "const" - NOTE! This is an ABI incompatible change for some C++ compilers, NdbApi applications using any of the four changed functions may need a recompile if it's using dynamic linking. --- storage/ndb/include/ndbapi/NdbEventOperation.hpp | 8 ++++---- storage/ndb/include/ndbapi/NdbOperation.hpp | 4 ++-- storage/ndb/src/ndbapi/NdbEventOperation.cpp | 8 ++++---- storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp | 8 ++++---- storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/storage/ndb/include/ndbapi/NdbEventOperation.hpp b/storage/ndb/include/ndbapi/NdbEventOperation.hpp index 437088d2893..0f98a4debef 100644 --- a/storage/ndb/include/ndbapi/NdbEventOperation.hpp +++ b/storage/ndb/include/ndbapi/NdbEventOperation.hpp @@ -178,22 +178,22 @@ public: /** * Check if table name has changed, for event TE_ALTER */ - const bool tableNameChanged() const; + bool tableNameChanged() const; /** * Check if table frm has changed, for event TE_ALTER */ - const bool tableFrmChanged() const; + bool tableFrmChanged() const; /** * Check if table fragmentation has changed, for event TE_ALTER */ - const bool tableFragmentationChanged() const; + bool tableFragmentationChanged() const; /** * Check if table range partition list name has changed, for event TE_ALTER */ - const bool tableRangeListChanged() const; + bool tableRangeListChanged() const; /** * Retrieve the GCI of the latest retrieved event diff --git a/storage/ndb/include/ndbapi/NdbOperation.hpp b/storage/ndb/include/ndbapi/NdbOperation.hpp index 78dbadfd7ab..713c29f028d 100644 --- a/storage/ndb/include/ndbapi/NdbOperation.hpp +++ b/storage/ndb/include/ndbapi/NdbOperation.hpp @@ -779,7 +779,7 @@ public: /** * Get the type of access for this operation */ - const Type getType() const; + Type getType() const; /** @} *********************************************************************/ @@ -1135,7 +1135,7 @@ Return Value Return the Type. Remark: Gets type of access. ******************************************************************************/ inline -const NdbOperation::Type +NdbOperation::Type NdbOperation::getType() const { return m_type; diff --git a/storage/ndb/src/ndbapi/NdbEventOperation.cpp b/storage/ndb/src/ndbapi/NdbEventOperation.cpp index 5c6ed562dcc..1353ca40e95 100644 --- a/storage/ndb/src/ndbapi/NdbEventOperation.cpp +++ b/storage/ndb/src/ndbapi/NdbEventOperation.cpp @@ -96,22 +96,22 @@ NdbEventOperation::hasError() const return m_impl.m_has_error; } -const bool NdbEventOperation::tableNameChanged() const +bool NdbEventOperation::tableNameChanged() const { return m_impl.tableNameChanged(); } -const bool NdbEventOperation::tableFrmChanged() const +bool NdbEventOperation::tableFrmChanged() const { return m_impl.tableFrmChanged(); } -const bool NdbEventOperation::tableFragmentationChanged() const +bool NdbEventOperation::tableFragmentationChanged() const { return m_impl.tableFragmentationChanged(); } -const bool NdbEventOperation::tableRangeListChanged() const +bool NdbEventOperation::tableRangeListChanged() const { return m_impl.tableRangeListChanged(); } diff --git a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp index dff953923fe..ed60650e33e 100644 --- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp +++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp @@ -658,22 +658,22 @@ NdbEventOperationImpl::stop() DBUG_RETURN(r); } -const bool NdbEventOperationImpl::tableNameChanged() const +bool NdbEventOperationImpl::tableNameChanged() const { return (bool)AlterTableReq::getNameFlag(m_change_mask); } -const bool NdbEventOperationImpl::tableFrmChanged() const +bool NdbEventOperationImpl::tableFrmChanged() const { return (bool)AlterTableReq::getFrmFlag(m_change_mask); } -const bool NdbEventOperationImpl::tableFragmentationChanged() const +bool NdbEventOperationImpl::tableFragmentationChanged() const { return (bool)AlterTableReq::getFragDataFlag(m_change_mask); } -const bool NdbEventOperationImpl::tableRangeListChanged() const +bool NdbEventOperationImpl::tableRangeListChanged() const { return (bool)AlterTableReq::getRangeListFlag(m_change_mask); } diff --git a/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp b/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp index 3d71146588d..c027226584c 100644 --- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp +++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp @@ -361,10 +361,10 @@ public: NdbBlob *getBlobHandle(const NdbColumnImpl *, int n); int readBlobParts(char* buf, NdbBlob* blob, Uint32 part, Uint32 count); int receive_event(); - const bool tableNameChanged() const; - const bool tableFrmChanged() const; - const bool tableFragmentationChanged() const; - const bool tableRangeListChanged() const; + bool tableNameChanged() const; + bool tableFrmChanged() const; + bool tableFragmentationChanged() const; + bool tableRangeListChanged() const; Uint64 getGCI(); Uint32 getAnyValue() const; Uint64 getLatestGCI(); From 9eae1881b384592e8fc13a78000071a08fe7370f Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Wed, 20 Jan 2010 22:22:20 -0200 Subject: [PATCH 073/132] Apply patch on behalf of Magnus: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 3325 Magnus Blåudd 2010-01-05 Bug #49860 new compiler warning ha_archive - fix compiler warning by casting to ulong --- storage/archive/ha_archive.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc index 4648ca798da..42ff9daa77e 100644 --- a/storage/archive/ha_archive.cc +++ b/storage/archive/ha_archive.cc @@ -1490,7 +1490,7 @@ int ha_archive::info(uint flag) stats.create_time= (ulong) file_stat.st_ctime; stats.update_time= (ulong) file_stat.st_mtime; stats.mean_rec_length= stats.records ? - stats.data_file_length / stats.records : table->s->reclength; + ulong(stats.data_file_length / stats.records) : table->s->reclength; stats.max_data_file_length= MAX_FILE_SIZE; } stats.delete_length= 0; From 132b46e96eb48b8d9d993583ed7b9ecd87e53674 Mon Sep 17 00:00:00 2001 From: Magne Mahre Date: Thu, 21 Jan 2010 09:10:05 +0100 Subject: [PATCH 074/132] WL#5154 Remove deprecated 4.1 features Several items said to be deprecated in the 4.1 manual have never been removed. This worklog adds deprecation warnings when these items are used, and warns the user that the items will be removed in MySQL 5.6. A couple of previously deprecation decision have been reversed (see single file comments) client/client_priv.h: Macro similar to the one in the server (mysql_priv.h) for printing a deprecation warning message client/mysql.cc: no-auto-rehash will not be deprecated skip-line-numbers will not be deprecated skip-column-names will not be deprecated no-pager is deprecated set-variable is deprecated no-named-commands is deprecated client/mysqladmin.cc: set-variable is deprecated client/mysqlbinlog.cc: position is deprecated client/mysqldump.c: first-slave is deprecated no-set-names is deprecated set-variable is deprecated mysql-test/r/mysqlbinlog.result: Adding the [Warning] to the test case, just to show that the deprecation works. The test case will be changed in Celosia to use --start-position. mysys/my_getopt.c: set-variable (include -O) is deprecated scripts/mysqld_multi.sh: Warning for mysqld_multi sql/mysqld.cc: default-collation is deprecated log-bin-trust-routine-creators is deprecated set-variable is deprecated default-character-set is deprecated safe-show-database is deprecated sql/share/errmsg.txt: Added version number for sql_log_update deprecation message. --- client/client_priv.h | 12 +++++++++++- client/mysql.cc | 17 +++++++++++++---- client/mysqladmin.cc | 3 +++ client/mysqlbinlog.cc | 8 ++++++-- client/mysqldump.c | 11 ++++++++--- mysql-test/r/func_time.result | 10 +++++----- mysql-test/r/mysqlbinlog.result | 3 +++ mysql-test/r/variables.result | 2 +- mysys/my_getopt.c | 9 +++++++++ scripts/mysqld_multi.sh | 3 +++ sql/mysql_priv.h | 4 ++++ sql/mysqld.cc | 22 ++++++++++++++++++++-- sql/set_var.cc | 2 +- sql/share/errmsg.txt | 8 ++++---- sql/sql_yacc.yy | 2 +- 15 files changed, 92 insertions(+), 24 deletions(-) diff --git a/client/client_priv.h b/client/client_priv.h index 06145232995..9d2fc2be141 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -31,6 +31,15 @@ # endif #endif +/* Version numbers for deprecation messages */ +#define VER_CELOSIA "5.6" + +#define WARN_DEPRECATED(Ver,Old,New) \ + do { \ + printf("Warning: The option '%s' is deprecated and will be removed " \ + "in MySQL %s. Please use %s instead.\n", (Old), (Ver), (New)); \ + } while(0); + enum options_client { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, @@ -49,7 +58,7 @@ enum options_client OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION, OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH, OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_CREATE_OPTIONS, OPT_SERVER_ARG, - OPT_START_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME, + OPT_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME, OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY, OPT_COUNT, #ifdef HAVE_NDBCLUSTER_DB OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING, @@ -80,5 +89,6 @@ enum options_client OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT, OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE, OPT_WRITE_BINLOG, OPT_DUMP_DATE, + OPT_FIRST_SLAVE, OPT_MAX_CLIENT_OPTION }; diff --git a/client/mysql.cc b/client/mysql.cc index b3854636bb2..b3b73fdb468 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -54,6 +54,9 @@ static char *server_version= NULL; /* Array of options to pass to libemysqld */ #define MAX_SERVER_ARGS 64 +/* Version numbers for deprecation messages */ +#define VER_CELOSIA "5.6" + void* sql_alloc(unsigned size); // Don't use mysqld alloc for these void sql_element_free(void *ptr); #include "sql_string.h" @@ -1343,7 +1346,7 @@ static struct my_option my_long_options[] = (uchar**) &opt_rehash, (uchar**) &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"no-auto-rehash", 'A', - "No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect. WARNING: options deprecated; use --disable-auto-rehash instead.", + "No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"batch", 'B', "Don't use history file. Disable interactive behavior. (Enables --silent)", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -1412,7 +1415,7 @@ static struct my_option my_long_options[] = {"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.", (uchar**) &line_numbers, (uchar**) &line_numbers, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, - {"skip-line-numbers", 'L', "Don't write line number for errors. WARNING: -L is deprecated, use long version of this option instead.", 0, 0, 0, GET_NO_ARG, + {"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"unbuffered", 'n', "Flush buffer after each query.", (uchar**) &unbuffered, (uchar**) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -1420,7 +1423,7 @@ static struct my_option my_long_options[] = (uchar**) &column_names, (uchar**) &column_names, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"skip-column-names", 'N', - "Don't write column names in results. WARNING: -N is deprecated, use long version of this options instead.", + "Don't write column names in results.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"set-variable", 'O', "Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.", @@ -1650,7 +1653,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), } break; case OPT_NOPAGER: - printf("WARNING: option deprecated; use --disable-pager instead.\n"); + WARN_DEPRECATED(VER_CELOSIA, "--no-pager", "--disable-pager"); opt_nopager= 1; break; case OPT_MYSQL_PROTOCOL: @@ -1696,12 +1699,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), if (!(status.line_buff= batch_readline_command(status.line_buff, argument))) return 1; break; + case 'g': + WARN_DEPRECATED(VER_CELOSIA, "-g, --no-named-commands", "--skip-named-commands"); + break; case 'o': if (argument == disabled_my_option) one_database= 0; else one_database= skip_updates= 1; break; + case 'O': + WARN_DEPRECATED(VER_CELOSIA, "-O, --set-variable", "--variable-name=value"); + break; case 'p': if (argument == disabled_my_option) argument= (char*) ""; // Don't require password diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index 2b93c149523..04e25fcf1ff 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -282,6 +282,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), charsets_dir = argument; #endif break; + case 'O': + WARN_DEPRECATED(VER_CELOSIA, "--set-variable", "--variable-name=value"); + break; case OPT_MYSQL_PROTOCOL: opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib, opt->name); diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index f55dc75df5d..1c0f6e5f96a 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -41,6 +41,7 @@ #define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_LOCAL_FILES) + char server_version[SERVER_VERSION_LENGTH]; ulong server_id = 0; @@ -1060,7 +1061,7 @@ static struct my_option my_long_options[] = "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").", (uchar**) &port, (uchar**) &port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"position", 'j', "Deprecated. Use --start-position instead.", + {"position", OPT_POSITION, "Deprecated. Use --start-position instead.", (uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL, REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE, /* COM_BINLOG_DUMP accepts only 4 bytes for the position */ @@ -1103,7 +1104,7 @@ static struct my_option my_long_options[] = "(you should probably use quotes for your shell to set it properly).", (uchar**) &start_datetime_str, (uchar**) &start_datetime_str, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"start-position", OPT_START_POSITION, + {"start-position", 'j', "Start reading the binlog at position N. Applies to the first binlog " "passed on the command line.", (uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL, @@ -1314,6 +1315,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case 'R': remote_opt= 1; break; + case OPT_POSITION: + WARN_DEPRECATED(VER_CELOSIA, "--position", "--start-position"); + break; case OPT_MYSQL_PROTOCOL: opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib, opt->name); diff --git a/client/mysqldump.c b/client/mysqldump.c index 56d6c12981f..25a8d7b0f6f 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -282,7 +282,7 @@ static struct my_option my_long_options[] = (uchar**) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0}, {"fields-escaped-by", OPT_ESC, "Fields in the i.file are escaped by ...", (uchar**) &escaped, (uchar**) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"first-slave", 'x', "Deprecated, renamed to --lock-all-tables.", + {"first-slave", OPT_FIRST_SLAVE, "Deprecated, renamed to --lock-all-tables.", (uchar**) &opt_lock_all_tables, (uchar**) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"flush-logs", 'F', "Flush logs file in server before starting dump. " @@ -366,8 +366,7 @@ static struct my_option my_long_options[] = NO_ARG, 0, 0, 0, 0, 0, 0}, {"no-data", 'd', "No row information.", (uchar**) &opt_no_data, (uchar**) &opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"no-set-names", 'N', - "Deprecated. Use --skip-set-charset instead.", + {"no-set-names", 'N',"Suppress the SET NAMES statement", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"opt", OPT_OPTIMIZE, "Same as --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys. Enabled by default, disable with --skip-opt.", @@ -760,6 +759,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case '?': usage(); exit(0); + case 'O': + WARN_DEPRECATED(VER_CELOSIA, "--set-variable", "--variable-name=value"); + break; + case (int) OPT_FIRST_SLAVE: + WARN_DEPRECATED(VER_CELOSIA, "--first-slave", "--lock-all-tables"); + break; case (int) OPT_MASTER_DATA: if (!argument) /* work like in old versions */ opt_master_data= MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL; diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 0fa143d95bc..2ac549a5abd 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -682,7 +682,7 @@ select timestampadd(SQL_TSI_FRAC_SECOND, 1, date) from t1; timestampadd(SQL_TSI_FRAC_SECOND, 1, date) 2003-01-02 00:00:00.000001 Warnings: -Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead +Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead select timestampdiff(MONTH, '2001-02-01', '2001-05-01') as a; a 3 @@ -717,7 +717,7 @@ select timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05 a 7689538999999 Warnings: -Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead +Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead select timestampdiff(SQL_TSI_DAY, '1986-02-01', '1986-03-01') as a1, timestampdiff(SQL_TSI_DAY, '1900-02-01', '1900-03-01') as a2, timestampdiff(SQL_TSI_DAY, '1996-02-01', '1996-03-01') as a3, @@ -1088,7 +1088,7 @@ timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12: id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead +Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead Note 1003 select timestampdiff(WEEK,'2001-02-01','2001-05-01') AS `a1`,timestampdiff(SECOND_FRAC,'2001-02-01 12:59:59.120000','2001-05-01 12:58:58.119999') AS `a2` select time_format('100:00:00', '%H %k %h %I %l'); time_format('100:00:00', '%H %k %h %I %l') @@ -1287,12 +1287,12 @@ SELECT TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18'); TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18') 2008-02-18 00:00:00.000001 Warnings: -Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead +Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead SELECT TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18'); TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18') 86400000000 Warnings: -Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead +Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead SELECT DATE_ADD('2008-02-18', INTERVAL 1 FRAC_SECOND); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FRAC_SECOND)' at line 1 SELECT DATE_SUB('2008-02-18', INTERVAL 1 FRAC_SECOND); diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 9d4fde96d18..f5c40202101 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -93,6 +93,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- --position -- +Warning: The option '--position' is deprecated and will be removed in MySQL 5.6. Please use --start-position instead. /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; @@ -193,6 +194,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- --position -- +Warning: The option '--position' is deprecated and will be removed in MySQL 5.6. Please use --start-position instead. /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; @@ -233,6 +235,7 @@ DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +Warning: The option '--position' is deprecated and will be removed in MySQL 5.6. Please use --start-position instead. /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 541b2b2fb86..7f45046fab5 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -566,7 +566,7 @@ set sql_log_bin=1; set sql_log_off=1; set sql_log_update=1; Warnings: -Note 1315 The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored +Note 1315 The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored. This option will be removed in MySQL 5.6. set sql_low_priority_updates=1; set sql_max_join_size=200; select @@sql_max_join_size,@@max_join_size; diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index e561d74f4d1..fc5662812b0 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -146,6 +146,10 @@ int handle_options(int *argc, char ***argv, { /* --set-variable, or -O */ if (*cur_arg == 'O') { + my_getopt_error_reporter(WARNING_LEVEL, + "%s: Option '-O' is deprecated. " + "Use --variable-name=value instead.", + my_progname); must_be_var= 1; if (!(*++cur_arg)) /* If not -Ovar=# */ @@ -165,6 +169,11 @@ int handle_options(int *argc, char ***argv, } else if (!getopt_compare_strings(cur_arg, "-set-variable", 13)) { + my_getopt_error_reporter(WARNING_LEVEL, + "%s: Option '--set-variable' is deprecated. " + "Use --variable-name=value instead.", + my_progname); + must_be_var= 1; if (cur_arg[13] == '=') { diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index 430c74874eb..528a1ca2e98 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -68,7 +68,10 @@ sub main # than a correct --defaults-extra-file option unshift @defaults_options, "--defaults-extra-file=$1"; + print "WARNING: --config-file is deprecated and will be removed\n"; + print "in MySQL 5.6. Please use --defaults-extra-file instead\n"; } + } } foreach (@defaults_options) diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 2be3b8f1f20..76edbf1dea3 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -111,6 +111,10 @@ char* query_table_status(THD *thd,const char *db,const char *table_name); #define PREV_BITS(type,A) ((type) (((type) 1 << (A)) -1)) #define all_bits_set(A,B) ((A) & (B) != (B)) +/* Version numbers for deprecation messages */ +#define VER_BETONY "5.5" +#define VER_CELOSIA "5.6" + #define WARN_DEPRECATED(Thd,Ver,Old,New) \ do { \ DBUG_ASSERT(strncmp(Ver, MYSQL_SERVER_VERSION, sizeof(Ver)-1) > 0); \ diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 242acd28ecc..db0453dc364 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5603,6 +5603,7 @@ enum options_mysqld OPT_DISCONNECT_SLAVE_EVENT_COUNT, OPT_TC_HEURISTIC_RECOVER, OPT_ABORT_SLAVE_EVENT_COUNT, OPT_LOG_BIN_TRUST_FUNCTION_CREATORS, + OPT_LOG_BIN_TRUST_FUNCTION_CREATORS_OLD, OPT_ENGINE_CONDITION_PUSHDOWN, OPT_NDB_CONNECTSTRING, OPT_NDB_USE_EXACT_COUNT, OPT_NDB_USE_TRANSACTIONS, OPT_NDB_FORCE_SEND, OPT_NDB_AUTOINCREMENT_PREFETCH_SZ, @@ -5683,6 +5684,7 @@ enum options_mysqld OPT_EXPIRE_LOGS_DAYS, OPT_GROUP_CONCAT_MAX_LEN, OPT_DEFAULT_COLLATION, + OPT_DEFAULT_COLLATION_OLD, OPT_CHARACTER_SET_CLIENT_HANDSHAKE, OPT_CHARACTER_SET_FILESYSTEM, OPT_LC_TIME_NAMES, @@ -5857,7 +5859,7 @@ struct my_option my_long_options[] = {"default-character-set", 'C', "Set the default character set (deprecated option, use --character-set-server instead).", (uchar**) &default_character_set_name, (uchar**) &default_character_set_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, - {"default-collation", OPT_DEFAULT_COLLATION, "Set the default collation (deprecated option, use --collation-server instead).", + {"default-collation", OPT_DEFAULT_COLLATION_OLD, "Set the default collation (deprecated option, use --collation-server instead).", (uchar**) &default_collation_name, (uchar**) &default_collation_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, {"default-storage-engine", OPT_STORAGE_ENGINE, @@ -5988,7 +5990,7 @@ each time the SQL thread starts.", compatibility; the behaviour was also changed to apply only to functions (and triggers). In a future release this old name could be removed. */ - {"log-bin-trust-routine-creators", OPT_LOG_BIN_TRUST_FUNCTION_CREATORS, + {"log-bin-trust-routine-creators", OPT_LOG_BIN_TRUST_FUNCTION_CREATORS_OLD, "(deprecated) Use log-bin-trust-function-creators.", (uchar**) &trust_function_creators, (uchar**) &trust_function_creators, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -7905,6 +7907,9 @@ mysqld_get_one_option(int optid, #endif opt_endinfo=1; /* unireg: memory allocation */ break; + case '0': + WARN_DEPRECATED(NULL, VER_CELOSIA, "--log-long-format", "--log-short-format"); + break; case 'a': global_system_variables.sql_mode= fix_sql_mode(MODE_ANSI); global_system_variables.tx_isolation= ISO_SERIALIZABLE; @@ -7913,6 +7918,7 @@ mysqld_get_one_option(int optid, strmake(mysql_home,argument,sizeof(mysql_home)-1); break; case 'C': + WARN_DEPRECATED(NULL, VER_CELOSIA, "--default-character-set", "--character-set-server"); if (default_collation_name == compiled_default_collation_name) default_collation_name= 0; break; @@ -7935,6 +7941,9 @@ mysqld_get_one_option(int optid, case 'L': strmake(language, argument, sizeof(language)-1); break; + case 'O': + WARN_DEPRECATED(NULL, VER_CELOSIA, "--set-variable", "--variable-name=value"); + break; #ifdef HAVE_REPLICATION case OPT_SLAVE_SKIP_ERRORS: init_slave_skip_errors(argument); @@ -7969,6 +7978,15 @@ mysqld_get_one_option(int optid, test_flags= argument ? (uint) atoi(argument) : 0; opt_endinfo=1; break; + case (int) OPT_DEFAULT_COLLATION_OLD: + WARN_DEPRECATED(NULL, VER_CELOSIA, "--default-collation", "--collation-server"); + break; + case (int) OPT_SAFE_SHOW_DB: + WARN_DEPRECATED(NULL, VER_CELOSIA, "--safe-show-database", "GRANT SHOW DATABASES"); + break; + case (int) OPT_LOG_BIN_TRUST_FUNCTION_CREATORS_OLD: + WARN_DEPRECATED(NULL, VER_CELOSIA, "--log-bin-trust-routine-creators", "--log-bin-trust-function-creators"); + break; case (int) OPT_BIG_TABLES: thd_startup_options|=OPTION_BIG_TABLES; break; diff --git a/sql/set_var.cc b/sql/set_var.cc index e06ad9dcc59..2c00d76b0f1 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -4139,7 +4139,7 @@ bool process_key_caches(process_key_cache_t func) void sys_var_trust_routine_creators::warn_deprecated(THD *thd) { - WARN_DEPRECATED(thd, "6.0", "@@log_bin_trust_routine_creators", + WARN_DEPRECATED(thd, VER_CELOSIA, "@@log_bin_trust_routine_creators", "'@@log_bin_trust_function_creators'"); } diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 6d1b7aaf1ee..06ce848399b 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5138,11 +5138,11 @@ ER_SP_BADSTATEMENT 0A000 eng "%s is not allowed in stored procedures" ger "%s ist in gespeicherten Prozeduren nicht erlaubt" ER_UPDATE_LOG_DEPRECATED_IGNORED 42000 - eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored" - ger "Das Update-Log ist veraltet und wurde durch das Binr-Log ersetzt. SET SQL_LOG_UPDATE wird ignoriert" + eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored. This option will be removed in MySQL 5.6." + ger "Das Update-Log ist veraltet und wurde durch das Binr-Log ersetzt. SET SQL_LOG_UPDATE wird ignoriert. Diese Option wird in MySQL 5.6 entfernt." ER_UPDATE_LOG_DEPRECATED_TRANSLATED 42000 - eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been translated to SET SQL_LOG_BIN" - ger "Das Update-Log ist veraltet und wurde durch das Binr-Log ersetzt. SET SQL_LOG_UPDATE wurde in SET SQL_LOG_BIN bersetzt" + eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been translated to SET SQL_LOG_BIN. This option will be removed in MySQL 5.6." + ger "Das Update-Log ist veraltet und wurde durch das Binr-Log ersetzt. SET SQL_LOG_UPDATE wurde in SET SQL_LOG_BIN bersetzt. Diese Option wird in MySQL 5.6 entfernt." ER_QUERY_INTERRUPTED 70100 eng "Query execution was interrupted" ger "Ausfhrung der Abfrage wurde unterbrochen" diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 6dc2becf664..8dc08f8425f 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -8932,7 +8932,7 @@ interval_time_stamp: implementation without changing its resolution. */ - WARN_DEPRECATED(yythd, "6.2", "FRAC_SECOND", "MICROSECOND"); + WARN_DEPRECATED(yythd, VER_CELOSIA, "FRAC_SECOND", "MICROSECOND"); } ; From 83f7a74bd4c5884a3ca082b7d5cc308ffe194ab7 Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Thu, 21 Jan 2010 14:16:12 +0000 Subject: [PATCH 075/132] BUG#50397 rpl.rpl_heartbeat_basic fails in mysql-trunk-merge Resetting the master before stopping the slave was generating the message "[ERROR] Slave I/O: Got fatal error 1236 from master when reading data from binary log: 'could not find next log', Error_code: 1236". In consequence, the test case was failing because the message had not been suppressed. To circumvent the failure, we rewrote the test stopping the slave before resetting the master. We prefer this alternative rather than suppressing the message. --- mysql-test/suite/rpl/r/rpl_heartbeat_basic.result | 13 +++++++------ mysql-test/suite/rpl/t/rpl_heartbeat_basic.test | 14 ++++---------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result index d229e1260dd..25a623b200e 100644 --- a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result +++ b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result @@ -266,15 +266,16 @@ Reload master Heartbeat event received *** Circular replication *** -RESET MASTER; -CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; include/stop_slave.inc -RESET MASTER; -RESET SLAVE; -CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_LOG_FILE='MASTER_BINLOG'; -RESET SLAVE; CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=SLAVE_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='SLAVE_BINLOG'; include/start_slave.inc +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); INSERT INTO t1 VALUES(1, 'on master'); include/start_slave.inc INSERT INTO t1 VALUES(2, 'on slave'); diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test index 10d327eece0..739cbe155ca 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test @@ -473,23 +473,17 @@ let $status_var_comparsion= >; # Circular replication --echo *** Circular replication *** # Configure circular replication ---connection master -RESET MASTER; -let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1); -CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); ---sync_slave_with_master +--source include/master-slave-reset.inc +--connection slave --source include/stop_slave.inc -RESET MASTER; let $slave_binlog= query_get_value(SHOW MASTER STATUS, File, 1); -RESET SLAVE; ---replace_result $MASTER_MYPORT MASTER_PORT $master_binlog MASTER_BINLOG -eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_LOG_FILE='$master_binlog'; --connection master -RESET SLAVE; --replace_result $SLAVE_MYPORT SLAVE_PORT $slave_binlog SLAVE_BINLOG eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='$slave_binlog'; --source include/start_slave.inc + # Insert data on master and on slave and make sure that it replicated for both directions +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); INSERT INTO t1 VALUES(1, 'on master'); --save_master_pos --connection slave From 679de2bb5eb36c900c0f9db189283e73ab4acbcc Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Thu, 21 Jan 2010 17:14:10 +0200 Subject: [PATCH 076/132] Bug #50276: Security flaw in INFORMATION_SCHEMA.TABLES check_access() returning false for a database does not guarantee that the access is granted to it. This wrong condition in filling the INFORMATION_SCHEMA tables causes extra tables to be returned to the user even if he has no rights to see them. Fixed by correcting the condition. --- mysql-test/r/information_schema.result | 22 +++++++++++++++++++++ mysql-test/t/information_schema.test | 27 ++++++++++++++++++++++++++ sql/sql_show.cc | 8 ++++---- 3 files changed, 53 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 9a75e478264..4ed7e4e700b 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1725,4 +1725,26 @@ SELECT 'OK' AS TEST_RESULT FROM INFORMATION_SCHEMA.PROCESSLIST WHERE time < 0; TEST_RESULT OK SET TIMESTAMP=DEFAULT; +# +# Bug #50276: Security flaw in INFORMATION_SCHEMA.TABLES +# +CREATE DATABASE db1; +USE db1; +CREATE TABLE t1 (id INT); +CREATE USER nonpriv; +USE test; +# connected as nonpriv +# Should return 0 +SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1'; +COUNT(*) +0 +USE INFORMATION_SCHEMA; +# Should return 0 +SELECT COUNT(*) FROM TABLES WHERE TABLE_NAME='t1'; +COUNT(*) +0 +# connected as root +DROP USER nonpriv; +DROP TABLE db1.t1; +DROP DATABASE db1; End of 5.1 tests. diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 392d1062492..f3ce3d87252 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1419,6 +1419,33 @@ SET TIMESTAMP=@@TIMESTAMP + 10000000; SELECT 'OK' AS TEST_RESULT FROM INFORMATION_SCHEMA.PROCESSLIST WHERE time < 0; SET TIMESTAMP=DEFAULT; + +--echo # +--echo # Bug #50276: Security flaw in INFORMATION_SCHEMA.TABLES +--echo # +CREATE DATABASE db1; +USE db1; +CREATE TABLE t1 (id INT); +CREATE USER nonpriv; +USE test; + +connect (nonpriv_con, localhost, nonpriv,,); +connection nonpriv_con; +--echo # connected as nonpriv +--echo # Should return 0 +SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1'; +USE INFORMATION_SCHEMA; +--echo # Should return 0 +SELECT COUNT(*) FROM TABLES WHERE TABLE_NAME='t1'; + +connection default; +--echo # connected as root +disconnect nonpriv_con; +DROP USER nonpriv; +DROP TABLE db1.t1; +DROP DATABASE db1; + + --echo End of 5.1 tests. # Wait till all disconnects are completed diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 5ec40d4893c..989606300d8 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3367,11 +3367,11 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond) while ((db_name= it++)) { #ifndef NO_EMBEDDED_ACCESS_CHECKS - if (!check_access(thd,SELECT_ACL, db_name->str, - &thd->col_access, 0, 1, with_i_schema) || + if (!(check_access(thd,SELECT_ACL, db_name->str, + &thd->col_access, 0, 1, with_i_schema) || + (!thd->col_access && check_grant_db(thd, db_name->str))) || sctx->master_access & (DB_ACLS | SHOW_DB_ACL) || - acl_get(sctx->host, sctx->ip, sctx->priv_user, db_name->str, 0) || - !check_grant_db(thd, db_name->str)) + acl_get(sctx->host, sctx->ip, sctx->priv_user, db_name->str, 0)) #endif { thd->no_warnings_for_error= 1; From 73f10f0662ce40b5cc6e8bc4d04f6cee45768ae7 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Thu, 21 Jan 2010 17:20:24 +0000 Subject: [PATCH 077/132] BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on delete: cant find record Some engines return data for the record. Despite the fact that the null bit is set for some fields, their old value may still in the row. This can happen when unpacking an AI from the binlog on top of a previous record in which a field is set to NULL, which previously contained a value. Ultimately, this may cause the comparison of records to fail when the slave is doing an index or range scan. We fix this by deploying a call to reset() for each field that is set to null while unpacking a row from the binary log. Furthermore, we also add mixed mode test case to cover the scenario where updating and setting a field to null through a Query event and later searching it through a rows event will succeed. Finally, we also change the reset() method, from Field_bit class, so that it takes into account bits stored among the null bits and not only the ones stored in the record. mysql-test/suite/rpl/t/rpl_set_null_innodb.test: InnoDB test. mysql-test/suite/rpl/t/rpl_set_null_myisam.test: MyISAM test. mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test: NDB test. sql/field.h: Changed reset so that it also clears the bits among the null_bits for the Field_bit class. sql/rpl_record.cc: Resetting field after setting it to null when unpacking row. --- mysql-test/extra/rpl_tests/rpl_set_null.test | 86 +++++++++++++++++++ .../suite/rpl/r/rpl_set_null_innodb.result | 35 ++++++++ .../suite/rpl/r/rpl_set_null_myisam.result | 35 ++++++++ .../suite/rpl/t/rpl_set_null_innodb.test | 6 ++ .../suite/rpl/t/rpl_set_null_myisam.test | 5 ++ .../suite/rpl_ndb/r/rpl_ndb_set_null.result | 35 ++++++++ .../suite/rpl_ndb/t/rpl_ndb_set_null.test | 6 ++ sql/field.h | 7 +- sql/rpl_record.cc | 11 +++ 9 files changed, 225 insertions(+), 1 deletion(-) create mode 100644 mysql-test/extra/rpl_tests/rpl_set_null.test create mode 100644 mysql-test/suite/rpl/r/rpl_set_null_innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_set_null_myisam.result create mode 100644 mysql-test/suite/rpl/t/rpl_set_null_innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_set_null_myisam.test create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test diff --git a/mysql-test/extra/rpl_tests/rpl_set_null.test b/mysql-test/extra/rpl_tests/rpl_set_null.test new file mode 100644 index 00000000000..f2aba089279 --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_set_null.test @@ -0,0 +1,86 @@ +# Both of the following tests check that comparison of binlog BI +# against SE record will not fail due to remains from previous values +# in the SE record (before a given field was set to null). +# +# In MIXED mode: +# - Insert and update are executed as statements +# - Delete is executed as a row event +# - Assertion: checks that comparison will not fail because the update +# statement will clear the record contents for the nulled +# field. If data was not cleared, some engines may keep +# the value and return it later as garbage - despite the +# fact that field is null. This may cause slave to +# falsely fail in the comparison (memcmp would fail +# because of "garbage" in record data). +# +# In ROW mode: +# - Insert, update and delete are executed as row events. +# - Assertion: checks that comparison will not fail because the update +# rows event will clear the record contents before +# feeding the new value to the SE. This protects against +# SEs that do not clear record contents when storing +# nulled fields. If the engine did not clear the data it +# would cause slave to falsely fail in the comparison +# (memcmp would fail because of "garbage" in record +# data). This scenario is pretty much the same described +# above in MIXED mode, but checks different execution +# path in the slave. + +# BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on +# delete cant find record + +-- source include/master-slave-reset.inc + +-- connection master +-- eval CREATE TABLE t1 (c1 BIT, c2 INT) Engine=$engine +INSERT INTO `t1` VALUES ( 1, 1 ); +UPDATE t1 SET c1=NULL where c2=1; +-- sync_slave_with_master + +-- let $diff_table_1=master:test.t1 +-- let $diff_table_2=slave:test.t1 +-- source include/diff_tables.inc + +-- connection master +# triggers switch to row mode when on mixed +DELETE FROM t1 WHERE c2=1 LIMIT 1; +-- sync_slave_with_master + +-- let $diff_table_1=master:test.t1 +-- let $diff_table_2=slave:test.t1 +-- source include/diff_tables.inc + +-- connection master +DROP TABLE t1; +-- sync_slave_with_master + +-- source include/master-slave-reset.inc + +-- connection master + +# BUG#49482: RBR: Replication may break on deletes when MyISAM tables +# + char field are used + +-- eval CREATE TABLE t1 (c1 CHAR) Engine=$engine + +INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; +SELECT * FROM t1; +UPDATE t1 SET c1=NULL WHERE c1='w'; +-- sync_slave_with_master + +-- let $diff_table_1=master:test.t1 +-- let $diff_table_2=slave:test.t1 +-- source include/diff_tables.inc + +-- connection master +# triggers switch to row mode when on mixed +DELETE FROM t1 LIMIT 2; +-- sync_slave_with_master + +-- let $diff_table_1=master:test.t1 +-- let $diff_table_2=slave:test.t1 +-- source include/diff_tables.inc + +-- connection master +DROP TABLE t1; +-- sync_slave_with_master diff --git a/mysql-test/suite/rpl/r/rpl_set_null_innodb.result b/mysql-test/suite/rpl/r/rpl_set_null_innodb.result new file mode 100644 index 00000000000..41600a5fe1b --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_set_null_innodb.result @@ -0,0 +1,35 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (c1 BIT, c2 INT) Engine=InnoDB; +INSERT INTO `t1` VALUES ( 1, 1 ); +UPDATE t1 SET c1=NULL where c2=1; +Comparing tables master:test.t1 and slave:test.t1 +DELETE FROM t1 WHERE c2=1 LIMIT 1; +Comparing tables master:test.t1 and slave:test.t1 +DROP TABLE t1; +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (c1 CHAR) Engine=InnoDB; +INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; +SELECT * FROM t1; +c1 +w +UPDATE t1 SET c1=NULL WHERE c1='w'; +Comparing tables master:test.t1 and slave:test.t1 +DELETE FROM t1 LIMIT 2; +Comparing tables master:test.t1 and slave:test.t1 +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_set_null_myisam.result b/mysql-test/suite/rpl/r/rpl_set_null_myisam.result new file mode 100644 index 00000000000..cbd7010664a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_set_null_myisam.result @@ -0,0 +1,35 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (c1 BIT, c2 INT) Engine=MyISAM; +INSERT INTO `t1` VALUES ( 1, 1 ); +UPDATE t1 SET c1=NULL where c2=1; +Comparing tables master:test.t1 and slave:test.t1 +DELETE FROM t1 WHERE c2=1 LIMIT 1; +Comparing tables master:test.t1 and slave:test.t1 +DROP TABLE t1; +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (c1 CHAR) Engine=MyISAM; +INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; +SELECT * FROM t1; +c1 +w +UPDATE t1 SET c1=NULL WHERE c1='w'; +Comparing tables master:test.t1 and slave:test.t1 +DELETE FROM t1 LIMIT 2; +Comparing tables master:test.t1 and slave:test.t1 +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/t/rpl_set_null_innodb.test b/mysql-test/suite/rpl/t/rpl_set_null_innodb.test new file mode 100644 index 00000000000..dba79b78fa1 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_set_null_innodb.test @@ -0,0 +1,6 @@ +-- source include/have_binlog_format_mixed_or_row.inc +-- source include/master-slave.inc +-- source include/have_innodb.inc + +-- let $engine= InnoDB +-- source extra/rpl_tests/rpl_set_null.test diff --git a/mysql-test/suite/rpl/t/rpl_set_null_myisam.test b/mysql-test/suite/rpl/t/rpl_set_null_myisam.test new file mode 100644 index 00000000000..7b433071553 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_set_null_myisam.test @@ -0,0 +1,5 @@ +-- source include/have_binlog_format_mixed_or_row.inc +-- source include/master-slave.inc + +-- let $engine= MyISAM +-- source extra/rpl_tests/rpl_set_null.test diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result new file mode 100644 index 00000000000..473cd63169c --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result @@ -0,0 +1,35 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (c1 BIT, c2 INT) Engine=NDB; +INSERT INTO `t1` VALUES ( 1, 1 ); +UPDATE t1 SET c1=NULL where c2=1; +Comparing tables master:test.t1 and slave:test.t1 +DELETE FROM t1 WHERE c2=1 LIMIT 1; +Comparing tables master:test.t1 and slave:test.t1 +DROP TABLE t1; +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (c1 CHAR) Engine=NDB; +INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; +SELECT * FROM t1; +c1 +w +UPDATE t1 SET c1=NULL WHERE c1='w'; +Comparing tables master:test.t1 and slave:test.t1 +DELETE FROM t1 LIMIT 2; +Comparing tables master:test.t1 and slave:test.t1 +DROP TABLE t1; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test new file mode 100644 index 00000000000..454807d9591 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test @@ -0,0 +1,6 @@ +-- source include/have_ndb.inc +-- source include/have_binlog_format_mixed_or_row.inc +-- source include/ndb_master-slave.inc + +-- let $engine= NDB +-- source extra/rpl_tests/rpl_set_null.test diff --git a/sql/field.h b/sql/field.h index ae074cc1a30..55604193687 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1926,7 +1926,12 @@ public: uint32 max_display_length() { return field_length; } uint size_of() const { return sizeof(*this); } Item_result result_type () const { return INT_RESULT; } - int reset(void) { bzero(ptr, bytes_in_rec); return 0; } + int reset(void) { + bzero(ptr, bytes_in_rec); + if (bit_ptr && (bit_len > 0)) // reset odd bits among null bits + clr_rec_bits(bit_ptr, bit_ofs, bit_len); + return 0; + } int store(const char *to, uint length, CHARSET_INFO *charset); int store(double nr); int store(longlong nr, bool unsigned_val); diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc index 8e80620dd2c..f6bf57cde3e 100644 --- a/sql/rpl_record.cc +++ b/sql/rpl_record.cc @@ -231,6 +231,17 @@ unpack_row(Relay_log_info const *rli, { DBUG_PRINT("debug", ("Was NULL; null mask: 0x%x; null bits: 0x%x", null_mask, null_bits)); + /** + Calling reset just in case one is unpacking on top a + record with data. + + This could probably go into set_null() but doing so, + (i) triggers assertion in other parts of the code at + the moment; (ii) it would make us reset the field, + always when setting null, which right now doesn't seem + needed anywhere else except here. + */ + f->reset(); f->set_null(); } else From f42a200e9e1e535dcf647237fcb4ccb65c04965d Mon Sep 17 00:00:00 2001 From: Magne Mahre Date: Fri, 22 Jan 2010 10:37:44 +0100 Subject: [PATCH 078/132] Post-commit fix of two tests The WL#5154 commit added a couple of warning messages that was not fixed in the result files for two RPL tests. --- mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result | 2 ++ mysql-test/suite/rpl/r/rpl_sp.result | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result index 2cb316c6a1f..449407742de 100644 --- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result +++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result @@ -152,6 +152,7 @@ c1 c3 c4 c5 5 2006-02-22 00:00:00 Tested in Texas 11 --- Test 2 position test -- +Warning: The option '--position' is deprecated and will be removed in MySQL 5.6. Please use --start-position instead. /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; @@ -314,6 +315,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- Test 7 reading stdin w/position -- +Warning: The option '--position' is deprecated and will be removed in MySQL 5.6. Please use --start-position instead. /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result index 90a362c352b..7fedaf4c1ef 100644 --- a/mysql-test/suite/rpl/r/rpl_sp.result +++ b/mysql-test/suite/rpl/r/rpl_sp.result @@ -195,7 +195,7 @@ set @old_log_bin_trust_routine_creators= @@global.log_bin_trust_routine_creators set @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators; set global log_bin_trust_routine_creators=1; Warnings: -Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead +Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.6. Please use '@@log_bin_trust_function_creators' instead set global log_bin_trust_function_creators=0; set global log_bin_trust_function_creators=1; set @old_log_bin_trust_routine_creators= @@global.log_bin_trust_routine_creators; @@ -559,11 +559,11 @@ end master-bin.000001 # Query 1 # use `mysqltest`; SELECT `mysqltest2`.`f1`() set @@global.log_bin_trust_routine_creators= @old_log_bin_trust_routine_creators; Warnings: -Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead +Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.6. Please use '@@log_bin_trust_function_creators' instead set @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators; set @@global.log_bin_trust_routine_creators= @old_log_bin_trust_routine_creators; Warnings: -Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead +Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.6. Please use '@@log_bin_trust_function_creators' instead set @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators; drop database mysqltest; drop database mysqltest2; From 3cae7d1187795a8089b6f54ac60cf2a0e579cf89 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Jan 2010 17:38:21 +0800 Subject: [PATCH 079/132] Bug #49132 Replication failure on temporary table + DDL In RBR, DDL statement will change binlog format to non row-based format before it is binlogged, but the binlog format was not be restored, and then manipulating a temporary table can not reset binlog format to row-based format rightly. So that the manipulated statement is binlogged with statement-based format. To fix the problem, restore the state of binlog format after the DDL statement is binlogged. mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test: Added the test file to verify if executing DDL statement before trying to manipulate a temporary table causes row-based replication to break with error 'table does not exist'. mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Correct the test result, all the above binlog event should be row-based after the bug49132 is fixed IN RBR. mysql-test/suite/ndb/r/ndb_tmp_table_and_DDL.result: Test result for bug#49132 base on ndb engine. mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test: Added the test file to verify if executing DDL statement before trying to manipulate a temporary table causes row-based replication to break with error 'table does not exist' base on ndb engine. mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result: Test result for bug#49132 base on myisam engine. mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test: Added the test file to verify if executing DDL statement before trying to manipulate a temporary table causes row-based replication to break with error 'table does not exist' base on myisam engine. sql/event_db_repository.cc: Added code to restore the state of binlog format after the DDL statement is binlogged. sql/events.cc: Added code to restore the state of binlog format after the DDL statement is binlogged. sql/sp.cc: Added code to restore the state of binlog format after the DDL statement is binlogged. sql/sql_acl.cc: Added code to restore the state of binlog format after the DDL statement is binlogged. sql/sql_udf.cc: Added code to restore the state of binlog format after the DDL statement is binlogged. --- .../rpl_tests/rpl_tmp_table_and_DDL.test | 159 ++++++++++++++++++ .../r/binlog_row_mix_innodb_myisam.result | 64 ++++--- .../suite/ndb/r/ndb_tmp_table_and_DDL.result | 90 ++++++++++ .../suite/ndb/t/ndb_tmp_table_and_DDL.test | 11 ++ .../suite/rpl/r/rpl_tmp_table_and_DDL.result | 96 +++++++++++ .../suite/rpl/t/rpl_tmp_table_and_DDL.test | 13 ++ sql/event_db_repository.cc | 7 +- sql/events.cc | 23 ++- sql/sp.cc | 13 ++ sql/sql_acl.cc | 66 ++++++++ sql/sql_udf.cc | 18 +- 11 files changed, 526 insertions(+), 34 deletions(-) create mode 100644 mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test create mode 100644 mysql-test/suite/ndb/r/ndb_tmp_table_and_DDL.result create mode 100644 mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test create mode 100644 mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result create mode 100644 mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test diff --git a/mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test b/mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test new file mode 100644 index 00000000000..9cf287281a0 --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test @@ -0,0 +1,159 @@ +# +# This test verify if executing DDL statement before trying to manipulate +# a temporary table causes row-based replication to break with error 'table +# does not exist'. +# + +# CREATE TABLE when a temporary table is open. +CREATE TEMPORARY TABLE t1 (a INT); +EVAL CREATE TABLE t2 (a INT, b INT) ENGINE= $ENGINE_TYPE; +INSERT INTO t1 VALUES (1); + +# CREATE EVENT when a temporary table is open. +CREATE EVENT e1 ON SCHEDULE EVERY 10 HOUR DO SELECT 1; +INSERT INTO t1 VALUES (1); + +# ALTER EVENT when a temporary table is open. +ALTER EVENT e1 ON SCHEDULE EVERY 20 HOUR DO SELECT 1; +INSERT INTO t1 VALUES (1); + +# DROP EVENT when a temporary table is open. +DROP EVENT IF EXISTS e1; +INSERT INTO t1 VALUES (1); + +# CREATE PROCEDURE when a temporary table is open. +CREATE PROCEDURE p1() SELECT 1; +INSERT INTO t1 VALUES (1); + +# Alter PROCEDURE when a temporary table is open. +ALTER PROCEDURE p1 SQL SECURITY INVOKER; +INSERT INTO t1 VALUES (1); + +# CREATE FUNCTION when a temporary table is open. +CREATE FUNCTION f1() RETURNS INT RETURN 123; +INSERT INTO t1 VALUES (1); + +# ALTER FUNCTION when a temporary table is open. +ALTER FUNCTION f1 SQL SECURITY INVOKER; +INSERT INTO t1 VALUES (1); + +# CREATE DATABASE when a temporary table is open. +CREATE DATABASE mysqltest1; +INSERT INTO t1 VALUES (1); + +# DROP DATABASE when a temporary table is open. +DROP DATABASE mysqltest1; +INSERT INTO t1 VALUES (1); + +# CREATE USER when a temporary table is open. +CREATE USER test_1@localhost; +INSERT INTO t1 VALUES (1); + +# GRANT select on table to user when a temporary table is open. +GRANT SELECT ON t2 TO test_1@localhost; +INSERT INTO t1 VALUES (1); + +# GRANT all on function to user when a temporary table is open. +GRANT ALL ON f1 TO test_1@localhost; +INSERT INTO t1 VALUES (1); + +# GRANT all on procedure to user when a temporary table is open. +GRANT ALL ON p1 TO test_1@localhost; +INSERT INTO t1 VALUES (1); + +# GRANT usage on *.* to user when a temporary table is open. +GRANT USAGE ON *.* TO test_1@localhost; +INSERT INTO t1 VALUES (1); + +# REVOKE ALL PRIVILEGES on function to user when a temporary table is open. +REVOKE ALL PRIVILEGES ON f1 FROM test_1@localhost; +INSERT INTO t1 VALUES (1); + +# REVOKE ALL PRIVILEGES on procedure to user when a temporary table is open. +REVOKE ALL PRIVILEGES ON p1 FROM test_1@localhost; +INSERT INTO t1 VALUES (1); + +# REVOKE ALL PRIVILEGES on table to user when a temporary table is open. +REVOKE ALL PRIVILEGES ON t2 FROM test_1@localhost; +INSERT INTO t1 VALUES (1); + +# REVOKE usage on *.* from user when a temporary table is open. +REVOKE USAGE ON *.* FROM test_1@localhost; +INSERT INTO t1 VALUES (1); + +# RENAME USER when a temporary table is open. +RENAME USER test_1@localhost TO test_2@localhost; +INSERT INTO t1 VALUES (1); + +# DROP USER when a temporary table is open. +DROP USER test_2@localhost; +INSERT INTO t1 VALUES (1); + +# Test ACL statement in sub statement +DELIMITER |; +CREATE PROCEDURE p2() +BEGIN + # CREATE USER when a temporary table is open. + CREATE TEMPORARY TABLE t3 (a INT); + CREATE USER test_2@localhost; + INSERT INTO t1 VALUES (1); + + # GRANT select on table to user when a temporary table is open. + GRANT SELECT ON t2 TO test_2@localhost; + INSERT INTO t1 VALUES (1); + + # GRANT all on function to user when a temporary table is open. + GRANT ALL ON f1 TO test_2@localhost; + INSERT INTO t1 VALUES (1); + + # GRANT all on procedure to user when a temporary table is open. + GRANT ALL ON p1 TO test_2@localhost; + INSERT INTO t1 VALUES (1); + + # GRANT usage on *.* to user when a temporary table is open. + GRANT USAGE ON *.* TO test_2@localhost; + INSERT INTO t1 VALUES (1); + + # REVOKE ALL PRIVILEGES on function to user when a temporary table is open. + REVOKE ALL PRIVILEGES ON f1 FROM test_2@localhost; + INSERT INTO t1 VALUES (1); + + # REVOKE ALL PRIVILEGES on procedure to user when a temporary table is open. + REVOKE ALL PRIVILEGES ON p1 FROM test_2@localhost; + INSERT INTO t1 VALUES (1); + + # REVOKE ALL PRIVILEGES on table to user when a temporary table is open. + REVOKE ALL PRIVILEGES ON t2 FROM test_2@localhost; + INSERT INTO t1 VALUES (1); + + # REVOKE usage on *.* from user when a temporary table is open. + REVOKE USAGE ON *.* FROM test_2@localhost; + INSERT INTO t1 VALUES (1); + + # RENAME USER when a temporary table is open. + RENAME USER test_2@localhost TO test_3@localhost; + INSERT INTO t1 VALUES (1); + + # DROP USER when a temporary table is open. + DROP USER test_3@localhost; + INSERT INTO t1 VALUES (1); + DROP TEMPORARY TABLE t3; +END | +DELIMITER ;| + +# DROP PROCEDURE when a temporary table is open. +DROP PROCEDURE p1; +INSERT INTO t1 VALUES (1); +DROP PROCEDURE p2; +INSERT INTO t1 VALUES (1); + +# DROP FUNCTION when a temporary table is open. +DROP FUNCTION f1; +INSERT INTO t1 VALUES (1); + +# DROP TABLE when a temporary table is open. +DROP TABLE t2; +INSERT INTO t1 VALUES (1); + +DROP TEMPORARY TABLE t1; + diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result index ef98275041c..87e9b7f8685 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result @@ -772,8 +772,11 @@ insert into t2 values (bug27417(2)); ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Intvar # # INSERT_ID=3 -master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(2)) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 3 */; count(*) 3 @@ -787,8 +790,11 @@ count(*) 2 show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Intvar # # INSERT_ID=4 -master-bin.000001 # Query # # use `test`; delete from t2 where a=bug27417(3) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT select count(*) from t1 /* must be 5 */; count(*) 5 @@ -810,8 +816,9 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Intvar # # INSERT_ID=1 -master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(1)) +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 1 */; count(*) @@ -825,8 +832,10 @@ ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Intvar # # INSERT_ID=2 -master-bin.000001 # Query # # use `test`; insert into t2 select bug27417(1) union select bug27417(2) +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 2 */; count(*) @@ -838,8 +847,13 @@ update t3 set b=b+bug27417(1); ERROR 23000: Duplicate entry '4' for key 'b' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Intvar # # INSERT_ID=4 -master-bin.000001 # Query # # use `test`; update t3 set b=b+bug27417(1) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t3) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Update_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 2 */; count(*) 2 @@ -853,8 +867,9 @@ ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Intvar # # INSERT_ID=6 -master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */ +master-bin.000001 # Table_map # # table_id: # (test.t4) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 4 */; count(*) @@ -869,7 +884,7 @@ UPDATE t3,t4 SET t3.a=t4.a + bug27417(1); ERROR 23000: Duplicate entry '2' for key 'PRIMARY' select count(*) from t1 /* must be 1 */; count(*) -1 +2 drop table t4; delete from t1; delete from t2; @@ -884,8 +899,10 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Intvar # # INSERT_ID=9 -master-bin.000001 # Query # # use `test`; delete from t2 +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Table_map # # table_id: # (test.t3) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 1 */; count(*) @@ -904,7 +921,11 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; delete t2.* from t2,t5 where t2.a=t5.a + 1 +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Delete_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 1 */; count(*) @@ -924,12 +945,11 @@ count(*) show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Intvar # # INSERT_ID=10 -master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci -master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# -master-bin.000001 # Intvar # # INSERT_ID=10 -master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci -master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @b) SET `b`=((@b) + `bug27417`(2)) ;file_id=# +master-bin.000001 # Table_map # # table_id: # (test.t4) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK drop trigger trg_del_t2; drop table t1,t2,t3,t4,t5; diff --git a/mysql-test/suite/ndb/r/ndb_tmp_table_and_DDL.result b/mysql-test/suite/ndb/r/ndb_tmp_table_and_DDL.result new file mode 100644 index 00000000000..1b0f718ad65 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_tmp_table_and_DDL.result @@ -0,0 +1,90 @@ +CREATE TEMPORARY TABLE t1 (a INT); +CREATE TABLE t2 (a INT, b INT) ENGINE= NDB; +INSERT INTO t1 VALUES (1); +CREATE EVENT e1 ON SCHEDULE EVERY 10 HOUR DO SELECT 1; +INSERT INTO t1 VALUES (1); +ALTER EVENT e1 ON SCHEDULE EVERY 20 HOUR DO SELECT 1; +INSERT INTO t1 VALUES (1); +DROP EVENT IF EXISTS e1; +INSERT INTO t1 VALUES (1); +CREATE PROCEDURE p1() SELECT 1; +INSERT INTO t1 VALUES (1); +ALTER PROCEDURE p1 SQL SECURITY INVOKER; +INSERT INTO t1 VALUES (1); +CREATE FUNCTION f1() RETURNS INT RETURN 123; +INSERT INTO t1 VALUES (1); +ALTER FUNCTION f1 SQL SECURITY INVOKER; +INSERT INTO t1 VALUES (1); +CREATE DATABASE mysqltest1; +INSERT INTO t1 VALUES (1); +DROP DATABASE mysqltest1; +INSERT INTO t1 VALUES (1); +CREATE USER test_1@localhost; +INSERT INTO t1 VALUES (1); +GRANT SELECT ON t2 TO test_1@localhost; +INSERT INTO t1 VALUES (1); +GRANT ALL ON f1 TO test_1@localhost; +INSERT INTO t1 VALUES (1); +GRANT ALL ON p1 TO test_1@localhost; +INSERT INTO t1 VALUES (1); +GRANT USAGE ON *.* TO test_1@localhost; +INSERT INTO t1 VALUES (1); +REVOKE ALL PRIVILEGES ON f1 FROM test_1@localhost; +INSERT INTO t1 VALUES (1); +REVOKE ALL PRIVILEGES ON p1 FROM test_1@localhost; +INSERT INTO t1 VALUES (1); +REVOKE ALL PRIVILEGES ON t2 FROM test_1@localhost; +INSERT INTO t1 VALUES (1); +REVOKE USAGE ON *.* FROM test_1@localhost; +INSERT INTO t1 VALUES (1); +RENAME USER test_1@localhost TO test_2@localhost; +INSERT INTO t1 VALUES (1); +DROP USER test_2@localhost; +INSERT INTO t1 VALUES (1); +CREATE PROCEDURE p2() +BEGIN +# CREATE USER when a temporary table is open. +CREATE TEMPORARY TABLE t3 (a INT); +CREATE USER test_2@localhost; +INSERT INTO t1 VALUES (1); +# GRANT select on table to user when a temporary table is open. +GRANT SELECT ON t2 TO test_2@localhost; +INSERT INTO t1 VALUES (1); +# GRANT all on function to user when a temporary table is open. +GRANT ALL ON f1 TO test_2@localhost; +INSERT INTO t1 VALUES (1); +# GRANT all on procedure to user when a temporary table is open. +GRANT ALL ON p1 TO test_2@localhost; +INSERT INTO t1 VALUES (1); +# GRANT usage on *.* to user when a temporary table is open. +GRANT USAGE ON *.* TO test_2@localhost; +INSERT INTO t1 VALUES (1); +# REVOKE ALL PRIVILEGES on function to user when a temporary table is open. +REVOKE ALL PRIVILEGES ON f1 FROM test_2@localhost; +INSERT INTO t1 VALUES (1); +# REVOKE ALL PRIVILEGES on procedure to user when a temporary table is open. +REVOKE ALL PRIVILEGES ON p1 FROM test_2@localhost; +INSERT INTO t1 VALUES (1); +# REVOKE ALL PRIVILEGES on table to user when a temporary table is open. +REVOKE ALL PRIVILEGES ON t2 FROM test_2@localhost; +INSERT INTO t1 VALUES (1); +# REVOKE usage on *.* from user when a temporary table is open. +REVOKE USAGE ON *.* FROM test_2@localhost; +INSERT INTO t1 VALUES (1); +# RENAME USER when a temporary table is open. +RENAME USER test_2@localhost TO test_3@localhost; +INSERT INTO t1 VALUES (1); +# DROP USER when a temporary table is open. +DROP USER test_3@localhost; +INSERT INTO t1 VALUES (1); +DROP TEMPORARY TABLE t3; +END | +DROP PROCEDURE p1; +INSERT INTO t1 VALUES (1); +DROP PROCEDURE p2; +INSERT INTO t1 VALUES (1); +DROP FUNCTION f1; +INSERT INTO t1 VALUES (1); +DROP TABLE t2; +INSERT INTO t1 VALUES (1); +DROP TEMPORARY TABLE t1; diff --git a/mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test b/mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test new file mode 100644 index 00000000000..748c0ac28e4 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test @@ -0,0 +1,11 @@ +# +# Bug#49132 +# This test verifies if executing DDL statement before trying to manipulate +# a temporary table causes row-based replication to break with error 'table +# does not exist' base on ndb engine. +# + +source include/have_ndb.inc; + +LET $ENGINE_TYPE= NDB; +source extra/rpl_tests/rpl_tmp_table_and_DDL.test; diff --git a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result new file mode 100644 index 00000000000..5729faa9659 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result @@ -0,0 +1,96 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TEMPORARY TABLE t1 (a INT); +CREATE TABLE t2 (a INT, b INT) ENGINE= MyISAM; +INSERT INTO t1 VALUES (1); +CREATE EVENT e1 ON SCHEDULE EVERY 10 HOUR DO SELECT 1; +INSERT INTO t1 VALUES (1); +ALTER EVENT e1 ON SCHEDULE EVERY 20 HOUR DO SELECT 1; +INSERT INTO t1 VALUES (1); +DROP EVENT IF EXISTS e1; +INSERT INTO t1 VALUES (1); +CREATE PROCEDURE p1() SELECT 1; +INSERT INTO t1 VALUES (1); +ALTER PROCEDURE p1 SQL SECURITY INVOKER; +INSERT INTO t1 VALUES (1); +CREATE FUNCTION f1() RETURNS INT RETURN 123; +INSERT INTO t1 VALUES (1); +ALTER FUNCTION f1 SQL SECURITY INVOKER; +INSERT INTO t1 VALUES (1); +CREATE DATABASE mysqltest1; +INSERT INTO t1 VALUES (1); +DROP DATABASE mysqltest1; +INSERT INTO t1 VALUES (1); +CREATE USER test_1@localhost; +INSERT INTO t1 VALUES (1); +GRANT SELECT ON t2 TO test_1@localhost; +INSERT INTO t1 VALUES (1); +GRANT ALL ON f1 TO test_1@localhost; +INSERT INTO t1 VALUES (1); +GRANT ALL ON p1 TO test_1@localhost; +INSERT INTO t1 VALUES (1); +GRANT USAGE ON *.* TO test_1@localhost; +INSERT INTO t1 VALUES (1); +REVOKE ALL PRIVILEGES ON f1 FROM test_1@localhost; +INSERT INTO t1 VALUES (1); +REVOKE ALL PRIVILEGES ON p1 FROM test_1@localhost; +INSERT INTO t1 VALUES (1); +REVOKE ALL PRIVILEGES ON t2 FROM test_1@localhost; +INSERT INTO t1 VALUES (1); +REVOKE USAGE ON *.* FROM test_1@localhost; +INSERT INTO t1 VALUES (1); +RENAME USER test_1@localhost TO test_2@localhost; +INSERT INTO t1 VALUES (1); +DROP USER test_2@localhost; +INSERT INTO t1 VALUES (1); +CREATE PROCEDURE p2() +BEGIN +# CREATE USER when a temporary table is open. +CREATE TEMPORARY TABLE t3 (a INT); +CREATE USER test_2@localhost; +INSERT INTO t1 VALUES (1); +# GRANT select on table to user when a temporary table is open. +GRANT SELECT ON t2 TO test_2@localhost; +INSERT INTO t1 VALUES (1); +# GRANT all on function to user when a temporary table is open. +GRANT ALL ON f1 TO test_2@localhost; +INSERT INTO t1 VALUES (1); +# GRANT all on procedure to user when a temporary table is open. +GRANT ALL ON p1 TO test_2@localhost; +INSERT INTO t1 VALUES (1); +# GRANT usage on *.* to user when a temporary table is open. +GRANT USAGE ON *.* TO test_2@localhost; +INSERT INTO t1 VALUES (1); +# REVOKE ALL PRIVILEGES on function to user when a temporary table is open. +REVOKE ALL PRIVILEGES ON f1 FROM test_2@localhost; +INSERT INTO t1 VALUES (1); +# REVOKE ALL PRIVILEGES on procedure to user when a temporary table is open. +REVOKE ALL PRIVILEGES ON p1 FROM test_2@localhost; +INSERT INTO t1 VALUES (1); +# REVOKE ALL PRIVILEGES on table to user when a temporary table is open. +REVOKE ALL PRIVILEGES ON t2 FROM test_2@localhost; +INSERT INTO t1 VALUES (1); +# REVOKE usage on *.* from user when a temporary table is open. +REVOKE USAGE ON *.* FROM test_2@localhost; +INSERT INTO t1 VALUES (1); +# RENAME USER when a temporary table is open. +RENAME USER test_2@localhost TO test_3@localhost; +INSERT INTO t1 VALUES (1); +# DROP USER when a temporary table is open. +DROP USER test_3@localhost; +INSERT INTO t1 VALUES (1); +DROP TEMPORARY TABLE t3; +END | +DROP PROCEDURE p1; +INSERT INTO t1 VALUES (1); +DROP PROCEDURE p2; +INSERT INTO t1 VALUES (1); +DROP FUNCTION f1; +INSERT INTO t1 VALUES (1); +DROP TABLE t2; +INSERT INTO t1 VALUES (1); +DROP TEMPORARY TABLE t1; diff --git a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test new file mode 100644 index 00000000000..56924a2efe9 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test @@ -0,0 +1,13 @@ +# +# Bug#49132 +# This test verifies if executing DDL statement before trying to manipulate +# a temporary table causes row-based replication to break with error 'table +# does not exist' base on myisam engine. +# + +source include/master-slave.inc; +source include/have_binlog_format_row.inc; + +LET $ENGINE_TYPE= MyISAM; +source extra/rpl_tests/rpl_tmp_table_and_DDL.test; + diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc index 9f3863eb2b0..753e9d21b65 100644 --- a/sql/event_db_repository.cc +++ b/sql/event_db_repository.cc @@ -1045,6 +1045,7 @@ update_timing_fields_for_event(THD *thd, TABLE *table= NULL; Field **fields; int ret= 1; + bool save_binlog_row_based; DBUG_ENTER("Event_db_repository::update_timing_fields_for_event"); @@ -1052,8 +1053,8 @@ update_timing_fields_for_event(THD *thd, Turn off row binlogging of event timing updates. These are not used for RBR of events replicated to the slave. */ - if (thd->current_stmt_binlog_row_based) - thd->clear_current_stmt_binlog_row_based(); + save_binlog_row_based= thd->current_stmt_binlog_row_based; + thd->clear_current_stmt_binlog_row_based(); DBUG_ASSERT(thd->security_ctx->master_access & SUPER_ACL); @@ -1095,6 +1096,8 @@ update_timing_fields_for_event(THD *thd, end: if (table) close_thread_tables(thd); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(test(ret)); } diff --git a/sql/events.cc b/sql/events.cc index 790e6a61699..c3a57578f2b 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -389,6 +389,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, bool if_not_exists) { int ret; + bool save_binlog_row_based; DBUG_ENTER("Events::create_event"); /* @@ -431,8 +432,8 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, Turn off row binlogging of this statement and use statement-based so that all supporting tables are updated for CREATE EVENT command. */ - if (thd->current_stmt_binlog_row_based) - thd->clear_current_stmt_binlog_row_based(); + save_binlog_row_based= thd->current_stmt_binlog_row_based; + thd->clear_current_stmt_binlog_row_based(); pthread_mutex_lock(&LOCK_event_metadata); @@ -472,6 +473,8 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, { sql_print_error("Event Error: An error occurred while creating query string, " "before writing it into binary log."); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(TRUE); } /* If the definer is not set or set to CURRENT_USER, the value of CURRENT_USER @@ -480,6 +483,8 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, } } pthread_mutex_unlock(&LOCK_event_metadata); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(ret); } @@ -509,6 +514,7 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, LEX_STRING *new_dbname, LEX_STRING *new_name) { int ret; + bool save_binlog_row_based; Event_queue_element *new_element; DBUG_ENTER("Events::update_event"); @@ -565,8 +571,8 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, Turn off row binlogging of this statement and use statement-based so that all supporting tables are updated for UPDATE EVENT command. */ - if (thd->current_stmt_binlog_row_based) - thd->clear_current_stmt_binlog_row_based(); + save_binlog_row_based= thd->current_stmt_binlog_row_based; + thd->clear_current_stmt_binlog_row_based(); pthread_mutex_lock(&LOCK_event_metadata); @@ -602,6 +608,8 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, } } pthread_mutex_unlock(&LOCK_event_metadata); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(ret); } @@ -635,6 +643,7 @@ bool Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) { int ret; + bool save_binlog_row_based; DBUG_ENTER("Events::drop_event"); /* @@ -662,8 +671,8 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) Turn off row binlogging of this statement and use statement-based so that all supporting tables are updated for DROP EVENT command. */ - if (thd->current_stmt_binlog_row_based) - thd->clear_current_stmt_binlog_row_based(); + save_binlog_row_based= thd->current_stmt_binlog_row_based; + thd->clear_current_stmt_binlog_row_based(); pthread_mutex_lock(&LOCK_event_metadata); /* On error conditions my_error() is called so no need to handle here */ @@ -676,6 +685,8 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) write_bin_log(thd, TRUE, thd->query(), thd->query_length()); } pthread_mutex_unlock(&LOCK_event_metadata); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(ret); } diff --git a/sql/sp.cc b/sql/sp.cc index 6fad1d70ffd..ff76dbf7921 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -896,6 +896,8 @@ sp_create_routine(THD *thd, int type, sp_head *sp) bool store_failed= FALSE; + bool save_binlog_row_based; + DBUG_ENTER("sp_create_routine"); DBUG_PRINT("enter", ("type: %d name: %.*s",type, (int) sp->m_name.length, sp->m_name.str)); @@ -913,6 +915,7 @@ sp_create_routine(THD *thd, int type, sp_head *sp) row-based replication. The flag will be reset at the end of the statement. */ + save_binlog_row_based= thd->current_stmt_binlog_row_based; thd->clear_current_stmt_binlog_row_based(); saved_count_cuted_fields= thd->count_cuted_fields; @@ -1118,6 +1121,8 @@ done: thd->variables.sql_mode= saved_mode; close_thread_tables(thd); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(ret); } @@ -1142,6 +1147,7 @@ sp_drop_routine(THD *thd, int type, sp_name *name) { TABLE *table; int ret; + bool save_binlog_row_based; DBUG_ENTER("sp_drop_routine"); DBUG_PRINT("enter", ("type: %d name: %.*s", type, (int) name->m_name.length, name->m_name.str)); @@ -1154,6 +1160,7 @@ sp_drop_routine(THD *thd, int type, sp_name *name) row-based replication. The flag will be reset at the end of the statement. */ + save_binlog_row_based= thd->current_stmt_binlog_row_based; thd->clear_current_stmt_binlog_row_based(); if (!(table= open_proc_table_for_update(thd))) @@ -1171,6 +1178,8 @@ sp_drop_routine(THD *thd, int type, sp_name *name) } close_thread_tables(thd); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(ret); } @@ -1197,6 +1206,7 @@ sp_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics) { TABLE *table; int ret; + bool save_binlog_row_based; DBUG_ENTER("sp_update_routine"); DBUG_PRINT("enter", ("type: %d name: %.*s", type, (int) name->m_name.length, name->m_name.str)); @@ -1208,6 +1218,7 @@ sp_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics) row-based replication. The flag will be reset at the end of the statement. */ + save_binlog_row_based= thd->current_stmt_binlog_row_based; thd->clear_current_stmt_binlog_row_based(); if (!(table= open_proc_table_for_update(thd))) @@ -1241,6 +1252,8 @@ sp_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics) } close_thread_tables(thd); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(ret); } diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 7ba1a657578..e2c47957e4d 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2978,6 +2978,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, TABLE_LIST tables[3]; bool create_new_users=0; char *db_name, *table_name; + bool save_binlog_row_based; DBUG_ENTER("mysql_table_grant"); if (!initialized) @@ -3073,6 +3074,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, row-based replication. The flag will be reset at the end of the statement. */ + save_binlog_row_based= thd->current_stmt_binlog_row_based; thd->clear_current_stmt_binlog_row_based(); #ifdef HAVE_REPLICATION @@ -3088,7 +3090,11 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, */ tables[0].updating= tables[1].updating= tables[2].updating= 1; if (!(thd->spcont || rpl_filter->tables_ok(0, tables))) + { + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(FALSE); + } } #endif @@ -3101,6 +3107,8 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, if (simple_open_n_lock_tables(thd,tables)) { // Should never happen close_thread_tables(thd); /* purecov: deadcode */ + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(TRUE); /* purecov: deadcode */ } @@ -3227,6 +3235,8 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, /* Tables are automatically closed */ thd->lex->restore_backup_query_tables_list(&backup); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(result); } @@ -3255,6 +3265,7 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, TABLE_LIST tables[2]; bool create_new_users=0, result=0; char *db_name, *table_name; + bool save_binlog_row_based; DBUG_ENTER("mysql_routine_grant"); if (!initialized) @@ -3290,6 +3301,7 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, row-based replication. The flag will be reset at the end of the statement. */ + save_binlog_row_based= thd->current_stmt_binlog_row_based; thd->clear_current_stmt_binlog_row_based(); #ifdef HAVE_REPLICATION @@ -3305,13 +3317,19 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, */ tables[0].updating= tables[1].updating= 1; if (!(thd->spcont || rpl_filter->tables_ok(0, tables))) + { + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(FALSE); + } } #endif if (simple_open_n_lock_tables(thd,tables)) { // Should never happen close_thread_tables(thd); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(TRUE); } @@ -3387,6 +3405,8 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, } rw_unlock(&LOCK_grant); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; /* Tables are automatically closed */ DBUG_RETURN(result); @@ -3401,6 +3421,7 @@ bool mysql_grant(THD *thd, const char *db, List &list, char tmp_db[NAME_LEN+1]; bool create_new_users=0; TABLE_LIST tables[2]; + bool save_binlog_row_based; DBUG_ENTER("mysql_grant"); if (!initialized) { @@ -3429,6 +3450,7 @@ bool mysql_grant(THD *thd, const char *db, List &list, row-based replication. The flag will be reset at the end of the statement. */ + save_binlog_row_based= thd->current_stmt_binlog_row_based; thd->clear_current_stmt_binlog_row_based(); #ifdef HAVE_REPLICATION @@ -3444,13 +3466,19 @@ bool mysql_grant(THD *thd, const char *db, List &list, */ tables[0].updating= tables[1].updating= 1; if (!(thd->spcont || rpl_filter->tables_ok(0, tables))) + { + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(FALSE); + } } #endif if (simple_open_n_lock_tables(thd,tables)) { // This should never happen close_thread_tables(thd); /* purecov: deadcode */ + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(TRUE); /* purecov: deadcode */ } @@ -3510,6 +3538,8 @@ bool mysql_grant(THD *thd, const char *db, List &list, if (!result) my_ok(thd); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(result); } @@ -5666,6 +5696,7 @@ bool mysql_create_user(THD *thd, List &list) List_iterator user_list(list); TABLE_LIST tables[GRANT_TABLES]; bool some_users_created= FALSE; + bool save_binlog_row_based; DBUG_ENTER("mysql_create_user"); /* @@ -5673,11 +5704,16 @@ bool mysql_create_user(THD *thd, List &list) row-based replication. The flag will be reset at the end of the statement. */ + save_binlog_row_based= thd->current_stmt_binlog_row_based; thd->clear_current_stmt_binlog_row_based(); /* CREATE USER may be skipped on replication client. */ if ((result= open_grant_tables(thd, tables))) + { + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(result != 1); + } rw_wrlock(&LOCK_grant); VOID(pthread_mutex_lock(&acl_cache->lock)); @@ -5720,6 +5756,8 @@ bool mysql_create_user(THD *thd, List &list) rw_unlock(&LOCK_grant); close_thread_tables(thd); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(result); } @@ -5746,6 +5784,7 @@ bool mysql_drop_user(THD *thd, List &list) TABLE_LIST tables[GRANT_TABLES]; bool some_users_deleted= FALSE; ulong old_sql_mode= thd->variables.sql_mode; + bool save_binlog_row_based; DBUG_ENTER("mysql_drop_user"); /* @@ -5753,11 +5792,16 @@ bool mysql_drop_user(THD *thd, List &list) row-based replication. The flag will be reset at the end of the statement. */ + save_binlog_row_based= thd->current_stmt_binlog_row_based; thd->clear_current_stmt_binlog_row_based(); /* DROP USER may be skipped on replication client. */ if ((result= open_grant_tables(thd, tables))) + { + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(result != 1); + } thd->variables.sql_mode&= ~MODE_PAD_CHAR_TO_FULL_LENGTH; @@ -5794,6 +5838,8 @@ bool mysql_drop_user(THD *thd, List &list) rw_unlock(&LOCK_grant); close_thread_tables(thd); thd->variables.sql_mode= old_sql_mode; + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(result); } @@ -5820,6 +5866,7 @@ bool mysql_rename_user(THD *thd, List &list) List_iterator user_list(list); TABLE_LIST tables[GRANT_TABLES]; bool some_users_renamed= FALSE; + bool save_binlog_row_based; DBUG_ENTER("mysql_rename_user"); /* @@ -5827,11 +5874,16 @@ bool mysql_rename_user(THD *thd, List &list) row-based replication. The flag will be reset at the end of the statement. */ + save_binlog_row_based= thd->current_stmt_binlog_row_based; thd->clear_current_stmt_binlog_row_based(); /* RENAME USER may be skipped on replication client. */ if ((result= open_grant_tables(thd, tables))) + { + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(result != 1); + } rw_wrlock(&LOCK_grant); VOID(pthread_mutex_lock(&acl_cache->lock)); @@ -5878,6 +5930,8 @@ bool mysql_rename_user(THD *thd, List &list) rw_unlock(&LOCK_grant); close_thread_tables(thd); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(result); } @@ -5902,6 +5956,7 @@ bool mysql_revoke_all(THD *thd, List &list) int result; ACL_DB *acl_db; TABLE_LIST tables[GRANT_TABLES]; + bool save_binlog_row_based; DBUG_ENTER("mysql_revoke_all"); /* @@ -5909,10 +5964,15 @@ bool mysql_revoke_all(THD *thd, List &list) row-based replication. The flag will be reset at the end of the statement. */ + save_binlog_row_based= thd->current_stmt_binlog_row_based; thd->clear_current_stmt_binlog_row_based(); if ((result= open_grant_tables(thd, tables))) + { + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(result != 1); + } rw_wrlock(&LOCK_grant); VOID(pthread_mutex_lock(&acl_cache->lock)); @@ -6063,6 +6123,8 @@ bool mysql_revoke_all(THD *thd, List &list) if (result) my_message(ER_REVOKE_GRANTS, ER(ER_REVOKE_GRANTS), MYF(0)); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(result); } @@ -6146,6 +6208,7 @@ bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name, TABLE_LIST tables[GRANT_TABLES]; HASH *hash= is_proc ? &proc_priv_hash : &func_priv_hash; Silence_routine_definer_errors error_handler; + bool save_binlog_row_based; DBUG_ENTER("sp_revoke_privileges"); if ((result= open_grant_tables(thd, tables))) @@ -6162,6 +6225,7 @@ bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name, row-based replication. The flag will be reset at the end of the statement. */ + save_binlog_row_based= thd->current_stmt_binlog_row_based; thd->clear_current_stmt_binlog_row_based(); /* Remove procedure access */ @@ -6198,6 +6262,8 @@ bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name, close_thread_tables(thd); thd->pop_internal_handler(); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(error_handler.has_errors()); } diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index c6b41b59a3f..76cadc79c6f 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -398,6 +398,7 @@ int mysql_create_function(THD *thd,udf_func *udf) TABLE *table; TABLE_LIST tables; udf_func *u_d; + bool save_binlog_row_based; DBUG_ENTER("mysql_create_function"); if (!initialized) @@ -437,8 +438,8 @@ int mysql_create_function(THD *thd,udf_func *udf) Turn off row binlogging of this statement and use statement-based so that all supporting tables are updated for CREATE FUNCTION command. */ - if (thd->current_stmt_binlog_row_based) - thd->clear_current_stmt_binlog_row_based(); + save_binlog_row_based= thd->current_stmt_binlog_row_based; + thd->clear_current_stmt_binlog_row_based(); rw_wrlock(&THR_LOCK_udf); if ((hash_search(&udf_hash,(uchar*) udf->name.str, udf->name.length))) @@ -508,12 +509,16 @@ int mysql_create_function(THD *thd,udf_func *udf) /* Binlog the create function. */ write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(0); err: if (new_dl) dlclose(dl); rw_unlock(&THR_LOCK_udf); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(1); } @@ -525,6 +530,7 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name) udf_func *udf; char *exact_name_str; uint exact_name_len; + bool save_binlog_row_based; DBUG_ENTER("mysql_drop_function"); if (!initialized) @@ -540,8 +546,8 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name) Turn off row binlogging of this statement and use statement-based so that all supporting tables are updated for DROP FUNCTION command. */ - if (thd->current_stmt_binlog_row_based) - thd->clear_current_stmt_binlog_row_based(); + save_binlog_row_based= thd->current_stmt_binlog_row_based; + thd->clear_current_stmt_binlog_row_based(); rw_wrlock(&THR_LOCK_udf); if (!(udf=(udf_func*) hash_search(&udf_hash,(uchar*) udf_name->str, @@ -583,9 +589,13 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name) /* Binlog the drop function. */ write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(0); err: rw_unlock(&THR_LOCK_udf); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(1); } From f65b3f7889b48c8f9dea4c066093e0f7b99fde3f Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 22 Jan 2010 13:55:50 +0400 Subject: [PATCH 080/132] Applying InnoDB snapshot, fixes BUG#49238. Detailed revision comments: r6421 | jyang | 2010-01-12 07:59:16 +0200 (Tue, 12 Jan 2010) | 8 lines branches/5.1: Fix bug #49238: Creating/Dropping a temporary table while at 1023 transactions will cause assert. Handle possible DB_TOO_MANY_CONCURRENT_TRXS when deleting metadata in row_drop_table_for_mysql(). rb://220, approved by Marko --- storage/innobase/row/row0mysql.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c index 4fcb1fbf9f2..f7156403247 100644 --- a/storage/innobase/row/row0mysql.c +++ b/storage/innobase/row/row0mysql.c @@ -3245,19 +3245,13 @@ check_next_foreign: "END;\n" , FALSE, trx); - if (err != DB_SUCCESS) { - ut_a(err == DB_OUT_OF_FILE_SPACE); - - err = DB_MUST_GET_MORE_FILE_SPACE; - - row_mysql_handle_errors(&err, trx, NULL, NULL); - - ut_error; - } else { + switch (err) { ibool is_path; const char* name_or_path; mem_heap_t* heap; + case DB_SUCCESS: + heap = mem_heap_create(200); /* Clone the name, in case it has been allocated @@ -3322,7 +3316,27 @@ check_next_foreign: } mem_heap_free(heap); + break; + + case DB_TOO_MANY_CONCURRENT_TRXS: + /* Cannot even find a free slot for the + the undo log. We can directly exit here + and return the DB_TOO_MANY_CONCURRENT_TRXS + error. */ + break; + + case DB_OUT_OF_FILE_SPACE: + err = DB_MUST_GET_MORE_FILE_SPACE; + + row_mysql_handle_errors(&err, trx, NULL, NULL); + + /* Fall through to raise error */ + + default: + /* No other possible error returns */ + ut_error; } + funct_exit: trx_commit_for_mysql(trx); From 9aaa3cc4dfdb5c33e5eb9418df2af7e46f440704 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 22 Jan 2010 13:56:32 +0400 Subject: [PATCH 081/132] Applying InnoDB snapshot Detailed revision comments: r6422 | marko | 2010-01-12 11:34:27 +0200 (Tue, 12 Jan 2010) | 3 lines branches/5.1: Non-functional change: Make innobase_get_int_col_max_value() a static function. It does not access any fields of class ha_innobase. --- storage/innobase/handler/ha_innodb.cc | 9 +++++---- storage/innobase/handler/ha_innodb.h | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index a1b8c551845..aca8be74b07 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -3652,11 +3652,12 @@ skip_field: /************************************************************************ Get the upper limit of the MySQL integral and floating-point type. */ - +static ulonglong -ha_innobase::innobase_get_int_col_max_value( -/*========================================*/ - const Field* field) +innobase_get_int_col_max_value( +/*===========================*/ + /* out: maximum allowed value for the field */ + const Field* field) /* in: MySQL field */ { ulonglong max_value = 0; diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index 9ddb516c3dc..8251af20a44 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -80,7 +80,6 @@ class ha_innobase: public handler ulong innobase_update_autoinc(ulonglong auto_inc); ulong innobase_initialize_autoinc(); dict_index_t* innobase_get_index(uint keynr); - ulonglong innobase_get_int_col_max_value(const Field* field); /* Init values for the class: */ public: From 12665e79e4ddffb23e351e04271c72b4b752c78a Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 22 Jan 2010 13:57:02 +0400 Subject: [PATCH 082/132] Applying InnoDB snapshot, fixes BUG#46193. Detailed revision comments: r6424 | marko | 2010-01-12 12:22:19 +0200 (Tue, 12 Jan 2010) | 16 lines branches/5.1: In innobase_initialize_autoinc(), do not attempt to read the maximum auto-increment value from the table if innodb_force_recovery is set to at least 4, so that writes are disabled. (Bug #46193) innobase_get_int_col_max_value(): Move the function definition before ha_innobase::innobase_initialize_autoinc(), because that function now calls this function. ha_innobase::innobase_initialize_autoinc(): Change the return type to void. Do not attempt to read the maximum auto-increment value from the table if innodb_force_recovery is set to at least 4. Issue ER_AUTOINC_READ_FAILED to the client when the auto-increment value cannot be read. rb://144 by Sunny, revised by Marko --- storage/innobase/handler/ha_innodb.cc | 238 ++++++++++++++------------ storage/innobase/handler/ha_innodb.h | 2 +- 2 files changed, 134 insertions(+), 106 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index aca8be74b07..9b6c2cf9895 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -2575,58 +2575,151 @@ normalize_table_name( #endif } +/************************************************************************ +Get the upper limit of the MySQL integral and floating-point type. */ +static +ulonglong +innobase_get_int_col_max_value( +/*===========================*/ + /* out: maximum allowed value for the field */ + const Field* field) /* in: MySQL field */ +{ + ulonglong max_value = 0; + + switch(field->key_type()) { + /* TINY */ + case HA_KEYTYPE_BINARY: + max_value = 0xFFULL; + break; + case HA_KEYTYPE_INT8: + max_value = 0x7FULL; + break; + /* SHORT */ + case HA_KEYTYPE_USHORT_INT: + max_value = 0xFFFFULL; + break; + case HA_KEYTYPE_SHORT_INT: + max_value = 0x7FFFULL; + break; + /* MEDIUM */ + case HA_KEYTYPE_UINT24: + max_value = 0xFFFFFFULL; + break; + case HA_KEYTYPE_INT24: + max_value = 0x7FFFFFULL; + break; + /* LONG */ + case HA_KEYTYPE_ULONG_INT: + max_value = 0xFFFFFFFFULL; + break; + case HA_KEYTYPE_LONG_INT: + max_value = 0x7FFFFFFFULL; + break; + /* BIG */ + case HA_KEYTYPE_ULONGLONG: + max_value = 0xFFFFFFFFFFFFFFFFULL; + break; + case HA_KEYTYPE_LONGLONG: + max_value = 0x7FFFFFFFFFFFFFFFULL; + break; + case HA_KEYTYPE_FLOAT: + /* We use the maximum as per IEEE754-2008 standard, 2^24 */ + max_value = 0x1000000ULL; + break; + case HA_KEYTYPE_DOUBLE: + /* We use the maximum as per IEEE754-2008 standard, 2^53 */ + max_value = 0x20000000000000ULL; + break; + default: + ut_error; + } + + return(max_value); +} + /************************************************************************ Set the autoinc column max value. This should only be called once from ha_innobase::open(). Therefore there's no need for a covering lock. */ -ulong +void ha_innobase::innobase_initialize_autoinc() /*======================================*/ { - dict_index_t* index; ulonglong auto_inc; - const char* col_name; - ulint error = DB_SUCCESS; - dict_table_t* innodb_table = prebuilt->table; - - col_name = table->found_next_number_field->field_name; - index = innobase_get_index(table->s->next_number_index); - - /* Execute SELECT MAX(col_name) FROM TABLE; */ - error = row_search_max_autoinc(index, col_name, &auto_inc); - - if (error == DB_SUCCESS) { - - /* At the this stage we dont' know the increment - or the offset, so use default inrement of 1. */ - ++auto_inc; - - dict_table_autoinc_initialize(innodb_table, auto_inc); - - } else if (error == DB_RECORD_NOT_FOUND) { - ut_print_timestamp(stderr); - fprintf(stderr, " InnoDB: MySQL and InnoDB data " - "dictionaries are out of sync.\n" - "InnoDB: Unable to find the AUTOINC column %s in the " - "InnoDB table %s.\n" - "InnoDB: We set the next AUTOINC column value to the " - "maximum possible value,\n" - "InnoDB: in effect disabling the AUTOINC next value " - "generation.\n" - "InnoDB: You can either set the next AUTOINC value " - "explicitly using ALTER TABLE\n" - "InnoDB: or fix the data dictionary by recreating " - "the table.\n", - col_name, index->table->name); + const Field* field = table->found_next_number_field; + if (field != NULL) { + auto_inc = innobase_get_int_col_max_value(field); + } else { + /* We have no idea what's been passed in to us as the + autoinc column. We set it to the MAX_INT of our table + autoinc type. */ auto_inc = 0xFFFFFFFFFFFFFFFFULL; - dict_table_autoinc_initialize(innodb_table, auto_inc); + ut_print_timestamp(stderr); + fprintf(stderr, " InnoDB: Unable to determine the AUTOINC " + "column name\n"); + } - error = DB_SUCCESS; - } /* else other errors are still fatal */ + if (srv_force_recovery >= SRV_FORCE_NO_IBUF_MERGE) { + /* If the recovery level is set so high that writes + are disabled we force the AUTOINC counter to the MAX + value effectively disabling writes to the table. + Secondly, we avoid reading the table in case the read + results in failure due to a corrupted table/index. - return(ulong(error)); + We will not return an error to the client, so that the + tables can be dumped with minimal hassle. If an error + were returned in this case, the first attempt to read + the table would fail and subsequent SELECTs would succeed. */ + } else if (field == NULL) { + my_error(ER_AUTOINC_READ_FAILED, MYF(0)); + } else { + dict_index_t* index; + const char* col_name; + ulonglong read_auto_inc; + ulint err; + + update_thd(ha_thd()); + col_name = field->field_name; + index = innobase_get_index(table->s->next_number_index); + + /* Execute SELECT MAX(col_name) FROM TABLE; */ + err = row_search_max_autoinc(index, col_name, &read_auto_inc); + + switch (err) { + case DB_SUCCESS: + /* At the this stage we do not know the increment + or the offset, so use a default increment of 1. */ + auto_inc = read_auto_inc + 1; + break; + + case DB_RECORD_NOT_FOUND: + ut_print_timestamp(stderr); + fprintf(stderr, " InnoDB: MySQL and InnoDB data " + "dictionaries are out of sync.\n" + "InnoDB: Unable to find the AUTOINC column " + "%s in the InnoDB table %s.\n" + "InnoDB: We set the next AUTOINC column " + "value to the maximum possible value,\n" + "InnoDB: in effect disabling the AUTOINC " + "next value generation.\n" + "InnoDB: You can either set the next " + "AUTOINC value explicitly using ALTER TABLE\n" + "InnoDB: or fix the data dictionary by " + "recreating the table.\n", + col_name, index->table->name); + + my_error(ER_AUTOINC_READ_FAILED, MYF(0)); + break; + default: + /* row_search_max_autoinc() should only return + one of DB_SUCCESS or DB_RECORD_NOT_FOUND. */ + ut_error; + } + } + + dict_table_autoinc_initialize(prebuilt->table, auto_inc); } /********************************************************************* @@ -2824,8 +2917,6 @@ retry: /* Only if the table has an AUTOINC column. */ if (prebuilt->table != NULL && table->found_next_number_field != NULL) { - ulint error; - dict_table_autoinc_lock(prebuilt->table); /* Since a table can already be "open" in InnoDB's internal @@ -2834,8 +2925,7 @@ retry: autoinc value from a previous MySQL open. */ if (dict_table_autoinc_read(prebuilt->table) == 0) { - error = innobase_initialize_autoinc(); - ut_a(error == DB_SUCCESS); + innobase_initialize_autoinc(); } dict_table_autoinc_unlock(prebuilt->table); @@ -3650,68 +3740,6 @@ skip_field: } } -/************************************************************************ -Get the upper limit of the MySQL integral and floating-point type. */ -static -ulonglong -innobase_get_int_col_max_value( -/*===========================*/ - /* out: maximum allowed value for the field */ - const Field* field) /* in: MySQL field */ -{ - ulonglong max_value = 0; - - switch(field->key_type()) { - /* TINY */ - case HA_KEYTYPE_BINARY: - max_value = 0xFFULL; - break; - case HA_KEYTYPE_INT8: - max_value = 0x7FULL; - break; - /* SHORT */ - case HA_KEYTYPE_USHORT_INT: - max_value = 0xFFFFULL; - break; - case HA_KEYTYPE_SHORT_INT: - max_value = 0x7FFFULL; - break; - /* MEDIUM */ - case HA_KEYTYPE_UINT24: - max_value = 0xFFFFFFULL; - break; - case HA_KEYTYPE_INT24: - max_value = 0x7FFFFFULL; - break; - /* LONG */ - case HA_KEYTYPE_ULONG_INT: - max_value = 0xFFFFFFFFULL; - break; - case HA_KEYTYPE_LONG_INT: - max_value = 0x7FFFFFFFULL; - break; - /* BIG */ - case HA_KEYTYPE_ULONGLONG: - max_value = 0xFFFFFFFFFFFFFFFFULL; - break; - case HA_KEYTYPE_LONGLONG: - max_value = 0x7FFFFFFFFFFFFFFFULL; - break; - case HA_KEYTYPE_FLOAT: - /* We use the maximum as per IEEE754-2008 standard, 2^24 */ - max_value = 0x1000000ULL; - break; - case HA_KEYTYPE_DOUBLE: - /* We use the maximum as per IEEE754-2008 standard, 2^53 */ - max_value = 0x20000000000000ULL; - break; - default: - ut_error; - } - - return(max_value); -} - /************************************************************************ This special handling is really to overcome the limitations of MySQL's binlogging. We need to eliminate the non-determinism that will arise in diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index 8251af20a44..5b3df16875a 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -78,7 +78,7 @@ class ha_innobase: public handler ulong innobase_reset_autoinc(ulonglong auto_inc); ulong innobase_get_autoinc(ulonglong* value); ulong innobase_update_autoinc(ulonglong auto_inc); - ulong innobase_initialize_autoinc(); + void innobase_initialize_autoinc(); dict_index_t* innobase_get_index(uint keynr); /* Init values for the class: */ From 407e6e309e0a32974e5db89da51b288242f1bb00 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 22 Jan 2010 14:02:17 +0400 Subject: [PATCH 083/132] Applying InnoDB snapshot Detailed revision comments: r6488 | sunny | 2010-01-21 02:55:08 +0200 (Thu, 21 Jan 2010) | 2 lines branches/5.1: Factor out test for bug#44030 from innodb-autoinc.test into a separate test/result files. --- mysql-test/r/innodb-autoinc.result | 29 ----------------------------- mysql-test/t/innodb-autoinc.test | 26 -------------------------- 2 files changed, 55 deletions(-) diff --git a/mysql-test/r/innodb-autoinc.result b/mysql-test/r/innodb-autoinc.result index fe87e11c9ec..c03daa3565e 100644 --- a/mysql-test/r/innodb-autoinc.result +++ b/mysql-test/r/innodb-autoinc.result @@ -868,35 +868,6 @@ Got one of the listed errors DROP TABLE t1; DROP TABLE t2; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; -CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; -INSERT INTO t1 VALUES (null); -INSERT INTO t1 VALUES (null); -ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT; -SELECT * FROM t1; -d1 -1 -2 -SELECT * FROM t1; -d1 -1 -2 -INSERT INTO t1 VALUES(null); -Got one of the listed errors -ALTER TABLE t1 AUTO_INCREMENT = 3; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `d1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`d1`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES(null); -SELECT * FROM t1; -d1 -1 -2 -3 -DROP TABLE t1; -SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 1 diff --git a/mysql-test/t/innodb-autoinc.test b/mysql-test/t/innodb-autoinc.test index 84386280a26..bb431408937 100644 --- a/mysql-test/t/innodb-autoinc.test +++ b/mysql-test/t/innodb-autoinc.test @@ -478,32 +478,6 @@ INSERT INTO t2 SELECT c1 FROM t1; INSERT INTO t2 SELECT NULL FROM t1; DROP TABLE t1; DROP TABLE t2; -# -# 44030: Error: (1500) Couldn't read the MAX(ID) autoinc value from -# the index (PRIMARY) -# This test requires a restart of the server -SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; -CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; -INSERT INTO t1 VALUES (null); -INSERT INTO t1 VALUES (null); -ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT; -SELECT * FROM t1; -# Restart the server --- source include/restart_mysqld.inc -# The MySQL and InnoDB data dictionaries should now be out of sync. -# The select should print message to the error log -SELECT * FROM t1; -# MySQL have made a change (http://lists.mysql.com/commits/75268) that no -# longer results in the two data dictionaries being out of sync. If they -# revert their changes then this check for ER_AUTOINC_READ_FAILED will need -# to be enabled. --- error ER_AUTOINC_READ_FAILED,1467 -INSERT INTO t1 VALUES(null); -ALTER TABLE t1 AUTO_INCREMENT = 3; -SHOW CREATE TABLE t1; -INSERT INTO t1 VALUES(null); -SELECT * FROM t1; -DROP TABLE t1; # If the user has specified negative values for an AUTOINC column then # InnoDB should ignore those values when setting the table's max value. From dab7c82fe5ce9152415354c8cac4c216ab49d4a6 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 22 Jan 2010 14:03:18 +0400 Subject: [PATCH 084/132] Applying InnoDB snapshot Detailed revision comments: r6489 | sunny | 2010-01-21 02:57:50 +0200 (Thu, 21 Jan 2010) | 2 lines branches/5.1: Factor out test for bug#44030 from innodb-autoinc.test into a separate test/result files. --- mysql-test/r/innodb-autoinc-44030.result | 30 +++++++++++++++++++++ mysql-test/t/innodb-autoinc-44030.test | 34 ++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 mysql-test/r/innodb-autoinc-44030.result create mode 100644 mysql-test/t/innodb-autoinc-44030.test diff --git a/mysql-test/r/innodb-autoinc-44030.result b/mysql-test/r/innodb-autoinc-44030.result new file mode 100644 index 00000000000..c0695bf0be0 --- /dev/null +++ b/mysql-test/r/innodb-autoinc-44030.result @@ -0,0 +1,30 @@ +drop table if exists t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (null); +INSERT INTO t1 VALUES (null); +ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT; +SELECT * FROM t1; +d1 +1 +2 +SELECT * FROM t1; +d1 +1 +2 +INSERT INTO t1 VALUES(null); +Got one of the listed errors +ALTER TABLE t1 AUTO_INCREMENT = 3; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `d1` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`d1`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES(null); +SELECT * FROM t1; +d1 +1 +2 +3 +DROP TABLE t1; diff --git a/mysql-test/t/innodb-autoinc-44030.test b/mysql-test/t/innodb-autoinc-44030.test new file mode 100644 index 00000000000..1dfdad2bede --- /dev/null +++ b/mysql-test/t/innodb-autoinc-44030.test @@ -0,0 +1,34 @@ +-- source include/have_innodb.inc +# embedded server ignores 'delayed', so skip this +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +# +# 44030: Error: (1500) Couldn't read the MAX(ID) autoinc value from +# the index (PRIMARY) +# This test requires a restart of the server +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (null); +INSERT INTO t1 VALUES (null); +ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT; +SELECT * FROM t1; +# Restart the server +-- source include/restart_mysqld.inc +# The MySQL and InnoDB data dictionaries should now be out of sync. +# The select should print message to the error log +SELECT * FROM t1; +# MySQL have made a change (http://lists.mysql.com/commits/75268) that no +# longer results in the two data dictionaries being out of sync. If they +# revert their changes then this check for ER_AUTOINC_READ_FAILED will need +# to be enabled. +-- error ER_AUTOINC_READ_FAILED,1467 +INSERT INTO t1 VALUES(null); +ALTER TABLE t1 AUTO_INCREMENT = 3; +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES(null); +SELECT * FROM t1; +DROP TABLE t1; From b6a739f6d77886b7b3b32de857a7f89ff17984e3 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 22 Jan 2010 14:03:52 +0400 Subject: [PATCH 085/132] Applying InnoDB snapshot Detailed revision comments: r6492 | sunny | 2010-01-21 09:38:35 +0200 (Thu, 21 Jan 2010) | 1 line branches/5.1: Add reference to bug#47621 in the comment. --- mysql-test/t/innodb-autoinc-44030.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/t/innodb-autoinc-44030.test b/mysql-test/t/innodb-autoinc-44030.test index 1dfdad2bede..af2e3015280 100644 --- a/mysql-test/t/innodb-autoinc-44030.test +++ b/mysql-test/t/innodb-autoinc-44030.test @@ -24,7 +24,7 @@ SELECT * FROM t1; # MySQL have made a change (http://lists.mysql.com/commits/75268) that no # longer results in the two data dictionaries being out of sync. If they # revert their changes then this check for ER_AUTOINC_READ_FAILED will need -# to be enabled. +# to be enabled. Also, see http://bugs.mysql.com/bug.php?id=47621. -- error ER_AUTOINC_READ_FAILED,1467 INSERT INTO t1 VALUES(null); ALTER TABLE t1 AUTO_INCREMENT = 3; From f996e36de9c6f79816057e246b34ad9cc0ff1b76 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 22 Jan 2010 14:20:08 +0400 Subject: [PATCH 086/132] Disabled innodb-autoinc-44030 due to BUG#47621. --- mysql-test/t/disabled.def | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 07462e91696..5f37dbe2cb6 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -11,3 +11,4 @@ ############################################################################## kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild. query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically +innodb-autoinc-44030 : BUG#47621 2009-01-22 svoj MySQL and InnoDB dicts getting out of sync From 4a10f7b46c9ebbd9af89f37f64df40981459b788 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Fri, 22 Jan 2010 14:58:21 +0400 Subject: [PATCH 087/132] Bug#49501 Inefficient information_schema check (system collation), addon removed wrongly introduced strlen calls sql/events.cc: removed wrongly introduced strlen calls sql/mysql_priv.h: removed wrongly introduced strlen calls sql/repl_failsafe.cc: removed wrongly introduced strlen calls sql/sql_db.cc: removed wrongly introduced strlen calls sql/sql_parse.cc: removed wrongly introduced strlen calls sql/sql_show.cc: removed wrongly introduced strlen calls --- sql/events.cc | 3 +-- sql/mysql_priv.h | 6 ++++++ sql/repl_failsafe.cc | 2 +- sql/sql_db.cc | 2 +- sql/sql_parse.cc | 6 +++--- sql/sql_show.cc | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/sql/events.cc b/sql/events.cc index 790e6a61699..3273635666e 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -871,8 +871,7 @@ Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */) if (thd->lex->sql_command == SQLCOM_SHOW_EVENTS) { DBUG_ASSERT(thd->lex->select_lex.db); - if (!is_schema_db(thd->lex->select_lex.db, // There is no events in I_S - strlen(thd->lex->select_lex.db)) && + if (!is_schema_db(thd->lex->select_lex.db) && // There is no events in I_S check_access(thd, EVENT_ACL, thd->lex->select_lex.db, 0, 0, 0, 0)) DBUG_RETURN(1); db= thd->lex->select_lex.db; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 76edbf1dea3..abc50cd8063 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1426,6 +1426,12 @@ inline bool is_schema_db(const char *name, size_t len) INFORMATION_SCHEMA_NAME.str, name)); } +inline bool is_schema_db(const char *name) +{ + return !my_strcasecmp(system_charset_info, + INFORMATION_SCHEMA_NAME.str, name); +} + /* sql_prepare.cc */ void mysqld_stmt_prepare(THD *thd, const char *packet, uint packet_length); diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index dda84ca8a37..c6a05e93bf4 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -905,7 +905,7 @@ bool load_master_data(THD* thd) if (!rpl_filter->db_ok(db) || !rpl_filter->db_ok_with_wild_table(db) || !strcmp(db,"mysql") || - is_schema_db(db, strlen(db))) + is_schema_db(db)) { *cur_table_res = 0; continue; diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 22ecaa17a0c..a3f9b4baea4 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -618,7 +618,7 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info, DBUG_ENTER("mysql_create_db"); /* do not create 'information_schema' db */ - if (is_schema_db(db, strlen(db))) + if (is_schema_db(db)) { my_error(ER_DB_CREATE_EXISTS, MYF(0), db); DBUG_RETURN(-1); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 3c404a984bf..a2a1494141c 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2852,7 +2852,7 @@ end_with_restore_list: &first_table->grant.privilege, 0, 0, test(first_table->schema_table)) || check_access(thd,INSERT_ACL | CREATE_ACL,select_lex->db,&priv,0,0, - is_schema_db(select_lex->db, strlen(select_lex->db)))|| + is_schema_db(select_lex->db))|| check_merge_table_access(thd, first_table->db, (TABLE_LIST *) create_info.merge_list.first)) @@ -3865,7 +3865,7 @@ end_with_restore_list: first_table ? 0 : 1, 0, first_table ? (bool) first_table->schema_table : select_lex->db ? - is_schema_db(select_lex->db, strlen(select_lex->db)) : 0)) + is_schema_db(select_lex->db) : 0)) goto error; if (thd->security_ctx->user) // If not replication @@ -5304,7 +5304,7 @@ static bool check_show_access(THD *thd, TABLE_LIST *table) if (check_access(thd, SELECT_ACL, dst_db_name, &thd->col_access, FALSE, FALSE, - is_schema_db(dst_db_name, strlen(dst_db_name)))) + is_schema_db(dst_db_name))) return TRUE; if (!thd->col_access && check_grant_db(thd, dst_db_name)) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index d4da29085b5..5ec40d4893c 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -826,7 +826,7 @@ bool mysqld_show_create_db(THD *thd, char *dbname, DBUG_RETURN(TRUE); } #endif - if (is_schema_db(dbname, strlen(dbname))) + if (is_schema_db(dbname)) { dbname= INFORMATION_SCHEMA_NAME.str; create.default_table_charset= system_charset_info; From d93550cb80deb587843940a0102b18473aae2f5d Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 22 Jan 2010 16:23:27 +0400 Subject: [PATCH 088/132] Applying InnoDB snapshot, fixes BUG#49396. Detailed revision comments: r6471 | calvin | 2010-01-16 01:43:27 +0200 (Sat, 16 Jan 2010) | 4 lines branches/5.1: fix bug#49396: main.innodb test fails in embedded mode Change replace_result by using $MYSQLD_DATADIR. Tested in both embedded mode and normal server mode. --- mysql-test/t/innodb.test | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 42c24324ebc..8dcf494406a 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -15,6 +15,8 @@ -- source include/have_innodb.inc +let $MYSQLD_DATADIR= `select @@datadir`; + # Save the original values of some variables in order to be able to # estimate how much they have changed during the tests. Previously this # test assumed that e.g. rows_deleted is 0 here and after deleting 23 @@ -1699,7 +1701,7 @@ set foreign_key_checks=0; create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1; create table t3(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=utf8; # Embedded server doesn't chdir to data directory ---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' +--replace_result $MYSQLD_DATADIR ./ master-data/ '' -- error 1025 rename table t3 to t1; set foreign_key_checks=1; @@ -2339,7 +2341,7 @@ ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL; # mysqltest first does replace_regex, then replace_result --replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/ # Embedded server doesn't chdir to data directory ---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' +--replace_result $MYSQLD_DATADIR ./ master-data/ '' --error 1025 ALTER TABLE t2 MODIFY a INT NOT NULL; DELETE FROM t1; From 2b16517522afad76bc94b07bdaa8af64091e713b Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Sun, 24 Jan 2010 15:03:23 +0800 Subject: [PATCH 089/132] Backport Bug#37148 to 5.1 --- mysql-test/include/binlog_inject_error.inc | 22 ++++ .../suite/binlog/r/binlog_write_error.result | 108 ++++++++++++++++++ .../suite/binlog/t/binlog_write_error.test | 101 ++++++++++++++++ sql/events.cc | 6 +- sql/log.cc | 4 +- sql/log_event.cc | 6 +- sql/log_event_old.cc | 15 ++- sql/mysql_priv.h | 4 +- sql/rpl_injector.cc | 41 ++++--- sql/sp.cc | 13 ++- sql/sp_head.cc | 1 + sql/sql_acl.cc | 25 ++-- sql/sql_base.cc | 18 ++- sql/sql_class.h | 2 +- sql/sql_db.cc | 35 ++++-- sql/sql_delete.cc | 12 +- sql/sql_insert.cc | 51 +++++---- sql/sql_load.cc | 32 +++--- sql/sql_parse.cc | 17 +-- sql/sql_partition.cc | 5 +- sql/sql_rename.cc | 9 +- sql/sql_repl.cc | 13 ++- sql/sql_table.cc | 62 +++++----- sql/sql_tablespace.cc | 4 +- sql/sql_trigger.cc | 2 +- sql/sql_udf.cc | 8 +- sql/sql_update.cc | 7 +- sql/sql_view.cc | 8 +- 28 files changed, 472 insertions(+), 159 deletions(-) create mode 100644 mysql-test/include/binlog_inject_error.inc create mode 100644 mysql-test/suite/binlog/r/binlog_write_error.result create mode 100644 mysql-test/suite/binlog/t/binlog_write_error.test diff --git a/mysql-test/include/binlog_inject_error.inc b/mysql-test/include/binlog_inject_error.inc new file mode 100644 index 00000000000..6465f7943a4 --- /dev/null +++ b/mysql-test/include/binlog_inject_error.inc @@ -0,0 +1,22 @@ +# +# === Name +# +# binlog_inject_error.inc +# +# === Description +# +# Inject binlog write error when running the query, verifies that the +# query is ended with the proper error (ER_ERROR_ON_WRITE). +# +# === Usage +# +# let query= 'CREATE TABLE t1 (a INT)'; +# source include/binlog_inject_error.inc; +# + +SET GLOBAL debug='d,injecting_fault_writing'; +--echo $query; +--replace_regex /(errno: .*)/(errno: #)/ +--error ER_ERROR_ON_WRITE +--eval $query +SET GLOBAL debug=''; diff --git a/mysql-test/suite/binlog/r/binlog_write_error.result b/mysql-test/suite/binlog/r/binlog_write_error.result new file mode 100644 index 00000000000..dd8bdb9715a --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_write_error.result @@ -0,0 +1,108 @@ +# +# Initialization +# +DROP TABLE IF EXISTS t1, t2; +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; +DROP TRIGGER IF EXISTS tr1; +DROP TRIGGER IF EXISTS tr2; +DROP VIEW IF EXISTS v1, v2; +# +# Test injecting binlog write error when executing queries +# +SET GLOBAL debug='d,injecting_fault_writing'; +CREATE TABLE t1 (a INT); +CREATE TABLE t1 (a INT); +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +INSERT INTO t1 VALUES (1),(2),(3); +SET GLOBAL debug='d,injecting_fault_writing'; +INSERT INTO t1 VALUES (4),(5),(6); +INSERT INTO t1 VALUES (4),(5),(6); +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +UPDATE t1 set a=a+1; +UPDATE t1 set a=a+1; +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +DELETE FROM t1; +DELETE FROM t1; +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES (new.a + 100); +CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES (new.a + 100); +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +DROP TRIGGER tr1; +DROP TRIGGER tr1; +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +ALTER TABLE t1 ADD (b INT); +ALTER TABLE t1 ADD (b INT); +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +CREATE VIEW v1 AS SELECT a FROM t1; +CREATE VIEW v1 AS SELECT a FROM t1; +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +DROP VIEW v1; +DROP VIEW v1; +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1; +CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1; +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +DROP PROCEDURE p1; +DROP PROCEDURE p1; +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +DROP TABLE t1; +DROP TABLE t1; +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +CREATE FUNCTION f1() RETURNS INT return 1; +CREATE FUNCTION f1() RETURNS INT return 1; +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +DROP FUNCTION f1; +DROP FUNCTION f1; +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +CREATE USER user1; +CREATE USER user1; +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1; +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +SET GLOBAL debug='d,injecting_fault_writing'; +DROP USER user1; +DROP USER user1; +ERROR HY000: Error writing file 'master-bin' ((errno: #) +SET GLOBAL debug=''; +# +# Cleanup +# +DROP TABLE IF EXISTS t1, t2; +DROP FUNCTION IF EXISTS f1; +DROP PROCEDURE IF EXISTS p1; +DROP TRIGGER IF EXISTS tr1; +DROP VIEW IF EXISTS v1, v2; diff --git a/mysql-test/suite/binlog/t/binlog_write_error.test b/mysql-test/suite/binlog/t/binlog_write_error.test new file mode 100644 index 00000000000..0e57db3d9a0 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_write_error.test @@ -0,0 +1,101 @@ +# +# === Name === +# +# binlog_write_error.test +# +# === Description === +# +# This test case check if the error of writing binlog file is properly +# reported and handled when executing statements. +# +# === Related Bugs === +# +# BUG#37148 +# + +source include/have_log_bin.inc; +source include/have_debug.inc; + +--echo # +--echo # Initialization +--echo # + +disable_warnings; +DROP TABLE IF EXISTS t1, t2; +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; +DROP TRIGGER IF EXISTS tr1; +DROP TRIGGER IF EXISTS tr2; +DROP VIEW IF EXISTS v1, v2; +enable_warnings; + +--echo # +--echo # Test injecting binlog write error when executing queries +--echo # + +let $query= CREATE TABLE t1 (a INT); +source include/binlog_inject_error.inc; + +INSERT INTO t1 VALUES (1),(2),(3); + +let $query= INSERT INTO t1 VALUES (4),(5),(6); +source include/binlog_inject_error.inc; + +let $query= UPDATE t1 set a=a+1; +source include/binlog_inject_error.inc; + +let $query= DELETE FROM t1; +source include/binlog_inject_error.inc; + +let $query= CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES (new.a + 100); +source include/binlog_inject_error.inc; + +let $query= DROP TRIGGER tr1; +source include/binlog_inject_error.inc; + +let $query= ALTER TABLE t1 ADD (b INT); +source include/binlog_inject_error.inc; + +let $query= CREATE VIEW v1 AS SELECT a FROM t1; +source include/binlog_inject_error.inc; + +let $query= DROP VIEW v1; +source include/binlog_inject_error.inc; + +let $query= CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1; +source include/binlog_inject_error.inc; + +let $query= DROP PROCEDURE p1; +source include/binlog_inject_error.inc; + +let $query= DROP TABLE t1; +source include/binlog_inject_error.inc; + +let $query= CREATE FUNCTION f1() RETURNS INT return 1; +source include/binlog_inject_error.inc; + +let $query= DROP FUNCTION f1; +source include/binlog_inject_error.inc; + +let $query= CREATE USER user1; +source include/binlog_inject_error.inc; + +let $query= REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1; +source include/binlog_inject_error.inc; + +let $query= DROP USER user1; +source include/binlog_inject_error.inc; + +--echo # +--echo # Cleanup +--echo # + +disable_warnings; +DROP TABLE IF EXISTS t1, t2; +DROP FUNCTION IF EXISTS f1; +DROP PROCEDURE IF EXISTS p1; +DROP TRIGGER IF EXISTS tr1; +DROP VIEW IF EXISTS v1, v2; +enable_warnings; diff --git a/sql/events.cc b/sql/events.cc index 3273635666e..2770cabae19 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -476,7 +476,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, } /* If the definer is not set or set to CURRENT_USER, the value of CURRENT_USER will be written into the binary log as the definer for the SQL thread. */ - write_bin_log(thd, TRUE, log_query.c_ptr(), log_query.length()); + ret= write_bin_log(thd, TRUE, log_query.c_ptr(), log_query.length()); } } pthread_mutex_unlock(&LOCK_event_metadata); @@ -598,7 +598,7 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, new_element); /* Binlog the alter event. */ DBUG_ASSERT(thd->query() && thd->query_length()); - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + ret= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); } } pthread_mutex_unlock(&LOCK_event_metadata); @@ -673,7 +673,7 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) event_queue->drop_event(thd, dbname, name); /* Binlog the drop event. */ DBUG_ASSERT(thd->query() && thd->query_length()); - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + ret= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); } pthread_mutex_unlock(&LOCK_event_metadata); DBUG_RETURN(ret); diff --git a/sql/log.cc b/sql/log.cc index bc9efd75ea2..5544d0010ef 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1464,7 +1464,7 @@ binlog_end_trans(THD *thd, binlog_trx_data *trx_data, if (all || !(thd->options & (OPTION_BEGIN | OPTION_NOT_AUTOCOMMIT))) { if (trx_data->has_incident()) - mysql_bin_log.write_incident(thd, TRUE); + error= mysql_bin_log.write_incident(thd, TRUE); trx_data->reset(); } else // ...statement @@ -4710,7 +4710,7 @@ bool MYSQL_BIN_LOG::write_incident(THD *thd, bool lock) Incident_log_event ev(thd, incident, write_error_msg); if (lock) pthread_mutex_lock(&LOCK_log); - ev.write(&log_file); + error= ev.write(&log_file); if (lock) { if (!error && !(error= flush_and_sync())) diff --git a/sql/log_event.cc b/sql/log_event.cc index 6b21087b6aa..5219eae6600 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -5864,7 +5864,7 @@ Slave_log_event::Slave_log_event(const char* buf, uint event_len) int Slave_log_event::do_apply_event(Relay_log_info const *rli) { if (mysql_bin_log.is_open()) - mysql_bin_log.write(this); + return mysql_bin_log.write(this); return 0; } #endif /* !MYSQL_CLIENT */ @@ -7611,7 +7611,7 @@ static int rows_event_stmt_cleanup(Relay_log_info const *rli, THD * thd) (assume the last master's transaction is ignored by the slave because of replicate-ignore rules). */ - thd->binlog_flush_pending_rows_event(true); + error= thd->binlog_flush_pending_rows_event(true); /* If this event is not in a transaction, the call below will, if some @@ -7622,7 +7622,7 @@ static int rows_event_stmt_cleanup(Relay_log_info const *rli, THD * thd) are involved, commit the transaction and flush the pending event to the binlog. */ - error= ha_autocommit_or_rollback(thd, 0); + error|= ha_autocommit_or_rollback(thd, error); /* Now what if this is not a transactional engine? we still need to diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc index 357bc78b1cd..313916c9818 100644 --- a/sql/log_event_old.cc +++ b/sql/log_event_old.cc @@ -1541,7 +1541,15 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) NOTE: For this new scheme there should be no pending event: need to add code to assert that is the case. */ - thd->binlog_flush_pending_rows_event(false); + error= thd->binlog_flush_pending_rows_event(false); + if (error) + { + rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR, + ER(ER_SLAVE_FATAL_ERROR), + "call to binlog_flush_pending_rows_event() failed"); + thd->is_slave_error= 1; + DBUG_RETURN(error); + } TABLE_LIST *tables= rli->tables_to_lock; close_tables_for_reopen(thd, &tables); @@ -1831,7 +1839,7 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) (assume the last master's transaction is ignored by the slave because of replicate-ignore rules). */ - thd->binlog_flush_pending_rows_event(true); + int binlog_error= thd->binlog_flush_pending_rows_event(true); /* If this event is not in a transaction, the call below will, if some @@ -1842,12 +1850,13 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) are involved, commit the transaction and flush the pending event to the binlog. */ - if ((error= ha_autocommit_or_rollback(thd, 0))) + if ((error= ha_autocommit_or_rollback(thd, binlog_error))) rli->report(ERROR_LEVEL, error, "Error in %s event: commit of row events failed, " "table `%s`.`%s`", get_type_str(), m_table->s->db.str, m_table->s->table_name.str); + error|= binlog_error; /* Now what if this is not a transactional engine? we still need to diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index abc50cd8063..e99effe1dcb 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1036,8 +1036,8 @@ check_and_unset_inject_value(int value) #endif -void write_bin_log(THD *thd, bool clear_error, - char const *query, ulong query_length); +int write_bin_log(THD *thd, bool clear_error, + char const *query, ulong query_length); /* sql_connect.cc */ int check_user(THD *thd, enum enum_server_command command, diff --git a/sql/rpl_injector.cc b/sql/rpl_injector.cc index 684655d1c3b..666622dbac4 100644 --- a/sql/rpl_injector.cc +++ b/sql/rpl_injector.cc @@ -58,10 +58,14 @@ injector::transaction::~transaction() my_free(the_memory, MYF(0)); } +/** + @retval 0 transaction committed + @retval 1 transaction rolled back + */ int injector::transaction::commit() { DBUG_ENTER("injector::transaction::commit()"); - m_thd->binlog_flush_pending_rows_event(true); + int error= m_thd->binlog_flush_pending_rows_event(true); /* Cluster replication does not preserve statement or transaction boundaries of the master. Instead, a new @@ -81,9 +85,9 @@ int injector::transaction::commit() is committed by committing the statement transaction explicitly. */ - ha_autocommit_or_rollback(m_thd, 0); - end_trans(m_thd, COMMIT); - DBUG_RETURN(0); + error |= ha_autocommit_or_rollback(m_thd, error); + end_trans(m_thd, error ? ROLLBACK : COMMIT); + DBUG_RETURN(error); } int injector::transaction::use_table(server_id_type sid, table tbl) @@ -109,16 +113,17 @@ int injector::transaction::write_row (server_id_type sid, table tbl, record_type record) { DBUG_ENTER("injector::transaction::write_row(...)"); - - if (int error= check_state(ROW_STATE)) + + int error= 0; + if (error= check_state(ROW_STATE)) DBUG_RETURN(error); server_id_type save_id= m_thd->server_id; m_thd->set_server_id(sid); - m_thd->binlog_write_row(tbl.get_table(), tbl.is_transactional(), - cols, colcnt, record); + error= m_thd->binlog_write_row(tbl.get_table(), tbl.is_transactional(), + cols, colcnt, record); m_thd->set_server_id(save_id); - DBUG_RETURN(0); + DBUG_RETURN(error); } @@ -128,15 +133,16 @@ int injector::transaction::delete_row(server_id_type sid, table tbl, { DBUG_ENTER("injector::transaction::delete_row(...)"); - if (int error= check_state(ROW_STATE)) + int error= 0; + if (error= check_state(ROW_STATE)) DBUG_RETURN(error); server_id_type save_id= m_thd->server_id; m_thd->set_server_id(sid); - m_thd->binlog_delete_row(tbl.get_table(), tbl.is_transactional(), - cols, colcnt, record); + error= m_thd->binlog_delete_row(tbl.get_table(), tbl.is_transactional(), + cols, colcnt, record); m_thd->set_server_id(save_id); - DBUG_RETURN(0); + DBUG_RETURN(error); } @@ -146,15 +152,16 @@ int injector::transaction::update_row(server_id_type sid, table tbl, { DBUG_ENTER("injector::transaction::update_row(...)"); - if (int error= check_state(ROW_STATE)) + int error= 0; + if (error= check_state(ROW_STATE)) DBUG_RETURN(error); server_id_type save_id= m_thd->server_id; m_thd->set_server_id(sid); - m_thd->binlog_update_row(tbl.get_table(), tbl.is_transactional(), - cols, colcnt, before, after); + error= m_thd->binlog_update_row(tbl.get_table(), tbl.is_transactional(), + cols, colcnt, before, after); m_thd->set_server_id(save_id); - DBUG_RETURN(0); + DBUG_RETURN(error); } diff --git a/sql/sp.cc b/sql/sp.cc index 6fad1d70ffd..30896acd913 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -1105,9 +1105,10 @@ sp_create_routine(THD *thd, int type, sp_head *sp) /* restore sql_mode when binloging */ thd->variables.sql_mode= saved_mode; /* Such a statement can always go directly to binlog, no trans cache */ - thd->binlog_query(THD::MYSQL_QUERY_TYPE, - log_query.c_ptr(), log_query.length(), - FALSE, FALSE, 0); + if (thd->binlog_query(THD::MYSQL_QUERY_TYPE, + log_query.c_ptr(), log_query.length(), + FALSE, FALSE, 0)) + ret= SP_INTERNAL_ERROR; thd->variables.sql_mode= 0; } @@ -1166,7 +1167,8 @@ sp_drop_routine(THD *thd, int type, sp_name *name) if (ret == SP_OK) { - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + if (write_bin_log(thd, TRUE, thd->query(), thd->query_length())) + ret= SP_INTERNAL_ERROR; sp_cache_invalidate(); } @@ -1236,7 +1238,8 @@ sp_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics) if (ret == SP_OK) { - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + if (write_bin_log(thd, TRUE, thd->query(), thd->query_length())) + ret= SP_INTERNAL_ERROR; sp_cache_invalidate(); } diff --git a/sql/sp_head.cc b/sql/sp_head.cc index d74e195048f..45cb4eebb09 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -1790,6 +1790,7 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount, push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR, "Invoked ROUTINE modified a transactional table but MySQL " "failed to reflect this change in the binary log"); + err_status= TRUE; } reset_dynamic(&thd->user_var_events); /* Forget those values, in case more function calls are binlogged: */ diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 7ba1a657578..1fd70b4039e 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1659,8 +1659,8 @@ bool change_password(THD *thd, const char *host, const char *user, acl_user->host.hostname ? acl_user->host.hostname : "", new_password)); thd->clear_error(); - thd->binlog_query(THD::MYSQL_QUERY_TYPE, buff, query_length, - FALSE, FALSE, 0); + result= thd->binlog_query(THD::MYSQL_QUERY_TYPE, buff, query_length, + FALSE, FALSE, 0); } end: close_thread_tables(thd); @@ -3217,7 +3217,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, if (!result) /* success */ { - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + result= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); } rw_unlock(&LOCK_grant); @@ -3383,7 +3383,8 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, if (write_to_binlog) { - write_bin_log(thd, FALSE, thd->query(), thd->query_length()); + if (write_bin_log(thd, FALSE, thd->query(), thd->query_length())) + result= TRUE; } rw_unlock(&LOCK_grant); @@ -3502,7 +3503,7 @@ bool mysql_grant(THD *thd, const char *db, List &list, if (!result) { - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + result= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); } rw_unlock(&LOCK_grant); @@ -5716,7 +5717,7 @@ bool mysql_create_user(THD *thd, List &list) my_error(ER_CANNOT_USER, MYF(0), "CREATE USER", wrong_users.c_ptr_safe()); if (some_users_created) - write_bin_log(thd, FALSE, thd->query(), thd->query_length()); + result |= write_bin_log(thd, FALSE, thd->query(), thd->query_length()); rw_unlock(&LOCK_grant); close_thread_tables(thd); @@ -5789,7 +5790,7 @@ bool mysql_drop_user(THD *thd, List &list) my_error(ER_CANNOT_USER, MYF(0), "DROP USER", wrong_users.c_ptr_safe()); if (some_users_deleted) - write_bin_log(thd, FALSE, thd->query(), thd->query_length()); + result |= write_bin_log(thd, FALSE, thd->query(), thd->query_length()); rw_unlock(&LOCK_grant); close_thread_tables(thd); @@ -5874,7 +5875,7 @@ bool mysql_rename_user(THD *thd, List &list) my_error(ER_CANNOT_USER, MYF(0), "RENAME USER", wrong_users.c_ptr_safe()); if (some_users_renamed && mysql_bin_log.is_open()) - write_bin_log(thd, FALSE, thd->query(), thd->query_length()); + result |= write_bin_log(thd, FALSE, thd->query(), thd->query_length()); rw_unlock(&LOCK_grant); close_thread_tables(thd); @@ -6056,15 +6057,17 @@ bool mysql_revoke_all(THD *thd, List &list) VOID(pthread_mutex_unlock(&acl_cache->lock)); - write_bin_log(thd, FALSE, thd->query(), thd->query_length()); + int binlog_error= + write_bin_log(thd, FALSE, thd->query(), thd->query_length()); rw_unlock(&LOCK_grant); close_thread_tables(thd); - if (result) + /* error for writing binary log has already been reported */ + if (result && !binlog_error) my_message(ER_REVOKE_GRANTS, ER(ER_REVOKE_GRANTS), MYF(0)); - DBUG_RETURN(result); + DBUG_RETURN(result || binlog_error); } diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 9bb4ebedd55..a1f34f6a770 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1336,7 +1336,7 @@ void close_thread_tables(THD *thd) handled either before writing a query log event (inside binlog_query()) or when preparing a pending event. */ - thd->binlog_flush_pending_rows_event(TRUE); + (void)thd->binlog_flush_pending_rows_event(TRUE); mysql_unlock_tables(thd, thd->lock); thd->lock=0; } @@ -1550,7 +1550,11 @@ void close_temporary_tables(THD *thd) qinfo.db= db.ptr(); qinfo.db_len= db.length(); thd->variables.character_set_client= cs_save; - mysql_bin_log.write(&qinfo); + if (mysql_bin_log.write(&qinfo)) + { + push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, MYF(0), + "Failed to write the DROP statement for temporary tables to binary log"); + } thd->variables.pseudo_thread_id= save_pseudo_thread_id; } else @@ -4031,9 +4035,13 @@ retry: end = strxmov(strmov(query, "DELETE FROM `"), share->db.str,"`.`",share->table_name.str,"`", NullS); int errcode= query_error_code(thd, TRUE); - thd->binlog_query(THD::STMT_QUERY_TYPE, - query, (ulong)(end-query), - FALSE, FALSE, errcode); + if (thd->binlog_query(THD::STMT_QUERY_TYPE, + query, (ulong)(end-query), + FALSE, FALSE, errcode)) + { + my_free(query, MYF(0)); + goto err; + } my_free(query, MYF(0)); } else diff --git a/sql/sql_class.h b/sql/sql_class.h index 56d31be79c7..77b4aa6c1d0 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -2621,7 +2621,7 @@ public: {} int prepare(List &list, SELECT_LEX_UNIT *u); - void binlog_show_create_table(TABLE **tables, uint count); + int binlog_show_create_table(TABLE **tables, uint count); void store_values(List &values); void send_error(uint errcode,const char *err); bool send_eof(); diff --git a/sql/sql_db.cc b/sql/sql_db.cc index a3f9b4baea4..d5d9830f63d 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -178,13 +178,13 @@ uchar* dboptions_get_key(my_dbopt_t *opt, size_t *length, Helper function to write a query to binlog used by mysql_rm_db() */ -static inline void write_to_binlog(THD *thd, char *query, uint q_len, - char *db, uint db_len) +static inline int write_to_binlog(THD *thd, char *query, uint q_len, + char *db, uint db_len) { Query_log_event qinfo(thd, query, q_len, 0, 0, 0); qinfo.db= db; qinfo.db_len= db_len; - mysql_bin_log.write(&qinfo); + return mysql_bin_log.write(&qinfo); } @@ -747,7 +747,11 @@ not_silent: qinfo.db_len = strlen(db); /* These DDL methods and logging protected with LOCK_mysql_create_db */ - mysql_bin_log.write(&qinfo); + if (mysql_bin_log.write(&qinfo)) + { + error= -1; + goto exit; + } } my_ok(thd, result); } @@ -824,7 +828,8 @@ bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info) qinfo.db_len = strlen(db); /* These DDL methods and logging protected with LOCK_mysql_create_db */ - mysql_bin_log.write(&qinfo); + if (error= mysql_bin_log.write(&qinfo)) + goto exit; } my_ok(thd, result); @@ -974,7 +979,11 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) qinfo.db_len = strlen(db); /* These DDL methods and logging protected with LOCK_mysql_create_db */ - mysql_bin_log.write(&qinfo); + if (mysql_bin_log.write(&qinfo)) + { + error= -1; + goto exit; + } } thd->clear_error(); thd->server_status|= SERVER_STATUS_DB_DROPPED; @@ -1002,7 +1011,11 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) if (query_pos + tbl_name_len + 1 >= query_end) { /* These DDL methods and logging protected with LOCK_mysql_create_db */ - write_to_binlog(thd, query, query_pos -1 - query, db, db_len); + if (write_to_binlog(thd, query, query_pos -1 - query, db, db_len)) + { + error= -1; + goto exit; + } query_pos= query_data_start; } @@ -1015,7 +1028,11 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) if (query_pos != query_data_start) { /* These DDL methods and logging protected with LOCK_mysql_create_db */ - write_to_binlog(thd, query, query_pos -1 - query, db, db_len); + if (write_to_binlog(thd, query, query_pos -1 - query, db, db_len)) + { + error= -1; + goto exit; + } } } @@ -1965,7 +1982,7 @@ bool mysql_upgrade_db(THD *thd, LEX_STRING *old_db) Query_log_event qinfo(thd, thd->query(), thd->query_length(), 0, TRUE, errcode); thd->clear_error(); - mysql_bin_log.write(&qinfo); + error|= mysql_bin_log.write(&qinfo); } /* Step9: Let's do "use newdb" if we renamed the current database */ diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 6b9a83e695b..af3fdf11696 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -850,9 +850,10 @@ void multi_delete::abort() if (mysql_bin_log.is_open()) { int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED); - thd->binlog_query(THD::ROW_QUERY_TYPE, - thd->query(), thd->query_length(), - transactional_tables, FALSE, errcode); + /* possible error of writing binary log is ignored deliberately */ + (void) thd->binlog_query(THD::ROW_QUERY_TYPE, + thd->query(), thd->query_length(), + transactional_tables, FALSE, errcode); } thd->transaction.all.modified_non_trans_table= true; } @@ -1167,8 +1168,9 @@ end: { /* In RBR, the statement is not binlogged if the table is temporary. */ if (!is_temporary_table || !thd->current_stmt_binlog_row_based) - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); - my_ok(thd); // This should return record count + error= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + if (!error) + my_ok(thd); // This should return record count } VOID(pthread_mutex_lock(&LOCK_open)); unlock_table_name(thd, table_list); diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 9754d5575e8..1f4ca90157f 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2743,10 +2743,11 @@ bool Delayed_insert::handle_inserts(void) will be binlogged together as one single Table_map event and one single Rows event. */ - thd.binlog_query(THD::ROW_QUERY_TYPE, - row->query.str, row->query.length, - FALSE, FALSE, errcode); - + if (thd.binlog_query(THD::ROW_QUERY_TYPE, + row->query.str, row->query.length, + FALSE, FALSE, errcode)) + goto err; + thd.time_zone_used = backup_time_zone_used; thd.variables.time_zone = backup_time_zone; } @@ -2814,8 +2815,9 @@ bool Delayed_insert::handle_inserts(void) TODO: Move the logging to last in the sequence of rows. */ - if (thd.current_stmt_binlog_row_based) - thd.binlog_flush_pending_rows_event(TRUE); + if (thd.current_stmt_binlog_row_based && + thd.binlog_flush_pending_rows_event(TRUE)) + goto err; if ((error=table->file->extra(HA_EXTRA_NO_CACHE))) { // This shouldn't happen @@ -3267,16 +3269,21 @@ bool select_insert::send_eof() events are in the transaction cache and will be written when ha_autocommit_or_rollback() is issued below. */ - if (mysql_bin_log.is_open()) + if (mysql_bin_log.is_open() && + (!error || thd->transaction.stmt.modified_non_trans_table)) { int errcode= 0; if (!error) thd->clear_error(); else errcode= query_error_code(thd, killed_status == THD::NOT_KILLED); - thd->binlog_query(THD::ROW_QUERY_TYPE, + if (thd->binlog_query(THD::ROW_QUERY_TYPE, thd->query(), thd->query_length(), - trans_table, FALSE, errcode); + trans_table, FALSE, errcode)) + { + table->file->ha_release_auto_increment(); + DBUG_RETURN(1); + } } table->file->ha_release_auto_increment(); @@ -3345,9 +3352,10 @@ void select_insert::abort() { if (mysql_bin_log.is_open()) { int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED); - thd->binlog_query(THD::ROW_QUERY_TYPE, thd->query(), - thd->query_length(), - transactional_table, FALSE, errcode); + /* error of writing binary log is ignored */ + (void) thd->binlog_query(THD::ROW_QUERY_TYPE, thd->query(), + thd->query_length(), + transactional_table, FALSE, errcode); } if (!thd->current_stmt_binlog_row_based && !can_rollback_data()) thd->transaction.all.modified_non_trans_table= TRUE; @@ -3602,7 +3610,8 @@ select_create::prepare(List &values, SELECT_LEX_UNIT *u) !table->s->tmp_table && !ptr->get_create_info()->table_existed) { - ptr->binlog_show_create_table(tables, count); + if (int error= ptr->binlog_show_create_table(tables, count)) + return error; } return 0; } @@ -3709,7 +3718,7 @@ select_create::prepare(List &values, SELECT_LEX_UNIT *u) DBUG_RETURN(0); } -void +int select_create::binlog_show_create_table(TABLE **tables, uint count) { /* @@ -3748,12 +3757,13 @@ select_create::binlog_show_create_table(TABLE **tables, uint count) if (mysql_bin_log.is_open()) { int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED); - thd->binlog_query(THD::STMT_QUERY_TYPE, - query.ptr(), query.length(), - /* is_trans */ TRUE, - /* suppress_use */ FALSE, - errcode); + result= thd->binlog_query(THD::STMT_QUERY_TYPE, + query.ptr(), query.length(), + /* is_trans */ TRUE, + /* suppress_use */ FALSE, + errcode); } + return result; } void select_create::store_values(List &values) @@ -3851,7 +3861,8 @@ void select_create::abort() select_insert::abort(); thd->transaction.stmt.modified_non_trans_table= FALSE; reenable_binlog(thd); - thd->binlog_flush_pending_rows_event(TRUE); + /* possible error of writing binary log is ignored deliberately */ + (void)thd->binlog_flush_pending_rows_event(TRUE); if (m_plock) { diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 326a7517ed6..ee3b442c83a 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -122,7 +122,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, char name[FN_REFLEN]; File file; TABLE *table= NULL; - int error; + int error= 0; String *field_term=ex->field_term,*escaped=ex->escaped; String *enclosed=ex->enclosed; bool is_fifo=0; @@ -504,18 +504,20 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, { int errcode= query_error_code(thd, killed_status == THD::NOT_KILLED); + /* since there is already an error, the possible error of + writing binary log will be ignored */ if (thd->transaction.stmt.modified_non_trans_table) - write_execute_load_query_log_event(thd, ex, - table_list->db, - table_list->table_name, - handle_duplicates, ignore, - transactional_table, - errcode); + (void) write_execute_load_query_log_event(thd, ex, + table_list->db, + table_list->table_name, + handle_duplicates, ignore, + transactional_table, + errcode); else { Delete_file_log_event d(thd, db, transactional_table); d.flags|= LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F; - mysql_bin_log.write(&d); + (void) mysql_bin_log.write(&d); } } } @@ -541,7 +543,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, after this point. */ if (thd->current_stmt_binlog_row_based) - thd->binlog_flush_pending_rows_event(true); + error= thd->binlog_flush_pending_rows_event(true); else { /* @@ -553,13 +555,15 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, if (lf_info.wrote_create_file) { int errcode= query_error_code(thd, killed_status == THD::NOT_KILLED); - write_execute_load_query_log_event(thd, ex, - table_list->db, table_list->table_name, - handle_duplicates, ignore, - transactional_table, - errcode); + error= write_execute_load_query_log_event(thd, ex, + table_list->db, table_list->table_name, + handle_duplicates, ignore, + transactional_table, + errcode); } } + if (error) + goto err; } #endif /*!EMBEDDED_LIBRARY*/ diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index a2a1494141c..a114d92b124 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2987,7 +2987,7 @@ end_with_restore_list: /* Presumably, REPAIR and binlog writing doesn't require synchronization */ - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + res= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); } select_lex->table_list.first= (uchar*) first_table; lex->query_tables=all_tables; @@ -3019,7 +3019,7 @@ end_with_restore_list: /* Presumably, ANALYZE and binlog writing doesn't require synchronization */ - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + res= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); } select_lex->table_list.first= (uchar*) first_table; lex->query_tables=all_tables; @@ -3042,7 +3042,7 @@ end_with_restore_list: /* Presumably, OPTIMIZE and binlog writing doesn't require synchronization */ - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + res= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); } select_lex->table_list.first= (uchar*) first_table; lex->query_tables=all_tables; @@ -3159,7 +3159,7 @@ end_with_restore_list: if (incident) { Incident_log_event ev(thd, incident); - mysql_bin_log.write(&ev); + (void) mysql_bin_log.write(&ev); /* error is ignored */ mysql_bin_log.rotate_and_purge(RP_FORCE_ROTATE); } DBUG_PRINT("debug", ("Just after generate_incident()")); @@ -3988,7 +3988,8 @@ end_with_restore_list: */ if (!lex->no_write_to_binlog && write_to_binlog) { - write_bin_log(thd, FALSE, thd->query(), thd->query_length()); + if (res= write_bin_log(thd, FALSE, thd->query(), thd->query_length())) + break; } my_ok(thd); } @@ -4566,12 +4567,12 @@ create_sp_error: case SP_KEY_NOT_FOUND: if (lex->drop_if_exists) { - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + res= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_SP_DOES_NOT_EXIST, ER(ER_SP_DOES_NOT_EXIST), SP_COM_STRING(lex), lex->spname->m_name.str); - res= FALSE; - my_ok(thd); + if (!res) + my_ok(thd); break; } my_error(ER_SP_DOES_NOT_EXIST, MYF(0), diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 329317f4293..275115e3cbd 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -4113,8 +4113,9 @@ static int fast_end_partition(THD *thd, ulonglong copied, } if ((!is_empty) && (!written_bin_log) && - (!thd->lex->no_write_to_binlog)) - write_bin_log(thd, FALSE, thd->query(), thd->query_length()); + (!thd->lex->no_write_to_binlog) && + write_bin_log(thd, FALSE, thd->query(), thd->query_length())) + DBUG_RETURN(TRUE); my_snprintf(tmp_name, sizeof(tmp_name), ER(ER_INSERT_INFO), (ulong) (copied + deleted), diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc index dac96f2e9c4..e85e730db5b 100644 --- a/sql/sql_rename.cc +++ b/sql/sql_rename.cc @@ -34,6 +34,7 @@ static TABLE_LIST *reverse_table_list(TABLE_LIST *table_list); bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent) { bool error= 1; + bool binlog_error= 0; TABLE_LIST *ren_table= 0; int to_table; char *rename_log_table[2]= {NULL, NULL}; @@ -174,11 +175,11 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent) */ pthread_mutex_unlock(&LOCK_open); - /* Lets hope this doesn't fail as the result will be messy */ if (!silent && !error) { - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); - my_ok(thd); + binlog_error= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + if (!binlog_error) + my_ok(thd); } if (!error) @@ -190,7 +191,7 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent) err: start_waiting_global_read_lock(thd); - DBUG_RETURN(error); + DBUG_RETURN(error || binlog_error); } diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index de038f8dc2c..4b10d284611 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -1004,8 +1004,8 @@ int reset_slave(THD *thd, Master_info* mi) MY_STAT stat_area; char fname[FN_REFLEN]; int thread_mask= 0, error= 0; - uint sql_errno=0; - const char* errmsg=0; + uint sql_errno=ER_UNKNOWN_ERROR; + const char* errmsg= "Unknown error occured while reseting slave"; DBUG_ENTER("reset_slave"); lock_slave_threads(mi); @@ -1671,7 +1671,8 @@ err: replication events along LOAD DATA processing. @param file pointer to io-cache - @return 0 + @retval 0 success + @retval 1 failure */ int log_loaded_block(IO_CACHE* file) { @@ -1698,7 +1699,8 @@ int log_loaded_block(IO_CACHE* file) Append_block_log_event a(lf_info->thd, lf_info->thd->db, buffer, min(block_len, max_event_size), lf_info->log_delayed); - mysql_bin_log.write(&a); + if (mysql_bin_log.write(&a)) + DBUG_RETURN(1); } else { @@ -1706,7 +1708,8 @@ int log_loaded_block(IO_CACHE* file) buffer, min(block_len, max_event_size), lf_info->log_delayed); - mysql_bin_log.write(&b); + if (mysql_bin_log.write(&b)) + DBUG_RETURN(1); lf_info->wrote_create_file= 1; DBUG_SYNC_POINT("debug_lock.created_file_event",10); } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 0e36ecfcb46..f5df8481dc4 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1748,9 +1748,10 @@ end: file */ -void write_bin_log(THD *thd, bool clear_error, - char const *query, ulong query_length) +int write_bin_log(THD *thd, bool clear_error, + char const *query, ulong query_length) { + int error= 0; if (mysql_bin_log.is_open()) { int errcode= 0; @@ -1758,9 +1759,10 @@ void write_bin_log(THD *thd, bool clear_error, thd->clear_error(); else errcode= query_error_code(thd, TRUE); - thd->binlog_query(THD::STMT_QUERY_TYPE, - query, query_length, FALSE, FALSE, errcode); + error= thd->binlog_query(THD::STMT_QUERY_TYPE, + query, query_length, FALSE, FALSE, errcode); } + return error; } @@ -2106,7 +2108,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, tables). In this case, we can write the original query into the binary log. */ - write_bin_log(thd, !error, thd->query(), thd->query_length()); + error |= write_bin_log(thd, !error, thd->query(), thd->query_length()); } else if (thd->current_stmt_binlog_row_based && tmp_table_deleted) @@ -2128,7 +2130,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, */ built_query.chop(); // Chop of the last comma built_query.append(" /* generated by server */"); - write_bin_log(thd, !error, built_query.ptr(), built_query.length()); + error|= write_bin_log(thd, !error, built_query.ptr(), built_query.length()); } /* @@ -2147,7 +2149,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, */ built_tmp_query.chop(); // Chop of the last comma built_tmp_query.append(" /* generated by server */"); - write_bin_log(thd, !error, built_tmp_query.ptr(), built_tmp_query.length()); + error|= write_bin_log(thd, !error, built_tmp_query.ptr(), built_tmp_query.length()); } } @@ -3556,9 +3558,9 @@ void sp_prepare_create_field(THD *thd, Create_field *sql_field) RETURN VALUES NONE */ -static inline void write_create_table_bin_log(THD *thd, - const HA_CREATE_INFO *create_info, - bool internal_tmp_table) +static inline int write_create_table_bin_log(THD *thd, + const HA_CREATE_INFO *create_info, + bool internal_tmp_table) { /* Don't write statement if: @@ -3571,7 +3573,8 @@ static inline void write_create_table_bin_log(THD *thd, (!thd->current_stmt_binlog_row_based || (thd->current_stmt_binlog_row_based && !(create_info->options & HA_LEX_CREATE_TMP_TABLE)))) - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + return write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + return 0; } @@ -3837,8 +3840,7 @@ bool mysql_create_table_no_lock(THD *thd, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR), alias); - error= 0; - write_create_table_bin_log(thd, create_info, internal_tmp_table); + error= write_create_table_bin_log(thd, create_info, internal_tmp_table); goto err; } my_error(ER_TABLE_EXISTS_ERROR, MYF(0), alias); @@ -3959,8 +3961,7 @@ bool mysql_create_table_no_lock(THD *thd, thd->thread_specific_used= TRUE; } - write_create_table_bin_log(thd, create_info, internal_tmp_table); - error= FALSE; + error= write_create_table_bin_log(thd, create_info, internal_tmp_table); unlock_and_end: VOID(pthread_mutex_unlock(&LOCK_open)); @@ -3975,7 +3976,7 @@ warn: ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR), alias); create_info->table_existed= 1; // Mark that table existed - write_create_table_bin_log(thd, create_info, internal_tmp_table); + error= write_create_table_bin_log(thd, create_info, internal_tmp_table); goto unlock_and_end; } @@ -5448,18 +5449,20 @@ binlog: create_info, FALSE /* show_database */); DBUG_ASSERT(result == 0); // store_create_info() always return 0 - write_bin_log(thd, TRUE, query.ptr(), query.length()); + if (write_bin_log(thd, TRUE, query.ptr(), query.length())) + goto err; } } else // Case 1 - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + if (write_bin_log(thd, TRUE, thd->query(), thd->query_length())) + goto err; } /* Case 3 and 4 does nothing under RBR */ } - else - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + else if (write_bin_log(thd, TRUE, thd->query(), thd->query_length())) + goto err; res= FALSE; @@ -5547,7 +5550,7 @@ mysql_discard_or_import_tablespace(THD *thd, error=1; if (error) goto err; - write_bin_log(thd, FALSE, thd->query(), thd->query_length()); + error= write_bin_log(thd, FALSE, thd->query(), thd->query_length()); err: ha_autocommit_or_rollback(thd, error); @@ -6558,11 +6561,13 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, thd->clear_error(); Query_log_event qinfo(thd, thd->query(), thd->query_length(), 0, FALSE, 0); - mysql_bin_log.write(&qinfo); + if (error= mysql_bin_log.write(&qinfo)) + goto view_err_unlock; } my_ok(thd); } +view_err_unlock: unlock_table_names(thd, table_list, (TABLE_LIST*) 0); view_err: @@ -6810,8 +6815,9 @@ view_err: if (!error) { - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); - my_ok(thd); + error= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + if (!error) + my_ok(thd); } else if (error > 0) { @@ -7299,8 +7305,9 @@ view_err: if (rename_temporary_table(thd, new_table, new_db, new_name)) goto err1; /* We don't replicate alter table statement on temporary tables */ - if (!thd->current_stmt_binlog_row_based) - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + if (!thd->current_stmt_binlog_row_based && + write_bin_log(thd, TRUE, thd->query(), thd->query_length())) + DBUG_RETURN(TRUE); goto end_temporary; } @@ -7463,7 +7470,8 @@ view_err: DBUG_ASSERT(!(mysql_bin_log.is_open() && thd->current_stmt_binlog_row_based && (create_info->options & HA_LEX_CREATE_TMP_TABLE))); - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + if (write_bin_log(thd, TRUE, thd->query(), thd->query_length())) + DBUG_RETURN(TRUE); if (ha_check_storage_engine_flag(old_db_type, HTON_FLUSH_AFTER_RENAME)) { diff --git a/sql/sql_tablespace.cc b/sql/sql_tablespace.cc index fcc442a8f9a..65107f8679e 100644 --- a/sql/sql_tablespace.cc +++ b/sql/sql_tablespace.cc @@ -66,6 +66,6 @@ int mysql_alter_tablespace(THD *thd, st_alter_tablespace *ts_info) ha_resolve_storage_engine_name(hton), "TABLESPACE or LOGFILE GROUP"); } - write_bin_log(thd, FALSE, thd->query(), thd->query_length()); - DBUG_RETURN(FALSE); + error= write_bin_log(thd, FALSE, thd->query(), thd->query_length()); + DBUG_RETURN(error); } diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index a251a533622..ba0515d38ad 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -507,7 +507,7 @@ end: if (!result) { - write_bin_log(thd, TRUE, stmt_query.ptr(), stmt_query.length()); + result= write_bin_log(thd, TRUE, stmt_query.ptr(), stmt_query.length()); } VOID(pthread_mutex_unlock(&LOCK_open)); diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index c6b41b59a3f..3ade9fbc0b1 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -506,8 +506,8 @@ int mysql_create_function(THD *thd,udf_func *udf) rw_unlock(&THR_LOCK_udf); /* Binlog the create function. */ - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); - + if (write_bin_log(thd, TRUE, thd->query(), thd->query_length())) + DBUG_RETURN(1); DBUG_RETURN(0); err: @@ -581,8 +581,8 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name) rw_unlock(&THR_LOCK_udf); /* Binlog the drop function. */ - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); - + if (write_bin_log(thd, TRUE, thd->query(), thd->query_length())) + DBUG_RETURN(1); DBUG_RETURN(0); err: rw_unlock(&THR_LOCK_udf); diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 26f40c7fa9f..433e2619aca 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1868,9 +1868,10 @@ void multi_update::abort() into repl event. */ int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED); - thd->binlog_query(THD::ROW_QUERY_TYPE, - thd->query(), thd->query_length(), - transactional_tables, FALSE, errcode); + /* the error of binary logging is ignored */ + (void)thd->binlog_query(THD::ROW_QUERY_TYPE, + thd->query(), thd->query_length(), + transactional_tables, FALSE, errcode); } thd->transaction.all.modified_non_trans_table= TRUE; } diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 83cebf1e3da..c6d412112c2 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -662,8 +662,9 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, buff.append(views->source.str, views->source.length); int errcode= query_error_code(thd, TRUE); - thd->binlog_query(THD::STMT_QUERY_TYPE, - buff.ptr(), buff.length(), FALSE, FALSE, errcode); + if (thd->binlog_query(THD::STMT_QUERY_TYPE, + buff.ptr(), buff.length(), FALSE, FALSE, errcode)) + res= TRUE; } VOID(pthread_mutex_unlock(&LOCK_open)); @@ -1652,7 +1653,8 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode) /* if something goes wrong, bin-log with possible error code, otherwise bin-log with error code cleared. */ - write_bin_log(thd, !something_wrong, thd->query(), thd->query_length()); + if (write_bin_log(thd, !something_wrong, thd->query(), thd->query_length())) + something_wrong= 1; } VOID(pthread_mutex_unlock(&LOCK_open)); From cfa7e83d6deee0acb2c003e94617be115e07814e Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Mon, 25 Jan 2010 17:46:48 +0200 Subject: [PATCH 090/132] Bug #47142 "slave start until" stops 1 event too late in 4.1 to 5.0 replication When replicating from 4.1 master to 5.0 slave START SLAVE UNTIL can stop too late. The necessary in calculating of the beginning of an event the event's length did not correspond to the master's genuine information at the event's execution time. That piece of info was changed at the event's relay-logging due to binlog_version<4 event conversion by IO thread. Fixed with storing the master genuine Query_log_event size into a new status variable at relay-logging of the event. The stored info is extacted at the event execution and participate further to caclulate the correct start position of the event in the until-pos stopping routine. The new status variable's algorithm will be only active when the event comes from the master of version < 5.0 (binlog_version < 4). mysql-test/r/rpl_until.result: results changed. mysql-test/std_data/bug47142_master-bin.000001: a binlog from 4.1 master to replace one of the running 5.x master is added as part of Bug #47142 regression test. mysql-test/t/rpl_until.test: Regression test for Bug #47142 is added. sql/log_event.cc: Storing and extracting the master's genuine size of the event from the status var of the event packet header. The binlog_version<4 query-log-event is a. converted into the modern binlog_version==4 to store the original size of the event into a new status var; the converted representation goes into the relay log. b. the converted event is read out and the stored size is engaged in the start pos calculation. The new status is active only for events that IO thread instantiates for the sake of the conversion. sql/log_event.h: Incrementing the max szie of MAX_SIZE_LOG_EVENT_STATUS because of the new status var; Defining the new status variable to hold the master's genuine event size; Augmenting the Query_log_event with a new member to hold a value to store/extact from the status var of the event packet header. --- mysql-test/r/rpl_until.result | 18 +++++++++ .../std_data/bug47142_master-bin.000001 | Bin 0 -> 386 bytes mysql-test/t/rpl_until.test | 36 +++++++++++++++++ sql/log_event.cc | 37 ++++++++++++++++-- sql/log_event.h | 15 ++++++- 5 files changed, 102 insertions(+), 4 deletions(-) create mode 100644 mysql-test/std_data/bug47142_master-bin.000001 diff --git a/mysql-test/r/rpl_until.result b/mysql-test/r/rpl_until.result index 60b956785ba..476e56878db 100644 --- a/mysql-test/r/rpl_until.result +++ b/mysql-test/r/rpl_until.result @@ -194,3 +194,21 @@ start slave sql_thread; start slave until master_log_file='master-bin.000001', master_log_pos=776; Warnings: Note 1254 Slave is already running +stop slave; +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +flush logs; +show binary logs; +Log_name File_size +master-bin.000001 # +master-bin.000002 # +reset slave; +start slave until master_log_file='master-bin.000001', master_log_pos=294 /* to stop right before DROP */; +show tables /* t1 must exist */; +Tables_in_test +t1 +drop table t1; +stop slave; +reset slave; +reset master; diff --git a/mysql-test/std_data/bug47142_master-bin.000001 b/mysql-test/std_data/bug47142_master-bin.000001 new file mode 100644 index 0000000000000000000000000000000000000000..d1a089a784a6596f5c92b2ffdd06da90951ad9fc GIT binary patch literal 386 zcmaJ-K}rKb5S(c69et97>@JxQye&Rp4;}=GczlSaDGcYom1G&aJDy?%}ZJu6l57w7# z_LwZsQvbEKE|8C+?Zo*3+kpbibOw6WlePp=FGl#6R3ssU3z$KIgL+OR3clU;9sy literal 0 HcmV?d00001 diff --git a/mysql-test/t/rpl_until.test b/mysql-test/t/rpl_until.test index c404ea7e58b..b533c2192b0 100644 --- a/mysql-test/t/rpl_until.test +++ b/mysql-test/t/rpl_until.test @@ -84,4 +84,40 @@ start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; start slave sql_thread; start slave until master_log_file='master-bin.000001', master_log_pos=776; +# +# Bug #47142 "slave start until" stops 1 event too late in 4.1 to 5.0 replication +# +# testing fixes that refine the start position of prior-5.0 master's event +# and by that provide correct execution of +# START SLAVE UNTIL ... master_log_pos= x; +# Keep the test at the end of the file because it manipulates with binlog files +# to substitute the genuine one with a prepared on 4.1 server. +# + +connection slave; +stop slave; + +connection master; +drop table if exists t1; +flush logs; +--source include/show_binary_logs.inc +--remove_file $MYSQLTEST_VARDIR/log/master-bin.000001 +--copy_file $MYSQL_TEST_DIR/std_data/bug47142_master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000001 + +connection slave; +reset slave; +start slave until master_log_file='master-bin.000001', master_log_pos=294 /* to stop right before DROP */; +--source include/wait_for_slave_sql_to_stop.inc + +show tables /* t1 must exist */; + +# clean-up of Bug #47142 testing + +drop table t1; # drop on slave only, master does not have t1. +stop slave; +reset slave; + +connection master; +reset master; + # End of 4.1 tests diff --git a/sql/log_event.cc b/sql/log_event.cc index 40e29e58ab6..f32fcb0056c 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1271,10 +1271,22 @@ bool Query_log_event::write(IO_CACHE* file) int8store(start, table_map_for_update); start+= 8; } + if (master_data_written != 0) + { + /* + Q_MASTER_DATA_WRITTEN_CODE only exists in relay logs where the master + has binlog_version<4 and the slave has binlog_version=4. See comment + for master_data_written in log_event.h for details. + */ + *start++= Q_MASTER_DATA_WRITTEN_CODE; + int4store(start, master_data_written); + start+= 4; + } + /* NOTE: When adding new status vars, please don't forget to update - the MAX_SIZE_LOG_EVENT_STATUS in log_event.h and update function - code_name in this file. + the MAX_SIZE_LOG_EVENT_STATUS in log_event.h and update the function + code_name() in this file. Here there could be code like if (command-line-option-which-says-"log_this_variable" && inited) @@ -1354,6 +1366,7 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg, auto_increment_offset(thd_arg->variables.auto_increment_offset), lc_time_names_number(thd_arg->variables.lc_time_names->number), charset_database_number(0), + master_data_written(0), table_map_for_update((ulonglong)thd_arg->table_map_for_update) { time_t end_time; @@ -1481,6 +1494,7 @@ code_name(int code) case Q_LC_TIME_NAMES_CODE: return "Q_LC_TIME_NAMES_CODE"; case Q_CHARSET_DATABASE_CODE: return "Q_CHARSET_DATABASE_CODE"; case Q_TABLE_MAP_FOR_UPDATE_CODE: return "Q_TABLE_MAP_FOR_UPDATE_CODE"; + case Q_MASTER_DATA_WRITTEN_CODE: return "Q_MASTER_DATA_WRITTEN_CODE"; } sprintf(buf, "CODE#%d", code); return buf; @@ -1518,7 +1532,7 @@ Query_log_event::Query_log_event(const char* buf, uint event_len, flags2_inited(0), sql_mode_inited(0), charset_inited(0), auto_increment_increment(1), auto_increment_offset(1), time_zone_len(0), lc_time_names_number(0), charset_database_number(0), - table_map_for_update(0) + table_map_for_update(0), master_data_written(0) { ulong data_len; uint32 tmp; @@ -1574,6 +1588,18 @@ Query_log_event::Query_log_event(const char* buf, uint event_len, DBUG_PRINT("info", ("Query_log_event has status_vars_len: %u", (uint) status_vars_len)); tmp-= 2; + } + else + { + /* + server version < 5.0 / binlog_version < 4 master's event is + relay-logged with storing the original size of the event in + Q_MASTER_DATA_WRITTEN_CODE status variable. + The size is to be restored at reading Q_MASTER_DATA_WRITTEN_CODE-marked + event from the relay log. + */ + DBUG_ASSERT(description_event->binlog_version < 4); + master_data_written= data_written; } /* We have parsed everything we know in the post header for QUERY_EVENT, @@ -1665,6 +1691,11 @@ Query_log_event::Query_log_event(const char* buf, uint event_len, table_map_for_update= uint8korr(pos); pos+= 8; break; + case Q_MASTER_DATA_WRITTEN_CODE: + CHECK_SPACE(pos, end, 4); + data_written= master_data_written= uint4korr(pos); + pos+= 4; + break; default: /* That's why you must write status vars in growing order of code */ DBUG_PRINT("info",("Query_log_event has unknown status vars (first has\ diff --git a/sql/log_event.h b/sql/log_event.h index 45e3d11b48c..10b374199de 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -212,7 +212,8 @@ struct sql_ex_info 1 + 1 + 255 /* type, length, time_zone */ + \ 1 + 2 /* type, lc_time_names_number */ + \ 1 + 2 /* type, charset_database_number */ + \ - 1 + 8 /* type, table_map_for_update */) + 1 + 8 /* type, table_map_for_update */ + \ + 1 + 4 /* type, master_data_written */) #define MAX_LOG_EVENT_HEADER ( /* in order of Query_log_event::write */ \ LOG_EVENT_HEADER_LEN + /* write_header */ \ QUERY_HEADER_LEN + /* write_data */ \ @@ -278,6 +279,9 @@ struct sql_ex_info #define Q_CHARSET_DATABASE_CODE 8 #define Q_TABLE_MAP_FOR_UPDATE_CODE 9 + +#define Q_MASTER_DATA_WRITTEN_CODE 10 + /* Intvar event post-header */ #define I_TYPE_OFFSET 0 @@ -810,6 +814,15 @@ public: statement, for other query statements, this will be zero. */ ulonglong table_map_for_update; + /* + Holds the original length of a Query_log_event that comes from a + master of version < 5.0 (i.e., binlog_version < 4). When the IO + thread writes the relay log, it augments the Query_log_event with a + Q_MASTER_DATA_WRITTEN_CODE status_var that holds the original event + length. This field is initialized to non-zero in the SQL thread when + it reads this augmented event. + */ + uint32 master_data_written; #ifndef MYSQL_CLIENT From 8baba07f6a02ea075ca7240814d688cc68049979 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Mon, 25 Jan 2010 19:04:56 +0300 Subject: [PATCH 091/132] Make sys_vars.delayed_insert_limit_func experimental due to Bug 50435. --- mysql-test/collections/default.experimental | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 34cf1f964b8..8e69b60eafb 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -32,6 +32,7 @@ rpl.rpl_sync* @windows # Bug#50473 2010-01-20 alik rpl_sync f rpl.rpl_timezone* # Bug#47017 2009-10-27 alik rpl_timezone fails on PB-2 with mismatch error sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun +sys_vars.delayed_insert_limit_func # Bug#50435 2010-01-25 alik sys_vars.delayed_insert_limit_func fails on Ubuntu x86_64 in debug mode # Declare all NDB-tests in ndb and rpl_ndb test suites experimental. # Usually the test cases from ndb and rpl_ndb test suites are not run in PB, From f8a5a1284b4e37ce2b5ab9ef8dfba8522366bd11 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Mon, 25 Jan 2010 19:12:25 +0300 Subject: [PATCH 092/132] Enable one test case for weekly builds. --- mysql-test/collections/default.weekly | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/collections/default.weekly b/mysql-test/collections/default.weekly index e69de29bb2d..452a79eacbd 100644 --- a/mysql-test/collections/default.weekly +++ b/mysql-test/collections/default.weekly @@ -0,0 +1 @@ +perl mysql-test-run.pl --timer --force --comment=1st --experimental=collections/default.experimental 1st From c7cb4b3c42ceeabf0e6ce289dccee560896faacc Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 26 Jan 2010 10:47:43 +0200 Subject: [PATCH 093/132] fix a windows test run bug with debug binaries : dbug frame should be exited before destroying the thread local storage. --- sql/mysqld.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index db0453dc364..1fcd046f870 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1949,10 +1949,10 @@ bool one_thread_per_connection_end(THD *thd, bool put_in_cache) /* It's safe to broadcast outside a lock (COND... is not deleted here) */ DBUG_PRINT("signal", ("Broadcasting COND_thread_count")); + DBUG_LEAVE; // Must match DBUG_ENTER() my_thread_end(); (void) pthread_cond_broadcast(&COND_thread_count); - DBUG_LEAVE; // Must match DBUG_ENTER() pthread_exit(0); return 0; // Avoid compiler warnings } From 7920e89a47a6cc8f65783528291ce87ba5b19074 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Tue, 26 Jan 2010 15:05:19 -0200 Subject: [PATCH 094/132] Bug#49491: Much overhead for MD5() and SHA1() on short strings MySQL's hash functions MD5 and SHA relied on the somewhat slow sprintf function to convert the digests to hex representations. This patch replaces the sprintf with a specific and inline hex conversion function. Patch contributed by Jan Steemann. sql/item_strfunc.cc: Add a hex conversion function. --- sql/item_strfunc.cc | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index ecd839d8378..4cdeeef6c78 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -42,6 +42,20 @@ C_MODE_END String my_empty_string("",default_charset_info); +/* + Convert an array of bytes to a hexadecimal representation. + + Used to generate a hexadecimal representation of a message digest. +*/ +static void array_to_hex(char *to, const char *str, uint len) +{ + const char *str_end= str + len; + for (; str != str_end; ++str) + { + *to++= _dig_vec_lower[((uchar) *str) >> 4]; + *to++= _dig_vec_lower[((uchar) *str) & 0x0F]; + } +} bool Item_str_func::fix_fields(THD *thd, Item **ref) @@ -114,12 +128,7 @@ String *Item_func_md5::val_str(String *str) null_value=1; return 0; } - sprintf((char *) str->ptr(), - "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", - digest[0], digest[1], digest[2], digest[3], - digest[4], digest[5], digest[6], digest[7], - digest[8], digest[9], digest[10], digest[11], - digest[12], digest[13], digest[14], digest[15]); + array_to_hex((char *) str->ptr(), (const char*) digest, 16); str->length((uint) 32); return str; } @@ -160,15 +169,7 @@ String *Item_func_sha::val_str(String *str) if (!( str->alloc(SHA1_HASH_SIZE*2) || (mysql_sha1_result(&context,digest)))) { - sprintf((char *) str->ptr(), - "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\ -%02x%02x%02x%02x%02x%02x%02x%02x", - digest[0], digest[1], digest[2], digest[3], - digest[4], digest[5], digest[6], digest[7], - digest[8], digest[9], digest[10], digest[11], - digest[12], digest[13], digest[14], digest[15], - digest[16], digest[17], digest[18], digest[19]); - + array_to_hex((char *) str->ptr(), (const char*) digest, SHA1_HASH_SIZE); str->length((uint) SHA1_HASH_SIZE*2); null_value=0; return str; From c12c9780cdbe965bcdce0326b14a171d2f2b8635 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Jan 2010 10:52:13 +0800 Subject: [PATCH 095/132] Bug #49191 rpl_get_master_version_and_clock failed on PB2: COM_REGISTER_SLAVE failed The 'rpl_get_master_version_and_clock' test verifies if the slave I/O thread tries to reconnect to master when it tries to get the values of the UNIX_TIMESTAMP, SERVER_ID from master under network disconnection. So the master server is restarted for making the transient network disconnection, during the period the COM_REGISTER_SLAVE failures are produced in server log file when the slave I/O thread tries to register on master. To fix the problem, suppress COM_REGISTER_SLAVE failures in server log file by mtr suppression, because they are expected. mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result: Removed mtr.add_suppression("Get master clock failed with error: ") and mtr.add_suppression("Get master SERVER_ID failed with error: "). Because they are suppressed globally. --- mysql-test/collections/default.experimental | 1 - .../rpl/r/rpl_get_master_version_and_clock.result | 5 ++--- .../suite/rpl/t/rpl_get_master_version_and_clock.test | 11 ++++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 2e31063a6db..9c4055cd19e 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -17,7 +17,6 @@ main.plugin_load @solaris # Bug#42144 ndb.* # joro : NDB tests marked as experimental as agreed with bochklin -rpl.rpl_get_master_version_and_clock* # Bug #49191 2009-12-01 Daogang rpl_get_master_version_and_clock failed on PB2: COM_REGISTER_SLAVE failed rpl.rpl_innodb_bug28430* @solaris # Bug#46029 rpl_ndb.* # joro : NDB tests marked as experimental as agreed with bochklin diff --git a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result index 5f2a55b5e35..d054cb573d3 100644 --- a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result +++ b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result @@ -4,10 +4,9 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -call mtr.add_suppression("Get master clock failed with error: "); -call mtr.add_suppression("Get master SERVER_ID failed with error: "); -call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again"); +call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: .*"); call mtr.add_suppression("Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; .*"); +call mtr.add_suppression("Slave I/O thread .* register on master"); SELECT IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP"); IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP") 1 diff --git a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test index 69c63eaa69f..24309e8a14a 100644 --- a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test +++ b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test @@ -16,12 +16,13 @@ source include/master-slave.inc; source include/have_debug.inc; -call mtr.add_suppression("Get master clock failed with error: "); -call mtr.add_suppression("Get master SERVER_ID failed with error: "); -call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again"); -call mtr.add_suppression("Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; .*"); -#Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection + connection slave; +call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: .*"); +call mtr.add_suppression("Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; .*"); +call mtr.add_suppression("Slave I/O thread .* register on master"); + +#Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection let $debug_saved= `select @@global.debug`; let $debug_lock= "debug_lock.before_get_UNIX_TIMESTAMP"; From 694d50c71efc079c794fc81fb13d49ce5036ce36 Mon Sep 17 00:00:00 2001 From: Staale Smedseng Date: Wed, 27 Jan 2010 11:38:50 +0100 Subject: [PATCH 096/132] Bug#50409 Solaris 8 compatibility broken by assumption about printstack() being present When Bug#47391 was fixed, no assumption was made that support for Solaris 8 was needed. Solaris 8 lacks printstack(), and the build breaks because of this. This patch adds a test for the presence of printstack() to configure.in for 5.0, and uses HAVE_PRINTSTACK to make decisions rather than the __sun define. --- configure.in | 2 +- sql/stacktrace.c | 2 +- sql/stacktrace.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 405ebddadbe..a399ccb2909 100644 --- a/configure.in +++ b/configure.in @@ -2128,7 +2128,7 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \ shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \ sighold sigset sigthreadmask \ snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr strtol \ - strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr) + strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr printstack) # # diff --git a/sql/stacktrace.c b/sql/stacktrace.c index 295a7a3e1e2..a8648ca4e5a 100644 --- a/sql/stacktrace.c +++ b/sql/stacktrace.c @@ -227,7 +227,7 @@ stack trace is much more helpful in diagnosing the problem, so please do \n\ resolve it\n"); } -#elif defined(__sun) +#elif defined(HAVE_PRINTSTACK) /* Use Solaris' symbolic stack trace routine. */ #include diff --git a/sql/stacktrace.h b/sql/stacktrace.h index 718b545b775..1366a6cf996 100644 --- a/sql/stacktrace.h +++ b/sql/stacktrace.h @@ -35,7 +35,7 @@ void check_thread_lib(void); #define HAVE_STACKTRACE extern void set_exception_pointers(EXCEPTION_POINTERS *ep); #define init_stacktrace() {} -#elif defined(__sun) +#elif defined(HAVE_PRINTSTACK) #define HAVE_STACKTRACE #define init_stacktrace() {} #endif From 35c6bb89e64fd87a0ce1b51eab8b757dbdfc228d Mon Sep 17 00:00:00 2001 From: Magne Mahre Date: Wed, 27 Jan 2010 13:23:28 +0100 Subject: [PATCH 097/132] WL#5182 Remove more deprecated 4.1/5.0 features WL#5182 is a follow-up to WL#5154, deprecating a few more options and system variables. client/client_priv.h: The warning message has been changed to not include a specific version number in the text. client/mysql.cc: --no-tee is deprecated client/mysqldump.c: --all is deprecated -a now points to create-options mysql-test/r/mysqlbinlog.result: Warning text changed mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result: Warning text changed sql/mysql_priv.h: The warning message has been changed to not include a specific version number in the text. sql/mysqld.cc: --use-symbolic-links is deprecated -s now points to --symbolic-links --warnings is deprecated -W now points to --log-warnings myisam_max_extra_sort_file_size is deprecated record_buffer is deprecated --log-update is deprecated --sql-bin-update-same is deprecated --skip-locking is deprecated --skip-symlink is deprecated --enable-locking is deprecated --delay-key-write-for-all-tables is deprecated --- client/client_priv.h | 5 ++- client/mysql.cc | 2 +- client/mysqldump.c | 7 +++- mysql-test/r/mysqlbinlog.result | 6 +-- .../suite/rpl/r/rpl_row_mysqlbinlog.result | 4 +- sql/mysql_priv.h | 2 +- sql/mysqld.cc | 40 ++++++++++++++++--- 7 files changed, 50 insertions(+), 16 deletions(-) diff --git a/client/client_priv.h b/client/client_priv.h index 9d2fc2be141..689f7277c2e 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -37,7 +37,7 @@ #define WARN_DEPRECATED(Ver,Old,New) \ do { \ printf("Warning: The option '%s' is deprecated and will be removed " \ - "in MySQL %s. Please use %s instead.\n", (Old), (Ver), (New)); \ + "in a future release. Please use %s instead.\n", (Old), (New)); \ } while(0); enum options_client @@ -57,7 +57,7 @@ enum options_client OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL, OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION, OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH, - OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_CREATE_OPTIONS, OPT_SERVER_ARG, + OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_SERVER_ARG, OPT_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME, OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY, OPT_COUNT, #ifdef HAVE_NDBCLUSTER_DB @@ -90,5 +90,6 @@ enum options_client OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE, OPT_WRITE_BINLOG, OPT_DUMP_DATE, OPT_FIRST_SLAVE, + OPT_ALL, OPT_MAX_CLIENT_OPTION }; diff --git a/client/mysql.cc b/client/mysql.cc index b3b73fdb468..82a29816b8e 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1630,7 +1630,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), init_tee(argument); break; case OPT_NOTEE: - printf("WARNING: option deprecated; use --disable-tee instead.\n"); + WARN_DEPRECATED(VER_CELOSIA, "--no-tee", "--disable-tee"); if (opt_outfile) end_tee(); break; diff --git a/client/mysqldump.c b/client/mysqldump.c index 25a8d7b0f6f..8a50c57201c 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -179,7 +179,7 @@ HASH ignore_table; static struct my_option my_long_options[] = { - {"all", 'a', "Deprecated. Use --create-options instead.", + {"all", OPT_ALL, "Deprecated. Use --create-options instead.", (uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"all-databases", 'A', @@ -230,7 +230,7 @@ static struct my_option my_long_options[] = {"compress", 'C', "Use compression in server/client protocol.", (uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"create-options", OPT_CREATE_OPTIONS, + {"create-options", 'a', "Include all MySQL specific create options.", (uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, @@ -762,6 +762,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case 'O': WARN_DEPRECATED(VER_CELOSIA, "--set-variable", "--variable-name=value"); break; + case (int) OPT_ALL: + WARN_DEPRECATED(VER_CELOSIA, "--all", "--create-options"); + break; case (int) OPT_FIRST_SLAVE: WARN_DEPRECATED(VER_CELOSIA, "--first-slave", "--lock-all-tables"); break; diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index f5c40202101..b7aa981f834 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -93,7 +93,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- --position -- -Warning: The option '--position' is deprecated and will be removed in MySQL 5.6. Please use --start-position instead. +Warning: The option '--position' is deprecated and will be removed in a future release. Please use --start-position instead. /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; @@ -194,7 +194,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- --position -- -Warning: The option '--position' is deprecated and will be removed in MySQL 5.6. Please use --start-position instead. +Warning: The option '--position' is deprecated and will be removed in a future release. Please use --start-position instead. /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; @@ -235,7 +235,7 @@ DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; -Warning: The option '--position' is deprecated and will be removed in MySQL 5.6. Please use --start-position instead. +Warning: The option '--position' is deprecated and will be removed in a future release. Please use --start-position instead. /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result index 449407742de..538764da738 100644 --- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result +++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result @@ -152,7 +152,7 @@ c1 c3 c4 c5 5 2006-02-22 00:00:00 Tested in Texas 11 --- Test 2 position test -- -Warning: The option '--position' is deprecated and will be removed in MySQL 5.6. Please use --start-position instead. +Warning: The option '--position' is deprecated and will be removed in a future release. Please use --start-position instead. /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; @@ -315,7 +315,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- Test 7 reading stdin w/position -- -Warning: The option '--position' is deprecated and will be removed in MySQL 5.6. Please use --start-position instead. +Warning: The option '--position' is deprecated and will be removed in a future release. Please use --start-position instead. /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index e99effe1dcb..34f29e7c458 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -124,7 +124,7 @@ char* query_table_status(THD *thd,const char *db,const char *table_name); (Old), (Ver), (New)); \ else \ sql_print_warning("The syntax '%s' is deprecated and will be removed " \ - "in MySQL %s. Please use %s instead.", (Old), (Ver), (New)); \ + "in a future release. Please use %s instead.", (Old), (New)); \ } while(0) extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *system_charset_info; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 1fcd046f870..40026867aaf 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5711,6 +5711,9 @@ enum options_mysqld OPT_TABLE_LOCK_WAIT_TIMEOUT, OPT_PLUGIN_LOAD, OPT_PLUGIN_DIR, + OPT_SYMBOLIC_LINKS, + OPT_WARNINGS, + OPT_RECORD_BUFFER_OLD, OPT_LOG_OUTPUT, OPT_PORT_OPEN_TIMEOUT, OPT_PROFILING, @@ -6532,7 +6535,7 @@ log and this option does nothing anymore.", {"transaction-isolation", OPT_TX_ISOLATION, "Default transaction isolation level.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"use-symbolic-links", 's', "Enable symbolic link support. Deprecated option; use --symbolic-links instead.", + {"use-symbolic-links", OPT_SYMBOLIC_LINKS, "Enable symbolic link support. Deprecated option; use --symbolic-links instead.", (uchar**) &my_use_symdir, (uchar**) &my_use_symdir, 0, GET_BOOL, NO_ARG, IF_PURIFY(0,1), 0, 0, 0, 0, 0}, {"user", 'u', "Run mysqld daemon as user.", 0, 0, 0, GET_STR, REQUIRED_ARG, @@ -6542,7 +6545,7 @@ log and this option does nothing anymore.", 0, 0}, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"warnings", 'W', "Deprecated; use --log-warnings instead.", + {"warnings", OPT_WARNINGS, "Deprecated; use --log-warnings instead.", (uchar**) &global_system_variables.log_warnings, (uchar**) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG, 1, 0, ULONG_MAX, 0, 0, 0}, @@ -6795,7 +6798,8 @@ The minimum value for this variable is 4096.", (uchar**) &myisam_data_pointer_size, 0, GET_ULONG, REQUIRED_ARG, 6, 2, 7, 0, 1, 0}, {"myisam_max_extra_sort_file_size", OPT_MYISAM_MAX_EXTRA_SORT_FILE_SIZE, - "Deprecated option", + "This is a deprecated option that does nothing anymore. It will be removed in MySQL " + VER_CELOSIA, (uchar**) &global_system_variables.myisam_max_extra_sort_file_size, (uchar**) &max_system_variables.myisam_max_extra_sort_file_size, 0, GET_ULL, REQUIRED_ARG, (ulonglong) MI_MAX_TEMP_LENGTH, @@ -6952,8 +6956,8 @@ The minimum value for this variable is 4096.", (uchar**) &max_system_variables.read_rnd_buff_size, 0, GET_ULONG, REQUIRED_ARG, 256*1024L, IO_SIZE*2+MALLOC_OVERHEAD, INT_MAX32, MALLOC_OVERHEAD, IO_SIZE, 0}, - {"record_buffer", OPT_RECORD_BUFFER, - "Alias for read_buffer_size", + {"record_buffer", OPT_RECORD_BUFFER_OLD, + "Alias for read_buffer_size. This variable is deprecated and will be removed in a future release.", (uchar**) &global_system_variables.read_buff_size, (uchar**) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG, 128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, INT_MAX32, MALLOC_OVERHEAD, IO_SIZE, 0}, @@ -7966,6 +7970,9 @@ mysqld_get_one_option(int optid, print_version(); exit(0); #endif /*EMBEDDED_LIBRARY*/ + case OPT_WARNINGS: + WARN_DEPRECATED(NULL, VER_CELOSIA, "--warnings", "--log-warnings"); + /* Note: fall-through to 'W' */ case 'W': if (!argument) global_system_variables.log_warnings++; @@ -7987,6 +7994,9 @@ mysqld_get_one_option(int optid, case (int) OPT_LOG_BIN_TRUST_FUNCTION_CREATORS_OLD: WARN_DEPRECATED(NULL, VER_CELOSIA, "--log-bin-trust-routine-creators", "--log-bin-trust-function-creators"); break; + case (int) OPT_ENABLE_LOCK: + WARN_DEPRECATED(NULL, VER_CELOSIA, "--enable-locking", "--external-locking"); + break; case (int) OPT_BIG_TABLES: thd_startup_options|=OPTION_BIG_TABLES; break; @@ -7997,6 +8007,7 @@ mysqld_get_one_option(int optid, opt_myisam_log=1; break; case (int) OPT_UPDATE_LOG: + WARN_DEPRECATED(NULL, VER_CELOSIA, "--log-update", "--log-bin"); opt_update_log=1; break; case (int) OPT_BIN_LOG: @@ -8164,8 +8175,18 @@ mysqld_get_one_option(int optid, "give threads different priorities."); break; case (int) OPT_SKIP_LOCK: + WARN_DEPRECATED(NULL, VER_CELOSIA, "--skip-locking", "--skip-external-locking"); opt_external_locking=0; break; + case (int) OPT_SQL_BIN_UPDATE_SAME: + WARN_DEPRECATED(NULL, VER_CELOSIA, "--sql-bin-update-same", "the binary log"); + break; + case (int) OPT_RECORD_BUFFER_OLD: + WARN_DEPRECATED(NULL, VER_CELOSIA, "record_buffer", "read_buffer_size"); + break; + case (int) OPT_SYMBOLIC_LINKS: + WARN_DEPRECATED(NULL, VER_CELOSIA, "--use-symbolic-links", "--symbolic-links"); + break; case (int) OPT_SKIP_HOST_CACHE: opt_specialflag|= SPECIAL_NO_HOST_CACHE; break; @@ -8191,6 +8212,7 @@ mysqld_get_one_option(int optid, test_flags|=TEST_NO_STACKTRACE; break; case (int) OPT_SKIP_SYMLINKS: + WARN_DEPRECATED(NULL, VER_CELOSIA, "--skip-symlink", "--skip-symbolic-links"); my_use_symdir=0; break; case (int) OPT_BIND_ADDRESS: @@ -8266,6 +8288,9 @@ mysqld_get_one_option(int optid, server_id_supplied = 1; break; case OPT_DELAY_KEY_WRITE_ALL: + WARN_DEPRECATED(NULL, VER_CELOSIA, + "--delay-key-write-for-all-tables", + "--delay-key-write=ALL"); if (argument != disabled_my_option) argument= (char*) "ALL"; /* Fall through */ @@ -8281,6 +8306,11 @@ mysqld_get_one_option(int optid, delay_key_write_options= (uint) type-1; } break; + case OPT_MYISAM_MAX_EXTRA_SORT_FILE_SIZE: + sql_print_warning("--myisam_max_extra_sort_file_size is deprecated and " + "does nothing in this version. It will be removed in " + "a future release."); + break; case OPT_CHARSETS_DIR: strmake(mysql_charsets_dir, argument, sizeof(mysql_charsets_dir)-1); charsets_dir = mysql_charsets_dir; From 29cd733fce232d84758b262121a5dd9b9c0031a6 Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Wed, 27 Jan 2010 15:20:03 +0200 Subject: [PATCH 098/132] bug#47142 improving comments --- sql/log_event.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/log_event.h b/sql/log_event.h index 10b374199de..3b62c6aab76 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -820,7 +820,8 @@ public: thread writes the relay log, it augments the Query_log_event with a Q_MASTER_DATA_WRITTEN_CODE status_var that holds the original event length. This field is initialized to non-zero in the SQL thread when - it reads this augmented event. + it reads this augmented event. SQL thread does not write + Q_MASTER_DATA_WRITTEN_CODE to the slave's server binlog. */ uint32 master_data_written; From b13ed2975d2c7be450596b429020b0b91af1dbf9 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Wed, 27 Jan 2010 15:21:41 +0100 Subject: [PATCH 099/132] Bug #49210 Enable MTR timeout configuration through environment variables Define env. vars for both timeout settings This patch is for 5.0 (mtr v1) and should replaces for 5.1 up --- mysql-test/mysql-test-run.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index e98e05eadb1..01094f40956 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1077,13 +1077,15 @@ sub command_line_setup () { if ( ! $opt_testcase_timeout ) { - $opt_testcase_timeout= $default_testcase_timeout; + $opt_testcase_timeout= + $ENV{MTR_TESTCASE_TIMEOUT} || $default_testcase_timeout; $opt_testcase_timeout*= 10 if $opt_valgrind; } if ( ! $opt_suite_timeout ) { - $opt_suite_timeout= $default_suite_timeout; + $opt_suite_timeout= + $ENV{MTR_SUITE_TIMEOUT} || $default_suite_timeout; $opt_suite_timeout*= 6 if $opt_valgrind; } From 18761a9223f80e95356dd0a62b09a5586414d054 Mon Sep 17 00:00:00 2001 From: Staale Smedseng Date: Wed, 27 Jan 2010 16:13:39 +0100 Subject: [PATCH 100/132] Bug #49223 Change help description for mysqldump --extended-insert Help message changed to the same as in the 5.1 online documentation. --- client/mysqldump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index 8a50c57201c..40e3e75cca2 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -268,7 +268,7 @@ static struct my_option my_long_options[] = (uchar**) &opt_events, (uchar**) &opt_events, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"extended-insert", 'e', - "Allows utilization of the new, much faster INSERT syntax.", + "Use multiple-row INSERT syntax that include several VALUES lists.", (uchar**) &extended_insert, (uchar**) &extended_insert, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"fields-terminated-by", OPT_FTB, From 8d4a8427298fdbf4be74712036fb8b2d172a1824 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Wed, 27 Jan 2010 22:53:45 +0300 Subject: [PATCH 101/132] Enable all active test suites for daily testing in next-mr and 6.0. --- mysql-test/collections/default.daily | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mysql-test/collections/default.daily b/mysql-test/collections/default.daily index 56714662b8f..52af68328c4 100644 --- a/mysql-test/collections/default.daily +++ b/mysql-test/collections/default.daily @@ -1 +1,4 @@ -perl mysql-test-run.pl --timer --force --comment=rpl_ndb_row --vardir=var-rpl_ndb_row --suite=rpl_ndb,ndb --mysqld=--binlog-format=row --experimental=collections/default.experimental +perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed +perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row +perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-emebbed --embedded +perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 From c3a73a8f6d674de1e9efcb498f3343db802d6a6c Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Thu, 28 Jan 2010 19:51:40 -0200 Subject: [PATCH 102/132] Fix for compiler warnings: Rename method as to not hide a base. Reorder attributes initialization. Remove unused variable. Rework code to silence a warning due to assignment used as truth value. sql/item_strfunc.cc: Rename method as to not hide a base. sql/item_strfunc.h: Rename method as to not hide a base. sql/log_event.cc: Reorder attributes initialization. sql/rpl_injector.cc: Rework code to silence a warning due to assignment used as truth value. sql/rpl_record.cc: Remove unused variable. sql/sql_db.cc: Rework code to silence a warning due to assignment used as truth value. sql/sql_parse.cc: Rework code to silence a warning due to assignment used as truth value. sql/sql_table.cc: Rework code to silence a warning due to assignment used as truth value. --- sql/item_strfunc.cc | 6 +++--- sql/item_strfunc.h | 4 ++-- sql/log_event.cc | 4 ++-- sql/rpl_injector.cc | 12 ++++++------ sql/rpl_record.cc | 1 - sql/sql_db.cc | 2 +- sql/sql_parse.cc | 2 +- sql/sql_table.cc | 2 +- 8 files changed, 16 insertions(+), 17 deletions(-) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 4cdeeef6c78..66308215d0b 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1765,19 +1765,19 @@ String *Item_func_encode::val_str(String *str) null_value= 0; res= copy_if_not_alloced(str, res, res->length()); - transform(res); + crypto_transform(res); sql_crypt.reinit(); return res; } -void Item_func_encode::transform(String *res) +void Item_func_encode::crypto_transform(String *res) { sql_crypt.encode((char*) res->ptr(),res->length()); res->set_charset(&my_charset_bin); } -void Item_func_decode::transform(String *res) +void Item_func_decode::crypto_transform(String *res) { sql_crypt.decode((char*) res->ptr(),res->length()); } diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 59241872e63..5799c768162 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -363,7 +363,7 @@ public: void fix_length_and_dec(); const char *func_name() const { return "encode"; } protected: - virtual void transform(String *); + virtual void crypto_transform(String *); private: /** Provide a seed for the PRNG sequence. */ bool seed(); @@ -376,7 +376,7 @@ public: Item_func_decode(Item *a, Item *seed): Item_func_encode(a, seed) {} const char *func_name() const { return "decode"; } protected: - void transform(String *); + void crypto_transform(String *); }; diff --git a/sql/log_event.cc b/sql/log_event.cc index f03f0fa930a..2da825e63ce 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -2386,8 +2386,8 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg, auto_increment_offset(thd_arg->variables.auto_increment_offset), lc_time_names_number(thd_arg->variables.lc_time_names->number), charset_database_number(0), - master_data_written(0), - table_map_for_update((ulonglong)thd_arg->table_map_for_update) + table_map_for_update((ulonglong)thd_arg->table_map_for_update), + master_data_written(0) { time_t end_time; diff --git a/sql/rpl_injector.cc b/sql/rpl_injector.cc index 666622dbac4..43f4e7d849d 100644 --- a/sql/rpl_injector.cc +++ b/sql/rpl_injector.cc @@ -114,8 +114,8 @@ int injector::transaction::write_row (server_id_type sid, table tbl, { DBUG_ENTER("injector::transaction::write_row(...)"); - int error= 0; - if (error= check_state(ROW_STATE)) + int error= check_state(ROW_STATE); + if (error) DBUG_RETURN(error); server_id_type save_id= m_thd->server_id; @@ -133,8 +133,8 @@ int injector::transaction::delete_row(server_id_type sid, table tbl, { DBUG_ENTER("injector::transaction::delete_row(...)"); - int error= 0; - if (error= check_state(ROW_STATE)) + int error= check_state(ROW_STATE); + if (error) DBUG_RETURN(error); server_id_type save_id= m_thd->server_id; @@ -152,8 +152,8 @@ int injector::transaction::update_row(server_id_type sid, table tbl, { DBUG_ENTER("injector::transaction::update_row(...)"); - int error= 0; - if (error= check_state(ROW_STATE)) + int error= check_state(ROW_STATE); + if (error) DBUG_RETURN(error); server_id_type save_id= m_thd->server_id; diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc index 1a48d0e3b0e..3a46bbcd6ee 100644 --- a/sql/rpl_record.cc +++ b/sql/rpl_record.cc @@ -382,7 +382,6 @@ int prepare_record(TABLE *const table, */ for (Field **field_ptr= table->field+skip; *field_ptr; ++field_ptr) { - uint32 const mask= NOT_NULL_FLAG | NO_DEFAULT_VALUE_FLAG; Field *const f= *field_ptr; if ((f->flags & NO_DEFAULT_VALUE_FLAG) && (f->real_type() != MYSQL_TYPE_ENUM)) diff --git a/sql/sql_db.cc b/sql/sql_db.cc index d5d9830f63d..0e65f97e10b 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -828,7 +828,7 @@ bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info) qinfo.db_len = strlen(db); /* These DDL methods and logging protected with LOCK_mysql_create_db */ - if (error= mysql_bin_log.write(&qinfo)) + if ((error= mysql_bin_log.write(&qinfo))) goto exit; } my_ok(thd, result); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index a114d92b124..2dd71b2214a 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3988,7 +3988,7 @@ end_with_restore_list: */ if (!lex->no_write_to_binlog && write_to_binlog) { - if (res= write_bin_log(thd, FALSE, thd->query(), thd->query_length())) + if ((res= write_bin_log(thd, FALSE, thd->query(), thd->query_length()))) break; } my_ok(thd); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index f5df8481dc4..301ab6ceda6 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -6561,7 +6561,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, thd->clear_error(); Query_log_event qinfo(thd, thd->query(), thd->query_length(), 0, FALSE, 0); - if (error= mysql_bin_log.write(&qinfo)) + if ((error= mysql_bin_log.write(&qinfo))) goto view_err_unlock; } my_ok(thd); From 443003a467ab11b2d34e8d67658338659348325b Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Fri, 29 Jan 2010 11:36:28 +0200 Subject: [PATCH 103/132] Bug #49552 : sql_buffer_result cause crash + not found records in multitable delete/subquery SQL_BUFFER_RESULT should not have an effect on non-SELECT statements according to our documentation. Fixed by not passing it through to multi-table DELETE (similarly to how it's done for multi-table UPDATE). --- mysql-test/r/delete.result | 13 +++++++++++++ mysql-test/t/delete.test | 19 ++++++++++++++++++- sql/sql_parse.cc | 4 ++-- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result index 1df19a75854..58278492985 100644 --- a/mysql-test/r/delete.result +++ b/mysql-test/r/delete.result @@ -337,3 +337,16 @@ END | DELETE IGNORE FROM t1; ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. DROP TABLE t1; +# +# Bug #49552 : sql_buffer_result cause crash + not found records +# in multitable delete/subquery +# +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (1),(2),(3); +SET SESSION SQL_BUFFER_RESULT=1; +DELETE t1 FROM (SELECT SUM(a) a FROM t1) x,t1; +SET SESSION SQL_BUFFER_RESULT=DEFAULT; +SELECT * FROM t1; +a +DROP TABLE t1; +End of 5.1 tests diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test index a5dff38c078..2f51fafd6a6 100644 --- a/mysql-test/t/delete.test +++ b/mysql-test/t/delete.test @@ -357,4 +357,21 @@ END | --error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG DELETE IGNORE FROM t1; -DROP TABLE t1; \ No newline at end of file +DROP TABLE t1; + + +--echo # +--echo # Bug #49552 : sql_buffer_result cause crash + not found records +--echo # in multitable delete/subquery +--echo # + +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (1),(2),(3); +SET SESSION SQL_BUFFER_RESULT=1; +DELETE t1 FROM (SELECT SUM(a) a FROM t1) x,t1; + +SET SESSION SQL_BUFFER_RESULT=DEFAULT; +SELECT * FROM t1; +DROP TABLE t1; + +--echo End of 5.1 tests diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 2dd71b2214a..df2c1854914 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3352,9 +3352,9 @@ end_with_restore_list: select_lex->where, 0, (ORDER *)NULL, (ORDER *)NULL, (Item *)NULL, (ORDER *)NULL, - select_lex->options | thd->options | + (select_lex->options | thd->options | SELECT_NO_JOIN_CACHE | SELECT_NO_UNLOCK | - OPTION_SETUP_TABLES_DONE, + OPTION_SETUP_TABLES_DONE) & ~OPTION_BUFFER_RESULT, del_result, unit, select_lex); res|= thd->is_error(); if (res) From 181f753e8b12c58645495622ad32b5e709120361 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Thu, 28 Jan 2010 12:10:57 +0100 Subject: [PATCH 104/132] Bug #50271: Debug output of JOIN structures is garbled sql/sql_test.cc: Assemble results of all the calls to full_name() first, in order not to garble the tabular output. --- sql/sql_test.cc | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/sql/sql_test.cc b/sql/sql_test.cc index eeb9a21b6f5..5de8301fd05 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -168,6 +168,21 @@ TEST_join(JOIN *join) uint i,ref; DBUG_ENTER("TEST_join"); + /* + Assemble results of all the calls to full_name() first, + in order not to garble the tabular output below. + */ + String ref_key_parts[MAX_TABLES]; + for (i= 0; i < join->tables; i++) + { + JOIN_TAB *tab= join->join_tab + i; + for (ref= 0; ref < tab->ref.key_parts; ref++) + { + ref_key_parts[i].append(tab->ref.items[ref]->full_name()); + ref_key_parts[i].append(" "); + } + } + DBUG_LOCK_FILE; VOID(fputs("\nInfo about JOIN\n",DBUG_FILE)); for (i=0 ; i < join->tables ; i++) @@ -199,13 +214,8 @@ TEST_join(JOIN *join) } if (tab->ref.key_parts) { - VOID(fputs(" refs: ",DBUG_FILE)); - for (ref=0 ; ref < tab->ref.key_parts ; ref++) - { - Item *item=tab->ref.items[ref]; - fprintf(DBUG_FILE,"%s ", item->full_name()); - } - VOID(fputc('\n',DBUG_FILE)); + fprintf(DBUG_FILE, + " refs: %s\n", ref_key_parts[i].ptr()); } } DBUG_UNLOCK_FILE; From 2423a7b68f8c4eaafb65a1e1665fac0acf740ad9 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Thu, 28 Jan 2010 21:49:00 +0300 Subject: [PATCH 105/132] Make the following tests experimental: - main.outfile_loaddata @solaris due to Bug#46895 - main.signal_demo3 @solaris due to Bug#47791 - main.sp @solaris due to Bug#47791 - rpl.rpl_slave_load_remove_tmpfile @windows due to Bug#50474 --- mysql-test/collections/default.experimental | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 52422f5d140..f661986ed25 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -11,7 +11,10 @@ main.information_schema # Bug#47449 2009-09-19 alik main.inform main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically main.lock_multi_bug38691 @solaris # Bug#47792 2009-10-02 alik main.lock_multi_bug38691 times out sporadically on Solaris 10 main.log_tables # Bug#47924 2009-10-08 alik main.log_tables times out sporadically +main.outfile_loaddata @solaris # Bug#46895 2010-01-20 alik Test "outfile_loaddata" fails (reproducible) main.plugin # Bug#47146 Linking problem with example plugin when dtrace enabled +main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun +main.sp @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun rpl.rpl_get_master_version_and_clock* # Bug#49191 2009-12-01 Daogang rpl_get_master_version_and_clock failed on PB2: COM_REGISTER_SLAVE failed rpl.rpl_heartbeat_basic # BUG#43828 2009-10-22 luis fails sporadically @@ -19,6 +22,7 @@ rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails spora rpl.rpl_innodb_bug28430* # Bug#46029 rpl.rpl_innodb_bug30888* @solaris # Bug#47646 2009-09-25 alik rpl.rpl_innodb_bug30888 fails sporadically on Solaris rpl.rpl_plugin_load* @solaris # Bug#47146 +rpl.rpl_slave_load_remove_tmpfile @windows # Bug#50474 2010-01-28 alik rpl_slave_load_remove_tmpfile failed on windows debug enabled binary rpl.rpl_timezone* # Bug#47017 2009-10-27 alik rpl_timezone fails on PB-2 with mismatch error # Declare all NDB-tests in ndb and rpl_ndb test suites experimental. From 172af3722ef34876f5e33bdf63c10d46573a2864 Mon Sep 17 00:00:00 2001 From: Ramil Kalimullin Date: Fri, 29 Jan 2010 13:17:57 +0400 Subject: [PATCH 106/132] Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL column is used for ORDER BY Problem: filesort isn't meant for null length sort data (e.g. char(0)), that leads to a server crash. Fix: disregard sort order if sort data record length is 0 (nothing to sort). mysql-test/r/select.result: Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL column is used for ORDER BY - test result. mysql-test/t/select.test: Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL column is used for ORDER BY - test case. sql/filesort.cc: Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL column is used for ORDER BY - assert added as filesort cannot handle null length sort data. sql/sql_select.cc: Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL column is used for ORDER BY - don't sort null length data e.g. in case of ORDER BY CHAR(0). --- mysql-test/r/select.result | 64 ++++++++++++++++++++++++++++++++++++++ mysql-test/t/select.test | 40 ++++++++++++++++++++++++ sql/filesort.cc | 2 ++ sql/sql_select.cc | 13 ++++++++ 4 files changed, 119 insertions(+) diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 1b2533eec89..c13df26b2ba 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -4540,4 +4540,68 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE z system NULL NULL NULL NULL 1 Warnings: Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a` from `test`.`t1` `x` join `test`.`t1` `y` join `test`.`t1` `z` where 1 +DROP TABLE t1; +# +# Bug #49897: crash in ptr_compare when char(0) NOT NULL +# column is used for ORDER BY +# +SET @old_sort_buffer_size= @@session.sort_buffer_size; +SET @@sort_buffer_size= 40000; +CREATE TABLE t1(a CHAR(0) NOT NULL); +INSERT INTO t1 VALUES (0), (0), (0); +INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; +INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; +INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; +EXPLAIN SELECT a FROM t1 ORDER BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 24492 +SELECT a FROM t1 ORDER BY a; +DROP TABLE t1; +CREATE TABLE t1(a CHAR(0) NOT NULL, b CHAR(0) NOT NULL, c int); +INSERT INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1); +INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; +INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; +INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; +EXPLAIN SELECT a FROM t1 ORDER BY a LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 24492 +SELECT a FROM t1 ORDER BY a LIMIT 5; +a + + + + + +EXPLAIN SELECT * FROM t1 ORDER BY a, b LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 24492 +SELECT * FROM t1 ORDER BY a, b LIMIT 5; +a b c + 0 + 2 + 1 + 0 + 2 +EXPLAIN SELECT * FROM t1 ORDER BY a, b, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 24492 Using filesort +SELECT * FROM t1 ORDER BY a, b, c LIMIT 5; +a b c + 0 + 0 + 0 + 0 + 0 +EXPLAIN SELECT * FROM t1 ORDER BY c, a LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 24492 Using filesort +SELECT * FROM t1 ORDER BY c, a LIMIT 5; +a b c + 0 + 0 + 0 + 0 + 0 +SET @@sort_buffer_size= @old_sort_buffer_size; +DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index eeabd2641d8..8ecadfc9dfb 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -3844,6 +3844,46 @@ EXPLAIN EXTENDED SELECT x.a, y.a, z.a FROM t1 x JOIN t1 y ON x.a=y.a JOIN t1 z ON y.a=z.a WHERE x.a='2001-01-01' AND z.a='2001-01-01 00:00:00'; +DROP TABLE t1; +--echo # +--echo # Bug #49897: crash in ptr_compare when char(0) NOT NULL +--echo # column is used for ORDER BY +--echo # +SET @old_sort_buffer_size= @@session.sort_buffer_size; +SET @@sort_buffer_size= 40000; + +CREATE TABLE t1(a CHAR(0) NOT NULL); +--disable_warnings +INSERT INTO t1 VALUES (0), (0), (0); +--enable_warnings +INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; +INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; +INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; +EXPLAIN SELECT a FROM t1 ORDER BY a; +--disable_result_log +SELECT a FROM t1 ORDER BY a; +--enable_result_log +DROP TABLE t1; + +CREATE TABLE t1(a CHAR(0) NOT NULL, b CHAR(0) NOT NULL, c int); +--disable_warnings +INSERT INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1); +--enable_warnings +INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; +INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; +INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; +EXPLAIN SELECT a FROM t1 ORDER BY a LIMIT 5; +SELECT a FROM t1 ORDER BY a LIMIT 5; +EXPLAIN SELECT * FROM t1 ORDER BY a, b LIMIT 5; +SELECT * FROM t1 ORDER BY a, b LIMIT 5; +EXPLAIN SELECT * FROM t1 ORDER BY a, b, c LIMIT 5; +SELECT * FROM t1 ORDER BY a, b, c LIMIT 5; +EXPLAIN SELECT * FROM t1 ORDER BY c, a LIMIT 5; +SELECT * FROM t1 ORDER BY c, a LIMIT 5; + +SET @@sort_buffer_size= @old_sort_buffer_size; +DROP TABLE t1; + --echo End of 5.0 tests diff --git a/sql/filesort.cc b/sql/filesort.cc index f56e5b3a771..11be5d7f672 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -134,6 +134,8 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, error= 1; bzero((char*) ¶m,sizeof(param)); param.sort_length= sortlength(thd, sortorder, s_length, &multi_byte_charset); + /* filesort cannot handle zero-length records. */ + DBUG_ASSERT(param.sort_length); param.ref_length= table->file->ref_length; param.addon_field= 0; param.addon_length= 0; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index d8ec5eff5c1..239809f1d4c 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -521,13 +521,26 @@ JOIN::prepare(Item ***rref_pointer_array, if (order) { + bool real_order= FALSE; ORDER *ord; for (ord= order; ord; ord= ord->next) { Item *item= *ord->item; + /* + Disregard sort order if there's only "{VAR}CHAR(0) NOT NULL" fields + there. Such fields don't contain any data to sort. + */ + if (!real_order && + (item->type() != Item::Item::FIELD_ITEM || + ((Item_field *) item)->field->maybe_null() || + ((Item_field *) item)->field->sort_length())) + real_order= TRUE; + if (item->with_sum_func && item->type() != Item::SUM_FUNC_ITEM) item->split_sum_func(thd, ref_pointer_array, all_fields); } + if (!real_order) + order= NULL; } if (having && having->with_sum_func) From d468e242b300f95214e05d3aba60cc24bb2f74b3 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Fri, 29 Jan 2010 15:55:46 +0200 Subject: [PATCH 107/132] Bug #50642 : ssl certs in test suite are expiring soon. Updated the certs to expire on 2015. Made sure they work with both yassl and openssl. --- mysql-test/r/openssl_1.result | 4 +- mysql-test/std_data/cacert.pem | 24 +-- mysql-test/std_data/client-cert.pem | 83 ++++----- mysql-test/std_data/client-key.pem | 20 ++- mysql-test/std_data/server-cert.pem | 78 ++++----- mysql-test/std_data/server-key.pem | 14 +- mysql-test/std_data/server8k-cert.pem | 243 ++++++++++++-------------- mysql-test/std_data/server8k-key.pem | 194 ++++++++++---------- mysql-test/t/openssl_1.test | 4 +- 9 files changed, 317 insertions(+), 347 deletions(-) diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result index 697fa33e7c7..398202abdbe 100644 --- a/mysql-test/r/openssl_1.result +++ b/mysql-test/r/openssl_1.result @@ -3,8 +3,8 @@ create table t1(f1 int); insert into t1 values (5); grant select on test.* to ssl_user1@localhost require SSL; grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA"; -grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com"; -grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB"; +grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB"; +grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB"; grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx"; flush privileges; connect(localhost,ssl_user5,,test,MASTER_PORT,MASTER_SOCKET); diff --git a/mysql-test/std_data/cacert.pem b/mysql-test/std_data/cacert.pem index 5473e4b153e..e44341384e4 100644 --- a/mysql-test/std_data/cacert.pem +++ b/mysql-test/std_data/cacert.pem @@ -1,17 +1,17 @@ -----BEGIN CERTIFICATE----- -MIICrTCCAhagAwIBAgIJAJXpePU0UOTVMA0GCSqGSIb3DQEBBQUAMEQxCzAJBgNV +MIICrTCCAhagAwIBAgIJAMI7xZKjhrDbMA0GCSqGSIb3DQEBBAUAMEQxCzAJBgNV BAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxhMREwDwYD -VQQKEwhNeVNRTCBBQjAeFw0wOTAxMjgxMDQ5NDZaFw0xNDAxMjcxMDQ5NDZaMEQx +VQQKEwhNeVNRTCBBQjAeFw0xMDAxMjkxMTQ3MTBaFw0xNTAxMjgxMTQ3MTBaMEQx CzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxh MREwDwYDVQQKEwhNeVNRTCBBQjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA -4XQHAe5R1+TXC8noZtWf+d5E0v1C59FWpn9SWEUCBjE5UiIwuJvi4Y+7xWGOXLAI -/JzJx5gNXLBiTsE/zh0uX9fKlajLhxB0GN+QU0ZlpQ1BeYipEcNXeI/7cT499f6v -XWabnTflivdCgHSWUOQ20/Lzs6kP6/e6OoZd/DPSjPECAwEAAaOBpjCBozAdBgNV -HQ4EFgQU8uLqVWWkmuKsnZf1RWz294wRrd8wdAYDVR0jBG0wa4AU8uLqVWWkmuKs -nZf1RWz294wRrd+hSKRGMEQxCzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxh -MRAwDgYDVQQHEwdVcHBzYWxhMREwDwYDVQQKEwhNeVNRTCBBQoIJAJXpePU0UOTV -MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAMMTE5sDN+Z0ZlV7KvH3g -6+aKvql8dTpRT3hYukeQlWua0nq74WPGVw0c4e/M/vbiMwmJcCYpB9pd4+dHqzSw -aPyoenjY6UF8n7B4quWy3SIUk2LSHeJLW+kzJn2afN9gvipFhdVh/uU2TIyLGOur -Z/vmJX2W7hF1uqPnbfa8Lrw= +wQYsOEfrN4ESP3FjsI8cghE+tZVuyK2gck61lwieVxjgFMtBd65mI5a1y9pmlOI1 +yM4SB2Ppqcuw7/e1CdV1y7lvHrGNt5yqEHbN4QX1gvsN8TQauP/2WILturk4R4Hq +rKg0ZySu7f1Xhl0ed9a48LpaEHD17IcxWEGMMJwAxF0CAwEAAaOBpjCBozAMBgNV +HRMEBTADAQH/MB0GA1UdDgQWBBSvktYQ0ahLnyxyVKqty+WpBbBrDTB0BgNVHSME +bTBrgBSvktYQ0ahLnyxyVKqty+WpBbBrDaFIpEYwRDELMAkGA1UEBhMCU0UxEDAO +BgNVBAgTB1VwcHNhbGExEDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15U1FM +IEFCggkAwjvFkqOGsNswDQYJKoZIhvcNAQEEBQADgYEAdKN1PjwMHAKG2Ww1145g +JQGBnKxSFOUaoSvkBi/4ntTM+ysnViWh7WvxyWjR9zU9arfr7aqsDeQxm0XDOqzj +AQ/cQIla2/Li8tXyfc06bisH/IHRaSc2zWqioTKbEwMdVOdrvq4a8V8ic3xYyIWn +7F4WeS07J8LKardSvM0+hOA= -----END CERTIFICATE----- diff --git a/mysql-test/std_data/client-cert.pem b/mysql-test/std_data/client-cert.pem index 9300520793e..ee7f2ab281e 100644 --- a/mysql-test/std_data/client-cert.pem +++ b/mysql-test/std_data/client-cert.pem @@ -1,55 +1,46 @@ Certificate: Data: - Version: 3 (0x2) - Serial Number: 3 (0x3) - Signature Algorithm: sha1WithRSAEncryption + Version: 1 (0x0) + Serial Number: 1048577 (0x100001) + Signature Algorithm: md5WithRSAEncryption Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB Validity - Not Before: Jan 28 11:04:39 2009 GMT - Not After : Jan 28 11:04:39 2010 GMT - Subject: C=SE, ST=Uppsala, O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com + Not Before: Jan 29 11:50:22 2010 GMT + Not After : Jan 28 11:50:22 2015 GMT + Subject: C=SE, ST=Uppsala, O=MySQL AB Subject Public Key Info: Public Key Algorithm: rsaEncryption - RSA Public Key: (512 bit) - Modulus (512 bit): - 00:e1:52:30:2c:d9:be:64:28:91:5d:7a:fd:d9:e9: - 14:35:7a:d2:94:4e:91:46:e0:db:9f:6b:79:f4:4c: - ac:6e:07:61:34:86:74:62:a7:a8:44:af:fa:87:87: - a8:7d:42:61:ff:ab:50:d4:7b:bf:75:fa:d5:d5:b3: - 74:fb:56:1e:37 + Public-Key: (1024 bit) + Modulus: + 00:cc:9a:37:49:13:66:dc:cf:e3:0b:13:a1:23:ed: + 78:db:4e:bd:11:f6:8c:0d:76:f9:a3:32:56:9a:f8: + a1:21:6a:55:4e:4d:3f:e6:67:9d:26:99:b2:cd:a4: + 9a:d2:2b:59:5c:d7:8a:d3:60:68:f8:18:bd:c5:be: + 15:e1:2a:3c:a3:d4:61:cb:f5:11:94:17:81:81:f7: + 87:8c:f6:6a:d2:ee:d8:e6:77:f6:62:66:4d:2e:16: + 8d:08:81:4a:c9:c6:4b:31:e5:b9:c7:8a:84:96:48: + a7:47:8c:0d:26:90:56:4e:e6:a5:6e:8c:b3:f2:9f: + fc:3d:78:9b:49:6e:86:83:77 Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Subject Key Identifier: - 58:30:B5:9B:2C:05:94:06:BA:3D:3C:F0:B2:CD:1D:67:65:E3:7F:85 - X509v3 Authority Key Identifier: - keyid:F2:E2:EA:55:65:A4:9A:E2:AC:9D:97:F5:45:6C:F6:F7:8C:11:AD:DF - DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB - serial:95:E9:78:F5:34:50:E4:D5 - - Signature Algorithm: sha1WithRSAEncryption - 05:19:e3:13:14:fc:c5:28:bf:69:f8:00:b3:25:cb:bd:ca:9f: - 2f:4c:b3:a8:04:11:f0:74:27:bd:82:2c:b4:49:9b:a7:59:f0: - f7:87:d1:e0:ba:99:a2:fe:4b:1d:10:6f:e4:a2:b3:cd:7f:8b: - 68:31:46:ee:cd:9e:e2:47:e1:4c:fa:74:d1:e2:8b:cc:a0:4b: - a8:24:d1:a4:c3:6b:2a:c6:28:cd:41:e0:06:48:e6:cf:f2:3c: - ca:37:95:d7:29:64:6b:91:91:83:e7:ac:c8:0b:87:bc:da:a6: - aa:f1:44:43:c8:74:7b:15:26:91:2e:03:c4:71:50:6c:f8:68: - dc:8c + Signature Algorithm: md5WithRSAEncryption + 5e:1f:a3:53:5f:24:13:1c:f8:28:32:b0:7f:69:69:f3:0e:c0: + 34:87:10:03:7d:da:15:8b:bd:19:b8:1a:56:31:e7:85:49:81: + c9:7f:45:20:74:3e:89:c0:e0:26:84:51:cc:04:16:ce:69:99: + 01:e1:26:99:b3:e3:f5:bd:ec:5f:a0:84:e4:38:da:75:78:7b: + 89:9c:d2:cd:60:95:20:ba:8e:e3:7c:e6:df:76:3a:7c:89:77: + 02:94:86:11:3a:c4:61:7d:6f:71:83:21:8a:17:fb:17:e2:ee: + 02:6b:61:c1:b4:52:63:d7:d8:46:b2:c5:9c:6f:38:91:8a:35: + 32:0b -----BEGIN CERTIFICATE----- -MIICfzCCAeigAwIBAgIBAzANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJTRTEQ -MA4GA1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlT -UUwgQUIwHhcNMDkwMTI4MTEwNDM5WhcNMTAwMTI4MTEwNDM5WjBlMQswCQYDVQQG -EwJTRTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIxMTAvBgkq -hkiG9w0BCQEWImFic3RyYWN0Lm15c3FsLmRldmVsb3BlckBteXNxbC5jb20wXDAN -BgkqhkiG9w0BAQEFAANLADBIAkEA4VIwLNm+ZCiRXXr92ekUNXrSlE6RRuDbn2t5 -9EysbgdhNIZ0YqeoRK/6h4eofUJh/6tQ1Hu/dfrV1bN0+1YeNwIDAQABo4GjMIGg -MAkGA1UdEwQCMAAwHQYDVR0OBBYEFFgwtZssBZQGuj088LLNHWdl43+FMHQGA1Ud -IwRtMGuAFPLi6lVlpJrirJ2X9UVs9veMEa3foUikRjBEMQswCQYDVQQGEwJTRTEQ -MA4GA1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlT -UUwgQUKCCQCV6Xj1NFDk1TANBgkqhkiG9w0BAQUFAAOBgQAFGeMTFPzFKL9p+ACz -Jcu9yp8vTLOoBBHwdCe9giy0SZunWfD3h9Hgupmi/ksdEG/korPNf4toMUbuzZ7i -R+FM+nTR4ovMoEuoJNGkw2sqxijNQeAGSObP8jzKN5XXKWRrkZGD56zIC4e82qaq -8URDyHR7FSaRLgPEcVBs+GjcjA== +MIIB5zCCAVACAxAAATANBgkqhkiG9w0BAQQFADBEMQswCQYDVQQGEwJTRTEQMA4G +A1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwg +QUIwHhcNMTAwMTI5MTE1MDIyWhcNMTUwMTI4MTE1MDIyWjAyMQswCQYDVQQGEwJT +RTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIwgZ8wDQYJKoZI +hvcNAQEBBQADgY0AMIGJAoGBAMyaN0kTZtzP4wsToSPteNtOvRH2jA12+aMyVpr4 +oSFqVU5NP+ZnnSaZss2kmtIrWVzXitNgaPgYvcW+FeEqPKPUYcv1EZQXgYH3h4z2 +atLu2OZ39mJmTS4WjQiBSsnGSzHluceKhJZIp0eMDSaQVk7mpW6Ms/Kf/D14m0lu +hoN3AgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAXh+jU18kExz4KDKwf2lp8w7ANIcQ +A33aFYu9GbgaVjHnhUmByX9FIHQ+icDgJoRRzAQWzmmZAeEmmbPj9b3sX6CE5Dja +dXh7iZzSzWCVILqO43zm33Y6fIl3ApSGETrEYX1vcYMhihf7F+LuAmthwbRSY9fY +RrLFnG84kYo1Mgs= -----END CERTIFICATE----- diff --git a/mysql-test/std_data/client-key.pem b/mysql-test/std_data/client-key.pem index 9ef464d0875..205b5f31cb9 100644 --- a/mysql-test/std_data/client-key.pem +++ b/mysql-test/std_data/client-key.pem @@ -1,9 +1,15 @@ -----BEGIN RSA PRIVATE KEY----- -MIIBOQIBAAJBAOFSMCzZvmQokV16/dnpFDV60pROkUbg259refRMrG4HYTSGdGKn -qESv+oeHqH1CYf+rUNR7v3X61dWzdPtWHjcCAwEAAQJAXYooM8ZlcuEgj+VKU1ee -qyEFIMqJJxqcMk+E/nWCM96WxCP3zHNSrqNfSpI3ld7QzMwhdRz+gFLxT2gGNpIw -MQIhAPxzM/lDihe67X3ADYtDl9ZjA8Pm430x9sXlcxI17tCZAiEA5H1SyFl4mUee -9VnfSC2XGW7lwz72ZygfVX+b7tLWF08CIEh40gzW5MfXM+KLxdea+fXjyursV5ZT -R6KcMiKiNQLRAiAcmHqlzFzFgisotai2Fc6VRkXHG7gmzOSvBJt1VjmpDQIge6jf -2N7whTdvC4ferB+zUlgWQdyvx1c3T4gnt6PYdaY= +MIICXQIBAAKBgQDMmjdJE2bcz+MLE6Ej7XjbTr0R9owNdvmjMlaa+KEhalVOTT/m +Z50mmbLNpJrSK1lc14rTYGj4GL3FvhXhKjyj1GHL9RGUF4GB94eM9mrS7tjmd/Zi +Zk0uFo0IgUrJxksx5bnHioSWSKdHjA0mkFZO5qVujLPyn/w9eJtJboaDdwIDAQAB +AoGASqk/4We2En+93y3jkIO4pXafIe3w/3zZ7caRue1ehx4RUQh5d+95djuB9u7J +HEZ7TpjM7QNyao5EueL6gvbxt0LXFvqAMni7yM9tt/HUYtHHPqYiRtUny9bKYFTm +l8szCCMal/wD9GZU9ByHDNHm7tHUMyMhARNTYSgx+SERFmECQQD/6jJocC4SXf6f +T3LqimWR02lbJ7qCoDgRglsUXh0zjrG+IIiAyE+QOCCx1GMe3Uw6bsIuYwdHT6as +WcdPs04xAkEAzKulvEvLVvN5zfa/DTYRTV7jh6aDleOxjsD5oN/oJXoACnPzVuUL +qQQMNtuAXm6Q1QItrRxpQsSKbY0UQka6JwJBAOSgoNoG5lIIYTKIMvzwGV+XBLeo +HYsXgh+6Wo4uql3mLErUG78ZtWL9kc/tE4R+ZdyKGLaCR/1gXmH5bwN4B/ECQEBb +uUH8k3REG4kojesZlVc+/00ojzgS4UKCa/yqa9VdB6ZBz8MDQydinnShkTwgiGpy +xOoqhO753o2UT0qH8wECQQC99IEJWUnwvExVMkLaZH5NjAFJkb22sjkmuT11tAgU +RQgOMoDOm6driojnOnDWOkx1r1Gy9NgMLooduja4v6cx -----END RSA PRIVATE KEY----- diff --git a/mysql-test/std_data/server-cert.pem b/mysql-test/std_data/server-cert.pem index cab54db8b23..5922fe7ded7 100644 --- a/mysql-test/std_data/server-cert.pem +++ b/mysql-test/std_data/server-cert.pem @@ -1,55 +1,41 @@ Certificate: Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha1WithRSAEncryption + Version: 1 (0x0) + Serial Number: 1048578 (0x100002) + Signature Algorithm: md5WithRSAEncryption Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB Validity - Not Before: Jan 28 10:55:13 2009 GMT - Not After : Jan 28 10:55:13 2010 GMT - Subject: C=SE, ST=Uppsala, O=MySQL AB, CN=localhost/emailAddress=abstract.mysql.developer@mysql.com + Not Before: Jan 29 11:56:49 2010 GMT + Not After : Jan 28 11:56:49 2015 GMT + Subject: C=SE, ST=Uppsala, O=MySQL AB, CN=localhost Subject Public Key Info: Public Key Algorithm: rsaEncryption - RSA Public Key: (512 bit) - Modulus (512 bit): - 00:b6:8f:e5:b7:b4:86:83:13:8a:f9:bf:63:cb:64: - 2d:b9:51:d1:de:ab:7b:45:1f:aa:b5:66:73:13:f9: - a6:07:d5:ba:7c:fa:92:bd:37:e2:ad:87:db:3e:b6: - 6a:12:64:f8:ee:17:e3:15:06:2f:a8:82:68:bf:57: - 8d:c3:04:98:27 + Public-Key: (512 bit) + Modulus: + 00:cd:e4:87:51:9d:72:11:a0:d1:fa:f3:92:8b:13: + 1c:eb:f7:e2:9a:2f:72:a8:d6:65:48:d1:69:af:1b: + c0:4c:13:e5:60:60:51:41:e9:ab:a6:bc:13:bb:0c: + 5e:32:7c:d9:6c:9e:cd:05:24:84:78:db:80:91:2e: + d8:88:2b:c2:ed Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Subject Key Identifier: - D9:9A:B8:5F:22:EA:04:10:C8:25:7D:82:57:E6:2E:FD:19:29:E7:DA - X509v3 Authority Key Identifier: - keyid:F2:E2:EA:55:65:A4:9A:E2:AC:9D:97:F5:45:6C:F6:F7:8C:11:AD:DF - DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB - serial:95:E9:78:F5:34:50:E4:D5 - - Signature Algorithm: sha1WithRSAEncryption - 54:07:2d:21:0b:a5:af:3b:58:23:32:5e:56:7f:ab:58:63:48: - 91:aa:38:90:89:16:f9:cc:bf:a4:0e:78:2b:9f:c5:1b:58:a6: - e6:08:8f:2e:ae:97:03:21:9b:f1:cd:c0:26:8f:1d:d7:28:27: - a0:8e:81:09:1b:1c:0f:c9:a5:41:3a:2d:44:3f:9c:fa:87:ff: - c8:4c:2b:44:f7:1b:c1:3e:4f:01:7f:e9:26:cc:9f:1c:06:b5: - 0b:27:d1:10:90:be:93:0c:9c:e7:b0:d1:ea:27:99:4e:06:14: - 0c:7a:e9:c1:52:c5:33:68:bc:61:0d:db:81:3b:57:48:57:bf: - 42:9a + Signature Algorithm: md5WithRSAEncryption + 73:ce:9c:6e:39:46:b4:14:be:da:3f:f3:1b:ba:90:bc:23:43: + d7:82:2a:70:4e:a6:d9:5a:65:5c:b7:df:71:df:75:77:c5:80: + a4:af:fa:d2:59:e2:fd:c9:9c:f0:98:95:8e:69:a9:8c:7c:d8: + 6f:48:d2:e3:36:e0:cd:ff:3f:d1:a5:e6:ab:75:09:c4:50:10: + c4:96:dd:bf:3b:de:32:46:da:ca:4a:f1:d6:52:8a:33:2f:ab: + f5:2e:70:3f:d4:9c:be:00:c8:03:f9:39:8a:df:5b:70:3c:40: + ef:03:be:7c:3d:1d:32:32:f3:51:81:e2:83:30:6e:3d:38:9b: + fb:3c -----BEGIN CERTIFICATE----- -MIICkzCCAfygAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJTRTEQ -MA4GA1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlT -UUwgQUIwHhcNMDkwMTI4MTA1NTEzWhcNMTAwMTI4MTA1NTEzWjB5MQswCQYDVQQG -EwJTRTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIxEjAQBgNV -BAMTCWxvY2FsaG9zdDExMC8GCSqGSIb3DQEJARYiYWJzdHJhY3QubXlzcWwuZGV2 -ZWxvcGVyQG15c3FsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQC2j+W3tIaD -E4r5v2PLZC25UdHeq3tFH6q1ZnMT+aYH1bp8+pK9N+Kth9s+tmoSZPjuF+MVBi+o -gmi/V43DBJgnAgMBAAGjgaMwgaAwCQYDVR0TBAIwADAdBgNVHQ4EFgQU2Zq4XyLq -BBDIJX2CV+Yu/Rkp59owdAYDVR0jBG0wa4AU8uLqVWWkmuKsnZf1RWz294wRrd+h -SKRGMEQxCzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdV -cHBzYWxhMREwDwYDVQQKEwhNeVNRTCBBQoIJAJXpePU0UOTVMA0GCSqGSIb3DQEB -BQUAA4GBAFQHLSELpa87WCMyXlZ/q1hjSJGqOJCJFvnMv6QOeCufxRtYpuYIjy6u -lwMhm/HNwCaPHdcoJ6COgQkbHA/JpUE6LUQ/nPqH/8hMK0T3G8E+TwF/6SbMnxwG -tQsn0RCQvpMMnOew0eonmU4GFAx66cFSxTNovGEN24E7V0hXv0Ka +MIIBtzCCASACAxAAAjANBgkqhkiG9w0BAQQFADBEMQswCQYDVQQGEwJTRTEQMA4G +A1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwg +QUIwHhcNMTAwMTI5MTE1NjQ5WhcNMTUwMTI4MTE1NjQ5WjBGMQswCQYDVQQGEwJT +RTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIxEjAQBgNVBAMT +CWxvY2FsaG9zdDBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDN5IdRnXIRoNH685KL +Exzr9+KaL3Ko1mVI0WmvG8BME+VgYFFB6aumvBO7DF4yfNlsns0FJIR424CRLtiI +K8LtAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAc86cbjlGtBS+2j/zG7qQvCND14Iq +cE6m2VplXLffcd91d8WApK/60lni/cmc8JiVjmmpjHzYb0jS4zbgzf8/0aXmq3UJ +xFAQxJbdvzveMkbaykrx1lKKMy+r9S5wP9ScvgDIA/k5it9bcDxA7wO+fD0dMjLz +UYHigzBuPTib+zw= -----END CERTIFICATE----- diff --git a/mysql-test/std_data/server-key.pem b/mysql-test/std_data/server-key.pem index 0d8274b77f6..1083495cb96 100644 --- a/mysql-test/std_data/server-key.pem +++ b/mysql-test/std_data/server-key.pem @@ -1,9 +1,9 @@ -----BEGIN RSA PRIVATE KEY----- -MIIBOQIBAAJBALaP5be0hoMTivm/Y8tkLblR0d6re0UfqrVmcxP5pgfVunz6kr03 -4q2H2z62ahJk+O4X4xUGL6iCaL9XjcMEmCcCAwEAAQJASA5VwgNb0CKHiPm0ntOk -hG+54SRX3DmafEy6gRjZIl/bZ/asSLhXUZ+CeohyrQh7BZgYWvykd8pRISL9eKsU -GQIhAOXkUrOtP/EtjyqNluEqZdG+RZi/7p61JS3Ce13Myu+LAiEAy0uMlV34AJpM -b40FPKqlHxw8DD/Dt1iKhNVAg8+LDVUCIFjv7fbJDbW2VG63/Cj8CAwOukoP5rbL -iaicVrHBKrllAiB9+MiaXeopZXNrxDS0jQFYr8Q9yt1aJVFgUkxx4Q9HKQIgZPs0 -KlF3NNNWw78INaAEkyf0IEssnLMsuoCWw0DIOak= +MIIBOwIBAAJBAM3kh1GdchGg0frzkosTHOv34povcqjWZUjRaa8bwEwT5WBgUUHp +q6a8E7sMXjJ82WyezQUkhHjbgJEu2Igrwu0CAwEAAQJBAJuwhFbF3NzRpBbEmnqJ +4GPa1UJMQMLFJF+04tqj/HxJcAIVhOJhGmmtYNw1yjz/ZsPnfJCMz4eFOtdjvGtf +peECIQDmFFg2WLvYo+2m9w9V7z4ZIkg7ixYkI/ObUUctfZkPOQIhAOUWnrvjFrAX +bIvYT/YR50+3ZDLEc51XxNgJnWqWYl1VAiEAnTOFWgyivFC1DgF8PvDp8u5TgCt2 +A1d1GMgd490O+TECIC/WMl0/hTxOF9930vKqOGf//o9PUGkZq8QE9fcM4gtlAiAE +iOcFpnLjtWj57jrhuw214ucnB5rklkQQe+AtcARNkg== -----END RSA PRIVATE KEY----- diff --git a/mysql-test/std_data/server8k-cert.pem b/mysql-test/std_data/server8k-cert.pem index 3b86effd699..06e118cf034 100644 --- a/mysql-test/std_data/server8k-cert.pem +++ b/mysql-test/std_data/server8k-cert.pem @@ -1,138 +1,125 @@ Certificate: Data: - Version: 3 (0x2) - Serial Number: 4 (0x4) - Signature Algorithm: sha1WithRSAEncryption + Version: 1 (0x0) + Serial Number: 1048579 (0x100003) + Signature Algorithm: md5WithRSAEncryption Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB Validity - Not Before: Jan 28 11:12:27 2009 GMT - Not After : Jan 28 11:12:27 2010 GMT + Not Before: Jan 29 12:01:53 2010 GMT + Not After : Jan 28 12:01:53 2015 GMT Subject: C=SE, ST=Uppsala, O=MySQL AB, CN=server Subject Public Key Info: Public Key Algorithm: rsaEncryption - RSA Public Key: (8192 bit) - Modulus (8192 bit): - 00:c0:8f:22:03:24:59:67:46:14:d6:8f:60:09:58: - 06:07:45:f1:78:71:55:f1:ea:b9:30:8a:cd:c3:3c: - b9:bf:65:6e:18:ed:a0:b8:c9:19:56:6f:c4:90:19: - c8:65:09:db:ff:bf:82:a1:08:ad:01:4f:5a:a3:d4: - 3d:78:7e:4b:4a:01:a4:7d:e8:7b:05:3e:7d:d8:b9: - 55:58:60:d6:1c:ce:e8:32:62:2c:19:60:f3:ed:05: - 99:6d:c9:77:07:2e:11:6d:0b:9a:c7:68:38:46:e8: - fa:31:80:df:e8:79:f0:f1:fd:a9:94:c3:fa:0d:f5: - 78:ac:49:7e:d5:17:fd:e1:ee:44:f3:c7:0e:30:32: - 5d:a9:19:25:e4:bb:21:1d:fe:3c:84:48:40:f5:58: - f4:bf:13:8c:85:68:bb:ec:f5:dd:c6:38:d1:b0:77: - 1f:a6:8e:4f:8d:e2:6f:49:74:f5:3f:90:65:8e:99: - 1e:59:9c:1c:b5:26:24:c4:b1:de:1e:fb:96:65:c4: - 31:14:1a:53:b8:5e:62:8a:c7:04:f7:b4:36:a4:af: - 07:c8:27:06:ed:dd:e6:f4:8c:62:f1:65:40:d0:9f: - 9f:a9:14:c8:8e:8b:74:d6:67:5a:d0:c9:4d:35:a1: - d5:7b:39:3a:42:9f:e4:d0:f4:c6:0f:2e:42:30:4b: - 56:b2:3d:6d:8e:2d:58:c5:69:99:35:49:95:95:99: - b6:87:29:2b:32:d1:50:08:cd:25:14:48:6d:10:99: - 85:61:3c:41:26:21:55:cc:1f:cf:ad:b0:2f:b9:89: - d8:4e:a0:18:ff:75:1d:b6:97:7c:c5:fa:8b:dc:93: - 17:86:0a:64:d4:09:35:d5:83:34:6d:5c:6d:c6:8c: - cd:b9:ec:c2:93:c6:c1:b7:cc:04:6f:22:e0:07:bf: - e0:d9:9b:2f:d5:a0:50:cc:f9:f0:95:83:8f:f4:30: - 83:72:94:d7:b5:4b:da:cc:9f:54:3b:8d:78:77:0b: - 24:6c:0f:c2:96:61:96:2f:b8:5f:b5:7a:ab:7a:5b: - 97:7a:a9:ad:40:8b:f2:d6:c6:8d:81:d9:94:61:8f: - 9d:03:c5:b9:10:03:68:83:bf:04:81:cc:ac:bd:34: - 89:e8:d4:8d:43:20:e2:b6:a4:11:3d:15:2a:82:0c: - d6:3a:6a:8c:62:d4:93:bc:c3:80:bf:1b:b4:2b:0a: - 7a:34:f0:cd:1e:82:3f:25:0f:d1:04:a8:0a:05:19: - b0:d6:16:83:39:af:0b:45:7d:cb:14:7e:4d:aa:aa: - c2:39:a8:46:38:ab:bd:ab:2a:bd:34:43:7f:da:25: - de:2b:fb:69:3b:fe:3b:87:fd:98:94:76:4a:bf:04: - a3:31:e3:3a:ff:6f:04:fa:fa:24:e4:2a:89:e9:0e: - bf:44:4c:72:85:82:3c:89:4a:03:63:01:41:92:53: - d0:82:60:6e:d8:ff:8c:a2:b4:1a:3b:20:6d:ae:74: - 92:30:4e:48:e3:51:a6:cb:73:97:06:13:03:32:23: - 9b:7d:a2:c7:3a:a9:af:97:8c:51:ed:fe:fa:b4:b4: - 1a:a3:87:fc:cf:8c:8e:e6:80:15:03:fd:fe:7d:bd: - b1:76:f1:5f:b3:09:2b:4c:4d:a7:7c:b5:72:b1:d6: - db:38:c0:67:a4:54:bc:87:09:a5:39:ba:1a:7e:3f: - 74:60:ad:3d:4b:be:94:53:f3:64:16:c7:33:35:ec: - 41:00:95:b6:de:99:62:a2:7a:28:9a:45:4d:fa:cd: - a6:77:f6:de:58:72:50:c8:7d:69:38:db:07:04:84: - d8:4d:39:f7:50:13:43:ae:2d:af:45:a4:2a:39:56: - 3c:b8:b7:d8:26:a4:36:c9:23:aa:aa:b8:49:0b:21: - ba:9e:7a:2b:7f:4d:29:9f:0e:00:1e:b4:5e:a6:fa: - 49:fe:8d:e5:74:57:d8:ba:d9:92:2c:d2:ac:84:1d: - f2:a6:a4:44:1c:bf:88:41:32:7e:d1:c3:2f:6e:bc: - 0f:5d:19:a6:8f:74:2b:67:ba:dd:a9:db:68:b5:ce: - 9d:25:48:df:54:08:d0:1d:4f:2e:5b:24:bc:05:0f: - fb:58:46:fa:02:ca:53:93:29:cf:10:27:c2:a0:18: - d0:f5:d4:b9:3c:5e:df:8e:6c:f5:7c:b9:b4:54:cc: - 39:16:5d:3c:da:96:b3:c3:6c:d4:70:5d:d3:30:a7: - a6:bd:6f:dd:41:bc:a8:de:42:60:59:9a:85:25:0d: - 2a:45:c3:05:b4:6e:7a:4a:4d:ca:8c:0a:e5:6c:34: - bc:20:9b:6d:4a:ca:ca:b6:a6:3a:a0:db:c3:0e:20: - 1a:12:1b:77:dd:cb:1d:7f:c3:0d:0d:e7:c1:fd:96: - d2:c7:68:80:99:a0:d9:8a:33:21:a3:8b:a2:5a:a7: - 7e:27:06:02:7f:ed:60:11:37:34:54:17:7f:4d:90: - 14:1e:69:37:0d:ba:f0:2b:f0:a3:2d:62:79:c8:76: - a8:ea:c8:e7:3b:1f:c6:4f:c2:0c:d7:ac:f0:77:53: - 5d:f0:50:b4:df:9b:03:ca:4d:41:e1:18:b2:25:30: - 86:1d:63:e5:67:b1:53:cd:6b:4e:83:1a:b9:5e:2d: - 05:15:6b:d4:8e:b1:97:fc:31:03:57:cb:bf:27:7f: - cd:5f:27:7e:66:e7:3c:17:09:b6:11:2a:4f:33:cd: - eb:1a:d3:6f:d5:15:8b:8b:ce:68:6b:7e:9a:95:e5: - 74:7f:17:57:d9 + Public-Key: (8192 bit) + Modulus: + 00:ca:aa:1d:c4:11:ec:91:f0:c7:ff:5f:90:92:fc: + 40:0c:5e:b7:3d:00:c5:20:d5:0f:89:31:07:d7:41: + 4c:8b:60:80:aa:38:14:de:93:6b:9c:74:88:41:68: + b5:02:41:01:2d:86:a2:7a:95:53:5e:7b:67:2f:6c: + 1e:29:51:f9:44:fd:4a:80:be:b2:23:a1:3e:1b:38: + cf:88:c4:71:ee:f8:6b:41:c5:2d:c0:c3:52:ac:59: + 7d:81:34:19:95:32:b8:9a:51:b6:41:36:d4:c4:a1: + ae:84:e6:38:b9:e8:bf:96:be:19:7a:6b:77:4d:e0: + de:e6:b3:b6:6b:bc:3d:dd:68:bc:4b:c4:eb:f5:36: + 93:ed:56:a2:15:50:8a:10:e8:d6:22:ed:6c:b1:cd: + c3:18:c9:f6:0a:e1:de:61:65:62:d6:14:41:8c:b5: + fb:14:68:c1:cf:12:5d:41:21:9d:57:11:43:7d:bb: + 43:2c:21:bb:c3:44:7d:a8:cf:1f:c3:71:75:b5:47: + c2:7d:ce:38:3c:73:64:9e:15:d8:a7:27:cf:bd:40: + c8:45:08:e3:c8:39:a8:0b:8e:c2:5b:7b:f1:47:91: + 12:91:cc:e1:00:e0:94:5b:bd:32:e4:0c:8d:c3:be: + cc:76:32:52:12:69:b0:18:e0:b0:c2:76:34:5a:5f: + 79:d9:f6:81:9d:02:0a:61:69:1c:33:ce:49:fa:76: + 03:1e:07:5b:27:0b:bf:34:9e:34:96:b8:03:9b:50: + 3a:6a:2f:17:7a:14:cf:65:63:00:37:52:a8:73:ce: + 4b:14:40:f4:d2:9a:56:54:33:b8:77:2e:42:5b:8f: + ec:1f:18:f4:ad:ab:8a:4a:8d:6d:70:25:f3:58:e7: + cb:66:51:14:7d:16:f4:eb:6d:56:76:76:51:6e:d6: + 1d:da:d3:8d:c0:64:5a:67:4e:af:e2:bf:33:d1:b8: + f6:2a:fc:57:87:a7:35:5e:80:c9:ac:fc:87:c9:71: + 17:91:bf:b7:4d:a3:ed:3c:1b:27:f4:66:a0:f9:46: + 03:27:cc:ea:80:f6:4b:40:f6:41:94:cd:bd:0a:b3: + ef:26:be:de:6f:69:ae:0f:3f:1c:55:63:33:90:9b: + ed:ca:5a:12:4d:de:4b:06:c2:a2:92:b0:42:3d:31: + af:a4:15:12:15:f8:8a:e9:88:8d:cf:fd:85:66:50: + 6f:11:f1:9f:48:f3:b5:ba:9d:86:68:24:a2:5d:a8: + 7c:54:42:fa:d8:b5:c5:f2:dd:0e:0f:d0:68:e4:54: + 7e:c5:b9:a0:9b:65:2d:77:f4:8f:b9:30:0a:d5:86: + 5c:ed:c9:7c:d1:da:9d:0d:63:50:ee:e5:1e:92:63: + cc:a2:0c:e8:4a:96:02:4d:dc:8f:df:7c:8f:08:18: + a8:30:88:d7:af:89:ad:fc:57:4b:10:f9:f1:cb:48: + e8:b6:3b:c8:3f:fc:c2:d3:d1:4a:10:3c:1b:6b:64: + dc:e5:65:1e:5b:b2:da:b1:e2:24:97:8f:ee:c0:4b: + 8e:18:83:7c:17:a6:3c:45:b3:60:06:23:f2:2f:18: + 13:9e:17:8a:c6:72:79:8c:4d:04:f3:9d:ea:e0:25: + d3:33:8c:1e:11:47:63:1f:a5:45:3f:bd:85:b3:fe: + a5:68:ee:48:b7:0c:a4:c9:7f:72:d0:75:66:9b:6a: + f9:a0:50:f3:a8:59:6d:a3:dd:38:4f:70:2b:bb:ff: + 92:2e:71:ab:ef:e9:00:ed:0d:d1:b4:6f:f0:8e:b2: + 09:fb:4d:61:0d:d9:10:d5:54:11:cd:03:94:84:fd: + a8:68:e4:45:6e:1e:6a:1e:2f:85:a1:6d:f5:b6:c0: + f1:ee:f7:36:e9:fe:c2:f7:ad:cc:13:46:5b:88:42: + f0:2d:1f:b5:0e:7e:b5:2b:e4:8d:ab:b9:87:30:6a: + 3d:12:f4:ad:f3:1c:ac:cc:1a:48:29:2a:96:7b:80: + 00:0b:6e:59:87:bf:a3:ca:70:99:1b:1c:fd:72:3d: + b2:d3:94:4a:cf:55:75:be:1f:40:ec:55:35:48:2d: + 55:f0:00:da:3c:b0:60:ba:11:32:66:54:0b:be:06: + a4:5e:b7:c9:59:bb:4d:f4:92:06:26:48:6e:c2:12: + d4:7c:f0:20:b8:a2:e1:bc:6a:b6:19:0e:37:47:55: + c9:f2:49:0d:96:75:a2:84:64:bf:34:fc:be:b2:41: + e4:f5:88:eb:e1:b7:26:a5:e5:41:c2:20:0c:f6:e2: + a8:a5:e7:76:54:a5:fb:4b:80:05:7d:18:85:7a:ba: + bc:b7:ad:c0:2f:60:85:cc:15:12:1c:2f:0a:9e:f3: + 7c:40:cf:f4:3e:23:d2:95:ca:d0:06:58:52:f0:84: + d8:0f:3d:eb:ff:12:68:94:79:8f:be:40:29:5f:98: + c8:90:6c:05:2f:99:8c:2a:63:78:1f:23:b1:29:c5: + e7:49:c9:b2:92:0f:53:0b:d5:71:28:17:c2:19:bf: + 60:bf:7c:87:a8:ab:c1:f4:0a:c1:b8:d2:68:ee:c1: + ce:a7:13:13:17:6d:24:5d:a2:37:a6:d7:7d:48:8b: + 2b:74:2d:40:2e:ca:19:d5:b6:3e:6c:42:71:fa:cf: + 85:87:f9:de:80:73:8b:89:f4:70:f0:d8:d7:ff:40: + 41:9c:c7:15:6d:9b:6e:4c:b5:52:02:99:79:32:73: + ca:26:a0:ac:31:6f:c4:b0:f5:da:bb:c2:1f:e0:9f: + 44:ba:25:f7:9f Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Subject Key Identifier: - 58:12:24:59:A7:3C:29:15:89:5A:C2:12:DB:E7:A5:42:10:21:B7:BA - X509v3 Authority Key Identifier: - keyid:F2:E2:EA:55:65:A4:9A:E2:AC:9D:97:F5:45:6C:F6:F7:8C:11:AD:DF - DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB - serial:95:E9:78:F5:34:50:E4:D5 - - Signature Algorithm: sha1WithRSAEncryption - cd:cb:5c:83:35:ea:cb:cb:c3:a8:c3:95:e2:e6:6f:4d:d8:e4: - ee:41:dd:3f:35:82:ac:2f:fd:63:89:4f:3a:19:d7:81:75:b3: - a3:fc:36:b2:12:d5:c6:56:bc:13:60:37:33:6e:a0:d8:ae:7c: - 88:f9:4b:ee:7b:1f:c8:f0:56:19:07:4d:bb:45:52:1c:78:81: - 07:7c:13:86:b8:86:70:85:e4:71:25:58:78:d1:be:de:22:82: - 6d:1a:4b:06:ac:f0:e8:50:87:c7:69:64:c2:61:43:cd:96:06: - a6:7e:09:a9:02:01:2a:a2:40:f3:cd:10:80:48:d0:34:55:40: - b9:ce + Signature Algorithm: md5WithRSAEncryption + 08:75:dc:b9:3f:aa:b6:7e:81:7a:39:d1:ee:ed:44:b6:ce:1b: + 37:c4:4c:19:d0:66:e6:eb:b5:4f:2a:ef:95:58:64:21:55:01: + 12:30:ac:8a:95:d1:06:de:29:46:a4:f1:7d:7f:b0:1e:d2:4e: + fb:f6:fa:9a:74:be:85:62:db:0b:82:90:58:62:c5:5f:f1:80: + 02:9f:c5:fb:f3:6b:b0:b4:3b:04:b1:e5:53:c2:d0:00:a1:1a: + 9d:65:60:6f:73:98:67:e0:9c:c8:12:94:79:59:bf:43:7b:f5: + 77:c8:8f:df:b1:cd:11:1c:01:19:99:c2:22:42:f7:41:ae:b4: + b8:1a -----BEGIN CERTIFICATE----- -MIIGJTCCBY6gAwIBAgIBBDANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJTRTEQ -MA4GA1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlT -UUwgQUIwHhcNMDkwMTI4MTExMjI3WhcNMTAwMTI4MTExMjI3WjBDMQswCQYDVQQG -EwJTRTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIxDzANBgNV -BAMTBnNlcnZlcjCCBCIwDQYJKoZIhvcNAQEBBQADggQPADCCBAoCggQBAMCPIgMk -WWdGFNaPYAlYBgdF8XhxVfHquTCKzcM8ub9lbhjtoLjJGVZvxJAZyGUJ2/+/gqEI -rQFPWqPUPXh+S0oBpH3oewU+fdi5VVhg1hzO6DJiLBlg8+0FmW3JdwcuEW0Lmsdo -OEbo+jGA3+h58PH9qZTD+g31eKxJftUX/eHuRPPHDjAyXakZJeS7IR3+PIRIQPVY -9L8TjIVou+z13cY40bB3H6aOT43ib0l09T+QZY6ZHlmcHLUmJMSx3h77lmXEMRQa -U7heYorHBPe0NqSvB8gnBu3d5vSMYvFlQNCfn6kUyI6LdNZnWtDJTTWh1Xs5OkKf -5ND0xg8uQjBLVrI9bY4tWMVpmTVJlZWZtocpKzLRUAjNJRRIbRCZhWE8QSYhVcwf -z62wL7mJ2E6gGP91HbaXfMX6i9yTF4YKZNQJNdWDNG1cbcaMzbnswpPGwbfMBG8i -4Ae/4NmbL9WgUMz58JWDj/Qwg3KU17VL2syfVDuNeHcLJGwPwpZhli+4X7V6q3pb -l3qprUCL8tbGjYHZlGGPnQPFuRADaIO/BIHMrL00iejUjUMg4rakET0VKoIM1jpq -jGLUk7zDgL8btCsKejTwzR6CPyUP0QSoCgUZsNYWgzmvC0V9yxR+TaqqwjmoRjir -vasqvTRDf9ol3iv7aTv+O4f9mJR2Sr8EozHjOv9vBPr6JOQqiekOv0RMcoWCPIlK -A2MBQZJT0IJgbtj/jKK0Gjsgba50kjBOSONRpstzlwYTAzIjm32ixzqpr5eMUe3+ -+rS0GqOH/M+MjuaAFQP9/n29sXbxX7MJK0xNp3y1crHW2zjAZ6RUvIcJpTm6Gn4/ -dGCtPUu+lFPzZBbHMzXsQQCVtt6ZYqJ6KJpFTfrNpnf23lhyUMh9aTjbBwSE2E05 -91ATQ64tr0WkKjlWPLi32CakNskjqqq4SQshup56K39NKZ8OAB60Xqb6Sf6N5XRX -2LrZkizSrIQd8qakRBy/iEEyftHDL268D10Zpo90K2e63anbaLXOnSVI31QI0B1P -LlskvAUP+1hG+gLKU5MpzxAnwqAY0PXUuTxe345s9Xy5tFTMORZdPNqWs8Ns1HBd -0zCnpr1v3UG8qN5CYFmahSUNKkXDBbRuekpNyowK5Ww0vCCbbUrKyramOqDbww4g -GhIbd93LHX/DDQ3nwf2W0sdogJmg2YozIaOLolqnficGAn/tYBE3NFQXf02QFB5p -Nw268Cvwoy1iech2qOrI5zsfxk/CDNes8HdTXfBQtN+bA8pNQeEYsiUwhh1j5Wex -U81rToMauV4tBRVr1I6xl/wxA1fLvyd/zV8nfmbnPBcJthEqTzPN6xrTb9UVi4vO -aGt+mpXldH8XV9kCAwEAAaOBozCBoDAJBgNVHRMEAjAAMB0GA1UdDgQWBBRYEiRZ -pzwpFYlawhLb56VCECG3ujB0BgNVHSMEbTBrgBTy4upVZaSa4qydl/VFbPb3jBGt -36FIpEYwRDELMAkGA1UEBhMCU0UxEDAOBgNVBAgTB1VwcHNhbGExEDAOBgNVBAcT -B1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFCggkAlel49TRQ5NUwDQYJKoZIhvcN -AQEFBQADgYEAzctcgzXqy8vDqMOV4uZvTdjk7kHdPzWCrC/9Y4lPOhnXgXWzo/w2 -shLVxla8E2A3M26g2K58iPlL7nsfyPBWGQdNu0VSHHiBB3wThriGcIXkcSVYeNG+ -3iKCbRpLBqzw6FCHx2lkwmFDzZYGpn4JqQIBKqJA880QgEjQNFVAuc4= +MIIFfDCCBOUCAxAAAzANBgkqhkiG9w0BAQQFADBEMQswCQYDVQQGEwJTRTEQMA4G +A1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwg +QUIwHhcNMTAwMTI5MTIwMTUzWhcNMTUwMTI4MTIwMTUzWjBDMQswCQYDVQQGEwJT +RTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIxDzANBgNVBAMT +BnNlcnZlcjCCBCIwDQYJKoZIhvcNAQEBBQADggQPADCCBAoCggQBAMqqHcQR7JHw +x/9fkJL8QAxetz0AxSDVD4kxB9dBTItggKo4FN6Ta5x0iEFotQJBAS2GonqVU157 +Zy9sHilR+UT9SoC+siOhPhs4z4jEce74a0HFLcDDUqxZfYE0GZUyuJpRtkE21MSh +roTmOLnov5a+GXprd03g3uaztmu8Pd1ovEvE6/U2k+1WohVQihDo1iLtbLHNwxjJ +9grh3mFlYtYUQYy1+xRowc8SXUEhnVcRQ327Qywhu8NEfajPH8NxdbVHwn3OODxz +ZJ4V2Kcnz71AyEUI48g5qAuOwlt78UeREpHM4QDglFu9MuQMjcO+zHYyUhJpsBjg +sMJ2NFpfedn2gZ0CCmFpHDPOSfp2Ax4HWycLvzSeNJa4A5tQOmovF3oUz2VjADdS +qHPOSxRA9NKaVlQzuHcuQluP7B8Y9K2rikqNbXAl81jny2ZRFH0W9OttVnZ2UW7W +HdrTjcBkWmdOr+K/M9G49ir8V4enNV6Ayaz8h8lxF5G/t02j7TwbJ/RmoPlGAyfM +6oD2S0D2QZTNvQqz7ya+3m9prg8/HFVjM5Cb7cpaEk3eSwbCopKwQj0xr6QVEhX4 +iumIjc/9hWZQbxHxn0jztbqdhmgkol2ofFRC+ti1xfLdDg/QaORUfsW5oJtlLXf0 +j7kwCtWGXO3JfNHanQ1jUO7lHpJjzKIM6EqWAk3cj998jwgYqDCI16+JrfxXSxD5 +8ctI6LY7yD/8wtPRShA8G2tk3OVlHluy2rHiJJeP7sBLjhiDfBemPEWzYAYj8i8Y +E54XisZyeYxNBPOd6uAl0zOMHhFHYx+lRT+9hbP+pWjuSLcMpMl/ctB1Zptq+aBQ +86hZbaPdOE9wK7v/ki5xq+/pAO0N0bRv8I6yCftNYQ3ZENVUEc0DlIT9qGjkRW4e +ah4vhaFt9bbA8e73Nun+wvetzBNGW4hC8C0ftQ5+tSvkjau5hzBqPRL0rfMcrMwa +SCkqlnuAAAtuWYe/o8pwmRsc/XI9stOUSs9Vdb4fQOxVNUgtVfAA2jywYLoRMmZU +C74GpF63yVm7TfSSBiZIbsIS1HzwILii4bxqthkON0dVyfJJDZZ1ooRkvzT8vrJB +5PWI6+G3JqXlQcIgDPbiqKXndlSl+0uABX0YhXq6vLetwC9ghcwVEhwvCp7zfEDP +9D4j0pXK0AZYUvCE2A896/8SaJR5j75AKV+YyJBsBS+ZjCpjeB8jsSnF50nJspIP +UwvVcSgXwhm/YL98h6irwfQKwbjSaO7BzqcTExdtJF2iN6bXfUiLK3QtQC7KGdW2 +PmxCcfrPhYf53oBzi4n0cPDY1/9AQZzHFW2bbky1UgKZeTJzyiagrDFvxLD12rvC +H+CfRLol958CAwEAATANBgkqhkiG9w0BAQQFAAOBgQAIddy5P6q2foF6OdHu7US2 +zhs3xEwZ0Gbm67VPKu+VWGQhVQESMKyKldEG3ilGpPF9f7Ae0k779vqadL6FYtsL +gpBYYsVf8YACn8X782uwtDsEseVTwtAAoRqdZWBvc5hn4JzIEpR5Wb9De/V3yI/f +sc0RHAEZmcIiQvdBrrS4Gg== -----END CERTIFICATE----- diff --git a/mysql-test/std_data/server8k-key.pem b/mysql-test/std_data/server8k-key.pem index 493ad2350c8..faf4b43fa56 100644 --- a/mysql-test/std_data/server8k-key.pem +++ b/mysql-test/std_data/server8k-key.pem @@ -1,99 +1,99 @@ -----BEGIN RSA PRIVATE KEY----- -MIISKAIBAAKCBAEAwI8iAyRZZ0YU1o9gCVgGB0XxeHFV8eq5MIrNwzy5v2VuGO2g -uMkZVm/EkBnIZQnb/7+CoQitAU9ao9Q9eH5LSgGkfeh7BT592LlVWGDWHM7oMmIs -GWDz7QWZbcl3By4RbQuax2g4Ruj6MYDf6Hnw8f2plMP6DfV4rEl+1Rf94e5E88cO -MDJdqRkl5LshHf48hEhA9Vj0vxOMhWi77PXdxjjRsHcfpo5PjeJvSXT1P5Bljpke -WZwctSYkxLHeHvuWZcQxFBpTuF5iiscE97Q2pK8HyCcG7d3m9Ixi8WVA0J+fqRTI -jot01mda0MlNNaHVezk6Qp/k0PTGDy5CMEtWsj1tji1YxWmZNUmVlZm2hykrMtFQ -CM0lFEhtEJmFYTxBJiFVzB/PrbAvuYnYTqAY/3Udtpd8xfqL3JMXhgpk1Ak11YM0 -bVxtxozNuezCk8bBt8wEbyLgB7/g2Zsv1aBQzPnwlYOP9DCDcpTXtUvazJ9UO414 -dwskbA/ClmGWL7hftXqreluXeqmtQIvy1saNgdmUYY+dA8W5EANog78EgcysvTSJ -6NSNQyDitqQRPRUqggzWOmqMYtSTvMOAvxu0Kwp6NPDNHoI/JQ/RBKgKBRmw1haD -Oa8LRX3LFH5NqqrCOahGOKu9qyq9NEN/2iXeK/tpO/47h/2YlHZKvwSjMeM6/28E -+vok5CqJ6Q6/RExyhYI8iUoDYwFBklPQgmBu2P+MorQaOyBtrnSSME5I41Gmy3OX -BhMDMiObfaLHOqmvl4xR7f76tLQao4f8z4yO5oAVA/3+fb2xdvFfswkrTE2nfLVy -sdbbOMBnpFS8hwmlOboafj90YK09S76UU/NkFsczNexBAJW23plionoomkVN+s2m -d/beWHJQyH1pONsHBITYTTn3UBNDri2vRaQqOVY8uLfYJqQ2ySOqqrhJCyG6nnor -f00pnw4AHrRepvpJ/o3ldFfYutmSLNKshB3ypqREHL+IQTJ+0cMvbrwPXRmmj3Qr -Z7rdqdtotc6dJUjfVAjQHU8uWyS8BQ/7WEb6AspTkynPECfCoBjQ9dS5PF7fjmz1 -fLm0VMw5Fl082pazw2zUcF3TMKemvW/dQbyo3kJgWZqFJQ0qRcMFtG56Sk3KjArl -bDS8IJttSsrKtqY6oNvDDiAaEht33csdf8MNDefB/ZbSx2iAmaDZijMho4uiWqd+ -JwYCf+1gETc0VBd/TZAUHmk3DbrwK/CjLWJ5yHao6sjnOx/GT8IM16zwd1Nd8FC0 -35sDyk1B4RiyJTCGHWPlZ7FTzWtOgxq5Xi0FFWvUjrGX/DEDV8u/J3/NXyd+Zuc8 -Fwm2ESpPM83rGtNv1RWLi85oa36aleV0fxdX2QIDAQABAoIEAGv5ltvmLQ/A93xc -x0BWEINRkBa2jrfpo9B5dOnuikWtza/Cx+X2NfQHFlSrcHhfr/JX5BsCb2iVo8DM -CXAgeX1VMHS9wQXuxciaHCZDnqxmxUNDU3EjsYQOKLusRcdL6M+Zuz/ny+7PQ0Qw -/N0yS46Wa9oUjon3RKRvTeSV4HIpFpcP3n/eLjDc/ielWuujnTGcBnjNWegvQROp -5/7221YElGh8U84kbK2l9DtfjwoGoTv11lPvOxXE/scg6em7r9j+y3p3TMzMeDtT -YBC6CA4Oa7GrWLJXROOKOQ0ddtvFNlUsZ02vG2QCbqU2y8mwJrJDI80qNbeKGel3 -SfwkssedtGoOOYHxNczwpyVNHVHrHuMPBe75gbo+5pFxVJ5ymCGWfbLJf73oVsqW -ZimoknvkozW4+mlVlcmo3X73IxTW2U4RlXthYdj9KXsBLRaKVCQJDc934eHWkXHU -GF2U2NonqOVd8YG/FmZQ2ig6EcW97hC6wnsWT2Uc7UNAE2RM4bY0xCUHaQiKTrEs -CI6wpbbTV+XhDu2HmL9G+fsuSIu0RoSOCmr5jQDAVwCNPXFgBgcIxbPZ/UCJ7RHj -GrWPBldAN8ip4osiA+B3XwBabcvwXP2fgBP/eLWN1St3q3tw5xpHpqCuhNuPSqsc -0ntz0oIdJyRR6fXWmRFex4kXQ597z5ozm0uyg8arV3HJFxDC3DI6kKfs86/oqMSW -l+9g+d4x6VrUOCTDk0bjN3T8HQ9ASfy9JVacqk6yuXX7a0WeeT+x9JsvFAjg2KmG -CJUtm5w5siItMDSPpcRE4hlfgh+M7ZKS3PFgH3vvwfPMbC/IC93QoSaFzRJMyobX -ei6PNwqJvL+HADlMfLmehE2w9ycp4Fe1Gw/NW0Ed1S6Ajo45hgXQJSIrzla6eglg -JPsPpQ8b+weZNQ8zvc0KvfRJmZKKEb9dHvFdi68I1kV8aapQsjrMOjwHC2pnCFh/ -axkVc7a59fKUs7L6nAJhCs2sSixTorZz5PvJ6mXhWu72TCzu+kThNnEORrlWPHQl -RFEAFpDDaGSzOMlhb92CWUMPyZU2qtzMzv4QGbP5YqTy121hXuT5OBKCF3eNLihV -aje16k0RMFqqW3Olbm7Mp2P1C6DuwzsUJBnNwB5JzhC79Po88zNAl2d1h+qysKU1 -jxF316nhpWJ2dGJ/sbJ+XpUMd/tVrNFQMA254GFfXycsfBoQOSY5d6GfRwKUDOou -xImbIzGUAaIYdsGKDuKtqs5S21JMJjJ/J5CwjLu9tbpP/jsp22KHCpraHAQCupSp -+SFwWI7tRUXzREuxJixfUOnJFQYOATnMFvvtk1d6v4xoPYCVEhHq8gHqJkTyTi3Y -BPVwT1UCggIBAOEy5gThTrEqSVFUcFJm9bJxtWZt/YhOIJWNNxeaxExHzy5hPpsw -fZXtN4MUCeMSWI4isgIujmltwgOHMjQqsJPISn/1gVrqLmrZ2PnFzko/WA8rMUfd -EUnOOpj2bKpChlRGHi76ZV4XGgoTXyO6mrVUcUgf3reSImdcdQ5IHa7J+lWhCQGb -neZIyDOk41LX1TxjcYkY7vuUgmbBYComXPm2UaY3HN4E/3ElXntj6PrlozL33A56 -z4UPfv2Vv9kl0ydkTJe/WcUN2htqLFCYygF2XLlwbv2SYDCT31PkJUORbScUM46A -DOhlxvLBFcpF+l0RtCtvnrKyFy9yZJKrcLh9x6xVChZ/aQqSptSHjll5IEcVm54Y -Z1TjWizCI4txnaBFV0UCLt1CZrllXnyIksZLS4/dVqUIKmkxPBQUpiD5dmgDcmPB -/LdWzS6k4MH3J3Y3tu3MNPHDwgUtnifSZrsWSYPK0F8J0dMU/mLaS9eOplAH7Eo1 -t7OrrImvitM6tUdErRYilIaoS/6YPmsPST5gY1N4n8Lf4sAE/tY8fwaWRpTVSrIw -CoFwLtHESUOhqfuAOdr1EkDfo/RQTUVdnmWZ+D0j3du8MmsMje4x3f2CjBDXqArl -gNnBQELDmrdif8KELNjlEpTIz0T7wEfquhVQ2dzhFpL7RLAgggD+oEBLAoICAQDa -5WOWrAtaI1cC5C7LFxM2qXTHGRttfAtVxuigJapLqNASJuu59GGRxsCVwhthbNFh -aCMSj+fZK7QNFkaoPwuZCEtzy0ErkVZzxYp3cP6b99mzGoCcuqiHiW5qhEkbxwdC -f3YEsSGqE6j8TPW8feiziqo8q+QPSudI9ngkH1gjgbIrTu9iaxKJcF2CwBxe5tfB -uFBNPIgJAaLPejRKQu17MAV2jDnBDIsZUZnm53IxQ+giIYUBay3cfC1KMJu/AnZ/ -CxETjgqqnzqdFW0b0o49Q6YQa6QXAiSjs+lL/BhjbdA5quVdFmA3CoASFQbihYfM -4vilUg7Y4wXfzS7DyBZdfppIn+HI8PPSMv/lfdsQXecl5TU1fBDPRWYPpTZqm1II -HDCkmGRKet/j4/oobabNRrJ6PJcxNjqeMVv/a72pypDRPIXzNxLb1BkfWDGfgu2R -YAdRNBSJSpdoHDZ+1VO2A+/8gz9Zuiv1WxoX7+u3pCAd+0vCfHiaXiFVc7fI8F+m -rtDmN5p3DD9l1+/v7yd+7eUezwxYecElw5E5MyAJRTYGrim8g7XvF/u9rXvH09VP -TeIE8oJ7XzrxCmtGIxlJs6FmgUbUblOyfPZDUqPnzlo8Ru1H2iKRo2FPiMfij8mh -H3wgFTnZpGDQjw/xop51bxVueXrmOeguS0wmk/8Z6wKCAgEA0y+bPApadJRWS1nn -N69sTBqMZfFR6Eh0ECts9criuTJCXZk+T+SqcTYTb+4T04k52Jk63Aby8HXIkuxv -LTK3gu86xkLiOvMP8o43Bwz0BvbeSuNThLQQ6Wjn1NiLUSOvu0pCNgYFl7YMalR+ -TRBK0y/MSDny762wa8Pt1iXVCDxLcY/h1UstSW8JqDzCHcdgJhCPwWTLgMxleZ1w -5DYzzM2oRjq67I49Sssjjo1ESD2fzUVZbY7IG11L1t1fG3F4UiGiHlCJC92Qo1Lv -Geoezj5EeHay70Mcx5F0xsRWGcZAWXx9WO5GrI39g1uFZro3Lp5SmsVDSwrt6UXa -gR0bSThTTw40tqJnTE34+6ff25JWrbLay+jQxm+q+fxZvwQeMNW2IHYKot4JXWVt -tVWSZzjnNJP6FCvTMfDFCYPPw26OFr7cwCaEKx7QriRazitMK3XWK6zsHalZwudj -wK50PpCJAnno7KdVySCP6v4ST6Rr3POBKJq1ml2tITWo96u/ooUJ2I83QAyFr8zw -BBBCvKdBnl6pW+P/TdmhbiEvcmrs59gaA34/6+DbV0Y++piZwswd9XML2iCgLZY8 -0IcZ6uf4PsXq4Yzcrz0HwM+tAXcyiPzkjstpCUxMShALgFxzuWOgdwpjYXnrviJk -0EyUkzbOCHBhbhcK9CyYHfyrJX8CggIAdWwgJC9eV5glkPN+9osGT4hPkI4zXGPy -YK03FNGfrL59/37JbRNfU6fen3dk4LpTB4Gpbserg6AiEfMlLBPF0O3WK+OYrhpk -2e3Z/YCr1Fb8fUt2Op0W0r4ycQlNfo0ho9ZkJNgwSuAJAm72U4rnTYjREYLT8DAq -KcWtZRM7YLCuNvU9DPqLExcn0n/juDT1AIIy8XvLLamnAM15R2znn/F+vL00Lg7g -f1B60pbNdwgKemSoyL4J+ADU+rtgkPJtRnFVU7walLSd6K4ZvZcRnmOvrZdQitcn -eHmGaLBvFMdPr9+w8mKScnQ7h3eoHdOrqYkIAQcn18jQ2eFjeLrY5IaJlPPPVs+K -u/OHuj/tR7ZXzMhL5skK62U6/qGNs1pmgts8bM8i3aFUgRdGlnFbzTpje5cNM+T3 -RO0NgNL3ByIW1Wc2I+YjQ7FfWKUi2YKOljGBO1pIue09kyevRBKDuVwbXMW7MhLg -idm5AaY+OGDeqbaoSUgkGgrsrr5IlI39gZi9jwG85qe3Spavq3ILKdfL1N8UrFGD -/xIN0TVPtilede7vjKTK79tZu8JYaDWGc+g/mo/M1wmawLrqGNGzOwoVRruKl2In -m9PU9wBZ1HuphDQ4DRdC/AU8qkGhmDOx4bDWEQ/R3KKFHNvhnamyfyR7xqt79gyS -NGNIElnJuskCggIARFaK6yAVmaL74Qu3iiELj8FU9Cw8kPP5HeWUfGxCjlegdH3R -FBtoQlDcQjYzO2uZR94Itg3yk3Dt+xbf7KxUsODwlgLj1UhV4eOXUDTosBFTrbTG -v9gnRVH0Eyu9tF+CMUcCXhq6tnIrQOVv1ozcdXfIpk9gvIbfh4rlo6X0iM8Xge2t -Vo7awq05t4wJBkO1xUtOaw9HabaszK/CU1iNV7cIBmaFF3AEP/KVfOs+kjubc9AF -mqC+LVVClvJPNzm1YA5JZlxmQ0u1xXFqZv0OMoibgY+gSzaiAQz3eKB6vEv4Xv4U -kaF9nEUTEjowpTE6uX9X0mGkXXT2wXmlTjosZFnxRX5IIrRNug30plRra5CNYPGp -3uTmD/D7Nzi1iYitJg3yhrTQmCWiJY3x4Z0xophLkio2nlJ9WoTKf1AwTIATY7fa -pX9bxEKldYXrYZNFlbqBPFgA/36v+JDVfMf2E9yRMCt0LAJ0HUM6zP0ngMv+S1TP -Pu6X0WXR9JeuoaF4uJSty/xwdpST/CkHflFLVsk5n3tNQfWGjqoTSOJMgL9NRY9e -Pc/OshHZHeCVFUSXtcf1pfmmBtT6FHX0L4cgVqA5xO8RYapnLDAFLXq2/dRv3NwW -W9CzZcZKh7jmJw4iSIY5IU1+ThgugWoxlkcmjs/egjBclL8BBfqRIwx/vOE= +MIISKgIBAAKCBAEAyqodxBHskfDH/1+QkvxADF63PQDFINUPiTEH10FMi2CAqjgU +3pNrnHSIQWi1AkEBLYaiepVTXntnL2weKVH5RP1KgL6yI6E+GzjPiMRx7vhrQcUt +wMNSrFl9gTQZlTK4mlG2QTbUxKGuhOY4uei/lr4Zemt3TeDe5rO2a7w93Wi8S8Tr +9TaT7VaiFVCKEOjWIu1ssc3DGMn2CuHeYWVi1hRBjLX7FGjBzxJdQSGdVxFDfbtD +LCG7w0R9qM8fw3F1tUfCfc44PHNknhXYpyfPvUDIRQjjyDmoC47CW3vxR5ESkczh +AOCUW70y5AyNw77MdjJSEmmwGOCwwnY0Wl952faBnQIKYWkcM85J+nYDHgdbJwu/ +NJ40lrgDm1A6ai8XehTPZWMAN1Koc85LFED00ppWVDO4dy5CW4/sHxj0rauKSo1t +cCXzWOfLZlEUfRb0621WdnZRbtYd2tONwGRaZ06v4r8z0bj2KvxXh6c1XoDJrPyH +yXEXkb+3TaPtPBsn9Gag+UYDJ8zqgPZLQPZBlM29CrPvJr7eb2muDz8cVWMzkJvt +yloSTd5LBsKikrBCPTGvpBUSFfiK6YiNz/2FZlBvEfGfSPO1up2GaCSiXah8VEL6 +2LXF8t0OD9Bo5FR+xbmgm2Utd/SPuTAK1YZc7cl80dqdDWNQ7uUekmPMogzoSpYC +TdyP33yPCBioMIjXr4mt/FdLEPnxy0jotjvIP/zC09FKEDwba2Tc5WUeW7LaseIk +l4/uwEuOGIN8F6Y8RbNgBiPyLxgTnheKxnJ5jE0E853q4CXTM4weEUdjH6VFP72F +s/6laO5ItwykyX9y0HVmm2r5oFDzqFlto904T3Aru/+SLnGr7+kA7Q3RtG/wjrIJ ++01hDdkQ1VQRzQOUhP2oaORFbh5qHi+FoW31tsDx7vc26f7C963ME0ZbiELwLR+1 +Dn61K+SNq7mHMGo9EvSt8xyszBpIKSqWe4AAC25Zh7+jynCZGxz9cj2y05RKz1V1 +vh9A7FU1SC1V8ADaPLBguhEyZlQLvgakXrfJWbtN9JIGJkhuwhLUfPAguKLhvGq2 +GQ43R1XJ8kkNlnWihGS/NPy+skHk9Yjr4bcmpeVBwiAM9uKoped2VKX7S4AFfRiF +erq8t63AL2CFzBUSHC8KnvN8QM/0PiPSlcrQBlhS8ITYDz3r/xJolHmPvkApX5jI +kGwFL5mMKmN4HyOxKcXnScmykg9TC9VxKBfCGb9gv3yHqKvB9ArBuNJo7sHOpxMT +F20kXaI3ptd9SIsrdC1ALsoZ1bY+bEJx+s+Fh/negHOLifRw8NjX/0BBnMcVbZtu +TLVSApl5MnPKJqCsMW/EsPXau8If4J9EuiX3nwIDAQABAoIEAElnTjqq502AsV+c +hGfId4ZDdAjjU4LtyJ+/I4DihM/ilxeQEnb/XDWhu4w9WXpEgyGzJvxRQ43wElKJ +zW7X4voK58Yzy5++EhmX/QsjY8TTMz3yJf0wgawtCZkXfsCcS2KRf/qk2nGRwf0e +yaMEWwhFOEMv01lgvjs/Ei55Usrz2Wd0HqaFKxUGkNQ5hJhVTOH/rqPDzAsZc0VD +w+Dw8NhrI8bMTvF4c+IFW8NwYmWbuh87CTxdx30VPJI82ttWJ/UN1bLtU08J2IKt +lPgOIl8ArMjcTGxD/cqZ3Wl3Pc/XCqvGUiSYMwP7Rgh1R4+DdtjEpxdGMmMAVuVI +HPQyqpa4gv+UMqBPish0yjSuM7jXnztINOvg9Vk1sxC5AT9eaRltmiS1s+lVxe+T +43ulf0ccYXJD/WclWSGCwloNFuokPIV+Lgo1pKsp4XDgoxQfkXwH8Q4dEqebY9rT +Tv9FGb1bMbdl22X1oSu2lBltBZaB/QnruV7L2GaQ0tqLKizgBRuvZFSE+DWdMb6d +9mnEB8LWtca/nzogXb5qv4GEMUX4FUAmSf1FnGWZwwDi1DFfJ860RVKf0xokGGQ3 +cm3H/F4veds88Z1hsAu0bG8h/bEAim+Whvag995cFHDD4on41KXW8wX1on9VFA1W +CkaGUPhLRytXDBVCSJkOYYFSJlb2wqONiWe4Tn5hsantCfliTj/GVkgDq2h7dAGR +WyoqTntJAv/xJsUOV9WmGXnWNeZX8BSO3P5dnXnMzhCWQGoprXmWFyJ3TYCJ2+CO +rzkZbtuKvTvGc3sDJgrSVmmg0BrOkH+GyYVlJdTDBmfzoORludDCFHECa8oK7NwY +t3o0eNlG6IqTxl2HIoPneW9nXFQtCXv6tpJjljwjlz5WpJG+kBW6bDedcxZu7olZ +fqtnyZTB2SjzzbGdQ4JvFup8MxNyPvYiqumQXJgkyXFVDl/UFhjWuGe04i8NBJgJ +xORcjfgLrKH1XKVBWPJdh/2YeUKIIvQ9RB4WVqXgGmD/21tgv1bVEMYabh23e/HE +Fe1U2XQPJKxGCEtG6b4zhFP+PeZACS+Vk5IVJYK9n4SepPBPgX/wbJLOcKGpsKjp +yx5WjopMO6T+VUV8HIduuZ+E8+uAILHDmo2Bq+LHblaxd4SkM0+hL2H36imK5CUO +5fLuvHW88LvFtQw6xhP20s+BnmgzE5ZvNG4Iedkjvwe9HmdNDew0UYT5vNJN0ehh +OlraBC++JYwEclrBD9SRvprT63XKDG735pPvzLQi7WKDCBn1/JEgxDIO8nkMewOZ +FU48Mdmkn9wqPeIigQciwl62fuAQCGRG+RXMQqra4A1apqMZQEauTK50VhHDGdbc +ye9LHaECggIBAO9lAzoYS/Lu0ticMt24P8BSbGdxSNIpEyIlTTs+7A0UjpfXsoK9 +4EJWZ7lhgbQh+SCTS662SeC+s8M6bT+3mELxUC5S/N3aCPyfjcM3JaoACkI9+VMn +9otJZjAEwH7cNpMN0Xa8fHCEma3l3XKiVxEJbuJC86S5mpkjeXVnDajAidBtevBd +LWJ9n2yXk+ZKUyI0mjpqItwUxOgQ/MOIvqAu66xyjg08/I1QQTuIrReAA+oaVKhp +c42Ufn26hUhNrQCBAtMAO3VC/chciet6vEMNEM13GqLp4+PcPhRX90gO4+bNrScD +WgiW/jc24CGan8gAenBWC/3l/C6JUsMp+ZYmPozsa0zo6edgiO/f2KXe5nP87wZT +MxaYJgnyXJxMefI79kUHPrhpXZxuiSCEWLhCBN34Lhpr2L491i2g/FJj9i6N3EzE +N3ic5Q63o4QFusjqIm3taQQFoGP2Cgg9owz5WJ0uRz/gtOE3XQiQA7+ozoAXOlTw +pJK5MMtVrEoOLIbVJIpxfDcKDp3yorR8QCQLHgDBmFeNCDmk+7YP33dRIc/AVNLF +q7cecqEc7D8AkXX8Q53GfCEg+uqbdeMQXK4BUE9iwRK9RiFhas/RJe73+Iio3S0L +ekLpnnOfvk744ws+JWsLpsfC/ZE7OxBLPtq2xvGl/RT2G7tCjmpX3CbPAoICAQDY +uOEJks2T105EcMPJjzNHCCqjK6S7qZaWkF3KT1Z0Mu5oUZwwHamsMg4BQJ2mjMrL +fRBKfXQLA6vgE7zysw3F300RDxE1RVow5+JLDQ4bqupp27/M0a8fuwksyOdKHqCV +YHzuTCxbVIFZawTjfOxJVXDHKCFCilfY1LsA+V+oFe3Ej8YYxWXkXA9ZLigpmt3s +Wu6eFcZgF3utzIGjI6eP6lL5bWp6Bh9Avp2xrOvpFwE2m02Y7/Zom6MT4DXvByY2 +KHHQLsasEMpeLuxQXjLeTocwcxBwBFKhX95yFuv31k00VydT+NExtaZeUYi9l19J +WmM4GjFjAqa3uUwMNVv5JfWtKMyk4FOox2XftLvMiIhV95B8hAGxtYr3hPkGg80O +AWPq6OKUD332COXRaHkmL5aQdN3gP5zh9+rH6icLrrZbrQidVRyDw03doRoGrH7i +ixXLyYoW80PHgqUDPohd5bFkZpi2vwXMl1YQ2TfN9TvYFSGme9YCm9ZuypnqauW/ +aAf0FI1MNwS+XDREtzPdFi0me6WxpKL4a2Z3GGNxIFuBjQ/uydWpjxkny9qI3KAp +SgjI3kBUDGq3gf0R+Xo/d4d/4asK9Nv2Fi0X+RfGqioFaTbQl/1zhNdvhP9IcwEJ +DLVQ3UhMdfg285RarC2Sihui0M8Smi9od9Dj6rdWMQKCAgEAiQVRFoRnnDGz/wVQ +W/Wkj6jdoUuG+btG10lwbhOyuj3k6+Yqp4iUfoPENKgpu/eiB1InhGWT3Y5ph7m+ +ZDTqco56bTlUwIqWkDmmw3CiHy6MsKOWPFFoXQry8VMW9sWGex7yoDp8I07SQ2WJ +HZ7rpLW4gMr/d25AnZxfXaJRgCBMAT9YmZFLc88hW99aaPproO1oxTyQnVVJ6uYm +NqjjKv4QKJEc21jn2N5xp+iv4f6Evw65G/fXitbOm5oRxXOoLNyqyCie35wrc+37 +hwumC97DmkasuUiUBoy9/5jl0ZmsOiPJEsZpVvdNpD7FhJZjE++qJPgrPvTPJbe1 +5jz1PUrAjJqZQ9kgYC2x01JVR4NQdlz0VrNyT2FgjFrrRQ7E0bAeYh4meRjd2rat +yC3YNgabkI0HnlnSIfl0yIMXSPUsKDNMP6gjc+aheI4FioBZC7xvXmn/rKynw+9E +iLj2xWtGnBir8VTlUu8EUe1UJ/Qv1cL1wT5HhC95TTjJN03rkHUYyCDyjvIzsZX6 +KMHhWIAAeUBVuO7hIVVcOTXWmw2WA7o7ErTPdy13QN40Hk9t8pEkBn9f9vpQg83d +aMypr3LTC80jY11wcZS3tSEpzCCkYVv91FV4cioTZmytWbg9A+dbNWzi1f22ctTr +FoVrAXaSYie2trOy5bjPmPCW8qMCggIBALQUKymBSkDmTqqf6I+65ajIKGWdBizJ +Jc/F9aj9c6DqER+tcFKq0ym6DdkMj/KsWnXrXXYH+DyOuGpg/EfOcEtS2P6rvmi9 +T8wDYg1qs6ZZxp5fcmgGc7Wx/FWyOj1kZZq5qhV4RgM9nJ1oR4+fZdcpn6RcvAZG +XehWG20byVgpoIAL11cN7zRpKne32rd3b5/NjyjcfxGpcaNgovej0L/MvVV0jV0H +aUCrIu1X+k6cRu3Q7hF+kwkpCcCiNS6AikfGI4wQ0hR3fy/zXXkKTMpcBglEEwyB +Cwf8WSID2d79uvka0hr8TRc5ERyeMzkWZp7U9EzRtufGdDGFTqN2Uw4bdKCFnkYC +AIHl7ciMrN+vM1n7c5uDNMUtTGOPojy/l8tjbFrtWBgfJ1Mg4ZW3cbNBJ6Kw+Qw0 +z28USYoEDp2uduiGRvo0lpUF29Wk37Nb8bLcTygeNxgK2u8Up3iipT0gdt4uQgbX +g0IVHfayB6SjeS57oJJto85XHz7AKlSWroD1OGagDSifLtneU7AlanryymGHrI6H +dsNkuqeLJFYDxQVI6UxJebiCpyxiPxwp9wtX8SS3SEyOZL5GzLn6ypGiCH1CTpW0 +EHHSy3V4DUGOc4w7eMirAnbSkxCfOmBA70NNw/uFY2XlQHKow0T0fImfKIeJagbT +B0GPDYvUpLKBAoICAQCzYnq8xupXK7lvTLaj936qGSe54OC2sj9+UpsFiPxglNY2 +sO5zKWKyY7+rjK6zG2ciGfPEDsZNIqKw1W/KBfR2kRLqkt4bC3fSCvUztx0vtGUe +veXlqiwETdE7RJXoaGJrgJArYJvpOd8PtWGeM+sSJNNrUlGlJnSiZ0CcypqUZgZL +WzGFfLOQYAXCykdB1iZkBqU2C5wktvCb9sVz6G3TmAwSKTENOWWZWmh+W0J4pZFV +ZEyvsxViJRQbwxa0kC0F5J/UtWZknO79/ZFj1H4jiAR45EjWHE+UZAkFwG8BSl54 +EKOx7GDanuRILr0dtbyi4d31nCYXdjs3x2+1N3exw4oKQIvNuF54WoowbNPu0kEb +G+7/kLwcJqRnSV4AiLuMz5aOte7JJSw5tzgZZlAQwJO7IDfrLqodivcXF5yirwiF +dyBpzSDmupy/aTHnCpT+l0H96jRU2awxaeRHZUqZog8gMHsslNVZEFvUFDJ7AUN/ +yyfUzJYjH18pZt0hS7jNb1O7KxZCkWGMiEcxHkgF/UINab5qruNBVKOkJ5vqGhYi +uNkgeGsQtXJcpqMRRiVXJE0kE+26gk+iaYnBJN9jnwy8OEAlYFUHsbCPObe/vPMQ +3RLl+ZoKdFkN/gTiy70wUTRVw+tWk+iAZc7GPX1CqDFOqGZ2t+xdF8hpsMtEww== -----END RSA PRIVATE KEY----- diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test index ad051503fd6..19b8aa236b9 100644 --- a/mysql-test/t/openssl_1.test +++ b/mysql-test/t/openssl_1.test @@ -15,8 +15,8 @@ insert into t1 values (5); grant select on test.* to ssl_user1@localhost require SSL; grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA"; -grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com"; -grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB"; +grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB"; +grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB"; grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx"; flush privileges; From d9e9a73e8f1355a24b27d64d56d555d045ee0b4c Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 30 Jan 2010 20:49:25 +0800 Subject: [PATCH 108/132] Bug #48321 CURRENT_USER() incorrectly replicated for DROP/RENAME USER; REVOKE/GRANT; ALTER EVENT. The following statements support the CURRENT_USER() where a user is needed. DROP USER RENAME USER CURRENT_USER() ... GRANT ... TO CURRENT_USER() REVOKE ... FROM CURRENT_USER() ALTER DEFINER = CURRENT_USER() EVENT but, When these statements are binlogged, CURRENT_USER() just is binlogged as 'CURRENT_USER()', it is not expanded to the real user name. When slave executes the log event, 'CURRENT_USER()' is expand to the user of slave SQL thread, but SQL thread's user name always NULL. This breaks the replication. After this patch, All above statements are rewritten when they are binlogged. The CURRENT_USER() is expanded to the real user's name and host. --- .../extra/rpl_tests/rpl_current_user.test | 127 ++ .../suite/rpl/r/rpl_binlog_grant.result | 42 +- mysql-test/suite/rpl/r/rpl_events.result | 42 + .../suite/rpl/r/rpl_innodb_mixed_dml.result | 4 +- mysql-test/suite/rpl/r/rpl_sp.result | 16 +- mysql-test/suite/rpl/r/rpl_user.result | 1755 ++++++++++++++++- mysql-test/suite/rpl/t/rpl_binlog_grant.test | 8 +- mysql-test/suite/rpl/t/rpl_events.test | 82 + mysql-test/suite/rpl/t/rpl_user.test | 83 +- sql/events.cc | 79 +- sql/sql_acl.cc | 124 +- sql/sql_lex.h | 25 + sql/sql_yacc.yy | 36 +- 13 files changed, 2319 insertions(+), 104 deletions(-) create mode 100644 mysql-test/extra/rpl_tests/rpl_current_user.test diff --git a/mysql-test/extra/rpl_tests/rpl_current_user.test b/mysql-test/extra/rpl_tests/rpl_current_user.test new file mode 100644 index 00000000000..7ec38e0c151 --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_current_user.test @@ -0,0 +1,127 @@ +--let $count=1 +connection master; + +if (`SELECT '$diff_table' = ''`) +{ + let $diff_table= mysql.user; +} + +--echo +--echo +--echo +--echo TEST STATEMENT: '$statement' +--echo -------------------------------------------------------------------------- + +if (`SELECT '$diff_columns' = ''`) +{ + eval CREATE VIEW test.bug48321_v1 AS SELECT user FROM $diff_table + WHERE user LIKE 'bug48321%'; +} + +if (`SELECT '$diff_columns' <> ''`) +{ + eval CREATE VIEW test.bug48321_v1 AS SELECT user, $diff_columns + FROM $diff_table WHERE user LIKE 'bug48321%'; +} + +while (`SELECT $count < 6`) +{ + --echo + --echo TEST STATEMENT: '$statement' + --echo CASE $count: + --echo ------- + + let $user2= 'bug48321_2'@'localhost'; + let $user3= 'bug48321_3'@'localhost'; + + let $user1= CURRENT_USER(); + if (`SELECT '$action'='RENAME'`) + { + let $user1= $user1 TO 'bug48321_4'@'localhost'; + let $user2= $user2 TO 'bug48321_5'@'localhost'; + let $user3= $user3 TO 'bug48321_6'@'localhost'; + } + + if (`SELECT '$action'='GRANT'`) + { + let $user1= $user1 IDENTIFIED BY 'user1'; + let $user3= $user3 IDENTIFIED BY ''; + } + + if (`SELECT $count=1`) + { + --echo # Only CURRENT_USER() in the user list of the test statement. + let $users_list= $user1; + } + + if (`SELECT $count=2`) + { + --echo # Two users are in the test statement, CURRENT_USER is the first one. + let $users_list= $user1, $user2; + } + + if (`SELECT $count=3`) + { + --echo # Two users are in the test statement, CURRENT_USER is the last one. + let $users_list= $user2, $user1; + } + + if (`SELECT $count=4`) + { + --echo # Three users are in the test statement, CURRENT_USER is the second one. + let $users_list= $user2, $user1, $user3; + } + + if (`SELECT $count=5`) + { + --echo # CURRENT_USER is not in the test statement. + let $users_list= $user2, $user3; + } + + --echo users_list= $users_list + --echo + --echo # Connect to master with user1, so user1 always is the current user, + --echo # when test statement is runing. + eval GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; + eval CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + + if (`SELECT '$action'='REVOKE'`) + { + --echo + --echo # Grant some privileges to users at first when testing + --echo # 'REVOKE ...' statement. + eval GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', + 'bug48321_3'@'localhost' WITH GRANT OPTION; + eval GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', + 'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + } + + connect (conn1, 127.0.0.1, 'bug48321_1'@'localhost',,); + connection conn1; + --echo + let $temp= `SELECT "$statement"`; + eval $temp; + --echo + + disconnect conn1; + + connection master; + sync_slave_with_master; + + connection master; + let $diff_table_1= master:test.bug48321_v1; + let $diff_table_2= slave:test.bug48321_v1; + source include/diff_tables.inc; + --echo + + --echo # Delete all bug48321% users + connection master; + DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; + DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; + FLUSH PRIVILEGES; + + inc $count; +} +DROP VIEW test.bug48321_v1; diff --git a/mysql-test/suite/rpl/r/rpl_binlog_grant.result b/mysql-test/suite/rpl/r/rpl_binlog_grant.result index 4a789f361c6..adf2175f3bb 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_grant.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_grant.result @@ -17,16 +17,15 @@ show grants for x@y; Grants for x@y GRANT USAGE ON *.* TO 'x'@'y' GRANT SELECT ON `d1`.`t` TO 'x'@'y' -show binlog events; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 106 Query 1 193 drop database if exists d1 -master-bin.000001 193 Query 1 272 create database d1 -master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb -master-bin.000001 370 Query 1 436 BEGIN -master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1) -master-bin.000001 521 Xid 1 548 COMMIT /* XID */ -master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y +master-bin.000001 # Query # # drop database if exists d1 +master-bin.000001 # Query # # create database d1 +master-bin.000001 # Query # # use `d1`; create table t (s1 int) engine=innodb +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `d1`; insert into t values (1) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `d1`; grant select on t to 'x'@'y' start transaction; insert into t values (2); revoke select on t from x@y; @@ -38,19 +37,18 @@ s1 show grants for x@y; Grants for x@y GRANT USAGE ON *.* TO 'x'@'y' -show binlog events; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 106 Query 1 193 drop database if exists d1 -master-bin.000001 193 Query 1 272 create database d1 -master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb -master-bin.000001 370 Query 1 436 BEGIN -master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1) -master-bin.000001 521 Xid 1 548 COMMIT /* XID */ -master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y -master-bin.000001 633 Query 1 699 BEGIN -master-bin.000001 699 Query 1 784 use `d1`; insert into t values (2) -master-bin.000001 784 Xid 1 811 COMMIT /* XID */ -master-bin.000001 811 Query 1 899 use `d1`; revoke select on t from x@y +master-bin.000001 # Query # # drop database if exists d1 +master-bin.000001 # Query # # create database d1 +master-bin.000001 # Query # # use `d1`; create table t (s1 int) engine=innodb +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `d1`; insert into t values (1) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `d1`; grant select on t to 'x'@'y' +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `d1`; insert into t values (2) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `d1`; revoke select on t from 'x'@'y' drop user x@y; drop database d1; diff --git a/mysql-test/suite/rpl/r/rpl_events.result b/mysql-test/suite/rpl/r/rpl_events.result index b3fd85d7e28..206ec52718c 100644 --- a/mysql-test/suite/rpl/r/rpl_events.result +++ b/mysql-test/suite/rpl/r/rpl_events.result @@ -251,3 +251,45 @@ DROP EVENT event44331_1; DROP EVENT event44331_2; DROP EVENT event44331_3; DROP EVENT event44331_4; +DROP VIEW IF EXISTS events_view; +DROP EVENT IF EXISTS event48321_1; +DROP EVENT IF EXISTS event48321_2; +DROP EVENT IF EXISTS event48321_3; +DROP EVENT IF EXISTS event48321_4; +CREATE VIEW events_view AS +SELECT EVENT_SCHEMA, EVENT_NAME, DEFINER FROM INFORMATION_SCHEMA.EVENTS +WHERE EVENT_NAME LIKE 'event48321%'; +CREATE DEFINER=CURRENT_USER() /*!50000 EVENT event48321_1 */ +ON SCHEDULE AT CURRENT_TIMESTAMP +ON COMPLETION PRESERVE DISABLE +DO SELECT 48321 as BUG; +CREATE DEFINER=CURRENT_USER() EVENT event48321_2 +ON SCHEDULE AT CURRENT_TIMESTAMP +ON COMPLETION PRESERVE DISABLE +DO SELECT 48321 as BUG; +CREATE /*!50000 DEFINER=CURRENT_USER() */ EVENT event48321_3 +ON SCHEDULE AT CURRENT_TIMESTAMP +ON COMPLETION PRESERVE DISABLE +DO SELECT 48321 as BUG; +Comparing tables master:test.events_view and slave:test.events_view +ALTER DEFINER=CURRENT_USER() EVENT event48321_1 RENAME TO event48321_4; +ALTER DEFINER=CURRENT_USER() EVENT event48321_2 +ON SCHEDULE AT CURRENT_TIMESTAMP +ON COMPLETION PRESERVE DISABLE +DO SELECT 48321 as BUG; +ALTER /*!50000 DEFINER=CURRENT_USER() */ EVENT event48321_3 +ON SCHEDULE AT CURRENT_TIMESTAMP +ON COMPLETION PRESERVE DISABLE +DO SELECT 48321 as BUG; +Comparing tables master:test.events_view and slave:test.events_view +ALTER /*!50000 DEFINER=CURRENT_USER() */ EVENT event48321_3 +ON SCHEDULE AT CURRENT_TIMESTAMP +ON COMPLETION PRESERVE DISABLE +DO SELECT 48321 as BUG; ALTER EVENT event48321_2 ENABLE | +Comparing tables master:test.events_view and slave:test.events_view +ALTER EVENT event48321_3 ENABLE; +Comparing tables master:test.events_view and slave:test.events_view +DROP EVENT event48321_4; +DROP EVENT event48321_2; +DROP EVENT event48321_3; +DROP VIEW events_view; diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result index fbfebbaa590..74ebb3be948 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result @@ -750,7 +750,7 @@ test_rpl e2 root@localhost SYSTEM RECURRING NULL 1 # # NULL ENABLED 1 latin1 lat USE test_rpl; SHOW EVENTS; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation -test_rpl e2 @ SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci +test_rpl e2 root@localhost SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci ==========MASTER========== SELECT COUNT(*) FROM t1; COUNT(*) @@ -1079,7 +1079,7 @@ master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1') master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # use `test_rpl`; CREATE DEFINER=`root`@`localhost` EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1 -master-bin.000001 # Query 1 # use `test_rpl`; ALTER EVENT e1 RENAME TO e2 +master-bin.000001 # Query 1 # use `test_rpl`; ALTER DEFINER=`root`@`localhost` EVENT e1 RENAME TO e2 master-bin.000001 # Query 1 # use `test_rpl`; DROP EVENT e2 master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result index 7fedaf4c1ef..02a5f33c843 100644 --- a/mysql-test/suite/rpl/r/rpl_sp.result +++ b/mysql-test/suite/rpl/r/rpl_sp.result @@ -433,9 +433,9 @@ master-bin.000001 # Query 1 # use `mysqltest1`; create table t2 like t1 master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `foo3`() DETERMINISTIC insert into t1 values (15) -master-bin.000001 # Query 1 # use `mysqltest1`; grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1 -master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1 -master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `mysqltest1`; grant CREATE ROUTINE, EXECUTE on mysqltest1.* to 'zedjzlcsjhd'@'127.0.0.1' +master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT on mysqltest1.t1 to 'zedjzlcsjhd'@'127.0.0.1' +master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT, INSERT on mysqltest1.t2 to 'zedjzlcsjhd'@'127.0.0.1' master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` PROCEDURE `foo4`() DETERMINISTIC begin @@ -510,7 +510,7 @@ select * from t1 master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1 master-bin.000001 # Query 1 # drop database mysqltest1 -master-bin.000001 # Query 1 # drop user "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # DROP USER 'zedjzlcsjhd'@'127.0.0.1' master-bin.000001 # Query 1 # use `test`; drop function if exists f1 master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) READS SQL DATA @@ -675,13 +675,13 @@ CREATE DEFINER=`root`@`localhost` PROCEDURE `foo3`() insert into t1 values (15) /*!*/; SET TIMESTAMP=t/*!*/; -grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1 +grant CREATE ROUTINE, EXECUTE on mysqltest1.* to 'zedjzlcsjhd'@'127.0.0.1' /*!*/; SET TIMESTAMP=t/*!*/; -grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1 +grant SELECT on mysqltest1.t1 to 'zedjzlcsjhd'@'127.0.0.1' /*!*/; SET TIMESTAMP=t/*!*/; -grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1 +grant SELECT, INSERT on mysqltest1.t2 to 'zedjzlcsjhd'@'127.0.0.1' /*!*/; SET TIMESTAMP=t/*!*/; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` PROCEDURE `foo4`() @@ -842,7 +842,7 @@ SET TIMESTAMP=t/*!*/; drop database mysqltest1 /*!*/; SET TIMESTAMP=t/*!*/; -drop user "zedjzlcsjhd"@127.0.0.1 +DROP USER 'zedjzlcsjhd'@'127.0.0.1' /*!*/; use test/*!*/; SET TIMESTAMP=t/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_user.result b/mysql-test/suite/rpl/r/rpl_user.result index a98e7e9ca55..b1f1d73cf86 100644 --- a/mysql-test/suite/rpl/r/rpl_user.result +++ b/mysql-test/suite/rpl/r/rpl_user.result @@ -39,7 +39,1754 @@ show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create user 'foo'@'fakehost' master-bin.000001 # Query # # use `test`; create user 'foo'@'fakehost', 'bar'@'fakehost' -master-bin.000001 # Query # # use `test`; rename user 'foo'@'fakehost' to 'foofoo'@'fakehost' -master-bin.000001 # Query # # use `test`; rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'bar'@'fakehost' to 'barbar'@'fakehost' -master-bin.000001 # Query # # use `test`; drop user 'foofoo'@'fakehost' -master-bin.000001 # Query # # use `test`; drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost' +master-bin.000001 # Query # # use `test`; RENAME USER 'foo'@'fakehost' TO 'foofoo'@'fakehost' +master-bin.000001 # Query # # use `test`; RENAME USER 'not_exist_user1'@'fakehost' TO 'foobar'@'fakehost', 'bar'@'fakehost' TO 'barbar'@'fakehost' +master-bin.000001 # Query # # use `test`; DROP USER 'foofoo'@'fakehost' +master-bin.000001 # Query # # use `test`; DROP USER 'not_exist_user1'@'fakehost', 'barbar'@'fakehost' + + + +TEST STATEMENT: 'RENAME USER $users_list' +-------------------------------------------------------------------------- +CREATE VIEW test.bug48321_v1 AS SELECT user FROM mysql.user +WHERE user LIKE 'bug48321%'; + +TEST STATEMENT: 'RENAME USER $users_list' +CASE 1: +------- +# Only CURRENT_USER() in the user list of the test statement. +users_list= CURRENT_USER() TO 'bug48321_4'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +RENAME USER CURRENT_USER() TO 'bug48321_4'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'RENAME USER $users_list' +CASE 2: +------- +# Two users are in the test statement, CURRENT_USER is the first one. +users_list= CURRENT_USER() TO 'bug48321_4'@'localhost', 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +RENAME USER CURRENT_USER() TO 'bug48321_4'@'localhost', 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'RENAME USER $users_list' +CASE 3: +------- +# Two users are in the test statement, CURRENT_USER is the last one. +users_list= 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost', CURRENT_USER() TO 'bug48321_4'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +RENAME USER 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost', CURRENT_USER() TO 'bug48321_4'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'RENAME USER $users_list' +CASE 4: +------- +# Three users are in the test statement, CURRENT_USER is the second one. +users_list= 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost', CURRENT_USER() TO 'bug48321_4'@'localhost', 'bug48321_3'@'localhost' TO 'bug48321_6'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +RENAME USER 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost', CURRENT_USER() TO 'bug48321_4'@'localhost', 'bug48321_3'@'localhost' TO 'bug48321_6'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'RENAME USER $users_list' +CASE 5: +------- +# CURRENT_USER is not in the test statement. +users_list= 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost', 'bug48321_3'@'localhost' TO 'bug48321_6'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +RENAME USER 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost', 'bug48321_3'@'localhost' TO 'bug48321_6'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; +DROP VIEW test.bug48321_v1; + + + +TEST STATEMENT: 'DROP USER $users_list' +-------------------------------------------------------------------------- +CREATE VIEW test.bug48321_v1 AS SELECT user FROM mysql.user +WHERE user LIKE 'bug48321%'; + +TEST STATEMENT: 'DROP USER $users_list' +CASE 1: +------- +# Only CURRENT_USER() in the user list of the test statement. +users_list= CURRENT_USER() + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +DROP USER CURRENT_USER(); + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'DROP USER $users_list' +CASE 2: +------- +# Two users are in the test statement, CURRENT_USER is the first one. +users_list= CURRENT_USER(), 'bug48321_2'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +DROP USER CURRENT_USER(), 'bug48321_2'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'DROP USER $users_list' +CASE 3: +------- +# Two users are in the test statement, CURRENT_USER is the last one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +DROP USER 'bug48321_2'@'localhost', CURRENT_USER(); + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'DROP USER $users_list' +CASE 4: +------- +# Three users are in the test statement, CURRENT_USER is the second one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +DROP USER 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'DROP USER $users_list' +CASE 5: +------- +# CURRENT_USER is not in the test statement. +users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +DROP USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; +DROP VIEW test.bug48321_v1; +DROP PROCEDURE IF EXISTS f1; +CREATE PROCEDURE p1() SELECT 1; + + + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list' +-------------------------------------------------------------------------- +CREATE VIEW test.bug48321_v1 AS SELECT user, Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv +FROM mysql.user WHERE user LIKE 'bug48321%'; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list' +CASE 1: +------- +# Only CURRENT_USER() in the user list of the test statement. +users_list= CURRENT_USER() + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER(); + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list' +CASE 2: +------- +# Two users are in the test statement, CURRENT_USER is the first one. +users_list= CURRENT_USER(), 'bug48321_2'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER(), 'bug48321_2'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list' +CASE 3: +------- +# Two users are in the test statement, CURRENT_USER is the last one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bug48321_2'@'localhost', CURRENT_USER(); + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list' +CASE 4: +------- +# Three users are in the test statement, CURRENT_USER is the second one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list' +CASE 5: +------- +# CURRENT_USER is not in the test statement. +users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; +DROP VIEW test.bug48321_v1; + + + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list /*With comment*/' +-------------------------------------------------------------------------- +CREATE VIEW test.bug48321_v1 AS SELECT user, Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv +FROM mysql.user WHERE user LIKE 'bug48321%'; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list /*With comment*/' +CASE 1: +------- +# Only CURRENT_USER() in the user list of the test statement. +users_list= CURRENT_USER() + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER() /*With comment*/; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list /*With comment*/' +CASE 2: +------- +# Two users are in the test statement, CURRENT_USER is the first one. +users_list= CURRENT_USER(), 'bug48321_2'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER(), 'bug48321_2'@'localhost' /*With comment*/; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list /*With comment*/' +CASE 3: +------- +# Two users are in the test statement, CURRENT_USER is the last one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bug48321_2'@'localhost', CURRENT_USER() /*With comment*/; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list /*With comment*/' +CASE 4: +------- +# Three users are in the test statement, CURRENT_USER is the second one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' /*With comment*/; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list /*With comment*/' +CASE 5: +------- +# CURRENT_USER is not in the test statement. +users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' /*With comment*/; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; +DROP VIEW test.bug48321_v1; + + + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ $users_list' +-------------------------------------------------------------------------- +CREATE VIEW test.bug48321_v1 AS SELECT user, Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv +FROM mysql.user WHERE user LIKE 'bug48321%'; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ $users_list' +CASE 1: +------- +# Only CURRENT_USER() in the user list of the test statement. +users_list= CURRENT_USER() + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ CURRENT_USER(); + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ $users_list' +CASE 2: +------- +# Two users are in the test statement, CURRENT_USER is the first one. +users_list= CURRENT_USER(), 'bug48321_2'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ CURRENT_USER(), 'bug48321_2'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ $users_list' +CASE 3: +------- +# Two users are in the test statement, CURRENT_USER is the last one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ 'bug48321_2'@'localhost', CURRENT_USER(); + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ $users_list' +CASE 4: +------- +# Three users are in the test statement, CURRENT_USER is the second one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ $users_list' +CASE 5: +------- +# CURRENT_USER is not in the test statement. +users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ 'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; +DROP VIEW test.bug48321_v1; + + + +TEST STATEMENT: 'REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM $users_list' +-------------------------------------------------------------------------- +CREATE VIEW test.bug48321_v1 AS SELECT user, Select_priv, Update_priv, Create_priv, Drop_priv +FROM mysql.user WHERE user LIKE 'bug48321%'; + +TEST STATEMENT: 'REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM $users_list' +CASE 1: +------- +# Only CURRENT_USER() in the user list of the test statement. +users_list= CURRENT_USER() + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM CURRENT_USER(); + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM $users_list' +CASE 2: +------- +# Two users are in the test statement, CURRENT_USER is the first one. +users_list= CURRENT_USER(), 'bug48321_2'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM CURRENT_USER(), 'bug48321_2'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM $users_list' +CASE 3: +------- +# Two users are in the test statement, CURRENT_USER is the last one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM 'bug48321_2'@'localhost', CURRENT_USER(); + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM $users_list' +CASE 4: +------- +# Three users are in the test statement, CURRENT_USER is the second one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM $users_list' +CASE 5: +------- +# CURRENT_USER is not in the test statement. +users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM 'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; +DROP VIEW test.bug48321_v1; + + + +TEST STATEMENT: 'REVOKE CREATE ROUTINE ON *.* FROM $users_list' +-------------------------------------------------------------------------- +CREATE VIEW test.bug48321_v1 AS SELECT user, Create_routine_priv +FROM mysql.user WHERE user LIKE 'bug48321%'; + +TEST STATEMENT: 'REVOKE CREATE ROUTINE ON *.* FROM $users_list' +CASE 1: +------- +# Only CURRENT_USER() in the user list of the test statement. +users_list= CURRENT_USER() + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE CREATE ROUTINE ON *.* FROM CURRENT_USER(); + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE CREATE ROUTINE ON *.* FROM $users_list' +CASE 2: +------- +# Two users are in the test statement, CURRENT_USER is the first one. +users_list= CURRENT_USER(), 'bug48321_2'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE CREATE ROUTINE ON *.* FROM CURRENT_USER(), 'bug48321_2'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE CREATE ROUTINE ON *.* FROM $users_list' +CASE 3: +------- +# Two users are in the test statement, CURRENT_USER is the last one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE CREATE ROUTINE ON *.* FROM 'bug48321_2'@'localhost', CURRENT_USER(); + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE CREATE ROUTINE ON *.* FROM $users_list' +CASE 4: +------- +# Three users are in the test statement, CURRENT_USER is the second one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE CREATE ROUTINE ON *.* FROM 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE CREATE ROUTINE ON *.* FROM $users_list' +CASE 5: +------- +# CURRENT_USER is not in the test statement. +users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE CREATE ROUTINE ON *.* FROM 'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; +DROP VIEW test.bug48321_v1; + + + +TEST STATEMENT: 'REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM $users_list' +-------------------------------------------------------------------------- +CREATE VIEW test.bug48321_v1 AS SELECT user, Routine_name, Proc_priv +FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; + +TEST STATEMENT: 'REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM $users_list' +CASE 1: +------- +# Only CURRENT_USER() in the user list of the test statement. +users_list= CURRENT_USER() + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM CURRENT_USER(); + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM $users_list' +CASE 2: +------- +# Two users are in the test statement, CURRENT_USER is the first one. +users_list= CURRENT_USER(), 'bug48321_2'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM CURRENT_USER(), 'bug48321_2'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM $users_list' +CASE 3: +------- +# Two users are in the test statement, CURRENT_USER is the last one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM 'bug48321_2'@'localhost', CURRENT_USER(); + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM $users_list' +CASE 4: +------- +# Three users are in the test statement, CURRENT_USER is the second one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM $users_list' +CASE 5: +------- +# CURRENT_USER is not in the test statement. +users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +# Grant some privileges to users at first when testing +# 'REVOKE ...' statement. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', +'bug48321_3'@'localhost' WITH GRANT OPTION; +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', +'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM 'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; +DROP VIEW test.bug48321_v1; + + + +TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list WITH GRANT OPTION' +-------------------------------------------------------------------------- +CREATE VIEW test.bug48321_v1 AS SELECT user, Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv, Password +FROM mysql.user WHERE user LIKE 'bug48321%'; + +TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list WITH GRANT OPTION' +CASE 1: +------- +# Only CURRENT_USER() in the user list of the test statement. +users_list= CURRENT_USER() IDENTIFIED BY 'user1' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() IDENTIFIED BY 'user1' WITH GRANT OPTION; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list WITH GRANT OPTION' +CASE 2: +------- +# Two users are in the test statement, CURRENT_USER is the first one. +users_list= CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost' WITH GRANT OPTION; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list WITH GRANT OPTION' +CASE 3: +------- +# Two users are in the test statement, CURRENT_USER is the last one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1' WITH GRANT OPTION; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list WITH GRANT OPTION' +CASE 4: +------- +# Three users are in the test statement, CURRENT_USER is the second one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY '' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY '' WITH GRANT OPTION; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list WITH GRANT OPTION' +CASE 5: +------- +# CURRENT_USER is not in the test statement. +users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY '' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY '' WITH GRANT OPTION; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; +DROP VIEW test.bug48321_v1; + + + +TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list /* With Comment */ WITH GRANT OPTION' +-------------------------------------------------------------------------- +CREATE VIEW test.bug48321_v1 AS SELECT user, Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv, Password +FROM mysql.user WHERE user LIKE 'bug48321%'; + +TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list /* With Comment */ WITH GRANT OPTION' +CASE 1: +------- +# Only CURRENT_USER() in the user list of the test statement. +users_list= CURRENT_USER() IDENTIFIED BY 'user1' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() IDENTIFIED BY 'user1' /* With Comment */ WITH GRANT OPTION; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list /* With Comment */ WITH GRANT OPTION' +CASE 2: +------- +# Two users are in the test statement, CURRENT_USER is the first one. +users_list= CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost' /* With Comment */ WITH GRANT OPTION; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list /* With Comment */ WITH GRANT OPTION' +CASE 3: +------- +# Two users are in the test statement, CURRENT_USER is the last one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1' /* With Comment */ WITH GRANT OPTION; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list /* With Comment */ WITH GRANT OPTION' +CASE 4: +------- +# Three users are in the test statement, CURRENT_USER is the second one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY '' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY '' /* With Comment */ WITH GRANT OPTION; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list /* With Comment */ WITH GRANT OPTION' +CASE 5: +------- +# CURRENT_USER is not in the test statement. +users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY '' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY '' /* With Comment */ WITH GRANT OPTION; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; +DROP VIEW test.bug48321_v1; + + + +TEST STATEMENT: 'GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO $users_list' +-------------------------------------------------------------------------- +CREATE VIEW test.bug48321_v1 AS SELECT user, Select_priv, Update_priv, Create_priv, Drop_priv, Password +FROM mysql.user WHERE user LIKE 'bug48321%'; + +TEST STATEMENT: 'GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO $users_list' +CASE 1: +------- +# Only CURRENT_USER() in the user list of the test statement. +users_list= CURRENT_USER() IDENTIFIED BY 'user1' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO CURRENT_USER() IDENTIFIED BY 'user1'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO $users_list' +CASE 2: +------- +# Two users are in the test statement, CURRENT_USER is the first one. +users_list= CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO $users_list' +CASE 3: +------- +# Two users are in the test statement, CURRENT_USER is the last one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO $users_list' +CASE 4: +------- +# Three users are in the test statement, CURRENT_USER is the second one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY '' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY ''; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO $users_list' +CASE 5: +------- +# CURRENT_USER is not in the test statement. +users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY '' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY ''; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; +DROP VIEW test.bug48321_v1; + + + +TEST STATEMENT: 'GRANT CREATE ROUTINE ON *.* TO $users_list' +-------------------------------------------------------------------------- +CREATE VIEW test.bug48321_v1 AS SELECT user, Create_routine_priv +FROM mysql.user WHERE user LIKE 'bug48321%'; + +TEST STATEMENT: 'GRANT CREATE ROUTINE ON *.* TO $users_list' +CASE 1: +------- +# Only CURRENT_USER() in the user list of the test statement. +users_list= CURRENT_USER() IDENTIFIED BY 'user1' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT CREATE ROUTINE ON *.* TO CURRENT_USER() IDENTIFIED BY 'user1'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT CREATE ROUTINE ON *.* TO $users_list' +CASE 2: +------- +# Two users are in the test statement, CURRENT_USER is the first one. +users_list= CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT CREATE ROUTINE ON *.* TO CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT CREATE ROUTINE ON *.* TO $users_list' +CASE 3: +------- +# Two users are in the test statement, CURRENT_USER is the last one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT CREATE ROUTINE ON *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT CREATE ROUTINE ON *.* TO $users_list' +CASE 4: +------- +# Three users are in the test statement, CURRENT_USER is the second one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY '' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT CREATE ROUTINE ON *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY ''; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT CREATE ROUTINE ON *.* TO $users_list' +CASE 5: +------- +# CURRENT_USER is not in the test statement. +users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY '' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT CREATE ROUTINE ON *.* TO 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY ''; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; +DROP VIEW test.bug48321_v1; +DROP PROCEDURE p1; + + + +TEST STATEMENT: 'GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO $users_list' +-------------------------------------------------------------------------- +CREATE VIEW test.bug48321_v1 AS SELECT user, Routine_name, Proc_priv +FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; + +TEST STATEMENT: 'GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO $users_list' +CASE 1: +------- +# Only CURRENT_USER() in the user list of the test statement. +users_list= CURRENT_USER() IDENTIFIED BY 'user1' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO CURRENT_USER() IDENTIFIED BY 'user1'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO $users_list' +CASE 2: +------- +# Two users are in the test statement, CURRENT_USER is the first one. +users_list= CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO $users_list' +CASE 3: +------- +# Two users are in the test statement, CURRENT_USER is the last one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1'; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO $users_list' +CASE 4: +------- +# Three users are in the test statement, CURRENT_USER is the second one. +users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY '' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY ''; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; + +TEST STATEMENT: 'GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO $users_list' +CASE 5: +------- +# CURRENT_USER is not in the test statement. +users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY '' + +# Connect to master with user1, so user1 always is the current user, +# when test statement is runing. +GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' + WITH GRANT OPTION; +CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' + IDENTIFIED BY 'user3'; + +GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY ''; + +Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 + +# Delete all bug48321% users +DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; +DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; +FLUSH PRIVILEGES; +DROP VIEW test.bug48321_v1; diff --git a/mysql-test/suite/rpl/t/rpl_binlog_grant.test b/mysql-test/suite/rpl/t/rpl_binlog_grant.test index 31163927ce2..64f4e8b2eeb 100644 --- a/mysql-test/suite/rpl/t/rpl_binlog_grant.test +++ b/mysql-test/suite/rpl/t/rpl_binlog_grant.test @@ -25,9 +25,7 @@ grant select on t to x@y; # rollback; show grants for x@y; ---replace_result $VERSION VERSION ---replace_regex /\/\* xid=.* \*\//\/* XID *\// -show binlog events; +--source include/show_binlog_events.inc start transaction; insert into t values (2); revoke select on t from x@y; @@ -37,9 +35,7 @@ revoke select on t from x@y; commit; select * from t; show grants for x@y; ---replace_result $VERSION VERSION ---replace_regex /\/\* xid=.* \*\//\/* XID *\// -show binlog events; +--source include/show_binlog_events.inc drop user x@y; drop database d1; --sync_slave_with_master diff --git a/mysql-test/suite/rpl/t/rpl_events.test b/mysql-test/suite/rpl/t/rpl_events.test index 7720ad6658c..25976f779e3 100644 --- a/mysql-test/suite/rpl/t/rpl_events.test +++ b/mysql-test/suite/rpl/t/rpl_events.test @@ -105,3 +105,85 @@ DROP EVENT event44331_2; DROP EVENT event44331_3; DROP EVENT event44331_4; sync_slave_with_master; + +# +# BUG#48321 +# This test verifies if the definer is consistent between master and slave, +# when the event is created or altered with the DEFINER clause that the +# DEFINER is set to CURRENT_USER() +# +connection master; +--disable_warnings +DROP VIEW IF EXISTS events_view; +DROP EVENT IF EXISTS event48321_1; +DROP EVENT IF EXISTS event48321_2; +DROP EVENT IF EXISTS event48321_3; +DROP EVENT IF EXISTS event48321_4; +--enable_warnings + +CREATE VIEW events_view AS + SELECT EVENT_SCHEMA, EVENT_NAME, DEFINER FROM INFORMATION_SCHEMA.EVENTS + WHERE EVENT_NAME LIKE 'event48321%'; +let $diff_table_1= master:test.events_view; +let $diff_table_2= slave:test.events_view; + +CREATE DEFINER=CURRENT_USER() /*!50000 EVENT event48321_1 */ + ON SCHEDULE AT CURRENT_TIMESTAMP + ON COMPLETION PRESERVE DISABLE + DO SELECT 48321 as BUG; + +CREATE DEFINER=CURRENT_USER() EVENT event48321_2 + ON SCHEDULE AT CURRENT_TIMESTAMP + ON COMPLETION PRESERVE DISABLE + DO SELECT 48321 as BUG; + +CREATE /*!50000 DEFINER=CURRENT_USER() */ EVENT event48321_3 + ON SCHEDULE AT CURRENT_TIMESTAMP + ON COMPLETION PRESERVE DISABLE + DO SELECT 48321 as BUG; +sync_slave_with_master; + +--source include/diff_tables.inc + +connection master; +ALTER DEFINER=CURRENT_USER() EVENT event48321_1 RENAME TO event48321_4; + +ALTER DEFINER=CURRENT_USER() EVENT event48321_2 + ON SCHEDULE AT CURRENT_TIMESTAMP + ON COMPLETION PRESERVE DISABLE + DO SELECT 48321 as BUG; + +ALTER /*!50000 DEFINER=CURRENT_USER() */ EVENT event48321_3 + ON SCHEDULE AT CURRENT_TIMESTAMP + ON COMPLETION PRESERVE DISABLE + DO SELECT 48321 as BUG; +sync_slave_with_master; + +--source include/diff_tables.inc + +# Two statements in on query +connection master; +DELIMITER |; +ALTER /*!50000 DEFINER=CURRENT_USER() */ EVENT event48321_3 + ON SCHEDULE AT CURRENT_TIMESTAMP + ON COMPLETION PRESERVE DISABLE + DO SELECT 48321 as BUG; ALTER EVENT event48321_2 ENABLE | +DELIMITER ;| +sync_slave_with_master; + +--source include/diff_tables.inc + +#No Event boday +connection master; +ALTER EVENT event48321_3 ENABLE; +sync_slave_with_master; + +--source include/diff_tables.inc + +connection master; +DROP EVENT event48321_4; +DROP EVENT event48321_2; +DROP EVENT event48321_3; +DROP VIEW events_view; +--source include/master-slave-end.inc + diff --git a/mysql-test/suite/rpl/t/rpl_user.test b/mysql-test/suite/rpl/t/rpl_user.test index b8fe41d03c4..2adb822839a 100644 --- a/mysql-test/suite/rpl/t/rpl_user.test +++ b/mysql-test/suite/rpl/t/rpl_user.test @@ -54,8 +54,85 @@ drop user 'not_exist_user1'@'fakehost', 'not_exist_user2'@'fakehost'; sync_slave_with_master; select Host,User from mysql.user where Host='fakehost'; -# -# show the binlog events on the master -# connection master; source include/show_binlog_events.inc; + +# +# BUG#48321 +# +let $action= RENAME; +let $statement= RENAME USER \$users_list; +source extra/rpl_tests/rpl_current_user.test; + +let $action= DROP; +let $statement= DROP USER \$users_list; +source extra/rpl_tests/rpl_current_user.test; + +--disable_warnings +DROP PROCEDURE IF EXISTS f1; +--enable_warnings +CREATE PROCEDURE p1() SELECT 1; +#REVOKE ALL PRIVILEGES +let $action= REVOKE; +let $diff_columns= Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv; +let $statement= REVOKE ALL PRIVILEGES, GRANT OPTION FROM \$users_list; +source extra/rpl_tests/rpl_current_user.test; + +#REVOKE ALL PRIVILEGES with comment +let $action= REVOKE; +let $diff_columns= Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv; +let $statement= REVOKE ALL PRIVILEGES, GRANT OPTION FROM \$users_list /*With comment*/; +source extra/rpl_tests/rpl_current_user.test; + +#REVOKE ALL PRIVILEGES with comment +let $action= REVOKE; +let $diff_columns= Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv; +let $statement= REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ \$users_list; +source extra/rpl_tests/rpl_current_user.test; + +let $diff_columns= Select_priv, Update_priv, Create_priv, Drop_priv; +#REVOKE ON TABLE +let $statement= REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM \$users_list; +source extra/rpl_tests/rpl_current_user.test; + +#REVOKE ON CREATE ROUTINE +let $diff_columns= Create_routine_priv; +let $statement= REVOKE CREATE ROUTINE ON *.* FROM \$users_list; +source extra/rpl_tests/rpl_current_user.test; + +#REVOKE ON ROUTINE +let $diff_table= mysql.procs_priv; +let $diff_columns= Routine_name, Proc_priv; +let $statement= REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM \$users_list; +source extra/rpl_tests/rpl_current_user.test; + +let $diff_table= mysql.user; +#GRANT ALL PRIVILEGES +let $action= GRANT; +let $diff_columns= Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv, Password; +let $statement= GRANT ALL PRIVILEGES ON *.* TO \$users_list WITH GRANT OPTION; +source extra/rpl_tests/rpl_current_user.test; + +#GRANT ALL PRIVILEGES with comment +let $action= GRANT; +let $diff_columns= Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv, Password; +let $statement= GRANT ALL PRIVILEGES ON *.* TO \$users_list /* With Comment */ WITH GRANT OPTION; +source extra/rpl_tests/rpl_current_user.test; + +#GRANT ON TABLE +let $diff_columns= Select_priv, Update_priv, Create_priv, Drop_priv, Password; +let $statement= GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO \$users_list; +source extra/rpl_tests/rpl_current_user.test; + +#GRANT ON CREATE ROUTINE +let $diff_columns= Create_routine_priv; +let $statement= GRANT CREATE ROUTINE ON *.* TO \$users_list; +source extra/rpl_tests/rpl_current_user.test; + +#GRANT ON ROUTINE +let $diff_table= mysql.procs_priv; +let $diff_columns= Routine_name, Proc_priv; +let $statement= GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO \$users_list; + +DROP PROCEDURE p1; +source extra/rpl_tests/rpl_current_user.test; diff --git a/sql/events.cc b/sql/events.cc index 4c6dd0f35d1..6c8bdb1ea0f 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -341,31 +341,48 @@ common_1_lev_code: } -/** - Create a new query string for removing executable comments - for avoiding leak and keeping consistency of the execution - on master and slave. - +/* + Binlog '{CREATE|ALTER} EVENT' statements. + Definer part is always rewritten, for definer can be CURRENT_USER() function. + @param[in] thd Thread handler - @param[in] buf Query string + @param[in] create CREATE or ALTER statement @return - 0 ok - 1 error + FASE ok + TRUE error */ -static int -create_query_string(THD *thd, String *buf) +static bool event_write_bin_log(THD *thd, bool create) { - /* Append the "CREATE" part of the query */ - if (buf->append(STRING_WITH_LEN("CREATE "))) - return 1; - /* Append definer */ - append_definer(thd, buf, &(thd->lex->definer->user), &(thd->lex->definer->host)); + String log_query; + if (create) + { + /* Append the "CREATE" part of the query */ + if (log_query.append(STRING_WITH_LEN("CREATE "))) + return TRUE; + } + else + { + /* Append the "ALETR " part of the query */ + if (log_query.append(STRING_WITH_LEN("ALTER "))) + return TRUE; + } + + /* Append definer + If the definer is not set or set to CURRENT_USER, the value of CURRENT_USER + will be written into the binary log as the definer for the SQL thread. + */ + append_definer(thd, &log_query, &(thd->lex->definer->user), + &(thd->lex->definer->host)); + /* Append the left part of thd->query after "DEFINER" part */ - if (buf->append(thd->lex->stmt_definition_begin)) - return 1; - - return 0; + if (log_query.append(thd->lex->stmt_definition_begin, + thd->lex->stmt_definition_end - + thd->lex->stmt_definition_begin)) + return TRUE; + + return write_bin_log(thd, TRUE, log_query.c_ptr_safe(), log_query.length()) + != 0; } /** @@ -380,8 +397,7 @@ create_query_string(THD *thd, String *buf) @sa Events::drop_event for the notes about locking, pre-locking and Events DDL. - @retval FALSE OK - @retval TRUE Error (reported) + @retval FALSE OK @retval TRUE Error (reported) */ bool @@ -465,22 +481,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, binlog the create event unless it's been successfully dropped */ if (!dropped) - { - /* Binlog the create event. */ - DBUG_ASSERT(thd->query() && thd->query_length()); - String log_query; - if (create_query_string(thd, &log_query)) - { - sql_print_error("Event Error: An error occurred while creating query string, " - "before writing it into binary log."); - /* Restore the state of binlog format */ - thd->current_stmt_binlog_row_based= save_binlog_row_based; - DBUG_RETURN(TRUE); - } - /* If the definer is not set or set to CURRENT_USER, the value of CURRENT_USER - will be written into the binary log as the definer for the SQL thread. */ - ret= write_bin_log(thd, TRUE, log_query.c_ptr(), log_query.length()); - } + ret= event_write_bin_log(thd, TRUE); } pthread_mutex_unlock(&LOCK_event_metadata); /* Restore the state of binlog format */ @@ -602,9 +603,7 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, if (event_queue) event_queue->update_event(thd, parse_data->dbname, parse_data->name, new_element); - /* Binlog the alter event. */ - DBUG_ASSERT(thd->query() && thd->query_length()); - ret= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + ret= event_write_bin_log(thd, FALSE); } } pthread_mutex_unlock(&LOCK_event_metadata); diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index a8828d15cae..70983f69746 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -194,6 +194,7 @@ static bool compare_hostname(const acl_host_and_ip *host,const char *hostname, const char *ip); static my_bool acl_load(THD *thd, TABLE_LIST *tables); static my_bool grant_load(THD *thd, TABLE_LIST *tables); +static bool acl_write_bin_log(THD *thd, List &list, bool clear_error); /* Convert scrambled password to binary form, according to scramble type, @@ -3225,7 +3226,8 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, if (!result) /* success */ { - result= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + if (acl_write_bin_log(thd, user_list, TRUE)) + result= -1; } rw_unlock(&LOCK_grant); @@ -3401,8 +3403,7 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, if (write_to_binlog) { - if (write_bin_log(thd, FALSE, thd->query(), thd->query_length())) - result= TRUE; + result|= acl_write_bin_log(thd, user_list, FALSE); } rw_unlock(&LOCK_grant); @@ -3531,7 +3532,7 @@ bool mysql_grant(THD *thd, const char *db, List &list, if (!result) { - result= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + result= acl_write_bin_log(thd, list, TRUE); } rw_unlock(&LOCK_grant); @@ -5663,9 +5664,9 @@ static int handle_grant_data(TABLE_LIST *tables, bool drop, } -static void append_user(String *str, LEX_USER *user) +static void append_user(String *str, LEX_USER *user, bool comma= TRUE) { - if (str->length()) + if (comma && str->length()) str->append(','); str->append('\''); str->append(user->user.str); @@ -5674,6 +5675,65 @@ static void append_user(String *str, LEX_USER *user) str->append('\''); } +/* + The operations(DROP, RENAME, REVOKE, GRANT) will cause inconsistency between + master and slave, when CURRENT_USER() is used. To solve this problem, we + construct a new binlog statement in which CURRENT_USER() is replaced by + the real user name and host name. + */ +static bool acl_write_bin_log(THD *thd, List &list, bool clear_error) +{ + String log_query; + LEX *lex= thd->lex; + List_iterator user_list(list); + LEX_USER *user, *tmp_user; + + if (!mysql_bin_log.is_open()) + return FALSE; + + if (log_query.append(lex->stmt_begin, lex->stmt_user_begin - lex->stmt_begin)) + return TRUE; + while ((tmp_user= user_list++)) + { + if (!(user= get_current_user(thd, tmp_user))) + continue; + + /* + No User, but a password? + They did GRANT ... TO CURRENT_USER() IDENTIFIED BY ... ! + Get the current user, and shallow-copy the new password to them! + */ + if (!tmp_user->user.str && tmp_user->password.str) + user->password= tmp_user->password; + + if (log_query.append(" ", 1)) + return TRUE; + append_user(&log_query, user, FALSE); + /* Only 'GRANT' have password */ + if (user->password.str) + { + if (log_query.append(STRING_WITH_LEN(" IDENTIFIED BY ")) || + log_query.append(STRING_WITH_LEN("PASSWORD ")) || + log_query.append("'", 1) || + log_query.append(user->password.str, + user->password.length) || + log_query.append("'", 1)) + return TRUE; + } + if (log_query.append(",", 1)) + return TRUE; + } + /* It is binlogged only when at least one user is in the query */ + if (log_query.c_ptr()[log_query.length()-1] == ',') + { + log_query.length(log_query.length()-1); + if (log_query.append(lex->stmt_user_end, lex->stmt_end - lex->stmt_user_end)) + return TRUE; + return write_bin_log(thd, clear_error, log_query.c_ptr_safe(), + log_query.length()) != 0; + } + return FALSE; +} /* Create a list of users. @@ -5780,6 +5840,7 @@ bool mysql_drop_user(THD *thd, List &list) { int result; String wrong_users; + String log_query; LEX_USER *user_name, *tmp_user_name; List_iterator user_list(list); TABLE_LIST tables[GRANT_TABLES]; @@ -5809,6 +5870,7 @@ bool mysql_drop_user(THD *thd, List &list) rw_wrlock(&LOCK_grant); VOID(pthread_mutex_lock(&acl_cache->lock)); + log_query.append(STRING_WITH_LEN("DROP USER")); while ((tmp_user_name= user_list++)) { if (!(user_name= get_current_user(thd, tmp_user_name))) @@ -5816,6 +5878,17 @@ bool mysql_drop_user(THD *thd, List &list) result= TRUE; continue; } + + /* + The operation will cause inconsistency between master and slave, when + CURRENT_USER() is used. To solve this problem, we construct a new + binlog statement in which CURRENT_USER() is replaced by the real user + name and host name. + */ + log_query.append(STRING_WITH_LEN(" ")); + append_user(&log_query, user_name, FALSE); + log_query.append(STRING_WITH_LEN(",")); + if (handle_grant_data(tables, 1, user_name, NULL) <= 0) { append_user(&wrong_users, user_name); @@ -5834,7 +5907,13 @@ bool mysql_drop_user(THD *thd, List &list) my_error(ER_CANNOT_USER, MYF(0), "DROP USER", wrong_users.c_ptr_safe()); if (some_users_deleted) - result |= write_bin_log(thd, FALSE, thd->query(), thd->query_length()); + { + if (log_query.c_ptr()[log_query.length()-1] == ',') + { + log_query.length(log_query.length()-1); + result|= write_bin_log(thd, FALSE, log_query.c_ptr_safe(), log_query.length()); + } + } rw_unlock(&LOCK_grant); close_thread_tables(thd); @@ -5862,6 +5941,7 @@ bool mysql_rename_user(THD *thd, List &list) { int result; String wrong_users; + String log_query; LEX_USER *user_from, *tmp_user_from; LEX_USER *user_to, *tmp_user_to; List_iterator user_list(list); @@ -5889,6 +5969,7 @@ bool mysql_rename_user(THD *thd, List &list) rw_wrlock(&LOCK_grant); VOID(pthread_mutex_lock(&acl_cache->lock)); + log_query.append(STRING_WITH_LEN("RENAME USER")); while ((tmp_user_from= user_list++)) { if (!(user_from= get_current_user(thd, tmp_user_from))) @@ -5904,6 +5985,18 @@ bool mysql_rename_user(THD *thd, List &list) } DBUG_ASSERT(user_to != 0); /* Syntax enforces pairs of users. */ + /* + The operation will cause inconsistency between master and slave, when + CURRENT_USER() is used. To solve this problem, we construct a new + binlog statement in which CURRENT_USER() is replaced by the real user + name and host name. + */ + log_query.append(STRING_WITH_LEN(" ")); + append_user(&log_query, user_from, FALSE); + log_query.append(STRING_WITH_LEN(" TO ")); + append_user(&log_query, user_to, FALSE); + log_query.append(STRING_WITH_LEN(",")); + /* Search all in-memory structures and grant tables for a mention of the new user name. @@ -5925,9 +6018,15 @@ bool mysql_rename_user(THD *thd, List &list) if (result) my_error(ER_CANNOT_USER, MYF(0), "RENAME USER", wrong_users.c_ptr_safe()); - - if (some_users_renamed && mysql_bin_log.is_open()) - result |= write_bin_log(thd, FALSE, thd->query(), thd->query_length()); + + if (some_users_renamed) + { + if (log_query.c_ptr()[log_query.length()-1] == ',') + { + log_query.length(log_query.length()-1); + result|= write_bin_log(thd, FALSE, log_query.c_ptr_safe(), log_query.length()); + } + } rw_unlock(&LOCK_grant); close_thread_tables(thd); @@ -6117,8 +6216,9 @@ bool mysql_revoke_all(THD *thd, List &list) VOID(pthread_mutex_unlock(&acl_cache->lock)); - int binlog_error= - write_bin_log(thd, FALSE, thd->query(), thd->query_length()); + int binlog_error= 0; + if (acl_write_bin_log(thd, list, FALSE)) + binlog_error= 1; rw_unlock(&LOCK_grant); close_thread_tables(thd); diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 4e4794ef2cf..99f5257eb5e 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -1727,6 +1727,8 @@ typedef struct st_lex : public Query_tables_list - CREATE TRIGGER (points to "TRIGGER"); - CREATE PROCEDURE (points to "PROCEDURE"); - CREATE FUNCTION (points to "FUNCTION" or "AGGREGATE"); + - CREATE VIEW(points to "VIEW"); + - CREATE EVENT(points to "EVENT"); This pointer is required to add possibly omitted DEFINER-clause to the DDL-statement before dumping it to the binlog. @@ -1735,6 +1737,29 @@ typedef struct st_lex : public Query_tables_list const char *stmt_definition_end; + /* + stmt_begin is intended to point to the begin of every statement. + It is now used in the following statements: + - GRANT ALL PRIVELEGES ON *.* (points to "GRANT"); + - REVOKE ALL PRIVELEGES ON *.* (points to "REVOKE"); + */ + const char *stmt_begin; + const char *stmt_end; + + /* + stmt_user_begin is intended to point to the begin of the user list in + the following statements: + - GRANT ALL PRIVELEGES ON *.* TO 'username'@'hostname' + (points to "'username'"); + - REVOKE ALL PRIVELEGES ON *.* FROM 'username'@'hostname' + (points to "'username'"); + + these pointers are required to replace the CURRENT_USER() + function by the real user before dumping it to the binlog. + */ + const char *stmt_user_begin; + const char *stmt_user_end; + /** During name resolution search only in the table list given by Name_resolution_context::first_name_resolution_table and diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 8dc08f8425f..92c4de5b462 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1562,7 +1562,11 @@ opt_end_of_input: ; verb_clause: - statement + remember_name statement remember_end + { + Lex->stmt_begin= $1; + Lex->stmt_end= $3; + } | begin ; @@ -5743,7 +5747,7 @@ alter: } view_tail {} - | ALTER definer_opt EVENT_SYM sp_name + | ALTER definer_opt remember_name EVENT_SYM sp_name { /* It is safe to use Lex->spname because @@ -5755,7 +5759,8 @@ alter: if (!(Lex->event_parse_data= Event_parse_data::new_instance(YYTHD))) MYSQL_YYABORT; - Lex->event_parse_data->identifier= $4; + Lex->event_parse_data->identifier= $5; + Lex->stmt_definition_begin= $3; Lex->sql_command= SQLCOM_ALTER_EVENT; } @@ -5765,7 +5770,7 @@ alter: opt_ev_comment opt_ev_sql_stmt { - if (!($6 || $7 || $8 || $9 || $10)) + if (!($7 || $8 || $9 || $10 || $11)) { my_parse_error(ER(ER_SYNTAX_ERROR)); MYSQL_YYABORT; @@ -5826,7 +5831,16 @@ opt_ev_rename_to: ; opt_ev_sql_stmt: - /* empty*/ { $$= 0;} + /* empty*/ + { + $$= 0; + /* + Lex->sp_head is not initialized when event body is empty. + So we can not use Lex->sp_head->set_stmt_end() to set + stmt_definition_end. + */ + Lex->stmt_definition_end= (char*) YYLIP->get_cpp_tok_end(); + } | DO_SYM ev_sql_stmt { $$= 1; } ; @@ -11516,6 +11530,7 @@ user: $$->user = $1; $$->host.str= (char *) "%"; $$->host.length= 1; + Lex->stmt_user_end= YYLIP->get_cpp_ptr(); if (check_string_char_length(&$$->user, ER(ER_USERNAME), USERNAME_CHAR_LENGTH, @@ -11528,6 +11543,7 @@ user: if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) MYSQL_YYABORT; $$->user = $1; $$->host=$3; + Lex->stmt_user_end= YYLIP->get_cpp_ptr(); if (check_string_char_length(&$$->user, ER(ER_USERNAME), USERNAME_CHAR_LENGTH, @@ -11537,6 +11553,7 @@ user: } | CURRENT_USER optional_braces { + Lex->stmt_user_end= YYLIP->get_cpp_ptr(); if (!($$=(LEX_USER*) YYTHD->alloc(sizeof(st_lex_user)))) MYSQL_YYABORT; /* @@ -12727,9 +12744,10 @@ user_list: ; grant_list: + { Lex->stmt_user_begin= YYLIP->get_cpp_ptr(); } grant_user { - if (Lex->users_list.push_back($1)) + if (Lex->users_list.push_back($2)) MYSQL_YYABORT; } | grant_list ',' grant_user @@ -12742,6 +12760,7 @@ grant_list: grant_user: user IDENTIFIED_SYM BY TEXT_STRING { + Lex->stmt_user_end= YYLIP->get_cpp_ptr(); $$=$1; $1->password=$4; if ($4.length) { @@ -12768,7 +12787,10 @@ grant_user: } } | user IDENTIFIED_SYM BY PASSWORD TEXT_STRING - { $$= $1; $1->password= $5; } + { + Lex->stmt_user_end= YYLIP->get_cpp_ptr(); + $$= $1; $1->password= $5; + } | user { $$= $1; $1->password= null_lex_str; } ; From 5a57e6bb45eb548a961cab2e9ca2f6b45430ffc8 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Sun, 31 Jan 2010 00:08:20 +0300 Subject: [PATCH 109/132] Fix Windows build failure (after manual merge from 5.1-bugteam). --- sql/sql_select.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index f8ebc0492a6..5598cc29a01 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -553,7 +553,7 @@ JOIN::prepare(Item ***rref_pointer_array, there. Such fields don't contain any data to sort. */ if (!real_order && - (item->type() != Item::Item::FIELD_ITEM || + (item->type() != Item::FIELD_ITEM || ((Item_field *) item)->field->maybe_null() || ((Item_field *) item)->field->sort_length())) real_order= TRUE; From d11db72503d0c1d1abb9c9dfa8b2c267da178e9f Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Sun, 31 Jan 2010 01:11:28 +0300 Subject: [PATCH 110/132] Add libmysqld/sql_audit.cc to .bzrignore. --- .bzrignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.bzrignore b/.bzrignore index 87d108ff1f4..4135a11bb3c 100644 --- a/.bzrignore +++ b/.bzrignore @@ -3075,3 +3075,4 @@ dbug/tests libmysqld/sys_vars.cc libmysqld/keycaches.cc client/dtoa.c +libmysqld/sql_audit.cc From daec25c11d73e87c0f05b0d4d6cbd18a812d1995 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Sun, 31 Jan 2010 14:38:55 +0300 Subject: [PATCH 111/132] Mark some tests experimental. --- mysql-test/collections/default.experimental | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index b989491c193..4460262cfa8 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -21,7 +21,9 @@ rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails spora rpl.rpl_innodb_bug28430* # Bug#46029 rpl.rpl_innodb_bug30888* @solaris # Bug#47646 2009-09-25 alik rpl.rpl_innodb_bug30888 fails sporadically on Solaris rpl.rpl_plugin_load* @solaris # Bug#47146 +rpl.rpl_row_sp011* @solaris # Bug#47791 2010-01-31 alik Several test cases fail on Solaris with error Thread stack overrun rpl.rpl_slave_load_remove_tmpfile @windows # Bug#50474 2010-01-28 alik rpl_slave_load_remove_tmpfile failed on windows debug enabled binary +rpl.rpl_sync* @windows # Bug#50473 2010-01-31 alik rpl_sync fails on windows debug enabled binaries rpl.rpl_timezone* # Bug#47017 2009-10-27 alik rpl_timezone fails on PB-2 with mismatch error # Declare all NDB-tests in ndb and rpl_ndb test suites experimental. From 31ca1544a3f3f52bfeab7005aa8b392a49bce047 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Sun, 31 Jan 2010 14:43:32 +0300 Subject: [PATCH 112/132] Update test result file. --- mysql-test/r/mysqld--help-win.result | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mysql-test/r/mysqld--help-win.result b/mysql-test/r/mysqld--help-win.result index 7e261fc203c..e7048c71a48 100644 --- a/mysql-test/r/mysqld--help-win.result +++ b/mysql-test/r/mysqld--help-win.result @@ -37,6 +37,14 @@ The following options may be given as the first argument: binary log during a transaction. If you often use big, multi-statement transactions you can increase this to get more performance + --binlog-direct-non-transactional-updates + Causes updates to non-transactional engines using + statement format to be written directly to binary log. + Before using this option make sure that there are no + dependencies between transactional and non-transactional + tables such as in the statement INSERT INTO t_myisam + SELECT * FROM t_innodb; otherwise, slaves may diverge + from the master. --binlog-do-db=name Tells the master it should log updates for the specified database, and exclude all others not explicitly mentioned. @@ -772,6 +780,7 @@ back-log 50 big-tables FALSE bind-address (No default value) binlog-cache-size 32768 +binlog-direct-non-transactional-updates FALSE binlog-format STATEMENT binlog-row-event-max-size 1024 blackhole ON From 1ff667c995a1a597615a9fb4820218d48659ae71 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Mon, 1 Feb 2010 13:40:16 +0200 Subject: [PATCH 113/132] fixed a typo in bug #49897. --- sql/sql_select.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 239809f1d4c..eecc2b086a3 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -531,7 +531,7 @@ JOIN::prepare(Item ***rref_pointer_array, there. Such fields don't contain any data to sort. */ if (!real_order && - (item->type() != Item::Item::FIELD_ITEM || + (item->type() != Item::FIELD_ITEM || ((Item_field *) item)->field->maybe_null() || ((Item_field *) item)->field->sort_length())) real_order= TRUE; From 4789e4abb2326757f7c66b5f4b9db493716c3381 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Mon, 1 Feb 2010 15:00:13 +0300 Subject: [PATCH 114/132] Add empty test cases to make sys_vars.all_vars.test pass. --- .../t/binlog_direct_non_transactional_updates_basic_32.test | 0 .../t/binlog_direct_non_transactional_updates_basic_64.test | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic_32.test create mode 100644 mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic_64.test diff --git a/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic_32.test b/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic_32.test new file mode 100644 index 00000000000..e69de29bb2d diff --git a/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic_64.test b/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic_64.test new file mode 100644 index 00000000000..e69de29bb2d From 9b75c2f268f0e40fe74f38759c8f8551b2637145 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Mon, 1 Feb 2010 14:05:21 +0200 Subject: [PATCH 115/132] Made outfile_testdata experimental in 5.1-bugteam, pending the resulution of bug #46895. --- mysql-test/collections/default.experimental | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 9c4055cd19e..d791686cd62 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -14,6 +14,7 @@ funcs_2.ndb_charset # joro : NDB tests marked as experiment main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists main.plugin_load @solaris # Bug#42144 +main.outfile_loaddata @solaris # joro : Bug #46895 ndb.* # joro : NDB tests marked as experimental as agreed with bochklin From c7ee11b0eac7660454b697075154ada3c8e07e7a Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Mon, 1 Feb 2010 23:27:03 +0300 Subject: [PATCH 116/132] Patch for Bug#50766. --- ...ect_non_transactional_updates_basic.result | 69 +++++++++++++++++ ...irect_non_transactional_updates_basic.test | 74 +++++++++++++++++++ ...ct_non_transactional_updates_basic_32.test | 0 ...ct_non_transactional_updates_basic_64.test | 0 4 files changed, 143 insertions(+) create mode 100644 mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_basic.result create mode 100644 mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic.test delete mode 100644 mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic_32.test delete mode 100644 mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic_64.test diff --git a/mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_basic.result b/mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_basic.result new file mode 100644 index 00000000000..834ef99ceec --- /dev/null +++ b/mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_basic.result @@ -0,0 +1,69 @@ +SELECT @@GLOBAL.binlog_direct_non_transactional_updates; +@@GLOBAL.binlog_direct_non_transactional_updates +0 +SET @start_value= @@global.binlog_direct_non_transactional_updates; +SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); +COUNT(@@GLOBAL.binlog_direct_non_transactional_updates) +1 +1 Expected +SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); +COUNT(@@SESSION.binlog_direct_non_transactional_updates) +1 +1 Expected +SET @@GLOBAL.binlog_direct_non_transactional_updates=1; +SELECT @@GLOBAL.binlog_direct_non_transactional_updates; +@@GLOBAL.binlog_direct_non_transactional_updates +1 +SET @@SESSION.binlog_direct_non_transactional_updates=1; +SELECT @@SESSION.binlog_direct_non_transactional_updates; +@@SESSION.binlog_direct_non_transactional_updates +1 +SELECT @@GLOBAL.binlog_direct_non_transactional_updates = UCASE(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +@@GLOBAL.binlog_direct_non_transactional_updates = UCASE(VARIABLE_VALUE) +0 +1 Expected +SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); +COUNT(@@GLOBAL.binlog_direct_non_transactional_updates) +1 +1 Expected +SELECT COUNT(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +COUNT(VARIABLE_VALUE) +1 +1 Expected +SELECT @@SESSION.binlog_direct_non_transactional_updates = UCASE(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.SESSION_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +@@SESSION.binlog_direct_non_transactional_updates = UCASE(VARIABLE_VALUE) +0 +1 Expected +SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); +COUNT(@@SESSION.binlog_direct_non_transactional_updates) +1 +1 Expected +SELECT COUNT(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.SESSION_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +COUNT(VARIABLE_VALUE) +1 +1 Expected +SELECT COUNT(@@binlog_direct_non_transactional_updates); +COUNT(@@binlog_direct_non_transactional_updates) +1 +1 Expected +SELECT COUNT(@@local.binlog_direct_non_transactional_updates); +COUNT(@@local.binlog_direct_non_transactional_updates) +1 +1 Expected +SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); +COUNT(@@SESSION.binlog_direct_non_transactional_updates) +1 +1 Expected +SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); +COUNT(@@GLOBAL.binlog_direct_non_transactional_updates) +1 +1 Expected +SET @@global.binlog_direct_non_transactional_updates= @start_value; diff --git a/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic.test b/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic.test new file mode 100644 index 00000000000..b47119b6621 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic.test @@ -0,0 +1,74 @@ +SELECT @@GLOBAL.binlog_direct_non_transactional_updates; + +#################################################################### +# Displaying default value # +#################################################################### +SET @start_value= @@global.binlog_direct_non_transactional_updates; + +SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); +--echo 1 Expected + +SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); +--echo 1 Expected + +#################################################################### +# Check if Value can set # +#################################################################### +SET @@GLOBAL.binlog_direct_non_transactional_updates=1; +SELECT @@GLOBAL.binlog_direct_non_transactional_updates; + +SET @@SESSION.binlog_direct_non_transactional_updates=1; +SELECT @@SESSION.binlog_direct_non_transactional_updates; + +################################################################# +# Check if the value in GLOBAL Table matches value in variable # +################################################################# + +SELECT @@GLOBAL.binlog_direct_non_transactional_updates = UCASE(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +--echo 1 Expected + +SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); +--echo 1 Expected + +SELECT COUNT(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +--echo 1 Expected + + +################################################################# +# Check if the value in SESSION Table matches value in variable # +################################################################# + +SELECT @@SESSION.binlog_direct_non_transactional_updates = UCASE(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.SESSION_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +--echo 1 Expected + +SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); +--echo 1 Expected + +SELECT COUNT(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.SESSION_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +--echo 1 Expected + + +################################################################################ +# Check if binlog_direct_non_transactional_updates can be accessed with and # +# without @@ sign # +################################################################################ + +SELECT COUNT(@@binlog_direct_non_transactional_updates); +--echo 1 Expected +SELECT COUNT(@@local.binlog_direct_non_transactional_updates); +--echo 1 Expected +SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); +--echo 1 Expected +SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); +--echo 1 Expected + +SET @@global.binlog_direct_non_transactional_updates= @start_value; + diff --git a/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic_32.test b/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic_32.test deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic_64.test b/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic_64.test deleted file mode 100644 index e69de29bb2d..00000000000 From 5d35477388eecf377ba709a4e7575c54486420fe Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Tue, 2 Feb 2010 10:41:31 +0300 Subject: [PATCH 117/132] Remove binlog_direct_non_transactional_updates_basic.test and binlog_direct_non_transactional_updates_basic.result. They will be added by a cherry-picking merge from mysql-next-mr-bugfixing (Bug#50766). --- ...ect_non_transactional_updates_basic.result | 69 ----------------- ...irect_non_transactional_updates_basic.test | 74 ------------------- 2 files changed, 143 deletions(-) delete mode 100644 mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_basic.result delete mode 100644 mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic.test diff --git a/mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_basic.result b/mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_basic.result deleted file mode 100644 index 834ef99ceec..00000000000 --- a/mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_basic.result +++ /dev/null @@ -1,69 +0,0 @@ -SELECT @@GLOBAL.binlog_direct_non_transactional_updates; -@@GLOBAL.binlog_direct_non_transactional_updates -0 -SET @start_value= @@global.binlog_direct_non_transactional_updates; -SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); -COUNT(@@GLOBAL.binlog_direct_non_transactional_updates) -1 -1 Expected -SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); -COUNT(@@SESSION.binlog_direct_non_transactional_updates) -1 -1 Expected -SET @@GLOBAL.binlog_direct_non_transactional_updates=1; -SELECT @@GLOBAL.binlog_direct_non_transactional_updates; -@@GLOBAL.binlog_direct_non_transactional_updates -1 -SET @@SESSION.binlog_direct_non_transactional_updates=1; -SELECT @@SESSION.binlog_direct_non_transactional_updates; -@@SESSION.binlog_direct_non_transactional_updates -1 -SELECT @@GLOBAL.binlog_direct_non_transactional_updates = UCASE(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; -@@GLOBAL.binlog_direct_non_transactional_updates = UCASE(VARIABLE_VALUE) -0 -1 Expected -SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); -COUNT(@@GLOBAL.binlog_direct_non_transactional_updates) -1 -1 Expected -SELECT COUNT(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; -COUNT(VARIABLE_VALUE) -1 -1 Expected -SELECT @@SESSION.binlog_direct_non_transactional_updates = UCASE(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; -@@SESSION.binlog_direct_non_transactional_updates = UCASE(VARIABLE_VALUE) -0 -1 Expected -SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); -COUNT(@@SESSION.binlog_direct_non_transactional_updates) -1 -1 Expected -SELECT COUNT(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; -COUNT(VARIABLE_VALUE) -1 -1 Expected -SELECT COUNT(@@binlog_direct_non_transactional_updates); -COUNT(@@binlog_direct_non_transactional_updates) -1 -1 Expected -SELECT COUNT(@@local.binlog_direct_non_transactional_updates); -COUNT(@@local.binlog_direct_non_transactional_updates) -1 -1 Expected -SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); -COUNT(@@SESSION.binlog_direct_non_transactional_updates) -1 -1 Expected -SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); -COUNT(@@GLOBAL.binlog_direct_non_transactional_updates) -1 -1 Expected -SET @@global.binlog_direct_non_transactional_updates= @start_value; diff --git a/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic.test b/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic.test deleted file mode 100644 index b47119b6621..00000000000 --- a/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic.test +++ /dev/null @@ -1,74 +0,0 @@ -SELECT @@GLOBAL.binlog_direct_non_transactional_updates; - -#################################################################### -# Displaying default value # -#################################################################### -SET @start_value= @@global.binlog_direct_non_transactional_updates; - -SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); ---echo 1 Expected - -SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); ---echo 1 Expected - -#################################################################### -# Check if Value can set # -#################################################################### -SET @@GLOBAL.binlog_direct_non_transactional_updates=1; -SELECT @@GLOBAL.binlog_direct_non_transactional_updates; - -SET @@SESSION.binlog_direct_non_transactional_updates=1; -SELECT @@SESSION.binlog_direct_non_transactional_updates; - -################################################################# -# Check if the value in GLOBAL Table matches value in variable # -################################################################# - -SELECT @@GLOBAL.binlog_direct_non_transactional_updates = UCASE(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; ---echo 1 Expected - -SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); ---echo 1 Expected - -SELECT COUNT(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; ---echo 1 Expected - - -################################################################# -# Check if the value in SESSION Table matches value in variable # -################################################################# - -SELECT @@SESSION.binlog_direct_non_transactional_updates = UCASE(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; ---echo 1 Expected - -SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); ---echo 1 Expected - -SELECT COUNT(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; ---echo 1 Expected - - -################################################################################ -# Check if binlog_direct_non_transactional_updates can be accessed with and # -# without @@ sign # -################################################################################ - -SELECT COUNT(@@binlog_direct_non_transactional_updates); ---echo 1 Expected -SELECT COUNT(@@local.binlog_direct_non_transactional_updates); ---echo 1 Expected -SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); ---echo 1 Expected -SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); ---echo 1 Expected - -SET @@global.binlog_direct_non_transactional_updates= @start_value; - From 6f957334068d1029f68a923403e3537b92a1e30b Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Tue, 2 Feb 2010 10:56:42 +0300 Subject: [PATCH 118/132] Manual merge of patch for Bug#46364 from mysql-next-mr-bugfixing. Conflicts: - mysql-test/r/mysqld--help-win.result - sql/sys_vars.cc Original revsion (in next-mr-bugfixing): ------------------------------------------------------------ revno: 2971 [merge] revision-id: alfranio.correia@sun.com-20100121210527-rbuheu5rnsmcakh1 committer: Alfranio Correia branch nick: mysql-next-mr-bugfixing timestamp: Thu 2010-01-21 21:05:27 +0000 message: BUG#46364 MyISAM transbuffer problems (NTM problem) It is well-known that due to concurrency issues, a slave can become inconsistent when a transaction contains updates to both transaction and non-transactional tables. In a nutshell, the current code-base tries to preserve causality among the statements by writing non-transactional statements to the txn-cache which is flushed upon commit. However, modifications done to non-transactional tables on behalf of a transaction become immediately visible to other connections but may not immediately get into the binary log and therefore consistency may be broken. In general, it is impossible to automatically detect causality/dependency among statements by just analyzing the statements sent to the server. This happen because dependency may be hidden in the application code and it is necessary to know a priori all the statements processed in the context of a transaction such as in a procedure. Moreover, even for the few cases that we could automatically address in the server, the computation effort required could make the approach infeasible. So, in this patch we introduce the option - "--binlog-direct-non-transactional-updates" that can be used to bypass the current behavior in order to write directly to binary log statements that change non-transactional tables. Besides, it is used to enable the WL#2687 which is disabled by default. ------------------------------------------------------------ revno: 2970.1.1 revision-id: alfranio.correia@sun.com-20100121131034-183r4qdyld7an5a0 parent: alik@sun.com-20100121083914-r9rz2myto3tkdya0 committer: Alfranio Correia branch nick: mysql-next-mr-bugfixing timestamp: Thu 2010-01-21 13:10:34 +0000 message: BUG#46364 MyISAM transbuffer problems (NTM problem) It is well-known that due to concurrency issues, a slave can become inconsistent when a transaction contains updates to both transaction and non-transactional tables. In a nutshell, the current code-base tries to preserve causality among the statements by writing non-transactional statements to the txn-cache which is flushed upon commit. However, modifications done to non-transactional tables on behalf of a transaction become immediately visible to other connections but may not immediately get into the binary log and therefore consistency may be broken. In general, it is impossible to automatically detect causality/dependency among statements by just analyzing the statements sent to the server. This happen because dependency may be hidden in the application code and it is necessary to know a priori all the statements processed in the context of a transaction such as in a procedure. Moreover, even for the few cases that we could automatically address in the server, the computation effort required could make the approach infeasible. So, in this patch we introduce the option - "--binlog-direct-non-transactional-updates" that can be used to bypass the current behavior in order to write directly to binary log statements that change non-transactional tables. Besides, it is used to enable the WL#2687 which is disabled by default. --- .../rpl_tests/rpl_binlog_max_cache_size.test | 41 +- .../rpl_tests/rpl_implicit_commit_binlog.test | 38 +- .../extra/rpl_tests/rpl_mixing_engines.test | 5 +- mysql-test/include/default_mysqld.cnf | 1 + .../suite/binlog/r/binlog_multi_engine.result | 4 +- ...sult => binlog_switch_inside_trans.result} | 51 +- .../t/binlog_stm_mix_innodb_myisam-master.opt | 2 +- ...s.test => binlog_switch_inside_trans.test} | 44 +- .../suite/ndb/r/ndb_binlog_format.result | 4 +- .../rpl/r/rpl_begin_commit_rollback.result | 1 + .../suite/rpl/r/rpl_concurrency_error.result | 16 +- .../r/rpl_mixed_implicit_commit_binlog.result | 4 +- .../rpl/r/rpl_mixed_mixing_engines.result | 18 + .../r/rpl_stm_binlog_max_cache_size.result | 7 +- .../r/rpl_stm_implicit_commit_binlog.result | 8 +- .../suite/rpl/r/rpl_stm_mixing_engines.result | 604 +++++++++++++----- .../rpl/r/rpl_stm_start_stop_slave.result | 1 + .../rpl/r/rpl_stm_stop_middle_group.result | 1 + .../rpl/t/rpl_begin_commit_rollback.test | 2 + .../suite/rpl/t/rpl_stm_start_stop_slave.test | 1 + .../rpl/t/rpl_stm_stop_middle_group.test | 1 + ...ect_non_transactional_updates_basic.result | 76 +++ ...irect_non_transactional_updates_basic.test | 97 +++ sql/log.cc | 150 +++-- sql/log.h | 5 +- sql/share/errmsg-utf8.txt | 5 + sql/share/errmsg.txt | 4 + sql/sys_vars.cc | 33 +- support-files/my-small.cnf.sh | 7 + 29 files changed, 933 insertions(+), 298 deletions(-) rename mysql-test/suite/binlog/r/{binlog_format_switch_inside_trans.result => binlog_switch_inside_trans.result} (55%) rename mysql-test/suite/binlog/t/{binlog_format_switch_inside_trans.test => binlog_switch_inside_trans.test} (61%) create mode 100644 mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_basic.result create mode 100644 mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic.test diff --git a/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test b/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test index 55dc7ca6514..3d8a8b9fb12 100644 --- a/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test +++ b/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test @@ -344,30 +344,14 @@ BEGIN; --eval INSERT INTO t1 (a, data) VALUES (1, $data); --eval INSERT INTO t1 (a, data) VALUES (2, $data); --eval INSERT INTO t2 (a, data) VALUES (3, $data); -if (`SELECT @@binlog_format = 'STATEMENT'`) -{ - --error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE - --eval INSERT INTO t1 (a, data) VALUES (4, $data); -} -if (`SELECT @@binlog_format = 'ROW' || @@binlog_format = 'MIXED'`) -{ - --eval INSERT INTO t1 (a, data) VALUES (4, $data); -} +--eval INSERT INTO t1 (a, data) VALUES (4, $data); --error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE --eval INSERT INTO t1 (a, data) VALUES (5, $data); --error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE --eval INSERT INTO t1 (a, data) VALUES (6, $data); --error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE --eval INSERT INTO t1 (a, data) VALUES (7, $data); -if (`SELECT @@binlog_format = 'STATEMENT'`) -{ - --error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE - --eval UPDATE t2 SET data= CONCAT($data, $data); -} -if (`SELECT @@binlog_format = 'ROW' || @@binlog_format = 'MIXED'`) -{ - --eval UPDATE t2 SET data= CONCAT($data, $data); -} +--eval UPDATE t2 SET data= CONCAT($data, $data); --eval INSERT INTO t1 (a, data) VALUES (8, 's'); --eval INSERT INTO t1 (a, data) VALUES (9, 's'); --eval INSERT INTO t2 (a, data) VALUES (10, 's'); @@ -380,31 +364,12 @@ BEGIN; --eval INSERT INTO t1 (a, data) VALUES (15, $data); --eval INSERT INTO t1 (a, data) VALUES (16, $data); --eval INSERT INTO t2 (a, data) VALUES (17, $data); -if (`SELECT @@binlog_format = 'STATEMENT'`) -{ - --error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE - --eval INSERT INTO t1 (a, data) VALUES (18, $data); -} -if (`SELECT @@binlog_format = 'ROW' || @@binlog_format = 'MIXED'`) -{ - --eval INSERT INTO t1 (a, data) VALUES (18, $data); -} +--eval INSERT INTO t1 (a, data) VALUES (18, $data); --error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE --eval INSERT INTO t1 (a, data) VALUES (19, $data); --enable_query_log COMMIT; -if (`SELECT @@binlog_format = 'STATEMENT'`) -{ - connection slave; - --source include/wait_for_slave_sql_to_stop.inc - - SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; - START SLAVE SQL_THREAD; - --source include/wait_for_slave_sql_to_start.inc - connection master; -} - let $diff_statement= SELECT * FROM t1; --source include/diff_master_slave.inc diff --git a/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test b/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test index 39d18b7403d..056b449b8fb 100644 --- a/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test +++ b/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test @@ -219,13 +219,12 @@ while (`SELECT $ddl_cases >= 1`) # in the binary log: # # 1: DDL EVENT which triggered the previous commmit. - # 2: COMMIT - # 3: BEGIN - # 4: TABLE MAP EVENT - # 5: TABLE MAP EVENT (ndb_apply_status) + # 2: BEGIN + # 3: TABLE MAP EVENT + # 4: TABLE MAP EVENT (ndb_apply_status) + # 5: ROW EVENT # 6: ROW EVENT - # 7: ROW EVENT - # 8: COMMIT + # 7: COMMIT # if (`SELECT '$engine' = 'NDB' && @@binlog_format != 'ROW'`) { @@ -362,8 +361,11 @@ while (`SELECT $ddl_cases >= 1`) # does not commit the current transaction. # # 1: BEGIN - # 2: INSERT - # 3: CREATE TEMPORARY + # 2: CREATE TEMPORARY + # 3: COMMIT + # 4: BEGIN + # 5: INSERT + # 6: COMMIT # # In RBR the transaction is not committed either and the statement is not # written to the binary log: @@ -371,10 +373,11 @@ while (`SELECT $ddl_cases >= 1`) # 1: BEGIN # 2: TABLE MAP EVENT # 3: ROW EVENT + # 4: COMMIT # - if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`) + if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'` ) { - let $commit_event_row_number= 4; + let $commit_event_row_number= 6; } # # In NDB (RBR mode), the commit event is the sixth event @@ -482,9 +485,14 @@ while (`SELECT $ddl_cases >= 1`) # In SBR and MIXED modes, the DDL statement is written to the binary log # but does not commit the current transaction: # + # In SBR, we have what follows: + # # 1: BEGIN - # 2: INSERT - # 3: DROP TEMPORARY + # 2: DROP TEMPORARY + # 3: COMMIT + # 4: BEGIN + # 5: INSERT + # 6: COMMIT # # In RBR the transaction is not committed either and the statement is not # written to the binary log: @@ -492,8 +500,13 @@ while (`SELECT $ddl_cases >= 1`) # 1: BEGIN # 2: TABLE MAP EVENT # 3: ROW EVENT + # 4: COMMIT # if (`select @@binlog_format = 'STATEMENT'`) + { + let $commit_event_row_number= 6; + } + if (`select @@binlog_format = 'ROW'`) { let $commit_event_row_number= 4; } @@ -503,6 +516,7 @@ while (`SELECT $ddl_cases >= 1`) # 2: TABLE MAP EVENT # 3: ROW EVENT # 4: DROP TEMPORARY table IF EXISTS + # 5: COMMIT # if (`select @@binlog_format = 'MIXED'`) { diff --git a/mysql-test/extra/rpl_tests/rpl_mixing_engines.test b/mysql-test/extra/rpl_tests/rpl_mixing_engines.test index b8b2b1bc01b..5df1eaf37cc 100644 --- a/mysql-test/extra/rpl_tests/rpl_mixing_engines.test +++ b/mysql-test/extra/rpl_tests/rpl_mixing_engines.test @@ -1767,7 +1767,10 @@ sync_slave_with_master; --exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/test-nmt-master.sql --exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/test-nmt-slave.sql ---diff_files $MYSQLTEST_VARDIR/tmp/test-nmt-master.sql $MYSQLTEST_VARDIR/tmp/test-nmt-slave.sql +if (`select @@session.binlog_format != 'STATEMENT'`) +{ + --diff_files $MYSQLTEST_VARDIR/tmp/test-nmt-master.sql $MYSQLTEST_VARDIR/tmp/test-nmt-slave.sql +} --echo ################################################################################### --echo # CLEAN diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf index def14abf55a..c54ac93133b 100644 --- a/mysql-test/include/default_mysqld.cnf +++ b/mysql-test/include/default_mysqld.cnf @@ -44,3 +44,4 @@ log-bin=mysqld-bin # Run tests with the performance schema instrumentation loose-enable-performance-schema +binlog-direct-non-transactional-updates diff --git a/mysql-test/suite/binlog/r/binlog_multi_engine.result b/mysql-test/suite/binlog/r/binlog_multi_engine.result index eee83183575..6668c3fa027 100644 --- a/mysql-test/suite/binlog/r/binlog_multi_engine.result +++ b/mysql-test/suite/binlog/r/binlog_multi_engine.result @@ -33,9 +33,11 @@ mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Query # # use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c mysqld-bin.000001 # Query # # COMMIT mysqld-bin.000001 # Query # # BEGIN +mysqld-bin.000001 # Query # # use `test`; UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c +mysqld-bin.000001 # Query # # COMMIT +mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2) mysqld-bin.000001 # Query # # use `test`; UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f -mysqld-bin.000001 # Query # # use `test`; UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c mysqld-bin.000001 # Query # # COMMIT mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Table_map # # table_id: # (test.t1n) diff --git a/mysql-test/suite/binlog/r/binlog_format_switch_inside_trans.result b/mysql-test/suite/binlog/r/binlog_switch_inside_trans.result similarity index 55% rename from mysql-test/suite/binlog/r/binlog_format_switch_inside_trans.result rename to mysql-test/suite/binlog/r/binlog_switch_inside_trans.result index c1e900053e4..57feb3f50f0 100644 --- a/mysql-test/suite/binlog/r/binlog_format_switch_inside_trans.result +++ b/mysql-test/suite/binlog/r/binlog_switch_inside_trans.result @@ -1,4 +1,5 @@ set @save_binlog_format= @@global.binlog_format; +set @save_binlog_dirct= @@global.binlog_direct_non_transactional_updates; create table t1 (a int) engine= myisam; create table t2 (a int) engine= innodb; SELECT @@session.binlog_format; @@ -8,19 +9,27 @@ SET AUTOCOMMIT=1; # Test that the session variable 'binlog_format' # is writable outside a transaction. set @@session.binlog_format= statement; +set @@session.binlog_direct_non_transactional_updates= TRUE; SELECT @@session.binlog_format; @@session.binlog_format STATEMENT +SELECT @@session.binlog_direct_non_transactional_updates; +@@session.binlog_direct_non_transactional_updates +1 begin; # Test that the session variable 'binlog_format' is read-only # inside a transaction with no preceding updates. set @@session.binlog_format= mixed; ERROR HY000: Cannot modify @@session.binlog_format inside a transaction +set @@session.binlog_direct_non_transactional_updates= FALSE; +ERROR HY000: Cannot modify @@session.binlog_direct_non_transactional_updates inside a transaction insert into t2 values (1); # Test that the session variable 'binlog_format' is read-only # inside a transaction with preceding transactional updates. set @@session.binlog_format= row; ERROR HY000: Cannot modify @@session.binlog_format inside a transaction +set @@session.binlog_direct_non_transactional_updates= FALSE; +ERROR HY000: Cannot modify @@session.binlog_direct_non_transactional_updates inside a transaction commit; begin; insert into t1 values (2); @@ -28,31 +37,47 @@ insert into t1 values (2); # inside a transaction with preceding non-transactional updates. set @@session.binlog_format= statement; ERROR HY000: Cannot modify @@session.binlog_format inside a transaction +set @@session.binlog_direct_non_transactional_updates= FALSE; +ERROR HY000: Cannot modify @@session.binlog_direct_non_transactional_updates inside a transaction commit; # Test that the session variable 'binlog_format' is writable # when AUTOCOMMIT=0, before a transaction has started. set AUTOCOMMIT=0; set @@session.binlog_format= row; +set @@session.binlog_direct_non_transactional_updates= FALSE; SELECT @@session.binlog_format; @@session.binlog_format ROW +SELECT @@session.binlog_direct_non_transactional_updates; +@@session.binlog_direct_non_transactional_updates +0 insert into t1 values (4); # Test that the session variable 'binlog_format' is read-only inside an # AUTOCOMMIT=0 transaction with preceding non-transactional updates. set @@session.binlog_format= statement; ERROR HY000: Cannot modify @@session.binlog_format inside a transaction +set @@session.binlog_direct_non_transactional_updates= TRUE; +ERROR HY000: Cannot modify @@session.binlog_direct_non_transactional_updates inside a transaction SELECT @@session.binlog_format; @@session.binlog_format ROW +SELECT @@session.binlog_direct_non_transactional_updates; +@@session.binlog_direct_non_transactional_updates +0 commit; insert into t2 values (5); # Test that the session variable 'binlog_format' is read-only inside an # AUTOCOMMIT=0 transaction with preceding transactional updates. set @@session.binlog_format= row; ERROR HY000: Cannot modify @@session.binlog_format inside a transaction +set @@session.binlog_direct_non_transactional_updates= TRUE; +ERROR HY000: Cannot modify @@session.binlog_direct_non_transactional_updates inside a transaction SELECT @@session.binlog_format; @@session.binlog_format ROW +SELECT @@session.binlog_direct_non_transactional_updates; +@@session.binlog_direct_non_transactional_updates +0 commit; begin; insert into t2 values (6); @@ -62,15 +87,20 @@ SELECT @@global.binlog_format; @@global.binlog_format ROW set @@global.binlog_format= statement; +set @@global.binlog_direct_non_transactional_updates= TRUE; SELECT @@global.binlog_format; @@global.binlog_format STATEMENT +SELECT @@global.binlog_direct_non_transactional_updates; +@@global.binlog_direct_non_transactional_updates +1 commit; set @@global.binlog_format= @save_binlog_format; +set @@global.binlog_direct_non_transactional_updates= @save_binlog_dirct; create table t3(a int, b int) engine= innodb; create table t4(a int) engine= innodb; create table t5(a int) engine= innodb; -create trigger tr2 after insert on t3 for each row begin +create trigger tr1 after insert on t3 for each row begin insert into t4(a) values(1); set @@session.binlog_format= statement; insert into t4(a) values(2); @@ -83,8 +113,27 @@ ERROR HY000: Cannot change the binary logging format inside a stored function or SELECT @@session.binlog_format; @@session.binlog_format ROW +create table t6(a int, b int) engine= innodb; +create table t7(a int) engine= innodb; +create table t8(a int) engine= innodb; +create trigger tr2 after insert on t6 for each row begin +insert into t7(a) values(1); +set @@global.binlog_direct_non_transactional_updates= FALSE; +insert into t7(a) values(2); +insert into t8(a) values(3); +end | +# Test that the session variable 'binlog_format' is read-only +# in sub-statements. +insert into t6(a,b) values(1,1); +ERROR HY000: Cannot change the binlog direct flag inside a stored function or trigger +SELECT @@session.binlog_direct_non_transactional_updates; +@@session.binlog_direct_non_transactional_updates +0 drop table t1; drop table t2; drop table t3; drop table t4; drop table t5; +drop table t6; +drop table t7; +drop table t8; diff --git a/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam-master.opt b/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam-master.opt index e76299453d3..5d0037fdc97 100644 --- a/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam-master.opt +++ b/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam-master.opt @@ -1 +1 @@ ---innodb_lock_wait_timeout=2 +--innodb_lock_wait_timeout=2 --binlog-direct-non-transactional-updates=FALSE diff --git a/mysql-test/suite/binlog/t/binlog_format_switch_inside_trans.test b/mysql-test/suite/binlog/t/binlog_switch_inside_trans.test similarity index 61% rename from mysql-test/suite/binlog/t/binlog_format_switch_inside_trans.test rename to mysql-test/suite/binlog/t/binlog_switch_inside_trans.test index 8ae87d13a12..7b98b5cd0d5 100644 --- a/mysql-test/suite/binlog/t/binlog_format_switch_inside_trans.test +++ b/mysql-test/suite/binlog/t/binlog_switch_inside_trans.test @@ -8,6 +8,7 @@ source include/have_innodb.inc; source include/have_binlog_format_row.inc; set @save_binlog_format= @@global.binlog_format; +set @save_binlog_dirct= @@global.binlog_direct_non_transactional_updates; create table t1 (a int) engine= myisam; create table t2 (a int) engine= innodb; @@ -16,19 +17,25 @@ SET AUTOCOMMIT=1; --echo # Test that the session variable 'binlog_format' --echo # is writable outside a transaction. set @@session.binlog_format= statement; +set @@session.binlog_direct_non_transactional_updates= TRUE; SELECT @@session.binlog_format; +SELECT @@session.binlog_direct_non_transactional_updates; begin; --echo # Test that the session variable 'binlog_format' is read-only --echo # inside a transaction with no preceding updates. --error ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT set @@session.binlog_format= mixed; +--error ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT + set @@session.binlog_direct_non_transactional_updates= FALSE; insert into t2 values (1); --echo # Test that the session variable 'binlog_format' is read-only --echo # inside a transaction with preceding transactional updates. --error ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT set @@session.binlog_format= row; +--error ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT + set @@session.binlog_direct_non_transactional_updates= FALSE; commit; begin; @@ -37,20 +44,27 @@ begin; --echo # inside a transaction with preceding non-transactional updates. --error ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT set @@session.binlog_format= statement; +--error ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT + set @@session.binlog_direct_non_transactional_updates= FALSE; commit; --echo # Test that the session variable 'binlog_format' is writable --echo # when AUTOCOMMIT=0, before a transaction has started. set AUTOCOMMIT=0; set @@session.binlog_format= row; +set @@session.binlog_direct_non_transactional_updates= FALSE; SELECT @@session.binlog_format; +SELECT @@session.binlog_direct_non_transactional_updates; insert into t1 values (4); --echo # Test that the session variable 'binlog_format' is read-only inside an --echo # AUTOCOMMIT=0 transaction with preceding non-transactional updates. --error ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT set @@session.binlog_format= statement; +--error ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT +set @@session.binlog_direct_non_transactional_updates= TRUE; SELECT @@session.binlog_format; +SELECT @@session.binlog_direct_non_transactional_updates; commit; insert into t2 values (5); @@ -58,7 +72,10 @@ insert into t2 values (5); --echo # AUTOCOMMIT=0 transaction with preceding transactional updates. --error ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT set @@session.binlog_format= row; +--error ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT +set @@session.binlog_direct_non_transactional_updates= TRUE; SELECT @@session.binlog_format; +SELECT @@session.binlog_direct_non_transactional_updates; commit; begin; @@ -67,16 +84,19 @@ begin; --echo # inside a transaction. SELECT @@global.binlog_format; set @@global.binlog_format= statement; + set @@global.binlog_direct_non_transactional_updates= TRUE; SELECT @@global.binlog_format; + SELECT @@global.binlog_direct_non_transactional_updates; commit; set @@global.binlog_format= @save_binlog_format; +set @@global.binlog_direct_non_transactional_updates= @save_binlog_dirct; create table t3(a int, b int) engine= innodb; create table t4(a int) engine= innodb; create table t5(a int) engine= innodb; delimiter |; -eval create trigger tr2 after insert on t3 for each row begin +eval create trigger tr1 after insert on t3 for each row begin insert into t4(a) values(1); set @@session.binlog_format= statement; insert into t4(a) values(2); @@ -90,9 +110,29 @@ delimiter ;| insert into t3(a,b) values(1,1); SELECT @@session.binlog_format; +create table t6(a int, b int) engine= innodb; +create table t7(a int) engine= innodb; +create table t8(a int) engine= innodb; +delimiter |; +eval create trigger tr2 after insert on t6 for each row begin + insert into t7(a) values(1); + set @@global.binlog_direct_non_transactional_updates= FALSE; + insert into t7(a) values(2); + insert into t8(a) values(3); +end | +delimiter ;| + +--echo # Test that the session variable 'binlog_format' is read-only +--echo # in sub-statements. +--error ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT +insert into t6(a,b) values(1,1); +SELECT @@session.binlog_direct_non_transactional_updates; + drop table t1; drop table t2; drop table t3; drop table t4; drop table t5; - +drop table t6; +drop table t7; +drop table t8; diff --git a/mysql-test/suite/ndb/r/ndb_binlog_format.result b/mysql-test/suite/ndb/r/ndb_binlog_format.result index 62d491bc94a..bd4a3291f03 100644 --- a/mysql-test/suite/ndb/r/ndb_binlog_format.result +++ b/mysql-test/suite/ndb/r/ndb_binlog_format.result @@ -29,9 +29,11 @@ mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Query # # use `test`; UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c mysqld-bin.000001 # Query # # COMMIT mysqld-bin.000001 # Query # # BEGIN +mysqld-bin.000001 # Query # # use `test`; UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c +mysqld-bin.000001 # Query # # COMMIT +mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2) mysqld-bin.000001 # Query # # use `test`; UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f -mysqld-bin.000001 # Query # # use `test`; UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c mysqld-bin.000001 # Query # # COMMIT mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Table_map # # table_id: # (test.t3) diff --git a/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result b/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result index 5be69177550..03fee144205 100644 --- a/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result +++ b/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result @@ -6,6 +6,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT"); +SET @@session.binlog_direct_non_transactional_updates= FALSE; DROP DATABASE IF EXISTS db1; CREATE DATABASE db1; use db1; diff --git a/mysql-test/suite/rpl/r/rpl_concurrency_error.result b/mysql-test/suite/rpl/r/rpl_concurrency_error.result index ae4fab7325c..80c4b694a79 100644 --- a/mysql-test/suite/rpl/r/rpl_concurrency_error.result +++ b/mysql-test/suite/rpl/r/rpl_concurrency_error.result @@ -38,12 +38,14 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown") +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 2' WHERE i = 3 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 2' WHERE f = 'red' master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (2 * 10),"brown") -master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown") master-bin.000001 # Query # # ROLLBACK SET AUTOCOMMIT = 1; BEGIN; @@ -63,12 +65,14 @@ COMMIT; show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown") +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 2' WHERE i = 3 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 2' WHERE f = 'red' master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (2 * 10),"brown") -master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown") master-bin.000001 # Xid # # COMMIT /* XID */ SET AUTOCOMMIT = 0; UPDATE t SET f = 'yellow 1' WHERE i = 3; @@ -88,12 +92,14 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown") +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 1' WHERE i = 3 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 1' WHERE f = 'red' master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (1 * 10),"brown") -master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown") master-bin.000001 # Query # # ROLLBACK SET AUTOCOMMIT = 0; UPDATE t SET f = 'gray 1' WHERE i = 3; @@ -111,12 +117,14 @@ COMMIT; show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown") +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 1' WHERE i = 3 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 1' WHERE f = 'red' master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (1 * 10),"brown") -master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown") master-bin.000001 # Xid # # COMMIT /* XID */ source include/diff_master_slave.inc; source include/diff_master_slave.inc; diff --git a/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result index 318c1104139..eb3bda688c3 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result @@ -393,8 +393,10 @@ CREATE TEMPORARY TABLE tt_xx (a int); -b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(ddl_case) VALUES (11) master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx (a int) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(ddl_case) VALUES (11) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- diff --git a/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result index 7ee633c0776..8966366c7f0 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result @@ -11868,6 +11868,9 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> CT << -b-b-b-b-b-b-b-b-b-b-b- CREATE TEMPORARY TABLE tt_xx_11 (a int) engine=Innodb;; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_11 (a int) engine=Innodb +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CT << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -11875,6 +11878,9 @@ Log_name Pos Event_type Server_id End_log_pos Info -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T CT R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_11 (a int) engine=Innodb +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> B T CT R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> drop-CT << -b-b-b-b-b-b-b-b-b-b-b- @@ -11906,6 +11912,9 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> CT << -b-b-b-b-b-b-b-b-b-b-b- CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb;; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CT << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R1 << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK TO s1; @@ -11919,6 +11928,9 @@ Log_name Pos Event_type Server_id End_log_pos Info -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T S1 T CT R1 R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> B T S1 T CT R1 R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> drop-CT << -b-b-b-b-b-b-b-b-b-b-b- @@ -11942,6 +11954,9 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> CT << -b-b-b-b-b-b-b-b-b-b-b- CREATE TEMPORARY TABLE tt_xx_13 (a int) engine=Innodb;; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_13 (a int) engine=Innodb +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CT << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 5); @@ -11953,6 +11968,9 @@ Log_name Pos Event_type Server_id End_log_pos Info -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T CT T R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_13 (a int) engine=Innodb +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> B T CT T R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> drop-CT << -b-b-b-b-b-b-b-b-b-b-b- diff --git a/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result b/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result index 3d571f5b6fa..ddbd5177ec2 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result +++ b/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result @@ -130,8 +130,8 @@ Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = S Got one of the listed errors Got one of the listed errors Got one of the listed errors -Got one of the listed errors -Got one of the listed errors +Warnings: +Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. COMMIT; @@ -139,10 +139,7 @@ BEGIN; Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Got one of the listed errors -Got one of the listed errors COMMIT; -SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; -START SLAVE SQL_THREAD; source include/diff_master_slave.inc; ######################################################################################## # CLEAN diff --git a/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result index 5ea268556fc..fd0b962b106 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result +++ b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result @@ -393,8 +393,10 @@ CREATE TEMPORARY TABLE tt_xx (a int); -b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(ddl_case) VALUES (11) master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx (a int) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(ddl_case) VALUES (11) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- @@ -429,8 +431,10 @@ DROP TEMPORARY TABLE IF EXISTS new_tt_xx; -b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(ddl_case) VALUES (8) master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS new_tt_xx +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(ddl_case) VALUES (8) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- diff --git a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result index f393ac5634f..efcdff769c9 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result @@ -3610,20 +3610,24 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (133, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (133, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (133, 2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T N C << -e-e-e-e-e-e-e-e-e-e-e- @@ -3638,20 +3642,24 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (134, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T N-trig C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (134, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (134, 2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T N-trig C << -e-e-e-e-e-e-e-e-e-e-e- @@ -3668,20 +3676,24 @@ SELECT fc_i_nt_5_suc (135, 4); fc_i_nt_5_suc (135, 4) fc_i_nt_5_suc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(135,4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (135, 2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(135,4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T N-func C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (135, 2) master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(135,4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (135, 2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T N-func C << -e-e-e-e-e-e-e-e-e-e-e- @@ -3696,22 +3708,30 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- CALL pc_i_nt_5_suc (136, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (136, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T N-proc C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (136, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (136, 2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T N-proc C << -e-e-e-e-e-e-e-e-e-e-e- @@ -3728,20 +3748,24 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (137, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (137, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (137, 2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N C << -e-e-e-e-e-e-e-e-e-e-e- @@ -3756,20 +3780,24 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (138, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-trig C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (138, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (138, 2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-trig C << -e-e-e-e-e-e-e-e-e-e-e- @@ -3786,20 +3814,24 @@ SELECT fc_i_nt_5_suc (139, 4); fc_i_nt_5_suc (139, 4) fc_i_nt_5_suc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(139,4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (139, 2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(139,4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-func C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (139, 2) master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(139,4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (139, 2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-func C << -e-e-e-e-e-e-e-e-e-e-e- @@ -3814,22 +3846,30 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- CALL pc_i_nt_5_suc (140, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (140, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-proc C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (140, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (140, 2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-proc C << -e-e-e-e-e-e-e-e-e-e-e- @@ -3848,20 +3888,24 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(141,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(141,2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(141,2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T-func N C << -e-e-e-e-e-e-e-e-e-e-e- @@ -3878,20 +3922,24 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(142,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-trig C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(142,2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(142,2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-trig C << -e-e-e-e-e-e-e-e-e-e-e- @@ -3910,20 +3958,24 @@ SELECT fc_i_nt_5_suc (143, 4); fc_i_nt_5_suc (143, 4) fc_i_nt_5_suc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(143,4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(143,2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(143,4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-func C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(143,2) master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(143,4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(143,2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-func C << -e-e-e-e-e-e-e-e-e-e-e- @@ -3940,22 +3992,30 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- CALL pc_i_nt_5_suc (144, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(144,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-proc C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(144,2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(144,2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-proc C << -e-e-e-e-e-e-e-e-e-e-e- @@ -3972,6 +4032,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; @@ -3979,15 +4042,16 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',145), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',145), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',145), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',145), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N C << -e-e-e-e-e-e-e-e-e-e-e- @@ -4002,6 +4066,9 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; @@ -4009,15 +4076,16 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',146), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',146), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-trig C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',146), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',146), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-trig C << -e-e-e-e-e-e-e-e-e-e-e- @@ -4034,6 +4102,9 @@ SELECT fc_i_nt_5_suc (147, 4); fc_i_nt_5_suc (147, 4) fc_i_nt_5_suc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(147,4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; @@ -4041,15 +4112,16 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(147,4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-func C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(147,4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(147,4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-func C << -e-e-e-e-e-e-e-e-e-e-e- @@ -4064,6 +4136,12 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- CALL pc_i_nt_5_suc (148, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; @@ -4071,17 +4149,19 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-proc C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-proc C << -e-e-e-e-e-e-e-e-e-e-e- @@ -4192,20 +4272,24 @@ Log_name Pos Event_type Server_id End_log_pos Info INSERT INTO nt_1(trans_id, stmt_id) VALUES (152, 4), (150, 4); Got one of the listed errors Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (152, 4), (150, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> Ne << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (152, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (152, 4), (150, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T Ne C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (152, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (152, 4), (150, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (152, 2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T Ne C << -e-e-e-e-e-e-e-e-e-e-e- @@ -4232,6 +4316,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4240,14 +4327,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (153, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (153, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (153, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4262,6 +4350,9 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4270,14 +4361,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (154, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T N-trig R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (154, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (154, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T N-trig R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4294,6 +4386,9 @@ SELECT fc_i_nt_5_suc (155, 4); fc_i_nt_5_suc (155, 4) fc_i_nt_5_suc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(155,4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4302,14 +4397,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (155, 2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(155,4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T N-func R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (155, 2) master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(155,4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (155, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T N-func R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4324,6 +4420,12 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- CALL pc_i_nt_5_suc (156, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4332,16 +4434,18 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (156, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T N-proc R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (156, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (156, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T N-proc R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4358,6 +4462,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4366,14 +4473,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (157, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (157, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (157, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4388,6 +4496,9 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4396,14 +4507,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (158, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-trig R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (158, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (158, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-trig R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4420,6 +4532,9 @@ SELECT fc_i_nt_5_suc (159, 4); fc_i_nt_5_suc (159, 4) fc_i_nt_5_suc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(159,4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4428,14 +4543,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (159, 2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(159,4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-func R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (159, 2) master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(159,4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (159, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-func R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4450,6 +4566,12 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- CALL pc_i_nt_5_suc (160, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4458,16 +4580,18 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (160, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-proc R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (160, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (160, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-proc R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4486,6 +4610,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4494,14 +4621,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(161,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(161,2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(161,2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T-func N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4518,6 +4646,9 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4526,14 +4657,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(162,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-trig R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(162,2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(162,2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-trig R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4552,6 +4684,9 @@ SELECT fc_i_nt_5_suc (163, 4); fc_i_nt_5_suc (163, 4) fc_i_nt_5_suc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(163,4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4560,14 +4695,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(163,2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(163,4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-func R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(163,2) master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(163,4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(163,2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-func R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4584,6 +4720,12 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- CALL pc_i_nt_5_suc (164, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4592,16 +4734,18 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(164,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-proc R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(164,2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(164,2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-proc R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4618,6 +4762,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4627,15 +4774,16 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',165), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',165), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',165), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',165), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4650,6 +4798,9 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4659,15 +4810,16 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',166), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',166), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-trig R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',166), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',166), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-trig R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4684,6 +4836,9 @@ SELECT fc_i_nt_5_suc (167, 4); fc_i_nt_5_suc (167, 4) fc_i_nt_5_suc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(167,4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4693,15 +4848,16 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',167), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',167), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(167,4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-func R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(167,4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',167), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',167), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(167,4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-func R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4716,6 +4872,12 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- CALL pc_i_nt_5_suc (168, 4); Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4725,17 +4887,19 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-proc R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1) + 1) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-proc R << -e-e-e-e-e-e-e-e-e-e-e- @@ -4844,6 +5008,9 @@ Log_name Pos Event_type Server_id End_log_pos Info INSERT INTO nt_1(trans_id, stmt_id) VALUES (172, 4), (170, 4); Got one of the listed errors Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (172, 4), (170, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> Ne << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -4852,14 +5019,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (172, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (172, 4), (170, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T Ne R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (172, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (172, 4), (170, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (172, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T Ne R << -e-e-e-e-e-e-e-e-e-e-e- @@ -6936,20 +7104,24 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1; Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1 +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (233, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T tN C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (233, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1 +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (233, 2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T tN C << -e-e-e-e-e-e-e-e-e-e-e- @@ -7177,20 +7349,24 @@ Log_name Pos Event_type Server_id End_log_pos Info INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 241, 4, COUNT(*) FROM tt_1 UNION SELECT 233, 4, COUNT(*) FROM tt_1; Got one of the listed errors Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 241, 4, COUNT(*) FROM tt_1 UNION SELECT 233, 4, COUNT(*) FROM tt_1 +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (241, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 241, 4, COUNT(*) FROM tt_1 UNION SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T tNe C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (241, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 241, 4, COUNT(*) FROM tt_1 UNION SELECT 233, 4, COUNT(*) FROM tt_1 +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (241, 2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B T tNe C << -e-e-e-e-e-e-e-e-e-e-e- @@ -7360,6 +7536,9 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1; Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1 +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -7368,14 +7547,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (247, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T tN R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (247, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1 +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (247, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T tN R << -e-e-e-e-e-e-e-e-e-e-e- @@ -7607,6 +7787,9 @@ Log_name Pos Event_type Server_id End_log_pos Info INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 255, 4, COUNT(*) FROM tt_1 UNION SELECT 247, 4, COUNT(*) FROM tt_1; Got one of the listed errors Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 255, 4, COUNT(*) FROM tt_1 UNION SELECT 247, 4, COUNT(*) FROM tt_1 +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -7615,14 +7798,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (255, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 255, 4, COUNT(*) FROM tt_1 UNION SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T tNe R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (255, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 255, 4, COUNT(*) FROM tt_1 UNION SELECT 247, 4, COUNT(*) FROM tt_1 +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (255, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T tNe R << -e-e-e-e-e-e-e-e-e-e-e- @@ -7832,20 +8016,24 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 262, 2, COUNT(*) FROM nt_1 -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B nT N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 262, 2, COUNT(*) FROM nt_1 master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 262, 2, COUNT(*) FROM nt_1 master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B nT N C << -e-e-e-e-e-e-e-e-e-e-e- @@ -7864,20 +8052,24 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B NT N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B NT N C << -e-e-e-e-e-e-e-e-e-e-e- @@ -7894,20 +8086,24 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B NT-trig N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B NT-trig N C << -e-e-e-e-e-e-e-e-e-e-e- @@ -7924,20 +8120,24 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (265, 2, fc_i_tt_5_suc(265, 2)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B NT-func N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (265, 2, fc_i_tt_5_suc(265, 2)) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (265, 2, fc_i_tt_5_suc(265, 2)) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B NT-func N C << -e-e-e-e-e-e-e-e-e-e-e- @@ -7956,20 +8156,24 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE tt_4, nt_4 SET tt_4.info= "new text 266 --> 2", nt_4.info= "new text 266 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B TN N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; UPDATE tt_4, nt_4 SET tt_4.info= "new text 266 --> 2", nt_4.info= "new text 266 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE tt_4, nt_4 SET tt_4.info= "new text 266 --> 2", nt_4.info= "new text 266 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B TN N C << -e-e-e-e-e-e-e-e-e-e-e- @@ -7986,20 +8190,24 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (267, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B TN-trig N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (267, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (267, 2) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B TN-trig N C << -e-e-e-e-e-e-e-e-e-e-e- @@ -8016,20 +8224,24 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (268, 2, fc_i_nt_5_suc(268, 2)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B TN-func N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (268, 2, fc_i_nt_5_suc(268, 2)) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (268, 2, fc_i_nt_5_suc(268, 2)) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> B TN-func N C << -e-e-e-e-e-e-e-e-e-e-e- @@ -8119,21 +8331,25 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (271, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (271, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (271, 2), (264, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (271, 4) master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B NeT-trig N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (271, 2), (264, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (271, 4) master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (271, 2), (264, 2) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> B NeT-trig N C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- @@ -8150,21 +8366,25 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (272, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (272, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (272, 2, ''), (268, 2, fc_i_tt_5_suc (272, 2)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (272, 4) master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B NeT-func N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (272, 2, ''), (268, 2, fc_i_tt_5_suc (272, 2)) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (272, 4) master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (272, 2, ''), (268, 2, fc_i_tt_5_suc (272, 2)) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> B NeT-func N C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- @@ -8181,21 +8401,25 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (273, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (273, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (273, 2), (267, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (273, 4) master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B TeN-trig N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (273, 2), (267, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (273, 4) master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (273, 2), (267, 2) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> B TeN-trig N C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- @@ -8212,21 +8436,25 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (274, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (274, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (274, 2, ''), (268, 2, fc_i_nt_5_suc (274, 2)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (274, 4) master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B TeN-func N C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (274, 2, ''), (268, 2, fc_i_nt_5_suc (274, 2)) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (274, 4) master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (274, 2, ''), (268, 2, fc_i_nt_5_suc (274, 2)) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> B TeN-func N C << -e-e-e-e-e-e-e-e-e-e-e- @@ -8292,6 +8520,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -8300,14 +8531,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 276, 2, COUNT(*) FROM nt_1 -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B nT N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 276, 2, COUNT(*) FROM nt_1 master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 276, 2, COUNT(*) FROM nt_1 master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B nT N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -8326,6 +8558,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -8334,14 +8569,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B NT N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B NT N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -8358,6 +8594,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -8366,14 +8605,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B NT-trig N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B NT-trig N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -8390,6 +8630,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -8398,14 +8641,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (279, 2, fc_i_tt_5_suc(279, 2)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B NT-func N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (279, 2, fc_i_tt_5_suc(279, 2)) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (279, 2, fc_i_tt_5_suc(279, 2)) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B NT-func N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -8424,6 +8668,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -8432,14 +8679,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE tt_4, nt_4 SET tt_4.info= "new text 280 --> 2", nt_4.info= "new text 280 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B TN N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; UPDATE tt_4, nt_4 SET tt_4.info= "new text 280 --> 2", nt_4.info= "new text 280 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE tt_4, nt_4 SET tt_4.info= "new text 280 --> 2", nt_4.info= "new text 280 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B TN N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -8456,6 +8704,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -8464,14 +8715,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (281, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B TN-trig N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (281, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (281, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B TN-trig N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -8488,6 +8740,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -8496,14 +8751,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (282, 2, fc_i_nt_5_suc(282, 2)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B TN-func N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (282, 2, fc_i_nt_5_suc(282, 2)) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (282, 2, fc_i_nt_5_suc(282, 2)) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B TN-func N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -8597,6 +8853,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (285, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (285, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -8605,14 +8864,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (285, 2), (278, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (285, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B NeT-trig N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (285, 2), (278, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (285, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (285, 2), (278, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B NeT-trig N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -8630,6 +8890,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (286, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (286, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -8638,14 +8901,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (286, 2, ''), (282, 2, fc_i_tt_5_suc (286, 2)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (286, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B NeT-func N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (286, 2, ''), (282, 2, fc_i_tt_5_suc (286, 2)) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (286, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (286, 2, ''), (282, 2, fc_i_tt_5_suc (286, 2)) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B NeT-func N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -8663,6 +8927,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (287, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (287, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -8671,14 +8938,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (287, 2), (267, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (287, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B TeN-trig N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (287, 2), (267, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (287, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (287, 2), (267, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B TeN-trig N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -8696,6 +8964,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (288, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (288, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; @@ -8704,14 +8975,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (288, 2, ''), (268, 2, fc_i_nt_5_suc (288, 2)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (288, 4) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B TeN-func N R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (288, 2, ''), (268, 2, fc_i_nt_5_suc (288, 2)) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (288, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (288, 2, ''), (268, 2, fc_i_nt_5_suc (288, 2)) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B TeN-func N R << -e-e-e-e-e-e-e-e-e-e-e- @@ -9801,6 +10073,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> S1 << -b-b-b-b-b-b-b-b-b-b-b- SAVEPOINT s1; @@ -9821,7 +10096,6 @@ COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4) master-bin.000001 # Query # # use `test`; SAVEPOINT s1 master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 7) master-bin.000001 # Query # # use `test`; ROLLBACK TO s1 @@ -9830,8 +10104,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ -b-b-b-b-b-b-b-b-b-b-b- >> B T N S1 T R1 C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2) master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2) master-bin.000001 # Query # # use `test`; SAVEPOINT s1 master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 7) master-bin.000001 # Query # # use `test`; ROLLBACK TO s1 @@ -9855,6 +10131,9 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5); Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5) +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7); @@ -9872,7 +10151,6 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2) master-bin.000001 # Query # # use `test`; SAVEPOINT s1 -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5) master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7) master-bin.000001 # Query # # use `test`; ROLLBACK TO s1 master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9880,9 +10158,11 @@ master-bin.000001 # Xid # # COMMIT /* XID */ -b-b-b-b-b-b-b-b-b-b-b- >> B T S1 N T R1 C << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2) master-bin.000001 # Query # # use `test`; SAVEPOINT s1 -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5) master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7) master-bin.000001 # Query # # use `test`; ROLLBACK TO s1 master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10399,6 +10679,9 @@ Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement uses a system function whose value may differ on slave. Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-T << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO tt_1(trans_id, stmt_id) VALUES (340, 6); @@ -10409,7 +10692,6 @@ COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (340, 3) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (340, 6) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- @@ -10417,8 +10699,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (340, 3) master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (340, 3) master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (340, 6) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> trunc-CS-N B T IS-N<-T T C << -e-e-e-e-e-e-e-e-e-e-e- @@ -10440,6 +10724,9 @@ Log_name Pos Event_type Server_id End_log_pos Info INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1;; Got one of the listed errors Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> ISe-N<-T << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO tt_1(trans_id, stmt_id) VALUES (341, 6); @@ -10450,7 +10737,6 @@ COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (341, 3) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (341, 6) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- @@ -10458,8 +10744,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (341, 3) master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (341, 3) master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (341, 6) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> trunc-CS-N B T ISe-N<-T T C << -e-e-e-e-e-e-e-e-e-e-e- @@ -10583,6 +10871,9 @@ Warnings: Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement uses a system function whose value may differ on slave. Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO tt_1(trans_id, stmt_id) VALUES (346, 6); @@ -10593,7 +10884,6 @@ COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (346, 3) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (346, 6) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- @@ -10601,8 +10891,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (346, 3) master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (346, 3) master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (346, 6) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> trunc-CS-N B T IS-N<-N T C << -e-e-e-e-e-e-e-e-e-e-e- @@ -10624,6 +10916,9 @@ Log_name Pos Event_type Server_id End_log_pos Info INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1;; Got one of the listed errors Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> ISe-N<-N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO tt_1(trans_id, stmt_id) VALUES (347, 6); @@ -10634,7 +10929,6 @@ COMMIT; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (347, 3) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (347, 6) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- @@ -10642,8 +10936,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (347, 3) master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (347, 3) master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (347, 6) master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> trunc-CS-N B T ISe-N<-N T C << -e-e-e-e-e-e-e-e-e-e-e- @@ -10751,20 +11047,24 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> CT << -b-b-b-b-b-b-b-b-b-b-b- CREATE TEMPORARY TABLE tt_xx_11 (a int) engine=Innodb;; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_11 (a int) engine=Innodb +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CT << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (351, 2) -master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_11 (a int) engine=Innodb master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T CT R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (351, 2) master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_11 (a int) engine=Innodb +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (351, 2) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T CT R << -e-e-e-e-e-e-e-e-e-e-e- @@ -10797,6 +11097,9 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> CT << -b-b-b-b-b-b-b-b-b-b-b- CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb;; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CT << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> R1 << -b-b-b-b-b-b-b-b-b-b-b- ROLLBACK TO s1; @@ -10811,17 +11114,18 @@ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2) master-bin.000001 # Query # # use `test`; SAVEPOINT s1 master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5) -master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb master-bin.000001 # Query # # use `test`; ROLLBACK TO s1 master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T S1 T CT R1 R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2) master-bin.000001 # Query # # use `test`; SAVEPOINT s1 master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5) -master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb master-bin.000001 # Query # # use `test`; ROLLBACK TO s1 master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T S1 T CT R1 R << -e-e-e-e-e-e-e-e-e-e-e- @@ -10847,6 +11151,9 @@ Log_name Pos Event_type Server_id End_log_pos Info -b-b-b-b-b-b-b-b-b-b-b- >> CT << -b-b-b-b-b-b-b-b-b-b-b- CREATE TEMPORARY TABLE tt_xx_13 (a int) engine=Innodb;; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_13 (a int) engine=Innodb +master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CT << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 5); @@ -10857,15 +11164,16 @@ ROLLBACK; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 2) -master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_13 (a int) engine=Innodb master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 5) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> B T CT T R << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 2) master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_13 (a int) engine=Innodb +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 2) master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 5) master-bin.000001 # Query # # ROLLBACK -e-e-e-e-e-e-e-e-e-e-e- >> B T CT T R << -e-e-e-e-e-e-e-e-e-e-e- diff --git a/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result index 5897735c74e..c2d644e4a7c 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +SET @@session.binlog_direct_non_transactional_updates= FALSE; call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT"); create table t1(n int); diff --git a/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result b/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result index 8d37686688a..59d6b919c3f 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result +++ b/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +SET @@session.binlog_direct_non_transactional_updates= FALSE; call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT"); create table tm (a int auto_increment primary key) engine=myisam; create table ti (a int auto_increment primary key) engine=innodb; diff --git a/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test b/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test index 583268d0f65..d89b76bf44a 100644 --- a/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test +++ b/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test @@ -8,6 +8,8 @@ call mtr.add_suppression("Unsafe statement binlogged in statement format since B connection master; call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT"); +SET @@session.binlog_direct_non_transactional_updates= FALSE; + disable_warnings; DROP DATABASE IF EXISTS db1; enable_warnings; diff --git a/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test b/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test index 067c4b7c9b6..7701cd7aa06 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test +++ b/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test @@ -5,4 +5,5 @@ --source include/have_binlog_format_statement.inc --source include/have_innodb.inc +SET @@session.binlog_direct_non_transactional_updates= FALSE; --source ./extra/rpl_tests/rpl_start_stop_slave.test diff --git a/mysql-test/suite/rpl/t/rpl_stm_stop_middle_group.test b/mysql-test/suite/rpl/t/rpl_stm_stop_middle_group.test index 649690ebbbe..dd3bf1a7f56 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_stop_middle_group.test +++ b/mysql-test/suite/rpl/t/rpl_stm_stop_middle_group.test @@ -6,4 +6,5 @@ -- source include/have_innodb.inc -- source include/have_binlog_format_statement.inc +SET @@session.binlog_direct_non_transactional_updates= FALSE; -- source extra/rpl_tests/rpl_stop_middle_group.test diff --git a/mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_basic.result b/mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_basic.result new file mode 100644 index 00000000000..529c1aa59aa --- /dev/null +++ b/mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_basic.result @@ -0,0 +1,76 @@ +SELECT @@GLOBAL.binlog_direct_non_transactional_updates; +@@GLOBAL.binlog_direct_non_transactional_updates +1 +'#---------------------BS_STVARS_002_01----------------------#' +SET @start_value= @@global.binlog_direct_non_transactional_updates; +SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); +COUNT(@@GLOBAL.binlog_direct_non_transactional_updates) +1 +1 Expected +SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); +COUNT(@@SESSION.binlog_direct_non_transactional_updates) +1 +1 Expected +'#---------------------BS_STVARS_002_02----------------------#' +SET @@GLOBAL.binlog_direct_non_transactional_updates=TRUE; +SELECT @@GLOBAL.binlog_direct_non_transactional_updates; +@@GLOBAL.binlog_direct_non_transactional_updates +1 +SET @@SESSION.binlog_direct_non_transactional_updates=TRUE; +SELECT @@SESSION.binlog_direct_non_transactional_updates; +@@SESSION.binlog_direct_non_transactional_updates +1 +'#---------------------BS_STVARS_002_03----------------------#' +SELECT +IF(@@GLOBAL.binlog_direct_non_transactional_updates, "ON", "OFF") = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +IF(@@GLOBAL.binlog_direct_non_transactional_updates, "ON", "OFF") = VARIABLE_VALUE +1 +1 Expected +SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); +COUNT(@@GLOBAL.binlog_direct_non_transactional_updates) +1 +1 Expected +SELECT COUNT(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +COUNT(VARIABLE_VALUE) +1 +1 Expected +'#---------------------BS_STVARS_002_04----------------------#' +SELECT +IF(@@SESSION.binlog_direct_non_transactional_updates, "ON", "OFF") = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.SESSION_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +IF(@@SESSION.binlog_direct_non_transactional_updates, "ON", "OFF") = VARIABLE_VALUE +1 +1 Expected +SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); +COUNT(@@SESSION.binlog_direct_non_transactional_updates) +1 +1 Expected +SELECT COUNT(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.SESSION_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +COUNT(VARIABLE_VALUE) +1 +1 Expected +'#---------------------BS_STVARS_002_05----------------------#' +SELECT COUNT(@@binlog_direct_non_transactional_updates); +COUNT(@@binlog_direct_non_transactional_updates) +1 +1 Expected +SELECT COUNT(@@local.binlog_direct_non_transactional_updates); +COUNT(@@local.binlog_direct_non_transactional_updates) +1 +1 Expected +SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); +COUNT(@@SESSION.binlog_direct_non_transactional_updates) +1 +1 Expected +SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); +COUNT(@@GLOBAL.binlog_direct_non_transactional_updates) +1 +1 Expected +SET @@global.binlog_direct_non_transactional_updates= @start_value; diff --git a/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic.test b/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic.test new file mode 100644 index 00000000000..9381f022a6d --- /dev/null +++ b/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_basic.test @@ -0,0 +1,97 @@ +######### mysql-test\t\binlog_direct_non_transactional_updates.test ########### +# # +# Variable Name: binlog_direct_non_transactional_updates # +# Scope: Global & Session # +# Access Type: Static # +# Data Type: bool # +# # +# Description:Test Cases of Dynamic System Variable # +# binlog_direct_non_transactional_updates # +# that checks the behavior of this variable in the following ways # +# * Value Check # +# * Scope Check # +# # +# Reference: # +# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html # +# # +############################################################################### + +SELECT @@GLOBAL.binlog_direct_non_transactional_updates; + +--echo '#---------------------BS_STVARS_002_01----------------------#' +#################################################################### +# Displaying default value # +#################################################################### +SET @start_value= @@global.binlog_direct_non_transactional_updates; + +SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); +--echo 1 Expected + +SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); +--echo 1 Expected + +--echo '#---------------------BS_STVARS_002_02----------------------#' +#################################################################### +# Check if Value can set # +#################################################################### +SET @@GLOBAL.binlog_direct_non_transactional_updates=TRUE; +SELECT @@GLOBAL.binlog_direct_non_transactional_updates; + +SET @@SESSION.binlog_direct_non_transactional_updates=TRUE; +SELECT @@SESSION.binlog_direct_non_transactional_updates; + +--echo '#---------------------BS_STVARS_002_03----------------------#' +################################################################# +# Check if the value in GLOBAL Table matches value in variable # +################################################################# + +SELECT +IF(@@GLOBAL.binlog_direct_non_transactional_updates, "ON", "OFF") = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +--echo 1 Expected + +SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); +--echo 1 Expected + +SELECT COUNT(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +--echo 1 Expected + + +--echo '#---------------------BS_STVARS_002_04----------------------#' +################################################################# +# Check if the value in SESSION Table matches value in variable # +################################################################# + +SELECT +IF(@@SESSION.binlog_direct_non_transactional_updates, "ON", "OFF") = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.SESSION_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +--echo 1 Expected + +SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); +--echo 1 Expected + +SELECT COUNT(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.SESSION_VARIABLES +WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates'; +--echo 1 Expected + + +--echo '#---------------------BS_STVARS_002_05----------------------#' +################################################################################ +# Check if binlog_format can be accessed with and without @@ sign # +################################################################################ + +SELECT COUNT(@@binlog_direct_non_transactional_updates); +--echo 1 Expected +SELECT COUNT(@@local.binlog_direct_non_transactional_updates); +--echo 1 Expected +SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates); +--echo 1 Expected +SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates); +--echo 1 Expected + +SET @@global.binlog_direct_non_transactional_updates= @start_value; diff --git a/sql/log.cc b/sql/log.cc index 26cfdb615fe..5a583e9e134 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -199,7 +199,7 @@ private: class binlog_cache_data { public: - binlog_cache_data(): m_pending(0), before_stmt_pos (MY_OFF_T_UNDEF), + binlog_cache_data(): m_pending(0), before_stmt_pos(MY_OFF_T_UNDEF), incident(FALSE) { cache_log.end_of_file= max_binlog_cache_size; @@ -1761,7 +1761,7 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all) binlog_flush_stmt_cache(thd, cache_mngr); } - if (cache_mngr->trx_cache.empty()) + if (cache_mngr->trx_cache.empty()) { /* we're here because cache_log was flushed in MYSQL_BIN_LOG::log_xid() @@ -1770,7 +1770,6 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all) DBUG_RETURN(0); } - if (mysql_bin_log.check_write_error(thd)) { /* @@ -1910,7 +1909,7 @@ static int binlog_savepoint_rollback(handlerton *hton, THD *thd, void *sv) non-transactional table. Otherwise, truncate the binlog cache starting from the SAVEPOINT command. */ - if (unlikely(thd->transaction.all.modified_non_trans_table || + if (unlikely(thd->transaction.all.modified_non_trans_table || (thd->variables.option_bits & OPTION_KEEP_LOG))) { int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED); @@ -4192,6 +4191,66 @@ bool MYSQL_BIN_LOG::is_query_in_union(THD *thd, query_id_t query_id_param) query_id_param >= thd->binlog_evt_union.first_query_id); } +/** + This function checks if a transactional talbe was updated by the + current transaction. + + @param thd The client thread that executed the current statement. + @return + @c true if a transactional table was updated, @c false otherwise. +*/ +bool +trans_has_updated_trans_table(const THD* thd) +{ + binlog_cache_mngr *const cache_mngr= + (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); + + return (cache_mngr ? my_b_tell (&cache_mngr->trx_cache.cache_log) : 0); +} + +/** + This function checks if a transactional talbe was updated by the + current statement. + + @param thd The client thread that executed the current statement. + @return + @c true if a transactional table was updated, @c false otherwise. +*/ +bool +stmt_has_updated_trans_table(const THD *thd) +{ + Ha_trx_info *ha_info; + + for (ha_info= thd->transaction.stmt.ha_list; ha_info; ha_info= ha_info->next()) + { + if (ha_info->is_trx_read_write() && ha_info->ht() != binlog_hton) + return (TRUE); + } + return (FALSE); +} + +/** + This function checks if either a trx-cache or a non-trx-cache should + be used. If @c bin_log_direct_non_trans_update is active, the cache + to be used depends on the flag @c is_transactional. + + Otherswise, we use the trx-cache if either the @c is_transactional + is true or the trx-cache is not empty. + + @param thd The client thread. + @param is_transactional The changes are related to a trx-table. + @return + @c true if a trx-cache should be used, @c false otherwise. +*/ +bool use_trans_cache(const THD* thd, bool is_transactional) +{ + binlog_cache_mngr *const cache_mngr= + (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); + + return + (thd->variables.binlog_direct_non_trans_update ? is_transactional : + (cache_mngr->trx_cache.empty() && !is_transactional ? FALSE : TRUE)); +} /* These functions are placed in this file since they need access to @@ -4224,44 +4283,6 @@ int THD::binlog_setup_trx_data() DBUG_RETURN(0); } -/** - This function checks if a transactional talbe was updated by the - current transaction. - - @param thd The client thread that executed the current statement. - @return - @c true if a transactional table was updated, @false otherwise. -*/ -bool -trans_has_updated_trans_table(THD* thd) -{ - binlog_cache_mngr *const cache_mngr= - (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); - - return (cache_mngr ? my_b_tell (&cache_mngr->trx_cache.cache_log) : 0); -} - -/** - This function checks if a transactional talbe was updated by the - current statement. - - @param thd The client thread that executed the current statement. - @return - @c true if a transactional table was updated, @false otherwise. -*/ -bool -stmt_has_updated_trans_table(THD *thd) -{ - Ha_trx_info *ha_info; - - for (ha_info= thd->transaction.stmt.ha_list; ha_info; ha_info= ha_info->next()) - { - if (ha_info->is_trx_read_write() && ha_info->ht() != binlog_hton) - return (TRUE); - } - return (FALSE); -} - /* Function to start a statement and optionally a transaction for the binary log. @@ -4370,8 +4391,8 @@ int THD::binlog_write_table_map(TABLE *table, bool is_transactional) binlog_cache_mngr *const cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(this, binlog_hton); - IO_CACHE *file= cache_mngr->get_binlog_cache_log(is_transactional); - + IO_CACHE *file= + cache_mngr->get_binlog_cache_log(use_trans_cache(this, is_transactional)); if ((error= the_event.write(file))) DBUG_RETURN(error); @@ -4406,7 +4427,7 @@ THD::binlog_get_pending_rows_event(bool is_transactional) const if (cache_mngr) { binlog_cache_data *cache_data= - cache_mngr->get_binlog_cache_data(is_transactional); + cache_mngr->get_binlog_cache_data(use_trans_cache(this, is_transactional)); rows= cache_data->pending(); } @@ -4435,7 +4456,7 @@ THD::binlog_set_pending_rows_event(Rows_log_event* ev, bool is_transactional) DBUG_ASSERT(cache_mngr); binlog_cache_data *cache_data= - cache_mngr->get_binlog_cache_data(is_transactional); + cache_mngr->get_binlog_cache_data(use_trans_cache(this, is_transactional)); cache_data->set_pending(ev); } @@ -4461,7 +4482,7 @@ MYSQL_BIN_LOG::remove_pending_rows_event(THD *thd, bool is_transactional) DBUG_ASSERT(cache_mngr); binlog_cache_data *cache_data= - cache_mngr->get_binlog_cache_data(is_transactional); + cache_mngr->get_binlog_cache_data(use_trans_cache(thd, is_transactional)); if (Rows_log_event* pending= cache_data->pending()) { @@ -4498,7 +4519,7 @@ MYSQL_BIN_LOG::flush_and_set_pending_rows_event(THD *thd, DBUG_ASSERT(cache_mngr); binlog_cache_data *cache_data= - cache_mngr->get_binlog_cache_data(is_transactional); + cache_mngr->get_binlog_cache_data(use_trans_cache(thd, is_transactional)); DBUG_PRINT("info", ("cache_mngr->pending(): 0x%lx", (long) cache_data->pending())); @@ -4609,35 +4630,9 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info) binlog_cache_mngr *const cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); - /* - If we are about to use write rows, we just need to check the type of - the event (either transactional or non-transactional) in order to - choose the cache. - */ - if (thd->is_current_stmt_binlog_format_row()) - { - file= cache_mngr->get_binlog_cache_log(event_info->use_trans_cache()); - cache_data= cache_mngr->get_binlog_cache_data(event_info->use_trans_cache()); - } - /* - However, if we are about to write statements we need to consider other - things. We use the non-transactional cache when: - - . the transactional cache is empty which means that there were no - early statement on behalf of the transaction. - . the respective event is tagged as non-transactional. - */ - else if (cache_mngr->trx_cache.empty() && - !event_info->use_trans_cache()) - { - file= &cache_mngr->stmt_cache.cache_log; - cache_data= &cache_mngr->stmt_cache; - } - else - { - file= &cache_mngr->trx_cache.cache_log; - cache_data= &cache_mngr->trx_cache; - } + bool is_trans_cache= use_trans_cache(thd, event_info->use_trans_cache()); + file= cache_mngr->get_binlog_cache_log(is_trans_cache); + cache_data= cache_mngr->get_binlog_cache_data(is_trans_cache); thd->binlog_start_trans_and_stmt(); } @@ -4899,7 +4894,6 @@ int MYSQL_BIN_LOG::write_cache(IO_CACHE *cache, bool lock_log, bool sync_log) do { - /* if we only got a partial header in the last iteration, get the other half now and process a full header. diff --git a/sql/log.h b/sql/log.h index 5e13d153db8..e9429067a34 100644 --- a/sql/log.h +++ b/sql/log.h @@ -20,8 +20,9 @@ class Relay_log_info; class Format_description_log_event; -bool trans_has_updated_trans_table(THD* thd); -bool stmt_has_updated_trans_table(THD *thd); +bool trans_has_updated_trans_table(const THD* thd); +bool stmt_has_updated_trans_table(const THD *thd); +bool use_trans_cache(const THD* thd, bool is_transactional); /* Transaction Coordinator log - a base abstract class diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 15089ed053a..33a68f1489e 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -6311,3 +6311,8 @@ ER_WRONG_NATIVE_TABLE_STRUCTURE ER_WRONG_PERFSCHEMA_USAGE eng "Invalid performance_schema usage." + +ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT + eng "Cannot modify @@session.binlog_direct_non_transactional_updates inside a transaction" +ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT + eng "Cannot change the binlog direct flag inside a stored function or trigger" diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index ae4fc533d92..2d80b7302a5 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -6306,3 +6306,7 @@ ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT eng "The syntax '%s' is deprecated and will be removed in MySQL %s." ger "Die Syntax '%s' ist veraltet und wird in MySQL %s entfernt." +ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT + eng "Cannot modify @@session.binlog_direct_non_transactional_updates inside a transaction" +ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT + eng "Cannot change the binlog direct flag inside a stored function or trigger" diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 6d731fd76a2..fe3114c9d50 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -299,6 +299,37 @@ static Sys_var_enum Sys_binlog_format( NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(binlog_format_check), ON_UPDATE(fix_binlog_format_after_update)); +static bool binlog_direct_check(sys_var *self, THD *thd, set_var *var) +{ + /* + Makes the session variable 'binlog_direct_non_transactional_updates' + read-only inside a transaction. + */ + if (thd->active_transaction() && (var->type == OPT_SESSION)) + { + my_error(ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT, MYF(0)); + return 1; + } + /* + Makes the session variable 'binlog_direct_non_transactional_updates' + read-only if within a procedure, trigger or function. + */ + if (thd->in_sub_stmt) + { + my_error(ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT, MYF(0)); + return 1; + } + + if (check_has_super(self, thd, var)) + return true; + if (var->type == OPT_GLOBAL || + (thd->variables.binlog_direct_non_trans_update == + var->save_result.ulonglong_value)) + return false; + + return false; +} + static Sys_var_mybool Sys_binlog_direct( "binlog_direct_non_transactional_updates", "Causes updates to non-transactional engines using statement format to " @@ -308,7 +339,7 @@ static Sys_var_mybool Sys_binlog_direct( "SELECT * FROM t_innodb; otherwise, slaves may diverge from the master.", SESSION_VAR(binlog_direct_non_trans_update), CMD_LINE(OPT_ARG), DEFAULT(FALSE), - NO_MUTEX_GUARD, NOT_IN_BINLOG); + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(binlog_direct_check)); static Sys_var_ulong Sys_bulk_insert_buff_size( "bulk_insert_buffer_size", "Size of tree cache used in bulk " diff --git a/support-files/my-small.cnf.sh b/support-files/my-small.cnf.sh index 3bfa08d0bd1..b4461ebf90f 100644 --- a/support-files/my-small.cnf.sh +++ b/support-files/my-small.cnf.sh @@ -51,6 +51,13 @@ server-id = 1 # binary logging format - mixed recommended #binlog_format=mixed +# Causes updates to non-transactional engines using statement format to be +# written directly to binary log. Before using this option make sure that +# there are no dependencies between transactional and non-transactional +# tables such as in the statement INSERT INTO t_myisam SELECT * FROM +# t_innodb; otherwise, slaves may diverge from the master. +#binlog_direct_non_transactional_updates=TRUE + # Uncomment the following if you are using InnoDB tables #innodb_data_home_dir = @localstatedir@/ #innodb_data_file_path = ibdata1:10M:autoextend From ab61c15efdf8da4152a98ee218b537ad6da625a9 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Tue, 2 Feb 2010 12:26:28 +0300 Subject: [PATCH 119/132] BUG#50767: Some RPL tests started to fail in next-mr-merge on Linux x86_64 debug Two test cases fail because the suppression for the unsafe warning needs to be updated (BUG@39934 refactored this part and these changes are only in mysql-next-mr - this is why we notice them now when merging in next-mr). This is the case for rpl_nondeterministic_functions and rpl_misc_functions test cases. rpl_stm_binlog_direct test case is not needed in version > 5.1. The rpl_heartbeat_basic test case fails because patch for BUG@50397 removed the CHANGE MASTER in the slave that would set it's period to 1/10 of the master. This would cause the test assertion to fail. The fixes for the issues described above are: - rpl_misc_functions - updated suppression message - rpl_nondeterministic_functions - updated suppression message - rpl_stm_binlog_direct - removed the test case (it is not needed in versions > 5.1) - rpl_heartbeat_basic - deployed instruction: CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=0.1; --- .../suite/rpl/r/rpl_heartbeat_basic.result | 1 + .../suite/rpl/r/rpl_misc_functions.result | 2 +- .../r/rpl_nondeterministic_functions.result | 2 +- .../suite/rpl/r/rpl_stm_binlog_direct.result | 1392 ----------------- .../suite/rpl/t/rpl_heartbeat_basic.test | 2 + .../suite/rpl/t/rpl_misc_functions.test | 2 +- .../rpl/t/rpl_nondeterministic_functions.test | 2 +- .../suite/rpl/t/rpl_stm_binlog_direct.test | 230 --- 8 files changed, 7 insertions(+), 1626 deletions(-) delete mode 100644 mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result delete mode 100644 mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result index 60d1eca1213..b4c4e538ea7 100644 --- a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result +++ b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result @@ -277,6 +277,7 @@ CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=SLAVE_PORT, MASTER_USER='r include/start_slave.inc CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); INSERT INTO t1 VALUES(1, 'on master'); +CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=0.1; include/start_slave.inc INSERT INTO t1 VALUES(2, 'on slave'); SELECT * FROM t1 ORDER BY a; diff --git a/mysql-test/suite/rpl/r/rpl_misc_functions.result b/mysql-test/suite/rpl/r/rpl_misc_functions.result index 6d69235927e..e92a11ca9b3 100644 --- a/mysql-test/suite/rpl/r/rpl_misc_functions.result +++ b/mysql-test/suite/rpl/r/rpl_misc_functions.result @@ -4,7 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); +CALL mtr.add_suppression('Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT'); create table t1(id int, i int, r1 int, r2 int, p varchar(100)); insert into t1 values(1, connection_id(), 0, 0, ""); insert into t1 values(2, 0, rand()*1000, rand()*1000, ""); diff --git a/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result b/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result index 3b9b741e040..3b4aef4f27e 100644 --- a/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result +++ b/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result @@ -4,7 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); +CALL mtr.add_suppression('Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT'); CREATE TABLE t1 (a VARCHAR(1000)); INSERT INTO t1 VALUES (CONNECTION_ID()); INSERT INTO t1 VALUES (CONNECTION_ID()); diff --git a/mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result b/mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result deleted file mode 100644 index e8bd0866a58..00000000000 --- a/mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result +++ /dev/null @@ -1,1392 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -set @@session.binlog_direct_non_transactional_updates= TRUE; -######################################################################### -# CONFIGURATION -######################################################################### -SET @commands= 'configure'; -SET SQL_LOG_BIN=0; -CREATE TABLE nt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; -CREATE TABLE nt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; -CREATE TABLE nt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; -CREATE TABLE nt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; -CREATE TABLE nt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; -CREATE TABLE nt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; -CREATE TABLE tt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; -CREATE TABLE tt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; -CREATE TABLE tt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; -CREATE TABLE tt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; -CREATE TABLE tt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; -CREATE TABLE tt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; -SET SQL_LOG_BIN=1; -SET SQL_LOG_BIN=0; -CREATE TABLE nt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; -CREATE TABLE nt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; -CREATE TABLE nt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; -CREATE TABLE nt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; -CREATE TABLE nt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; -CREATE TABLE nt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; -CREATE TABLE tt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; -CREATE TABLE tt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; -CREATE TABLE tt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; -CREATE TABLE tt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; -CREATE TABLE tt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; -CREATE TABLE tt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; -SET SQL_LOG_BIN=1; -INSERT INTO nt_1(trans_id, stmt_id) VALUES(1,1); -INSERT INTO nt_2(trans_id, stmt_id) VALUES(1,1); -INSERT INTO nt_3(trans_id, stmt_id) VALUES(1,1); -INSERT INTO nt_4(trans_id, stmt_id) VALUES(1,1); -INSERT INTO nt_5(trans_id, stmt_id) VALUES(1,1); -INSERT INTO nt_6(trans_id, stmt_id) VALUES(1,1); -INSERT INTO tt_1(trans_id, stmt_id) VALUES(1,1); -INSERT INTO tt_2(trans_id, stmt_id) VALUES(1,1); -INSERT INTO tt_3(trans_id, stmt_id) VALUES(1,1); -INSERT INTO tt_4(trans_id, stmt_id) VALUES(1,1); -INSERT INTO tt_5(trans_id, stmt_id) VALUES(1,1); -INSERT INTO tt_6(trans_id, stmt_id) VALUES(1,1); -CREATE PROCEDURE pc_i_tt_5_suc (IN p_trans_id INTEGER, IN p_stmt_id INTEGER) -BEGIN -DECLARE in_stmt_id INTEGER; -SELECT max(stmt_id) INTO in_stmt_id FROM tt_5 WHERE trans_id= p_trans_id; -SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; -INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); -INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); -END| -CREATE PROCEDURE pc_i_nt_5_suc (IN p_trans_id INTEGER, IN p_stmt_id INTEGER) -BEGIN -DECLARE in_stmt_id INTEGER; -SELECT max(stmt_id) INTO in_stmt_id FROM nt_5 WHERE trans_id= p_trans_id; -SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; -INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); -INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); -END| -CREATE FUNCTION fc_i_tt_5_suc (p_trans_id INTEGER, p_stmt_id INTEGER) RETURNS VARCHAR(64) -BEGIN -DECLARE in_stmt_id INTEGER; -SELECT max(stmt_id) INTO in_stmt_id FROM tt_5 WHERE trans_id= p_trans_id; -SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; -INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); -INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); -RETURN "fc_i_tt_5_suc"; -END| -CREATE FUNCTION fc_i_nt_5_suc (p_trans_id INTEGER, p_stmt_id INTEGER) RETURNS VARCHAR(64) -BEGIN -DECLARE in_stmt_id INTEGER; -SELECT max(stmt_id) INTO in_stmt_id FROM nt_5 WHERE trans_id= p_trans_id; -SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; -INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); -INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); -RETURN "fc_i_nt_5_suc"; -END| -CREATE TRIGGER tr_i_tt_3_to_nt_3 AFTER INSERT ON tt_3 FOR EACH ROW -BEGIN -DECLARE in_stmt_id INTEGER; -SELECT max(stmt_id) INTO in_stmt_id FROM nt_3 WHERE trans_id= NEW.trans_id; -SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id; -INSERT INTO nt_3(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); -INSERT INTO nt_3(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); -END| -CREATE TRIGGER tr_i_nt_4_to_tt_4 AFTER INSERT ON nt_4 FOR EACH ROW -BEGIN -DECLARE in_stmt_id INTEGER; -SELECT max(stmt_id) INTO in_stmt_id FROM tt_4 WHERE trans_id= NEW.trans_id; -SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id; -INSERT INTO tt_4(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); -INSERT INTO tt_4(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); -END| -CREATE TRIGGER tr_i_tt_5_to_tt_6 AFTER INSERT ON tt_5 FOR EACH ROW -BEGIN -DECLARE in_stmt_id INTEGER; -SELECT max(stmt_id) INTO in_stmt_id FROM tt_6 WHERE trans_id= NEW.trans_id; -SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id, 1), 1) INTO in_stmt_id; -INSERT INTO tt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); -INSERT INTO tt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); -END| -CREATE TRIGGER tr_i_nt_5_to_nt_6 AFTER INSERT ON nt_5 FOR EACH ROW -BEGIN -DECLARE in_stmt_id INTEGER; -SELECT max(stmt_id) INTO in_stmt_id FROM nt_6 WHERE trans_id= NEW.trans_id; -SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id; -INSERT INTO nt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); -INSERT INTO nt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); -END| -SET @commands= ''; -######################################################################### -# 1 - BINLOG ORDER -######################################################################### - - - - -# -#3) Generates in the binlog what follows: -# --> STMT "N B T C" entries, format S. -# -SET @commands= 'B T N C'; --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (7, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (7, 4); -Warnings: -Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (7, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (7, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T N C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (7, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (7, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T N C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (8, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_5(trans_id, stmt_id) VALUES (8, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (8, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (8, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T N-trig C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (8, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (8, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T N-trig C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (9, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_nt_5_suc (9, 4); -fc_i_nt_5_suc (9, 4) -fc_i_nt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (9, 2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(9,4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T N-func C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (9, 2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(9,4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T N-func C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (10, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_nt_5_suc (10, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (10, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T N-proc C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (10, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T N-proc C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_5(trans_id, stmt_id) VALUES (11, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (11, 4); -Warnings: -Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (11, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (11, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (11, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (11, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_5(trans_id, stmt_id) VALUES (12, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_5(trans_id, stmt_id) VALUES (12, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (12, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (12, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-trig C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (12, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (12, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-trig C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_5(trans_id, stmt_id) VALUES (13, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_nt_5_suc (13, 4); -fc_i_nt_5_suc (13, 4) -fc_i_nt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (13, 2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(13,4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-func C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (13, 2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(13,4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-func C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_5(trans_id, stmt_id) VALUES (14, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_nt_5_suc (14, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (14, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',14), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',14), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-proc C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (14, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',14), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',14), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-proc C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_tt_5_suc (15, 2); -fc_i_tt_5_suc (15, 2) -fc_i_tt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (15, 4); -Warnings: -Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(15,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (15, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-func N C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(15,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (15, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T-func N C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_tt_5_suc (16, 2); -fc_i_tt_5_suc (16, 2) -fc_i_tt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_5(trans_id, stmt_id) VALUES (16, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(16,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (16, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-trig C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(16,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (16, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-trig C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_tt_5_suc (17, 2); -fc_i_tt_5_suc (17, 2) -fc_i_tt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_nt_5_suc (17, 4); -fc_i_nt_5_suc (17, 4) -fc_i_nt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(17,2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(17,4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-func C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(17,2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(17,4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-func C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_tt_5_suc (18, 2); -fc_i_tt_5_suc (18, 2) -fc_i_tt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_nt_5_suc (18, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(18,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-proc C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(18,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-proc C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_tt_5_suc (19, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (19, 4); -Warnings: -Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',19), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',19), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (19, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',19), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',19), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (19, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_tt_5_suc (20, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_5(trans_id, stmt_id) VALUES (20, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',20), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',20), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (20, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-trig C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',20), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',20), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (20, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-trig C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_tt_5_suc (21, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_nt_5_suc (21, 4); -fc_i_nt_5_suc (21, 4) -fc_i_nt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',21), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',21), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(21,4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-func C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',21), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',21), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(21,4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-func C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_tt_5_suc (22, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_nt_5_suc (22, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-proc C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',22), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-proc C << -e-e-e-e-e-e-e-e-e-e-e- - - - - - -# -#3.e) Generates in the binlog what follows if T-* fails: -# --> STMT "N" entry, format S. -# Otherwise, what follows if N-* fails and a N-Table is changed: -# --> STMT "N B T C" entries, format S. -# --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> eT << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (10, 2); -Got one of the listed errors -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> eT << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (23, 4); -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (23, 4) -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B eT N C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (23, 4) -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> B eT N C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> Te << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (24, 2), (10, 2); -Got one of the listed errors -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> Te << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (24, 4); -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (24, 4) -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B Te N C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (24, 4) -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> B Te N C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (25, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> eN << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (24, 4); -Got one of the listed errors -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> eN << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (25, 2) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T eN C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (25, 2) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T eN C << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (26, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> Ne << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (26, 4), (24, 4); -Got one of the listed errors -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> Ne << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b- -COMMIT; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (26, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (26, 4), (24, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T Ne C << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (26, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (26, 4), (24, 4) -master-bin.000001 # Xid # # COMMIT /* XID */ --e-e-e-e-e-e-e-e-e-e-e- >> B T Ne C << -e-e-e-e-e-e-e-e-e-e-e- - - - - - -# -#4) Generates in the binlog what follows: -# --> STMT "N B T R" entries, format S. -# --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (27, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (27, 4); -Warnings: -Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (27, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (27, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T N R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (27, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (27, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T N R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (28, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_5(trans_id, stmt_id) VALUES (28, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (28, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (28, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T N-trig R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (28, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (28, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T N-trig R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (29, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_nt_5_suc (29, 4); -fc_i_nt_5_suc (29, 4) -fc_i_nt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (29, 2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(29,4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T N-func R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (29, 2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(29,4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T N-func R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (30, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_nt_5_suc (30, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (30, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',30), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',30), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T N-proc R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (30, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',30), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',30), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T N-proc R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_5(trans_id, stmt_id) VALUES (31, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (31, 4); -Warnings: -Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (31, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (31, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (31, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (31, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_5(trans_id, stmt_id) VALUES (32, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_5(trans_id, stmt_id) VALUES (32, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (32, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (32, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-trig R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (32, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (32, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-trig R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_5(trans_id, stmt_id) VALUES (33, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_nt_5_suc (33, 4); -fc_i_nt_5_suc (33, 4) -fc_i_nt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (33, 2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(33,4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-func R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (33, 2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(33,4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-func R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_5(trans_id, stmt_id) VALUES (34, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_nt_5_suc (34, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (34, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',34), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',34), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-proc R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (34, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',34), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',34), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-proc R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_tt_5_suc (35, 2); -fc_i_tt_5_suc (35, 2) -fc_i_tt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (35, 4); -Warnings: -Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(35,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (35, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-func N R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(35,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (35, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T-func N R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_tt_5_suc (36, 2); -fc_i_tt_5_suc (36, 2) -fc_i_tt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_5(trans_id, stmt_id) VALUES (36, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(36,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (36, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-trig R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(36,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (36, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-trig R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_tt_5_suc (37, 2); -fc_i_tt_5_suc (37, 2) -fc_i_tt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_nt_5_suc (37, 4); -fc_i_nt_5_suc (37, 4) -fc_i_nt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(37,2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(37,4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-func R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(37,2) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(37,4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-func R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_tt_5_suc (38, 2); -fc_i_tt_5_suc (38, 2) -fc_i_tt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_nt_5_suc (38, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(38,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',38), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',38), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-proc R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(38,2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',38), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',38), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-proc R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_tt_5_suc (39, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (39, 4); -Warnings: -Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction. -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',39), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',39), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (39, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',39), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',39), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (39, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_tt_5_suc (40, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_5(trans_id, stmt_id) VALUES (40, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (40, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-trig R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (40, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-trig R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_tt_5_suc (41, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- -SELECT fc_i_nt_5_suc (41, 4); -fc_i_nt_5_suc (41, 4) -fc_i_nt_5_suc -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',41), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',41), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(41,4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-func R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',41), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',41), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_nt_5_suc`(41,4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-func R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_tt_5_suc (42, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- -CALL pc_i_nt_5_suc (42, 4); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-proc R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1)) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',42), NAME_CONST('in_stmt_id',1) + 1) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-proc R << -e-e-e-e-e-e-e-e-e-e-e- - - - - - -# -#4.e) Generates in the binlog what follows if T* fails: -# --> STMT "B N C" entry, format S. -# Otherwise, what follows if N* fails and a N-Table is changed: -# --> STMT "N" entries, format S. -# --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> eT << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (26, 2); -Got one of the listed errors -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> eT << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (43, 4); -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (43, 4) -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B eT N R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (43, 4) -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> B eT N R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> Te << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (44, 2), (26, 2); -Got one of the listed errors -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> Te << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (44, 4); -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (44, 4) -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B Te N R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (44, 4) -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> B Te N R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (45, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> eN << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (44, 4); -Got one of the listed errors -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> eN << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T eN R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B T eN R << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> B << -b-b-b-b-b-b-b-b-b-b-b- -BEGIN; -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(trans_id, stmt_id) VALUES (46, 2); -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> Ne << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO nt_1(trans_id, stmt_id) VALUES (46, 4), (44, 4); -Got one of the listed errors -Log_name Pos Event_type Server_id End_log_pos Info --e-e-e-e-e-e-e-e-e-e-e- >> Ne << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b- -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (46, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (46, 4), (44, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> B T Ne R << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (46, 2) -master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (46, 4), (44, 4) -master-bin.000001 # Query # # ROLLBACK --e-e-e-e-e-e-e-e-e-e-e- >> B T Ne R << -e-e-e-e-e-e-e-e-e-e-e- - -################################################################################### -# CHECK CONSISTENCY -################################################################################### -################################################################################### -# CLEAN -################################################################################### diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test index 739cbe155ca..fca8646dd05 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test @@ -487,6 +487,8 @@ CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); INSERT INTO t1 VALUES(1, 'on master'); --save_master_pos --connection slave +## set slave period 1/10 of master's +CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=0.1; --source include/start_slave.inc --sync_with_master INSERT INTO t1 VALUES(2, 'on slave'); diff --git a/mysql-test/suite/rpl/t/rpl_misc_functions.test b/mysql-test/suite/rpl/t/rpl_misc_functions.test index b84042160cd..ce74abe970a 100644 --- a/mysql-test/suite/rpl/t/rpl_misc_functions.test +++ b/mysql-test/suite/rpl/t/rpl_misc_functions.test @@ -3,7 +3,7 @@ # source include/master-slave.inc; -CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); +CALL mtr.add_suppression('Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT'); create table t1(id int, i int, r1 int, r2 int, p varchar(100)); insert into t1 values(1, connection_id(), 0, 0, ""); diff --git a/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test b/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test index 9ff2e2d081e..6a83364b0b2 100644 --- a/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test +++ b/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test @@ -17,7 +17,7 @@ --source include/master-slave.inc -CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); +CALL mtr.add_suppression('Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT'); CREATE TABLE t1 (a VARCHAR(1000)); diff --git a/mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test b/mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test deleted file mode 100644 index f0c36c7b40c..00000000000 --- a/mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test +++ /dev/null @@ -1,230 +0,0 @@ -################################################################################ -# This test case checks if the option "binlog-direct-non-transactional-updates" -# makes non-transactional changes in the statement format to be written to the -# binary log as soon as the statement commits. -# -# In what follows, we use the include file rpl_mixing_engines.inc to generate -# sql commands from a format string. The format string consists of a sequence of -# 'codes' separated by spaces. Before it set of commands, we paste the expected -# sequence in the binary log. The following codes exist: -# -# - Define the scope of a transaction: -# B - Begin. -# C - Commit. -# R - Rollback. -# -# - Change only T-Tables: -# T - Updates a T-Table. -# T-trig - Updates T-Tables through a trigger. -# T-func - Updates T-Tables through a function. -# T-proc - Updates T-Tables through a procedure. -# eT - Fails while updating the first tuple in a T-Table. -# Te - Fails while updating an n-tuple (n > 1) in a T-Table. -# Te-trig - Fails while updating an n-tuple (n > 1) in a T-Table. -# Te-func - Fails while updating an n-tuple (n > 1) in a T-Table. -# -# - Change only N-Tables -# N - Updates a N-Table. -# N-trig - Updates N-Tables through a trigger. -# N-func - Updates N-Tables through a function. -# N-proc - Updates N-Tables through a procedure. -# eN - Fails while updating the first tuple in a N-Table. -# Ne - Fails while updating an n-tuple (n > 1) in a N-Table. -# Ne-trig - Fails while updating an n-tuple (n > 1) in a N-Table. -# Ne-func - Fails while updating an n-tuple (n > 1) in a N-Table. -################################################################################ - ---source include/have_binlog_format_statement.inc ---source include/master-slave.inc ---source include/have_innodb.inc - -set @@session.binlog_direct_non_transactional_updates= TRUE; - ---echo ######################################################################### ---echo # CONFIGURATION ---echo ######################################################################### - ---let $engine_type= Innodb -SET @commands= 'configure'; ---source extra/rpl_tests/rpl_mixing_engines.inc - ---echo ######################################################################### ---echo # 1 - BINLOG ORDER ---echo ######################################################################### -connection master; - ---echo ---echo ---echo ---echo ---echo # ---echo #3) Generates in the binlog what follows: ---echo # --> STMT "N B T C" entries, format S. ---echo # -SET @commands= 'B T N C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T N-trig C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T N-func C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T N-proc C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-trig N C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-trig N-trig C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-trig N-func C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-trig N-proc C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-func N C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-func N-trig C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-func N-func C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-func N-proc C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-proc N C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-proc N-trig C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-proc N-func C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-proc N-proc C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - - ---echo ---echo ---echo ---echo ---echo # ---echo #3.e) Generates in the binlog what follows if T-* fails: ---echo # --> STMT "N" entry, format S. ---echo # Otherwise, what follows if N-* fails and a N-Table is changed: ---echo # --> STMT "N B T C" entries, format S. ---echo # -SET @commands= 'B eT N C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B Te N C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T eN C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T Ne C'; ---source extra/rpl_tests/rpl_mixing_engines.inc - - ---echo ---echo ---echo ---echo ---echo # ---echo #4) Generates in the binlog what follows: ---echo # --> STMT "N B T R" entries, format S. ---echo # -SET @commands= 'B T N R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T N-trig R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T N-func R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T N-proc R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-trig N R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-trig N-trig R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-trig N-func R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-trig N-proc R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-func N R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-func N-trig R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-func N-func R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-func N-proc R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-proc N R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-proc N-trig R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-proc N-func R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T-proc N-proc R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - - ---echo ---echo ---echo ---echo ---echo # ---echo #4.e) Generates in the binlog what follows if T* fails: ---echo # --> STMT "B N C" entry, format S. ---echo # Otherwise, what follows if N* fails and a N-Table is changed: ---echo # --> STMT "N" entries, format S. ---echo # -SET @commands= 'B eT N R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B Te N R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T eN R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - -SET @commands= 'B T Ne R'; ---source extra/rpl_tests/rpl_mixing_engines.inc - - ---echo ################################################################################### ---echo # CHECK CONSISTENCY ---echo ################################################################################### -connection master; -sync_slave_with_master; - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/test-nmt-master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/test-nmt-slave.sql ---diff_files $MYSQLTEST_VARDIR/tmp/test-nmt-master.sql $MYSQLTEST_VARDIR/tmp/test-nmt-slave.sql - ---echo ################################################################################### ---echo # CLEAN ---echo ################################################################################### -SET @commands= 'clean'; ---source extra/rpl_tests/rpl_mixing_engines.inc From 1dafac6f35b23757cafe0ac1ef9f6b4edb28947d Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 2 Feb 2010 14:17:21 +0200 Subject: [PATCH 120/132] fixed various pb2 test failures on windows. --- mysql-test/r/bug46080.result | 4 ++-- mysql-test/t/bug46080.test | 4 ++-- sql/event_scheduler.cc | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) mode change 100644 => 100755 mysql-test/r/bug46080.result mode change 100644 => 100755 sql/event_scheduler.cc diff --git a/mysql-test/r/bug46080.result b/mysql-test/r/bug46080.result old mode 100644 new mode 100755 index 2173768cdad..602027be43e --- a/mysql-test/r/bug46080.result +++ b/mysql-test/r/bug46080.result @@ -2,8 +2,8 @@ # Bug #46080: group_concat(... order by) crashes server when # sort_buffer_size cannot allocate # -call mtr.add_suppression("Out of memory at line .*, 'my_alloc.c'"); -call mtr.add_suppression("needed .* byte .*k., memory in use: .* bytes .*k"); +call mtr.add_suppression("Out of memory at line .*, '.*my_alloc.c'"); +call mtr.add_suppression("needed .* byte (.*k)., memory in use: .* bytes (.*k)"); CREATE TABLE t1(a CHAR(255)); INSERT INTO t1 VALUES ('a'); SET @@SESSION.sort_buffer_size=5*16*1000000; diff --git a/mysql-test/t/bug46080.test b/mysql-test/t/bug46080.test index 8b4cee4d8b0..ed4a16fdf51 100644 --- a/mysql-test/t/bug46080.test +++ b/mysql-test/t/bug46080.test @@ -3,8 +3,8 @@ --echo # sort_buffer_size cannot allocate --echo # -call mtr.add_suppression("Out of memory at line .*, 'my_alloc.c'"); -call mtr.add_suppression("needed .* byte .*k., memory in use: .* bytes .*k"); +call mtr.add_suppression("Out of memory at line .*, '.*my_alloc.c'"); +call mtr.add_suppression("needed .* byte (.*k)., memory in use: .* bytes (.*k)"); CREATE TABLE t1(a CHAR(255)); INSERT INTO t1 VALUES ('a'); diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc old mode 100644 new mode 100755 index 8c0025f9ed4..706afb3e0ad --- a/sql/event_scheduler.cc +++ b/sql/event_scheduler.cc @@ -235,8 +235,9 @@ event_scheduler_thread(void *arg) if (!res) scheduler->run(thd); + DBUG_LEAVE; // Against gcc warnings my_thread_end(); - DBUG_RETURN(0); // Against gcc warnings + return 0; } From 2db684572ea716de462bf8d79f398dfcc130a8ff Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Tue, 2 Feb 2010 11:17:58 -0200 Subject: [PATCH 121/132] Fix for valgrind warning: check whether pointer was initialized. storage/myisammrg/ha_myisammrg.cc: myisam pointer is not relevant if a error was raised. --- storage/myisammrg/ha_myisammrg.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc index e265dac2c82..8af776f5c5e 100644 --- a/storage/myisammrg/ha_myisammrg.cc +++ b/storage/myisammrg/ha_myisammrg.cc @@ -380,7 +380,7 @@ static MI_INFO *myisammrg_attach_children_callback(void *callback_param) my_errno= HA_ERR_WRONG_MRG_TABLE_DEF; } DBUG_PRINT("myrg", ("MyISAM handle: 0x%lx my_errno: %d", - (long) myisam, my_errno)); + my_errno ? NULL : (long) myisam, my_errno)); err: DBUG_RETURN(my_errno ? NULL : myisam); From 59f1be1b636e360c410c81de1c41a8c4a254077d Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Tue, 2 Feb 2010 16:38:44 +0300 Subject: [PATCH 122/132] Revert a patch for Bug#48231, which introduced valgrind warnings. Original revision: ------------------------------------------------------------ revision-id: li-bing.song@sun.com-20100130124925-o6sfex42b6noyc6x parent: joro@sun.com-20100129145427-0n79l9hnk0q43ajk committer: branch nick: mysql-5.1-bugteam timestamp: Sat 2010-01-30 20:49:25 +0800 message: Bug #48321 CURRENT_USER() incorrectly replicated for DROP/RENAME USER; REVOKE/GRANT; ALTER EVENT. The following statements support the CURRENT_USER() where a user is needed. DROP USER RENAME USER CURRENT_USER() ... GRANT ... TO CURRENT_USER() REVOKE ... FROM CURRENT_USER() ALTER DEFINER = CURRENT_USER() EVENT but, When these statements are binlogged, CURRENT_USER() just is binlogged as 'CURRENT_USER()', it is not expanded to the real user name. When slave executes the log event, 'CURRENT_USER()' is expand to the user of slave SQL thread, but SQL thread's user name always NULL. This breaks the replication. After this patch, All above statements are rewritten when they are binlogged. The CURRENT_USER() is expanded to the real user's name and host. ------------------------------------------------------------ --- .../extra/rpl_tests/rpl_current_user.test | 127 -- .../suite/rpl/r/rpl_binlog_grant.result | 42 +- mysql-test/suite/rpl/r/rpl_events.result | 42 - .../suite/rpl/r/rpl_innodb_mixed_dml.result | 4 +- mysql-test/suite/rpl/r/rpl_sp.result | 16 +- mysql-test/suite/rpl/r/rpl_user.result | 1755 +---------------- mysql-test/suite/rpl/t/rpl_binlog_grant.test | 8 +- mysql-test/suite/rpl/t/rpl_events.test | 82 - mysql-test/suite/rpl/t/rpl_user.test | 83 +- sql/events.cc | 79 +- sql/sql_acl.cc | 124 +- sql/sql_lex.h | 25 - sql/sql_yacc.yy | 36 +- 13 files changed, 104 insertions(+), 2319 deletions(-) delete mode 100644 mysql-test/extra/rpl_tests/rpl_current_user.test diff --git a/mysql-test/extra/rpl_tests/rpl_current_user.test b/mysql-test/extra/rpl_tests/rpl_current_user.test deleted file mode 100644 index 7ec38e0c151..00000000000 --- a/mysql-test/extra/rpl_tests/rpl_current_user.test +++ /dev/null @@ -1,127 +0,0 @@ ---let $count=1 -connection master; - -if (`SELECT '$diff_table' = ''`) -{ - let $diff_table= mysql.user; -} - ---echo ---echo ---echo ---echo TEST STATEMENT: '$statement' ---echo -------------------------------------------------------------------------- - -if (`SELECT '$diff_columns' = ''`) -{ - eval CREATE VIEW test.bug48321_v1 AS SELECT user FROM $diff_table - WHERE user LIKE 'bug48321%'; -} - -if (`SELECT '$diff_columns' <> ''`) -{ - eval CREATE VIEW test.bug48321_v1 AS SELECT user, $diff_columns - FROM $diff_table WHERE user LIKE 'bug48321%'; -} - -while (`SELECT $count < 6`) -{ - --echo - --echo TEST STATEMENT: '$statement' - --echo CASE $count: - --echo ------- - - let $user2= 'bug48321_2'@'localhost'; - let $user3= 'bug48321_3'@'localhost'; - - let $user1= CURRENT_USER(); - if (`SELECT '$action'='RENAME'`) - { - let $user1= $user1 TO 'bug48321_4'@'localhost'; - let $user2= $user2 TO 'bug48321_5'@'localhost'; - let $user3= $user3 TO 'bug48321_6'@'localhost'; - } - - if (`SELECT '$action'='GRANT'`) - { - let $user1= $user1 IDENTIFIED BY 'user1'; - let $user3= $user3 IDENTIFIED BY ''; - } - - if (`SELECT $count=1`) - { - --echo # Only CURRENT_USER() in the user list of the test statement. - let $users_list= $user1; - } - - if (`SELECT $count=2`) - { - --echo # Two users are in the test statement, CURRENT_USER is the first one. - let $users_list= $user1, $user2; - } - - if (`SELECT $count=3`) - { - --echo # Two users are in the test statement, CURRENT_USER is the last one. - let $users_list= $user2, $user1; - } - - if (`SELECT $count=4`) - { - --echo # Three users are in the test statement, CURRENT_USER is the second one. - let $users_list= $user2, $user1, $user3; - } - - if (`SELECT $count=5`) - { - --echo # CURRENT_USER is not in the test statement. - let $users_list= $user2, $user3; - } - - --echo users_list= $users_list - --echo - --echo # Connect to master with user1, so user1 always is the current user, - --echo # when test statement is runing. - eval GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; - eval CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - - if (`SELECT '$action'='REVOKE'`) - { - --echo - --echo # Grant some privileges to users at first when testing - --echo # 'REVOKE ...' statement. - eval GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', - 'bug48321_3'@'localhost' WITH GRANT OPTION; - eval GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', - 'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - } - - connect (conn1, 127.0.0.1, 'bug48321_1'@'localhost',,); - connection conn1; - --echo - let $temp= `SELECT "$statement"`; - eval $temp; - --echo - - disconnect conn1; - - connection master; - sync_slave_with_master; - - connection master; - let $diff_table_1= master:test.bug48321_v1; - let $diff_table_2= slave:test.bug48321_v1; - source include/diff_tables.inc; - --echo - - --echo # Delete all bug48321% users - connection master; - DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; - DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; - FLUSH PRIVILEGES; - - inc $count; -} -DROP VIEW test.bug48321_v1; diff --git a/mysql-test/suite/rpl/r/rpl_binlog_grant.result b/mysql-test/suite/rpl/r/rpl_binlog_grant.result index adf2175f3bb..4a789f361c6 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_grant.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_grant.result @@ -17,15 +17,16 @@ show grants for x@y; Grants for x@y GRANT USAGE ON *.* TO 'x'@'y' GRANT SELECT ON `d1`.`t` TO 'x'@'y' -show binlog events from ; +show binlog events; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # drop database if exists d1 -master-bin.000001 # Query # # create database d1 -master-bin.000001 # Query # # use `d1`; create table t (s1 int) engine=innodb -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `d1`; insert into t values (1) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `d1`; grant select on t to 'x'@'y' +master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4 +master-bin.000001 106 Query 1 193 drop database if exists d1 +master-bin.000001 193 Query 1 272 create database d1 +master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb +master-bin.000001 370 Query 1 436 BEGIN +master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1) +master-bin.000001 521 Xid 1 548 COMMIT /* XID */ +master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y start transaction; insert into t values (2); revoke select on t from x@y; @@ -37,18 +38,19 @@ s1 show grants for x@y; Grants for x@y GRANT USAGE ON *.* TO 'x'@'y' -show binlog events from ; +show binlog events; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # drop database if exists d1 -master-bin.000001 # Query # # create database d1 -master-bin.000001 # Query # # use `d1`; create table t (s1 int) engine=innodb -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `d1`; insert into t values (1) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `d1`; grant select on t to 'x'@'y' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `d1`; insert into t values (2) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `d1`; revoke select on t from 'x'@'y' +master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4 +master-bin.000001 106 Query 1 193 drop database if exists d1 +master-bin.000001 193 Query 1 272 create database d1 +master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb +master-bin.000001 370 Query 1 436 BEGIN +master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1) +master-bin.000001 521 Xid 1 548 COMMIT /* XID */ +master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y +master-bin.000001 633 Query 1 699 BEGIN +master-bin.000001 699 Query 1 784 use `d1`; insert into t values (2) +master-bin.000001 784 Xid 1 811 COMMIT /* XID */ +master-bin.000001 811 Query 1 899 use `d1`; revoke select on t from x@y drop user x@y; drop database d1; diff --git a/mysql-test/suite/rpl/r/rpl_events.result b/mysql-test/suite/rpl/r/rpl_events.result index 206ec52718c..b3fd85d7e28 100644 --- a/mysql-test/suite/rpl/r/rpl_events.result +++ b/mysql-test/suite/rpl/r/rpl_events.result @@ -251,45 +251,3 @@ DROP EVENT event44331_1; DROP EVENT event44331_2; DROP EVENT event44331_3; DROP EVENT event44331_4; -DROP VIEW IF EXISTS events_view; -DROP EVENT IF EXISTS event48321_1; -DROP EVENT IF EXISTS event48321_2; -DROP EVENT IF EXISTS event48321_3; -DROP EVENT IF EXISTS event48321_4; -CREATE VIEW events_view AS -SELECT EVENT_SCHEMA, EVENT_NAME, DEFINER FROM INFORMATION_SCHEMA.EVENTS -WHERE EVENT_NAME LIKE 'event48321%'; -CREATE DEFINER=CURRENT_USER() /*!50000 EVENT event48321_1 */ -ON SCHEDULE AT CURRENT_TIMESTAMP -ON COMPLETION PRESERVE DISABLE -DO SELECT 48321 as BUG; -CREATE DEFINER=CURRENT_USER() EVENT event48321_2 -ON SCHEDULE AT CURRENT_TIMESTAMP -ON COMPLETION PRESERVE DISABLE -DO SELECT 48321 as BUG; -CREATE /*!50000 DEFINER=CURRENT_USER() */ EVENT event48321_3 -ON SCHEDULE AT CURRENT_TIMESTAMP -ON COMPLETION PRESERVE DISABLE -DO SELECT 48321 as BUG; -Comparing tables master:test.events_view and slave:test.events_view -ALTER DEFINER=CURRENT_USER() EVENT event48321_1 RENAME TO event48321_4; -ALTER DEFINER=CURRENT_USER() EVENT event48321_2 -ON SCHEDULE AT CURRENT_TIMESTAMP -ON COMPLETION PRESERVE DISABLE -DO SELECT 48321 as BUG; -ALTER /*!50000 DEFINER=CURRENT_USER() */ EVENT event48321_3 -ON SCHEDULE AT CURRENT_TIMESTAMP -ON COMPLETION PRESERVE DISABLE -DO SELECT 48321 as BUG; -Comparing tables master:test.events_view and slave:test.events_view -ALTER /*!50000 DEFINER=CURRENT_USER() */ EVENT event48321_3 -ON SCHEDULE AT CURRENT_TIMESTAMP -ON COMPLETION PRESERVE DISABLE -DO SELECT 48321 as BUG; ALTER EVENT event48321_2 ENABLE | -Comparing tables master:test.events_view and slave:test.events_view -ALTER EVENT event48321_3 ENABLE; -Comparing tables master:test.events_view and slave:test.events_view -DROP EVENT event48321_4; -DROP EVENT event48321_2; -DROP EVENT event48321_3; -DROP VIEW events_view; diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result index 74ebb3be948..fbfebbaa590 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result @@ -750,7 +750,7 @@ test_rpl e2 root@localhost SYSTEM RECURRING NULL 1 # # NULL ENABLED 1 latin1 lat USE test_rpl; SHOW EVENTS; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation -test_rpl e2 root@localhost SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci +test_rpl e2 @ SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci ==========MASTER========== SELECT COUNT(*) FROM t1; COUNT(*) @@ -1079,7 +1079,7 @@ master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1') master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # use `test_rpl`; CREATE DEFINER=`root`@`localhost` EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1 -master-bin.000001 # Query 1 # use `test_rpl`; ALTER DEFINER=`root`@`localhost` EVENT e1 RENAME TO e2 +master-bin.000001 # Query 1 # use `test_rpl`; ALTER EVENT e1 RENAME TO e2 master-bin.000001 # Query 1 # use `test_rpl`; DROP EVENT e2 master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result index 02a5f33c843..7fedaf4c1ef 100644 --- a/mysql-test/suite/rpl/r/rpl_sp.result +++ b/mysql-test/suite/rpl/r/rpl_sp.result @@ -433,9 +433,9 @@ master-bin.000001 # Query 1 # use `mysqltest1`; create table t2 like t1 master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `foo3`() DETERMINISTIC insert into t1 values (15) -master-bin.000001 # Query 1 # use `mysqltest1`; grant CREATE ROUTINE, EXECUTE on mysqltest1.* to 'zedjzlcsjhd'@'127.0.0.1' -master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT on mysqltest1.t1 to 'zedjzlcsjhd'@'127.0.0.1' -master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT, INSERT on mysqltest1.t2 to 'zedjzlcsjhd'@'127.0.0.1' +master-bin.000001 # Query 1 # use `mysqltest1`; grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1 master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` PROCEDURE `foo4`() DETERMINISTIC begin @@ -510,7 +510,7 @@ select * from t1 master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1 master-bin.000001 # Query 1 # drop database mysqltest1 -master-bin.000001 # Query 1 # DROP USER 'zedjzlcsjhd'@'127.0.0.1' +master-bin.000001 # Query 1 # drop user "zedjzlcsjhd"@127.0.0.1 master-bin.000001 # Query 1 # use `test`; drop function if exists f1 master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) READS SQL DATA @@ -675,13 +675,13 @@ CREATE DEFINER=`root`@`localhost` PROCEDURE `foo3`() insert into t1 values (15) /*!*/; SET TIMESTAMP=t/*!*/; -grant CREATE ROUTINE, EXECUTE on mysqltest1.* to 'zedjzlcsjhd'@'127.0.0.1' +grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1 /*!*/; SET TIMESTAMP=t/*!*/; -grant SELECT on mysqltest1.t1 to 'zedjzlcsjhd'@'127.0.0.1' +grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1 /*!*/; SET TIMESTAMP=t/*!*/; -grant SELECT, INSERT on mysqltest1.t2 to 'zedjzlcsjhd'@'127.0.0.1' +grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1 /*!*/; SET TIMESTAMP=t/*!*/; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` PROCEDURE `foo4`() @@ -842,7 +842,7 @@ SET TIMESTAMP=t/*!*/; drop database mysqltest1 /*!*/; SET TIMESTAMP=t/*!*/; -DROP USER 'zedjzlcsjhd'@'127.0.0.1' +drop user "zedjzlcsjhd"@127.0.0.1 /*!*/; use test/*!*/; SET TIMESTAMP=t/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_user.result b/mysql-test/suite/rpl/r/rpl_user.result index b1f1d73cf86..a98e7e9ca55 100644 --- a/mysql-test/suite/rpl/r/rpl_user.result +++ b/mysql-test/suite/rpl/r/rpl_user.result @@ -39,1754 +39,7 @@ show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create user 'foo'@'fakehost' master-bin.000001 # Query # # use `test`; create user 'foo'@'fakehost', 'bar'@'fakehost' -master-bin.000001 # Query # # use `test`; RENAME USER 'foo'@'fakehost' TO 'foofoo'@'fakehost' -master-bin.000001 # Query # # use `test`; RENAME USER 'not_exist_user1'@'fakehost' TO 'foobar'@'fakehost', 'bar'@'fakehost' TO 'barbar'@'fakehost' -master-bin.000001 # Query # # use `test`; DROP USER 'foofoo'@'fakehost' -master-bin.000001 # Query # # use `test`; DROP USER 'not_exist_user1'@'fakehost', 'barbar'@'fakehost' - - - -TEST STATEMENT: 'RENAME USER $users_list' --------------------------------------------------------------------------- -CREATE VIEW test.bug48321_v1 AS SELECT user FROM mysql.user -WHERE user LIKE 'bug48321%'; - -TEST STATEMENT: 'RENAME USER $users_list' -CASE 1: -------- -# Only CURRENT_USER() in the user list of the test statement. -users_list= CURRENT_USER() TO 'bug48321_4'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -RENAME USER CURRENT_USER() TO 'bug48321_4'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'RENAME USER $users_list' -CASE 2: -------- -# Two users are in the test statement, CURRENT_USER is the first one. -users_list= CURRENT_USER() TO 'bug48321_4'@'localhost', 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -RENAME USER CURRENT_USER() TO 'bug48321_4'@'localhost', 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'RENAME USER $users_list' -CASE 3: -------- -# Two users are in the test statement, CURRENT_USER is the last one. -users_list= 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost', CURRENT_USER() TO 'bug48321_4'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -RENAME USER 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost', CURRENT_USER() TO 'bug48321_4'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'RENAME USER $users_list' -CASE 4: -------- -# Three users are in the test statement, CURRENT_USER is the second one. -users_list= 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost', CURRENT_USER() TO 'bug48321_4'@'localhost', 'bug48321_3'@'localhost' TO 'bug48321_6'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -RENAME USER 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost', CURRENT_USER() TO 'bug48321_4'@'localhost', 'bug48321_3'@'localhost' TO 'bug48321_6'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'RENAME USER $users_list' -CASE 5: -------- -# CURRENT_USER is not in the test statement. -users_list= 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost', 'bug48321_3'@'localhost' TO 'bug48321_6'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -RENAME USER 'bug48321_2'@'localhost' TO 'bug48321_5'@'localhost', 'bug48321_3'@'localhost' TO 'bug48321_6'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; -DROP VIEW test.bug48321_v1; - - - -TEST STATEMENT: 'DROP USER $users_list' --------------------------------------------------------------------------- -CREATE VIEW test.bug48321_v1 AS SELECT user FROM mysql.user -WHERE user LIKE 'bug48321%'; - -TEST STATEMENT: 'DROP USER $users_list' -CASE 1: -------- -# Only CURRENT_USER() in the user list of the test statement. -users_list= CURRENT_USER() - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -DROP USER CURRENT_USER(); - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'DROP USER $users_list' -CASE 2: -------- -# Two users are in the test statement, CURRENT_USER is the first one. -users_list= CURRENT_USER(), 'bug48321_2'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -DROP USER CURRENT_USER(), 'bug48321_2'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'DROP USER $users_list' -CASE 3: -------- -# Two users are in the test statement, CURRENT_USER is the last one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -DROP USER 'bug48321_2'@'localhost', CURRENT_USER(); - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'DROP USER $users_list' -CASE 4: -------- -# Three users are in the test statement, CURRENT_USER is the second one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -DROP USER 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'DROP USER $users_list' -CASE 5: -------- -# CURRENT_USER is not in the test statement. -users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -DROP USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; -DROP VIEW test.bug48321_v1; -DROP PROCEDURE IF EXISTS f1; -CREATE PROCEDURE p1() SELECT 1; - - - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list' --------------------------------------------------------------------------- -CREATE VIEW test.bug48321_v1 AS SELECT user, Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv -FROM mysql.user WHERE user LIKE 'bug48321%'; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list' -CASE 1: -------- -# Only CURRENT_USER() in the user list of the test statement. -users_list= CURRENT_USER() - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER(); - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list' -CASE 2: -------- -# Two users are in the test statement, CURRENT_USER is the first one. -users_list= CURRENT_USER(), 'bug48321_2'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER(), 'bug48321_2'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list' -CASE 3: -------- -# Two users are in the test statement, CURRENT_USER is the last one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bug48321_2'@'localhost', CURRENT_USER(); - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list' -CASE 4: -------- -# Three users are in the test statement, CURRENT_USER is the second one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list' -CASE 5: -------- -# CURRENT_USER is not in the test statement. -users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; -DROP VIEW test.bug48321_v1; - - - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list /*With comment*/' --------------------------------------------------------------------------- -CREATE VIEW test.bug48321_v1 AS SELECT user, Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv -FROM mysql.user WHERE user LIKE 'bug48321%'; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list /*With comment*/' -CASE 1: -------- -# Only CURRENT_USER() in the user list of the test statement. -users_list= CURRENT_USER() - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER() /*With comment*/; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list /*With comment*/' -CASE 2: -------- -# Two users are in the test statement, CURRENT_USER is the first one. -users_list= CURRENT_USER(), 'bug48321_2'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER(), 'bug48321_2'@'localhost' /*With comment*/; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list /*With comment*/' -CASE 3: -------- -# Two users are in the test statement, CURRENT_USER is the last one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bug48321_2'@'localhost', CURRENT_USER() /*With comment*/; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list /*With comment*/' -CASE 4: -------- -# Three users are in the test statement, CURRENT_USER is the second one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' /*With comment*/; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM $users_list /*With comment*/' -CASE 5: -------- -# CURRENT_USER is not in the test statement. -users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' /*With comment*/; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; -DROP VIEW test.bug48321_v1; - - - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ $users_list' --------------------------------------------------------------------------- -CREATE VIEW test.bug48321_v1 AS SELECT user, Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv -FROM mysql.user WHERE user LIKE 'bug48321%'; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ $users_list' -CASE 1: -------- -# Only CURRENT_USER() in the user list of the test statement. -users_list= CURRENT_USER() - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ CURRENT_USER(); - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ $users_list' -CASE 2: -------- -# Two users are in the test statement, CURRENT_USER is the first one. -users_list= CURRENT_USER(), 'bug48321_2'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ CURRENT_USER(), 'bug48321_2'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ $users_list' -CASE 3: -------- -# Two users are in the test statement, CURRENT_USER is the last one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ 'bug48321_2'@'localhost', CURRENT_USER(); - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ $users_list' -CASE 4: -------- -# Three users are in the test statement, CURRENT_USER is the second one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ $users_list' -CASE 5: -------- -# CURRENT_USER is not in the test statement. -users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ 'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; -DROP VIEW test.bug48321_v1; - - - -TEST STATEMENT: 'REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM $users_list' --------------------------------------------------------------------------- -CREATE VIEW test.bug48321_v1 AS SELECT user, Select_priv, Update_priv, Create_priv, Drop_priv -FROM mysql.user WHERE user LIKE 'bug48321%'; - -TEST STATEMENT: 'REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM $users_list' -CASE 1: -------- -# Only CURRENT_USER() in the user list of the test statement. -users_list= CURRENT_USER() - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM CURRENT_USER(); - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM $users_list' -CASE 2: -------- -# Two users are in the test statement, CURRENT_USER is the first one. -users_list= CURRENT_USER(), 'bug48321_2'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM CURRENT_USER(), 'bug48321_2'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM $users_list' -CASE 3: -------- -# Two users are in the test statement, CURRENT_USER is the last one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM 'bug48321_2'@'localhost', CURRENT_USER(); - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM $users_list' -CASE 4: -------- -# Three users are in the test statement, CURRENT_USER is the second one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM $users_list' -CASE 5: -------- -# CURRENT_USER is not in the test statement. -users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM 'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; -DROP VIEW test.bug48321_v1; - - - -TEST STATEMENT: 'REVOKE CREATE ROUTINE ON *.* FROM $users_list' --------------------------------------------------------------------------- -CREATE VIEW test.bug48321_v1 AS SELECT user, Create_routine_priv -FROM mysql.user WHERE user LIKE 'bug48321%'; - -TEST STATEMENT: 'REVOKE CREATE ROUTINE ON *.* FROM $users_list' -CASE 1: -------- -# Only CURRENT_USER() in the user list of the test statement. -users_list= CURRENT_USER() - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE CREATE ROUTINE ON *.* FROM CURRENT_USER(); - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE CREATE ROUTINE ON *.* FROM $users_list' -CASE 2: -------- -# Two users are in the test statement, CURRENT_USER is the first one. -users_list= CURRENT_USER(), 'bug48321_2'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE CREATE ROUTINE ON *.* FROM CURRENT_USER(), 'bug48321_2'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE CREATE ROUTINE ON *.* FROM $users_list' -CASE 3: -------- -# Two users are in the test statement, CURRENT_USER is the last one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE CREATE ROUTINE ON *.* FROM 'bug48321_2'@'localhost', CURRENT_USER(); - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE CREATE ROUTINE ON *.* FROM $users_list' -CASE 4: -------- -# Three users are in the test statement, CURRENT_USER is the second one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE CREATE ROUTINE ON *.* FROM 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE CREATE ROUTINE ON *.* FROM $users_list' -CASE 5: -------- -# CURRENT_USER is not in the test statement. -users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE CREATE ROUTINE ON *.* FROM 'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; -DROP VIEW test.bug48321_v1; - - - -TEST STATEMENT: 'REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM $users_list' --------------------------------------------------------------------------- -CREATE VIEW test.bug48321_v1 AS SELECT user, Routine_name, Proc_priv -FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; - -TEST STATEMENT: 'REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM $users_list' -CASE 1: -------- -# Only CURRENT_USER() in the user list of the test statement. -users_list= CURRENT_USER() - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM CURRENT_USER(); - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM $users_list' -CASE 2: -------- -# Two users are in the test statement, CURRENT_USER is the first one. -users_list= CURRENT_USER(), 'bug48321_2'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM CURRENT_USER(), 'bug48321_2'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM $users_list' -CASE 3: -------- -# Two users are in the test statement, CURRENT_USER is the last one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM 'bug48321_2'@'localhost', CURRENT_USER(); - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM $users_list' -CASE 4: -------- -# Three users are in the test statement, CURRENT_USER is the second one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM 'bug48321_2'@'localhost', CURRENT_USER(), 'bug48321_3'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM $users_list' -CASE 5: -------- -# CURRENT_USER is not in the test statement. -users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -# Grant some privileges to users at first when testing -# 'REVOKE ...' statement. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', -'bug48321_3'@'localhost' WITH GRANT OPTION; -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_1'@'localhost', -'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM 'bug48321_2'@'localhost', 'bug48321_3'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; -DROP VIEW test.bug48321_v1; - - - -TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list WITH GRANT OPTION' --------------------------------------------------------------------------- -CREATE VIEW test.bug48321_v1 AS SELECT user, Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv, Password -FROM mysql.user WHERE user LIKE 'bug48321%'; - -TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list WITH GRANT OPTION' -CASE 1: -------- -# Only CURRENT_USER() in the user list of the test statement. -users_list= CURRENT_USER() IDENTIFIED BY 'user1' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() IDENTIFIED BY 'user1' WITH GRANT OPTION; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list WITH GRANT OPTION' -CASE 2: -------- -# Two users are in the test statement, CURRENT_USER is the first one. -users_list= CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost' WITH GRANT OPTION; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list WITH GRANT OPTION' -CASE 3: -------- -# Two users are in the test statement, CURRENT_USER is the last one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1' WITH GRANT OPTION; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list WITH GRANT OPTION' -CASE 4: -------- -# Three users are in the test statement, CURRENT_USER is the second one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY '' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY '' WITH GRANT OPTION; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list WITH GRANT OPTION' -CASE 5: -------- -# CURRENT_USER is not in the test statement. -users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY '' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY '' WITH GRANT OPTION; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; -DROP VIEW test.bug48321_v1; - - - -TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list /* With Comment */ WITH GRANT OPTION' --------------------------------------------------------------------------- -CREATE VIEW test.bug48321_v1 AS SELECT user, Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv, Password -FROM mysql.user WHERE user LIKE 'bug48321%'; - -TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list /* With Comment */ WITH GRANT OPTION' -CASE 1: -------- -# Only CURRENT_USER() in the user list of the test statement. -users_list= CURRENT_USER() IDENTIFIED BY 'user1' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() IDENTIFIED BY 'user1' /* With Comment */ WITH GRANT OPTION; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list /* With Comment */ WITH GRANT OPTION' -CASE 2: -------- -# Two users are in the test statement, CURRENT_USER is the first one. -users_list= CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost' /* With Comment */ WITH GRANT OPTION; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list /* With Comment */ WITH GRANT OPTION' -CASE 3: -------- -# Two users are in the test statement, CURRENT_USER is the last one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1' /* With Comment */ WITH GRANT OPTION; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list /* With Comment */ WITH GRANT OPTION' -CASE 4: -------- -# Three users are in the test statement, CURRENT_USER is the second one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY '' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY '' /* With Comment */ WITH GRANT OPTION; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT ALL PRIVILEGES ON *.* TO $users_list /* With Comment */ WITH GRANT OPTION' -CASE 5: -------- -# CURRENT_USER is not in the test statement. -users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY '' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY '' /* With Comment */ WITH GRANT OPTION; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; -DROP VIEW test.bug48321_v1; - - - -TEST STATEMENT: 'GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO $users_list' --------------------------------------------------------------------------- -CREATE VIEW test.bug48321_v1 AS SELECT user, Select_priv, Update_priv, Create_priv, Drop_priv, Password -FROM mysql.user WHERE user LIKE 'bug48321%'; - -TEST STATEMENT: 'GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO $users_list' -CASE 1: -------- -# Only CURRENT_USER() in the user list of the test statement. -users_list= CURRENT_USER() IDENTIFIED BY 'user1' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO CURRENT_USER() IDENTIFIED BY 'user1'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO $users_list' -CASE 2: -------- -# Two users are in the test statement, CURRENT_USER is the first one. -users_list= CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO $users_list' -CASE 3: -------- -# Two users are in the test statement, CURRENT_USER is the last one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO $users_list' -CASE 4: -------- -# Three users are in the test statement, CURRENT_USER is the second one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY '' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY ''; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO $users_list' -CASE 5: -------- -# CURRENT_USER is not in the test statement. -users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY '' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY ''; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; -DROP VIEW test.bug48321_v1; - - - -TEST STATEMENT: 'GRANT CREATE ROUTINE ON *.* TO $users_list' --------------------------------------------------------------------------- -CREATE VIEW test.bug48321_v1 AS SELECT user, Create_routine_priv -FROM mysql.user WHERE user LIKE 'bug48321%'; - -TEST STATEMENT: 'GRANT CREATE ROUTINE ON *.* TO $users_list' -CASE 1: -------- -# Only CURRENT_USER() in the user list of the test statement. -users_list= CURRENT_USER() IDENTIFIED BY 'user1' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT CREATE ROUTINE ON *.* TO CURRENT_USER() IDENTIFIED BY 'user1'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT CREATE ROUTINE ON *.* TO $users_list' -CASE 2: -------- -# Two users are in the test statement, CURRENT_USER is the first one. -users_list= CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT CREATE ROUTINE ON *.* TO CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT CREATE ROUTINE ON *.* TO $users_list' -CASE 3: -------- -# Two users are in the test statement, CURRENT_USER is the last one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT CREATE ROUTINE ON *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT CREATE ROUTINE ON *.* TO $users_list' -CASE 4: -------- -# Three users are in the test statement, CURRENT_USER is the second one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY '' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT CREATE ROUTINE ON *.* TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY ''; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT CREATE ROUTINE ON *.* TO $users_list' -CASE 5: -------- -# CURRENT_USER is not in the test statement. -users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY '' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT CREATE ROUTINE ON *.* TO 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY ''; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; -DROP VIEW test.bug48321_v1; -DROP PROCEDURE p1; - - - -TEST STATEMENT: 'GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO $users_list' --------------------------------------------------------------------------- -CREATE VIEW test.bug48321_v1 AS SELECT user, Routine_name, Proc_priv -FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; - -TEST STATEMENT: 'GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO $users_list' -CASE 1: -------- -# Only CURRENT_USER() in the user list of the test statement. -users_list= CURRENT_USER() IDENTIFIED BY 'user1' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO CURRENT_USER() IDENTIFIED BY 'user1'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO $users_list' -CASE 2: -------- -# Two users are in the test statement, CURRENT_USER is the first one. -users_list= CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_2'@'localhost'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO $users_list' -CASE 3: -------- -# Two users are in the test statement, CURRENT_USER is the last one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1'; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO $users_list' -CASE 4: -------- -# Three users are in the test statement, CURRENT_USER is the second one. -users_list= 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY '' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_2'@'localhost', CURRENT_USER() IDENTIFIED BY 'user1', 'bug48321_3'@'localhost' IDENTIFIED BY ''; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; - -TEST STATEMENT: 'GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO $users_list' -CASE 5: -------- -# CURRENT_USER is not in the test statement. -users_list= 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY '' - -# Connect to master with user1, so user1 always is the current user, -# when test statement is runing. -GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1'@'localhost' - WITH GRANT OPTION; -CREATE USER 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' - IDENTIFIED BY 'user3'; - -GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO 'bug48321_2'@'localhost', 'bug48321_3'@'localhost' IDENTIFIED BY ''; - -Comparing tables master:test.bug48321_v1 and slave:test.bug48321_v1 - -# Delete all bug48321% users -DELETE FROM mysql.user WHERE user LIKE 'bug48321%'; -DELETE FROM mysql.procs_priv WHERE user LIKE 'bug48321%'; -FLUSH PRIVILEGES; -DROP VIEW test.bug48321_v1; +master-bin.000001 # Query # # use `test`; rename user 'foo'@'fakehost' to 'foofoo'@'fakehost' +master-bin.000001 # Query # # use `test`; rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'bar'@'fakehost' to 'barbar'@'fakehost' +master-bin.000001 # Query # # use `test`; drop user 'foofoo'@'fakehost' +master-bin.000001 # Query # # use `test`; drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost' diff --git a/mysql-test/suite/rpl/t/rpl_binlog_grant.test b/mysql-test/suite/rpl/t/rpl_binlog_grant.test index 64f4e8b2eeb..31163927ce2 100644 --- a/mysql-test/suite/rpl/t/rpl_binlog_grant.test +++ b/mysql-test/suite/rpl/t/rpl_binlog_grant.test @@ -25,7 +25,9 @@ grant select on t to x@y; # rollback; show grants for x@y; ---source include/show_binlog_events.inc +--replace_result $VERSION VERSION +--replace_regex /\/\* xid=.* \*\//\/* XID *\// +show binlog events; start transaction; insert into t values (2); revoke select on t from x@y; @@ -35,7 +37,9 @@ revoke select on t from x@y; commit; select * from t; show grants for x@y; ---source include/show_binlog_events.inc +--replace_result $VERSION VERSION +--replace_regex /\/\* xid=.* \*\//\/* XID *\// +show binlog events; drop user x@y; drop database d1; --sync_slave_with_master diff --git a/mysql-test/suite/rpl/t/rpl_events.test b/mysql-test/suite/rpl/t/rpl_events.test index 25976f779e3..7720ad6658c 100644 --- a/mysql-test/suite/rpl/t/rpl_events.test +++ b/mysql-test/suite/rpl/t/rpl_events.test @@ -105,85 +105,3 @@ DROP EVENT event44331_2; DROP EVENT event44331_3; DROP EVENT event44331_4; sync_slave_with_master; - -# -# BUG#48321 -# This test verifies if the definer is consistent between master and slave, -# when the event is created or altered with the DEFINER clause that the -# DEFINER is set to CURRENT_USER() -# -connection master; ---disable_warnings -DROP VIEW IF EXISTS events_view; -DROP EVENT IF EXISTS event48321_1; -DROP EVENT IF EXISTS event48321_2; -DROP EVENT IF EXISTS event48321_3; -DROP EVENT IF EXISTS event48321_4; ---enable_warnings - -CREATE VIEW events_view AS - SELECT EVENT_SCHEMA, EVENT_NAME, DEFINER FROM INFORMATION_SCHEMA.EVENTS - WHERE EVENT_NAME LIKE 'event48321%'; -let $diff_table_1= master:test.events_view; -let $diff_table_2= slave:test.events_view; - -CREATE DEFINER=CURRENT_USER() /*!50000 EVENT event48321_1 */ - ON SCHEDULE AT CURRENT_TIMESTAMP - ON COMPLETION PRESERVE DISABLE - DO SELECT 48321 as BUG; - -CREATE DEFINER=CURRENT_USER() EVENT event48321_2 - ON SCHEDULE AT CURRENT_TIMESTAMP - ON COMPLETION PRESERVE DISABLE - DO SELECT 48321 as BUG; - -CREATE /*!50000 DEFINER=CURRENT_USER() */ EVENT event48321_3 - ON SCHEDULE AT CURRENT_TIMESTAMP - ON COMPLETION PRESERVE DISABLE - DO SELECT 48321 as BUG; -sync_slave_with_master; - ---source include/diff_tables.inc - -connection master; -ALTER DEFINER=CURRENT_USER() EVENT event48321_1 RENAME TO event48321_4; - -ALTER DEFINER=CURRENT_USER() EVENT event48321_2 - ON SCHEDULE AT CURRENT_TIMESTAMP - ON COMPLETION PRESERVE DISABLE - DO SELECT 48321 as BUG; - -ALTER /*!50000 DEFINER=CURRENT_USER() */ EVENT event48321_3 - ON SCHEDULE AT CURRENT_TIMESTAMP - ON COMPLETION PRESERVE DISABLE - DO SELECT 48321 as BUG; -sync_slave_with_master; - ---source include/diff_tables.inc - -# Two statements in on query -connection master; -DELIMITER |; -ALTER /*!50000 DEFINER=CURRENT_USER() */ EVENT event48321_3 - ON SCHEDULE AT CURRENT_TIMESTAMP - ON COMPLETION PRESERVE DISABLE - DO SELECT 48321 as BUG; ALTER EVENT event48321_2 ENABLE | -DELIMITER ;| -sync_slave_with_master; - ---source include/diff_tables.inc - -#No Event boday -connection master; -ALTER EVENT event48321_3 ENABLE; -sync_slave_with_master; - ---source include/diff_tables.inc - -connection master; -DROP EVENT event48321_4; -DROP EVENT event48321_2; -DROP EVENT event48321_3; -DROP VIEW events_view; ---source include/master-slave-end.inc - diff --git a/mysql-test/suite/rpl/t/rpl_user.test b/mysql-test/suite/rpl/t/rpl_user.test index 2adb822839a..b8fe41d03c4 100644 --- a/mysql-test/suite/rpl/t/rpl_user.test +++ b/mysql-test/suite/rpl/t/rpl_user.test @@ -54,85 +54,8 @@ drop user 'not_exist_user1'@'fakehost', 'not_exist_user2'@'fakehost'; sync_slave_with_master; select Host,User from mysql.user where Host='fakehost'; +# +# show the binlog events on the master +# connection master; source include/show_binlog_events.inc; - -# -# BUG#48321 -# -let $action= RENAME; -let $statement= RENAME USER \$users_list; -source extra/rpl_tests/rpl_current_user.test; - -let $action= DROP; -let $statement= DROP USER \$users_list; -source extra/rpl_tests/rpl_current_user.test; - ---disable_warnings -DROP PROCEDURE IF EXISTS f1; ---enable_warnings -CREATE PROCEDURE p1() SELECT 1; -#REVOKE ALL PRIVILEGES -let $action= REVOKE; -let $diff_columns= Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv; -let $statement= REVOKE ALL PRIVILEGES, GRANT OPTION FROM \$users_list; -source extra/rpl_tests/rpl_current_user.test; - -#REVOKE ALL PRIVILEGES with comment -let $action= REVOKE; -let $diff_columns= Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv; -let $statement= REVOKE ALL PRIVILEGES, GRANT OPTION FROM \$users_list /*With comment*/; -source extra/rpl_tests/rpl_current_user.test; - -#REVOKE ALL PRIVILEGES with comment -let $action= REVOKE; -let $diff_columns= Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv; -let $statement= REVOKE ALL PRIVILEGES, GRANT OPTION FROM /*With comment*/ \$users_list; -source extra/rpl_tests/rpl_current_user.test; - -let $diff_columns= Select_priv, Update_priv, Create_priv, Drop_priv; -#REVOKE ON TABLE -let $statement= REVOKE SELECT, UPDATE, CREATE, DROP ON TABLE *.* FROM \$users_list; -source extra/rpl_tests/rpl_current_user.test; - -#REVOKE ON CREATE ROUTINE -let $diff_columns= Create_routine_priv; -let $statement= REVOKE CREATE ROUTINE ON *.* FROM \$users_list; -source extra/rpl_tests/rpl_current_user.test; - -#REVOKE ON ROUTINE -let $diff_table= mysql.procs_priv; -let $diff_columns= Routine_name, Proc_priv; -let $statement= REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM \$users_list; -source extra/rpl_tests/rpl_current_user.test; - -let $diff_table= mysql.user; -#GRANT ALL PRIVILEGES -let $action= GRANT; -let $diff_columns= Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv, Password; -let $statement= GRANT ALL PRIVILEGES ON *.* TO \$users_list WITH GRANT OPTION; -source extra/rpl_tests/rpl_current_user.test; - -#GRANT ALL PRIVILEGES with comment -let $action= GRANT; -let $diff_columns= Select_priv, Update_priv, Create_priv, Drop_priv, Grant_priv, Password; -let $statement= GRANT ALL PRIVILEGES ON *.* TO \$users_list /* With Comment */ WITH GRANT OPTION; -source extra/rpl_tests/rpl_current_user.test; - -#GRANT ON TABLE -let $diff_columns= Select_priv, Update_priv, Create_priv, Drop_priv, Password; -let $statement= GRANT SELECT, UPDATE, CREATE, DROP ON TABLE *.* TO \$users_list; -source extra/rpl_tests/rpl_current_user.test; - -#GRANT ON CREATE ROUTINE -let $diff_columns= Create_routine_priv; -let $statement= GRANT CREATE ROUTINE ON *.* TO \$users_list; -source extra/rpl_tests/rpl_current_user.test; - -#GRANT ON ROUTINE -let $diff_table= mysql.procs_priv; -let $diff_columns= Routine_name, Proc_priv; -let $statement= GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO \$users_list; - -DROP PROCEDURE p1; -source extra/rpl_tests/rpl_current_user.test; diff --git a/sql/events.cc b/sql/events.cc index 6c8bdb1ea0f..4c6dd0f35d1 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -341,48 +341,31 @@ common_1_lev_code: } -/* - Binlog '{CREATE|ALTER} EVENT' statements. - Definer part is always rewritten, for definer can be CURRENT_USER() function. - +/** + Create a new query string for removing executable comments + for avoiding leak and keeping consistency of the execution + on master and slave. + @param[in] thd Thread handler - @param[in] create CREATE or ALTER statement + @param[in] buf Query string @return - FASE ok - TRUE error + 0 ok + 1 error */ -static bool event_write_bin_log(THD *thd, bool create) +static int +create_query_string(THD *thd, String *buf) { - String log_query; - if (create) - { - /* Append the "CREATE" part of the query */ - if (log_query.append(STRING_WITH_LEN("CREATE "))) - return TRUE; - } - else - { - /* Append the "ALETR " part of the query */ - if (log_query.append(STRING_WITH_LEN("ALTER "))) - return TRUE; - } - - /* Append definer - If the definer is not set or set to CURRENT_USER, the value of CURRENT_USER - will be written into the binary log as the definer for the SQL thread. - */ - append_definer(thd, &log_query, &(thd->lex->definer->user), - &(thd->lex->definer->host)); - + /* Append the "CREATE" part of the query */ + if (buf->append(STRING_WITH_LEN("CREATE "))) + return 1; + /* Append definer */ + append_definer(thd, buf, &(thd->lex->definer->user), &(thd->lex->definer->host)); /* Append the left part of thd->query after "DEFINER" part */ - if (log_query.append(thd->lex->stmt_definition_begin, - thd->lex->stmt_definition_end - - thd->lex->stmt_definition_begin)) - return TRUE; - - return write_bin_log(thd, TRUE, log_query.c_ptr_safe(), log_query.length()) - != 0; + if (buf->append(thd->lex->stmt_definition_begin)) + return 1; + + return 0; } /** @@ -397,7 +380,8 @@ static bool event_write_bin_log(THD *thd, bool create) @sa Events::drop_event for the notes about locking, pre-locking and Events DDL. - @retval FALSE OK @retval TRUE Error (reported) + @retval FALSE OK + @retval TRUE Error (reported) */ bool @@ -481,7 +465,22 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, binlog the create event unless it's been successfully dropped */ if (!dropped) - ret= event_write_bin_log(thd, TRUE); + { + /* Binlog the create event. */ + DBUG_ASSERT(thd->query() && thd->query_length()); + String log_query; + if (create_query_string(thd, &log_query)) + { + sql_print_error("Event Error: An error occurred while creating query string, " + "before writing it into binary log."); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; + DBUG_RETURN(TRUE); + } + /* If the definer is not set or set to CURRENT_USER, the value of CURRENT_USER + will be written into the binary log as the definer for the SQL thread. */ + ret= write_bin_log(thd, TRUE, log_query.c_ptr(), log_query.length()); + } } pthread_mutex_unlock(&LOCK_event_metadata); /* Restore the state of binlog format */ @@ -603,7 +602,9 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, if (event_queue) event_queue->update_event(thd, parse_data->dbname, parse_data->name, new_element); - ret= event_write_bin_log(thd, FALSE); + /* Binlog the alter event. */ + DBUG_ASSERT(thd->query() && thd->query_length()); + ret= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); } } pthread_mutex_unlock(&LOCK_event_metadata); diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 70983f69746..a8828d15cae 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -194,7 +194,6 @@ static bool compare_hostname(const acl_host_and_ip *host,const char *hostname, const char *ip); static my_bool acl_load(THD *thd, TABLE_LIST *tables); static my_bool grant_load(THD *thd, TABLE_LIST *tables); -static bool acl_write_bin_log(THD *thd, List &list, bool clear_error); /* Convert scrambled password to binary form, according to scramble type, @@ -3226,8 +3225,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, if (!result) /* success */ { - if (acl_write_bin_log(thd, user_list, TRUE)) - result= -1; + result= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); } rw_unlock(&LOCK_grant); @@ -3403,7 +3401,8 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, if (write_to_binlog) { - result|= acl_write_bin_log(thd, user_list, FALSE); + if (write_bin_log(thd, FALSE, thd->query(), thd->query_length())) + result= TRUE; } rw_unlock(&LOCK_grant); @@ -3532,7 +3531,7 @@ bool mysql_grant(THD *thd, const char *db, List &list, if (!result) { - result= acl_write_bin_log(thd, list, TRUE); + result= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); } rw_unlock(&LOCK_grant); @@ -5664,9 +5663,9 @@ static int handle_grant_data(TABLE_LIST *tables, bool drop, } -static void append_user(String *str, LEX_USER *user, bool comma= TRUE) +static void append_user(String *str, LEX_USER *user) { - if (comma && str->length()) + if (str->length()) str->append(','); str->append('\''); str->append(user->user.str); @@ -5675,65 +5674,6 @@ static void append_user(String *str, LEX_USER *user, bool comma= TRUE) str->append('\''); } -/* - The operations(DROP, RENAME, REVOKE, GRANT) will cause inconsistency between - master and slave, when CURRENT_USER() is used. To solve this problem, we - construct a new binlog statement in which CURRENT_USER() is replaced by - the real user name and host name. - */ -static bool acl_write_bin_log(THD *thd, List &list, bool clear_error) -{ - String log_query; - LEX *lex= thd->lex; - List_iterator user_list(list); - LEX_USER *user, *tmp_user; - - if (!mysql_bin_log.is_open()) - return FALSE; - - if (log_query.append(lex->stmt_begin, lex->stmt_user_begin - lex->stmt_begin)) - return TRUE; - while ((tmp_user= user_list++)) - { - if (!(user= get_current_user(thd, tmp_user))) - continue; - - /* - No User, but a password? - They did GRANT ... TO CURRENT_USER() IDENTIFIED BY ... ! - Get the current user, and shallow-copy the new password to them! - */ - if (!tmp_user->user.str && tmp_user->password.str) - user->password= tmp_user->password; - - if (log_query.append(" ", 1)) - return TRUE; - append_user(&log_query, user, FALSE); - /* Only 'GRANT' have password */ - if (user->password.str) - { - if (log_query.append(STRING_WITH_LEN(" IDENTIFIED BY ")) || - log_query.append(STRING_WITH_LEN("PASSWORD ")) || - log_query.append("'", 1) || - log_query.append(user->password.str, - user->password.length) || - log_query.append("'", 1)) - return TRUE; - } - if (log_query.append(",", 1)) - return TRUE; - } - /* It is binlogged only when at least one user is in the query */ - if (log_query.c_ptr()[log_query.length()-1] == ',') - { - log_query.length(log_query.length()-1); - if (log_query.append(lex->stmt_user_end, lex->stmt_end - lex->stmt_user_end)) - return TRUE; - return write_bin_log(thd, clear_error, log_query.c_ptr_safe(), - log_query.length()) != 0; - } - return FALSE; -} /* Create a list of users. @@ -5840,7 +5780,6 @@ bool mysql_drop_user(THD *thd, List &list) { int result; String wrong_users; - String log_query; LEX_USER *user_name, *tmp_user_name; List_iterator user_list(list); TABLE_LIST tables[GRANT_TABLES]; @@ -5870,7 +5809,6 @@ bool mysql_drop_user(THD *thd, List &list) rw_wrlock(&LOCK_grant); VOID(pthread_mutex_lock(&acl_cache->lock)); - log_query.append(STRING_WITH_LEN("DROP USER")); while ((tmp_user_name= user_list++)) { if (!(user_name= get_current_user(thd, tmp_user_name))) @@ -5878,17 +5816,6 @@ bool mysql_drop_user(THD *thd, List &list) result= TRUE; continue; } - - /* - The operation will cause inconsistency between master and slave, when - CURRENT_USER() is used. To solve this problem, we construct a new - binlog statement in which CURRENT_USER() is replaced by the real user - name and host name. - */ - log_query.append(STRING_WITH_LEN(" ")); - append_user(&log_query, user_name, FALSE); - log_query.append(STRING_WITH_LEN(",")); - if (handle_grant_data(tables, 1, user_name, NULL) <= 0) { append_user(&wrong_users, user_name); @@ -5907,13 +5834,7 @@ bool mysql_drop_user(THD *thd, List &list) my_error(ER_CANNOT_USER, MYF(0), "DROP USER", wrong_users.c_ptr_safe()); if (some_users_deleted) - { - if (log_query.c_ptr()[log_query.length()-1] == ',') - { - log_query.length(log_query.length()-1); - result|= write_bin_log(thd, FALSE, log_query.c_ptr_safe(), log_query.length()); - } - } + result |= write_bin_log(thd, FALSE, thd->query(), thd->query_length()); rw_unlock(&LOCK_grant); close_thread_tables(thd); @@ -5941,7 +5862,6 @@ bool mysql_rename_user(THD *thd, List &list) { int result; String wrong_users; - String log_query; LEX_USER *user_from, *tmp_user_from; LEX_USER *user_to, *tmp_user_to; List_iterator user_list(list); @@ -5969,7 +5889,6 @@ bool mysql_rename_user(THD *thd, List &list) rw_wrlock(&LOCK_grant); VOID(pthread_mutex_lock(&acl_cache->lock)); - log_query.append(STRING_WITH_LEN("RENAME USER")); while ((tmp_user_from= user_list++)) { if (!(user_from= get_current_user(thd, tmp_user_from))) @@ -5985,18 +5904,6 @@ bool mysql_rename_user(THD *thd, List &list) } DBUG_ASSERT(user_to != 0); /* Syntax enforces pairs of users. */ - /* - The operation will cause inconsistency between master and slave, when - CURRENT_USER() is used. To solve this problem, we construct a new - binlog statement in which CURRENT_USER() is replaced by the real user - name and host name. - */ - log_query.append(STRING_WITH_LEN(" ")); - append_user(&log_query, user_from, FALSE); - log_query.append(STRING_WITH_LEN(" TO ")); - append_user(&log_query, user_to, FALSE); - log_query.append(STRING_WITH_LEN(",")); - /* Search all in-memory structures and grant tables for a mention of the new user name. @@ -6018,15 +5925,9 @@ bool mysql_rename_user(THD *thd, List &list) if (result) my_error(ER_CANNOT_USER, MYF(0), "RENAME USER", wrong_users.c_ptr_safe()); - - if (some_users_renamed) - { - if (log_query.c_ptr()[log_query.length()-1] == ',') - { - log_query.length(log_query.length()-1); - result|= write_bin_log(thd, FALSE, log_query.c_ptr_safe(), log_query.length()); - } - } + + if (some_users_renamed && mysql_bin_log.is_open()) + result |= write_bin_log(thd, FALSE, thd->query(), thd->query_length()); rw_unlock(&LOCK_grant); close_thread_tables(thd); @@ -6216,9 +6117,8 @@ bool mysql_revoke_all(THD *thd, List &list) VOID(pthread_mutex_unlock(&acl_cache->lock)); - int binlog_error= 0; - if (acl_write_bin_log(thd, list, FALSE)) - binlog_error= 1; + int binlog_error= + write_bin_log(thd, FALSE, thd->query(), thd->query_length()); rw_unlock(&LOCK_grant); close_thread_tables(thd); diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 99f5257eb5e..4e4794ef2cf 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -1727,8 +1727,6 @@ typedef struct st_lex : public Query_tables_list - CREATE TRIGGER (points to "TRIGGER"); - CREATE PROCEDURE (points to "PROCEDURE"); - CREATE FUNCTION (points to "FUNCTION" or "AGGREGATE"); - - CREATE VIEW(points to "VIEW"); - - CREATE EVENT(points to "EVENT"); This pointer is required to add possibly omitted DEFINER-clause to the DDL-statement before dumping it to the binlog. @@ -1737,29 +1735,6 @@ typedef struct st_lex : public Query_tables_list const char *stmt_definition_end; - /* - stmt_begin is intended to point to the begin of every statement. - It is now used in the following statements: - - GRANT ALL PRIVELEGES ON *.* (points to "GRANT"); - - REVOKE ALL PRIVELEGES ON *.* (points to "REVOKE"); - */ - const char *stmt_begin; - const char *stmt_end; - - /* - stmt_user_begin is intended to point to the begin of the user list in - the following statements: - - GRANT ALL PRIVELEGES ON *.* TO 'username'@'hostname' - (points to "'username'"); - - REVOKE ALL PRIVELEGES ON *.* FROM 'username'@'hostname' - (points to "'username'"); - - these pointers are required to replace the CURRENT_USER() - function by the real user before dumping it to the binlog. - */ - const char *stmt_user_begin; - const char *stmt_user_end; - /** During name resolution search only in the table list given by Name_resolution_context::first_name_resolution_table and diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 92c4de5b462..8dc08f8425f 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1562,11 +1562,7 @@ opt_end_of_input: ; verb_clause: - remember_name statement remember_end - { - Lex->stmt_begin= $1; - Lex->stmt_end= $3; - } + statement | begin ; @@ -5747,7 +5743,7 @@ alter: } view_tail {} - | ALTER definer_opt remember_name EVENT_SYM sp_name + | ALTER definer_opt EVENT_SYM sp_name { /* It is safe to use Lex->spname because @@ -5759,8 +5755,7 @@ alter: if (!(Lex->event_parse_data= Event_parse_data::new_instance(YYTHD))) MYSQL_YYABORT; - Lex->event_parse_data->identifier= $5; - Lex->stmt_definition_begin= $3; + Lex->event_parse_data->identifier= $4; Lex->sql_command= SQLCOM_ALTER_EVENT; } @@ -5770,7 +5765,7 @@ alter: opt_ev_comment opt_ev_sql_stmt { - if (!($7 || $8 || $9 || $10 || $11)) + if (!($6 || $7 || $8 || $9 || $10)) { my_parse_error(ER(ER_SYNTAX_ERROR)); MYSQL_YYABORT; @@ -5831,16 +5826,7 @@ opt_ev_rename_to: ; opt_ev_sql_stmt: - /* empty*/ - { - $$= 0; - /* - Lex->sp_head is not initialized when event body is empty. - So we can not use Lex->sp_head->set_stmt_end() to set - stmt_definition_end. - */ - Lex->stmt_definition_end= (char*) YYLIP->get_cpp_tok_end(); - } + /* empty*/ { $$= 0;} | DO_SYM ev_sql_stmt { $$= 1; } ; @@ -11530,7 +11516,6 @@ user: $$->user = $1; $$->host.str= (char *) "%"; $$->host.length= 1; - Lex->stmt_user_end= YYLIP->get_cpp_ptr(); if (check_string_char_length(&$$->user, ER(ER_USERNAME), USERNAME_CHAR_LENGTH, @@ -11543,7 +11528,6 @@ user: if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) MYSQL_YYABORT; $$->user = $1; $$->host=$3; - Lex->stmt_user_end= YYLIP->get_cpp_ptr(); if (check_string_char_length(&$$->user, ER(ER_USERNAME), USERNAME_CHAR_LENGTH, @@ -11553,7 +11537,6 @@ user: } | CURRENT_USER optional_braces { - Lex->stmt_user_end= YYLIP->get_cpp_ptr(); if (!($$=(LEX_USER*) YYTHD->alloc(sizeof(st_lex_user)))) MYSQL_YYABORT; /* @@ -12744,10 +12727,9 @@ user_list: ; grant_list: - { Lex->stmt_user_begin= YYLIP->get_cpp_ptr(); } grant_user { - if (Lex->users_list.push_back($2)) + if (Lex->users_list.push_back($1)) MYSQL_YYABORT; } | grant_list ',' grant_user @@ -12760,7 +12742,6 @@ grant_list: grant_user: user IDENTIFIED_SYM BY TEXT_STRING { - Lex->stmt_user_end= YYLIP->get_cpp_ptr(); $$=$1; $1->password=$4; if ($4.length) { @@ -12787,10 +12768,7 @@ grant_user: } } | user IDENTIFIED_SYM BY PASSWORD TEXT_STRING - { - Lex->stmt_user_end= YYLIP->get_cpp_ptr(); - $$= $1; $1->password= $5; - } + { $$= $1; $1->password= $5; } | user { $$= $1; $1->password= null_lex_str; } ; From 56b911f893594004c2da92c9a77b2f122fe317d9 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Tue, 2 Feb 2010 15:16:47 +0000 Subject: [PATCH 123/132] BUG#47639: The rpl_binlog_corruption test fails on Windows The test case rpl_binlog_corruption fails on windows because when adding a line to the binary log index file it gets terminated with a CR+LF (which btw, is the normal case in windows, but not on Unixes - LF). This causes mismatch between the relay log names, causing mysqld to report that it cannot find the log file. We fix this by creating the instrumented index file through mysql, ie, using SELECT ... INTO DUMPFILE ..., as opposed on relying on ultimatly OS commands like: -- echo "..." > index. These changes go into the file and make the procedure platform independent: include/setup_fake_relay_log.inc Side note: when using SELECT ... INTO DUMPFILE ..., one needs to check if mysqld is running with secure_file_priv. If it is, we do it in two steps: 1. create the file on the allowed location; 2. move it to the datadir. If it is not, then we just create the file directly on the datadir (so previous step 2. is not needed). --- mysql-test/include/setup_fake_relay_log.inc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/mysql-test/include/setup_fake_relay_log.inc b/mysql-test/include/setup_fake_relay_log.inc index f88806e1079..5b9e7f72fdd 100644 --- a/mysql-test/include/setup_fake_relay_log.inc +++ b/mysql-test/include/setup_fake_relay_log.inc @@ -69,7 +69,22 @@ let $_fake_relay_log_purge= `SELECT @@global.relay_log_purge`; # Create relay log file. copy_file $fake_relay_log $_fake_relay_log; # Create relay log index. ---exec echo $_fake_filename-fake.000001 > $_fake_relay_index + +if (`SELECT LENGTH(@@secure_file_priv) > 0`) +{ + -- let $_file_priv_dir= `SELECT @@secure_file_priv`; + -- let $_suffix= `SELECT UUID()` + -- let $_tmp_file= $_file_priv_dir/fake-index.$_suffix + + -- eval select '$_fake_filename-fake.000001\n' into dumpfile '$_tmp_file' + -- copy_file $_tmp_file $_fake_relay_index + -- remove_file $_tmp_file +} + +if (`SELECT LENGTH(@@secure_file_priv) = 0`) +{ + -- eval select '$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index' +} # Setup replication from existing relay log. eval CHANGE MASTER TO MASTER_HOST='dummy.localdomain', RELAY_LOG_FILE='$_fake_filename-fake.000001', RELAY_LOG_POS=4; From 090c75d2b0e202ca103215fbf1211d7a85defae5 Mon Sep 17 00:00:00 2001 From: Magne Mahre Date: Tue, 2 Feb 2010 16:34:32 +0100 Subject: [PATCH 124/132] Cleanup fix for WL#5154 that splits commands handling for --default-character-set and --character-set-server such that only the first will give a deprecation warning. Apart from that, the two options should do the same. --- sql/mysqld.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 40026867aaf..ca20299b36e 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5733,7 +5733,8 @@ enum options_mysqld OPT_GENERAL_LOG_FILE, OPT_SLOW_QUERY_LOG_FILE, OPT_IGNORE_BUILTIN_INNODB, - OPT_BINLOG_DIRECT_NON_TRANS_UPDATE + OPT_BINLOG_DIRECT_NON_TRANS_UPDATE, + OPT_DEFAULT_CHARACTER_SET_OLD }; @@ -5859,7 +5860,8 @@ struct my_option my_long_options[] = {"debug", '#', "Debug log.", (uchar**) &default_dbug_option, (uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"default-character-set", 'C', "Set the default character set (deprecated option, use --character-set-server instead).", + {"default-character-set", OPT_DEFAULT_CHARACTER_SET_OLD, + "Set the default character set (deprecated option, use --character-set-server instead).", (uchar**) &default_character_set_name, (uchar**) &default_character_set_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, {"default-collation", OPT_DEFAULT_COLLATION_OLD, "Set the default collation (deprecated option, use --collation-server instead).", @@ -7921,8 +7923,12 @@ mysqld_get_one_option(int optid, case 'b': strmake(mysql_home,argument,sizeof(mysql_home)-1); break; + case OPT_DEFAULT_CHARACTER_SET_OLD: // --default-character-set + WARN_DEPRECATED(NULL, VER_CELOSIA, + "--default-character-set", + "--character-set-server"); + /* Fall through */ case 'C': - WARN_DEPRECATED(NULL, VER_CELOSIA, "--default-character-set", "--character-set-server"); if (default_collation_name == compiled_default_collation_name) default_collation_name= 0; break; From e4b7138561d567041dbb2aa8ed366e3c3d31d58b Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 2 Feb 2010 18:37:56 +0200 Subject: [PATCH 125/132] Bug #49445: Assertion failed: 0, file .\item_row.cc, line 55 with fulltext search and row op. The search for fulltext indexes is searching for some special predicate layouts. While doing so it's not checking for the number of columns of the expressions it tries to calculate. And since row expressions can't return a single scalar value there was a crash. Fixed by checking if the expressions are scalar (in addition to being constant) before calling Item::val_xxx() methods. --- mysql-test/r/fulltext.result | 8 ++++++++ mysql-test/t/fulltext.test | 10 ++++++++++ sql/sql_select.cc | 24 ++++++++++++------------ 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 1ef6656e7a4..f65823518d4 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -603,4 +603,12 @@ WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE) count(*) 0 DROP TABLE t1,t2,t3; +# +# Bug #49445: Assertion failed: 0, file .\item_row.cc, line 55 with +# fulltext search and row op +# +CREATE TABLE t1(a CHAR(1),FULLTEXT(a)); +SELECT 1 FROM t1 WHERE MATCH(a) AGAINST ('') AND ROW(a,a) > ROW(1,1); +1 +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 3853a224fd5..57a90483ea9 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -545,4 +545,14 @@ SELECT count(*) FROM t1 WHERE DROP TABLE t1,t2,t3; +--echo # +--echo # Bug #49445: Assertion failed: 0, file .\item_row.cc, line 55 with +--echo # fulltext search and row op +--echo # + +CREATE TABLE t1(a CHAR(1),FULLTEXT(a)); +SELECT 1 FROM t1 WHERE MATCH(a) AGAINST ('') AND ROW(a,a) > ROW(1,1); +DROP TABLE t1; + + --echo End of 5.1 tests diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 0e36d35289f..da85ca27339 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3650,20 +3650,20 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array, cond_func=(Item_func_match *)cond; else if (func->arg_count == 2) { - Item_func *arg0=(Item_func *)(func->arguments()[0]), - *arg1=(Item_func *)(func->arguments()[1]); - if (arg1->const_item() && + Item *arg0= func->arguments()[0], + *arg1= func->arguments()[1]; + if (arg1->const_item() && arg1->cols() == 1 && ((functype == Item_func::GE_FUNC && arg1->val_real() > 0) || - (functype == Item_func::GT_FUNC && arg1->val_real() >=0)) && - arg0->type() == Item::FUNC_ITEM && - arg0->functype() == Item_func::FT_FUNC) - cond_func=(Item_func_match *) arg0; - else if (arg0->const_item() && + (functype == Item_func::GT_FUNC && arg1->val_real() >= 0)) && + arg0->type() == Item::FUNC_ITEM && + ((Item_func *) arg0)->functype() == Item_func::FT_FUNC) + cond_func= (Item_func_match *) arg0; + else if (arg0->const_item() && arg0->cols() == 1 && ((functype == Item_func::LE_FUNC && arg0->val_real() > 0) || - (functype == Item_func::LT_FUNC && arg0->val_real() >=0)) && - arg1->type() == Item::FUNC_ITEM && - arg1->functype() == Item_func::FT_FUNC) - cond_func=(Item_func_match *) arg1; + (functype == Item_func::LT_FUNC && arg0->val_real() >= 0)) && + arg1->type() == Item::FUNC_ITEM && + ((Item_func *) arg1)->functype() == Item_func::FT_FUNC) + cond_func= (Item_func_match *) arg1; } } else if (cond->type() == Item::COND_ITEM) From 673ec7b24d1e4c8806d964ef262f39fadc84da70 Mon Sep 17 00:00:00 2001 From: Kent Boortz Date: Tue, 2 Feb 2010 23:29:14 +0100 Subject: [PATCH 126/132] Changes to be able to create source TAR packages with longer path names than 99 characters, using the USTAR format of the resulting source TAR. To be able to specify the use of USTAR when creating the source TAR, we needed both to update the GNU autotools version requirements slightly, and update the initiation of the tools to use more modern constructs. --- configure.in | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/configure.in b/configure.in index 38eb511ac18..eeb1da8670a 100644 --- a/configure.in +++ b/configure.in @@ -1,17 +1,23 @@ dnl -*- ksh -*- dnl Process this file with autoconf to produce a configure script. -AC_PREREQ(2.52)dnl Minimum Autoconf version required. +# Minimum Autoconf version required. +AC_PREREQ(2.59) -AC_INIT(sql/mysqld.cc) -AC_CANONICAL_SYSTEM -# The Docs Makefile.am parses this line! -# remember to also update version.c in ndb -# +# Remember to also update version.c in ndb. # When changing major version number please also check switch statement # in mysqlbinlog::check_master_version(). -AM_INIT_AUTOMAKE(mysql, 5.1.43) -AM_CONFIG_HEADER([include/config.h:config.h.in]) +AC_INIT([MySQL Server], [5.1.43], [], [mysql]) +AC_CONFIG_SRCDIR([sql/mysqld.cc]) +AC_CANONICAL_SYSTEM +# USTAR format gives us the possibility to store longer path names in +# TAR files, the path name is split into two parts, a 155 chacater +# first part and a 100 character second part. +AM_INIT_AUTOMAKE([1.9 tar-ustar]) +LT_INIT +LT_PREREQ([1.5.6]) + +AM_CONFIG_HEADER([include/config.h]) # Request support for automake silent-rules if available. # Default to verbose output. One can use the configure-time From 0a90bfe6c019fd1dc3db3090de969077ac311fb5 Mon Sep 17 00:00:00 2001 From: Kent Boortz Date: Wed, 3 Feb 2010 14:52:11 +0100 Subject: [PATCH 127/132] Adjuster the parsing of "configure.in" version number line --- win/configure.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win/configure.js b/win/configure.js index fc5c548c983..38fa8e7afeb 100644 --- a/win/configure.js +++ b/win/configure.js @@ -140,11 +140,11 @@ function GetValue(str, key) function GetVersion(str) { - var key = "AM_INIT_AUTOMAKE(mysql, "; - var pos = str.indexOf(key); //5.0.6-beta) + var key = "AC_INIT([MySQL Server], ["; + var pos = str.indexOf(key); if (pos == -1) return null; pos += key.length; - var end = str.indexOf(")", pos); + var end = str.indexOf("]", pos); if (end == -1) return null; return str.substring(pos, end); } From 619037517f6827131f0f6367df57e28d1b695626 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Thu, 4 Feb 2010 09:35:40 +0300 Subject: [PATCH 128/132] Fix test result file after manual merge. --- mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result index c67c05f4974..077aba8ddb0 100644 --- a/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result +++ b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result @@ -233,7 +233,7 @@ master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; ALTER DEFINER=`root`@`localhost` EVENT evt COMMENT 'evt' +master-bin.000001 # Query # # use `test`; ALTER EVENT evt COMMENT 'evt' -e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- From b8db15fc226063b83e507fcdfec1765088abcada Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Thu, 4 Feb 2010 12:13:29 +0200 Subject: [PATCH 129/132] tree name change --- .bzr-mysql/default.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bzr-mysql/default.conf b/.bzr-mysql/default.conf index 557df1b1ffe..f79c1cd6319 100644 --- a/.bzr-mysql/default.conf +++ b/.bzr-mysql/default.conf @@ -1,4 +1,4 @@ [MYSQL] post_commit_to = "commits@lists.mysql.com" post_push_to = "commits@lists.mysql.com" -tree_name = "mysql-5.0-bugteam" +tree_name = "mysql-5.0" From 88519d1c8f33e183bdea575bf18171c82b7da363 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 4 Feb 2010 12:23:33 +0100 Subject: [PATCH 130/132] Raise version number after cloning 5.1.44 --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index f2e83abc60c..567ed391eab 100644 --- a/configure.in +++ b/configure.in @@ -7,7 +7,7 @@ AC_PREREQ(2.59) # Remember to also update version.c in ndb. # When changing major version number please also check switch statement # in mysqlbinlog::check_master_version(). -AC_INIT([MySQL Server], [5.1.44], [], [mysql]) +AC_INIT([MySQL Server], [5.1.45], [], [mysql]) AC_CONFIG_SRCDIR([sql/mysqld.cc]) AC_CANONICAL_SYSTEM # USTAR format gives us the possibility to store longer path names in From f53d591e9f11c8ff8a186c1e764bed17f1f5a7b8 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Fri, 5 Feb 2010 16:52:35 +0300 Subject: [PATCH 131/132] Remove errmsg.txt and errmsg-cnv.sh. Use errmsg-utf8.txt instead. --- sql/share/errmsg-cnv.sh | 61 - sql/share/errmsg.txt | 6312 --------------------------------------- 2 files changed, 6373 deletions(-) delete mode 100644 sql/share/errmsg-cnv.sh delete mode 100644 sql/share/errmsg.txt diff --git a/sql/share/errmsg-cnv.sh b/sql/share/errmsg-cnv.sh deleted file mode 100644 index ac6243c9a37..00000000000 --- a/sql/share/errmsg-cnv.sh +++ /dev/null @@ -1,61 +0,0 @@ -# -# This shell script converts errmsg.txt -# from a mixed-charset format -# to utf8 format -# and writes the result to errmgs-utf8.txt -# - - -cat errmsg.txt | while IFS= ; read -r a -do -cs="" - -var="${a#"${a%%[![:space:]]*}"}" - -case $var in -cze*|hun*|pol*|rum*|slo*) - cs=latin2 - ;; -dan*|nla*|eng*|fre*|ger*|ita*|nor*|por*|spa*|swe*) - cs=latin1 - ;; -est*) - cs=latin7 - ;; -greek*) - cs=windows-1253 - ;; -jpn*) - cs=euc-jp - ;; -jps*) - cs=shift-jis - ;; -kor*) - cs=euc-kr - ;; -serbian*) - cs=windows-1250 - ;; -rus*) - cs=koi8-r - ;; -ukr*) - cs=koi8-u - ;; -*) - echo $a -esac - -if [ "x$cs" != "x" ] -then - b=`echo $a | iconv -f $cs -t utf-8` ; rc=$? - if [ "$rc" == "0" ] - then - echo "$b" - else - echo "# This message failed to convert from $cs, skipped" - fi -fi -done > errmsg-utf8.txt - diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt deleted file mode 100644 index 2d80b7302a5..00000000000 --- a/sql/share/errmsg.txt +++ /dev/null @@ -1,6312 +0,0 @@ -languages czech=cze latin2, danish=dan latin1, dutch=nla latin1, english=eng latin1, estonian=est latin7, french=fre latin1, german=ger latin1, greek=greek greek, hungarian=hun latin2, italian=ita latin1, japanese=jpn ujis, japanese-sjis=jps sjis, korean=kor euckr, norwegian-ny=norwegian-ny latin1, norwegian=nor latin1, polish=pol latin2, portuguese=por latin1, romanian=rum latin2, russian=rus koi8r, serbian=serbian cp1250, slovak=slo latin2, spanish=spa latin1, swedish=swe latin1, ukrainian=ukr koi8u; - -default-language eng - -start-error-number 1000 - -ER_HASHCHK - eng "hashchk" -ER_NISAMCHK - eng "isamchk" -ER_NO - cze "NE" - dan "NEJ" - nla "NEE" - eng "NO" - est "EI" - fre "NON" - ger "Nein" - greek "" - hun "NEM" - kor "ƴϿ" - nor "NEI" - norwegian-ny "NEI" - pol "NIE" - por "NO" - rum "NU" - rus "" - serbian "NE" - slo "NIE" - ukr "" -ER_YES - cze "ANO" - dan "JA" - nla "JA" - eng "YES" - est "JAH" - fre "OUI" - ger "Ja" - greek "" - hun "IGEN" - ita "SI" - kor "" - nor "JA" - norwegian-ny "JA" - pol "TAK" - por "SIM" - rum "DA" - rus "" - serbian "DA" - slo "no" - spa "SI" - ukr "" -ER_CANT_CREATE_FILE - cze "Nemohu vytvo-Bit soubor '%-.200s' (chybov kd: %d)" - dan "Kan ikke oprette filen '%-.200s' (Fejlkode: %d)" - nla "Kan file '%-.200s' niet aanmaken (Errcode: %d)" - eng "Can't create file '%-.200s' (errno: %d)" - est "Ei suuda luua faili '%-.200s' (veakood: %d)" - fre "Ne peut crer le fichier '%-.200s' (Errcode: %d)" - ger "Kann Datei '%-.200s' nicht erzeugen (Fehler: %d)" - greek " '%-.200s' ( : %d)" - hun "A '%-.200s' file nem hozhato letre (hibakod: %d)" - ita "Impossibile creare il file '%-.200s' (errno: %d)" - jpn "'%-.200s' ե뤬ޤ (errno: %d)" - kor "ȭ '%-.200s' ߽ϴ. (ȣ: %d)" - nor "Kan ikke opprette fila '%-.200s' (Feilkode: %d)" - norwegian-ny "Kan ikkje opprette fila '%-.200s' (Feilkode: %d)" - pol "Nie mona stworzy pliku '%-.200s' (Kod bdu: %d)" - por "No pode criar o arquivo '%-.200s' (erro no. %d)" - rum "Nu pot sa creez fisierul '%-.200s' (Eroare: %d)" - rus " '%-.200s' (: %d)" - serbian "Ne mogu da kreiram file '%-.200s' (errno: %d)" - slo "Nemem vytvori sbor '%-.200s' (chybov kd: %d)" - spa "No puedo crear archivo '%-.200s' (Error: %d)" - swe "Kan inte skapa filen '%-.200s' (Felkod: %d)" - ukr " '%-.200s' (: %d)" -ER_CANT_CREATE_TABLE - cze "Nemohu vytvo-Bit tabulku '%-.200s' (chybov kd: %d)" - dan "Kan ikke oprette tabellen '%-.200s' (Fejlkode: %d)" - nla "Kan tabel '%-.200s' niet aanmaken (Errcode: %d)" - eng "Can't create table '%-.200s' (errno: %d)" - jps "'%-.200s' e[u܂.(errno: %d)", - est "Ei suuda luua tabelit '%-.200s' (veakood: %d)" - fre "Ne peut crer la table '%-.200s' (Errcode: %d)" - ger "Kann Tabelle '%-.200s' nicht erzeugen (Fehler: %d)" - greek " '%-.200s' ( : %d)" - hun "A '%-.200s' tabla nem hozhato letre (hibakod: %d)" - ita "Impossibile creare la tabella '%-.200s' (errno: %d)" - jpn "'%-.200s' ơ֥뤬ޤ.(errno: %d)" - kor "̺ '%-.200s' ߽ϴ. (ȣ: %d)" - nor "Kan ikke opprette tabellen '%-.200s' (Feilkode: %d)" - norwegian-ny "Kan ikkje opprette tabellen '%-.200s' (Feilkode: %d)" - pol "Nie mona stworzy tabeli '%-.200s' (Kod bdu: %d)" - por "No pode criar a tabela '%-.200s' (erro no. %d)" - rum "Nu pot sa creez tabla '%-.200s' (Eroare: %d)" - rus " '%-.200s' (: %d)" - serbian "Ne mogu da kreiram tabelu '%-.200s' (errno: %d)" - slo "Nemem vytvori tabuku '%-.200s' (chybov kd: %d)" - spa "No puedo crear tabla '%-.200s' (Error: %d)" - swe "Kan inte skapa tabellen '%-.200s' (Felkod: %d)" - ukr " '%-.200s' (: %d)" -ER_CANT_CREATE_DB - cze "Nemohu vytvo-Bit databzi '%-.192s' (chybov kd: %d)" - dan "Kan ikke oprette databasen '%-.192s' (Fejlkode: %d)" - nla "Kan database '%-.192s' niet aanmaken (Errcode: %d)" - eng "Can't create database '%-.192s' (errno: %d)" - jps "'%-.192s' f[^x[X܂ (errno: %d)", - est "Ei suuda luua andmebaasi '%-.192s' (veakood: %d)" - fre "Ne peut crer la base '%-.192s' (Erreur %d)" - ger "Kann Datenbank '%-.192s' nicht erzeugen (Fehler: %d)" - greek " '%-.192s' ( : %d)" - hun "Az '%-.192s' adatbazis nem hozhato letre (hibakod: %d)" - ita "Impossibile creare il database '%-.192s' (errno: %d)" - jpn "'%-.192s' ǡ١ޤ (errno: %d)" - kor "Ÿ̽ '%-.192s' ߽ϴ.. (ȣ: %d)" - nor "Kan ikke opprette databasen '%-.192s' (Feilkode: %d)" - norwegian-ny "Kan ikkje opprette databasen '%-.192s' (Feilkode: %d)" - pol "Nie mona stworzy bazy danych '%-.192s' (Kod bdu: %d)" - por "No pode criar o banco de dados '%-.192s' (erro no. %d)" - rum "Nu pot sa creez baza de date '%-.192s' (Eroare: %d)" - rus " '%-.192s' (: %d)" - serbian "Ne mogu da kreiram bazu '%-.192s' (errno: %d)" - slo "Nemem vytvori databzu '%-.192s' (chybov kd: %d)" - spa "No puedo crear base de datos '%-.192s' (Error: %d)" - swe "Kan inte skapa databasen '%-.192s' (Felkod: %d)" - ukr " '%-.192s' (: %d)" -ER_DB_CREATE_EXISTS - cze "Nemohu vytvo-Bit databzi '%-.192s'; databze ji existuje" - dan "Kan ikke oprette databasen '%-.192s'; databasen eksisterer" - nla "Kan database '%-.192s' niet aanmaken; database bestaat reeds" - eng "Can't create database '%-.192s'; database exists" - jps "'%-.192s' f[^x[X܂.ɂ̃f[^x[X݂܂", - est "Ei suuda luua andmebaasi '%-.192s': andmebaas juba eksisteerib" - fre "Ne peut crer la base '%-.192s'; elle existe dj" - ger "Kann Datenbank '%-.192s' nicht erzeugen. Datenbank existiert bereits" - greek " '%-.192s'; " - hun "Az '%-.192s' adatbazis nem hozhato letre Az adatbazis mar letezik" - ita "Impossibile creare il database '%-.192s'; il database esiste" - jpn "'%-.192s' ǡ١ޤ.ˤΥǡ١¸ߤޤ" - kor "Ÿ̽ '%-.192s' ߽ϴ.. Ÿ̽ " - nor "Kan ikke opprette databasen '%-.192s'; databasen eksisterer" - norwegian-ny "Kan ikkje opprette databasen '%-.192s'; databasen eksisterer" - pol "Nie mona stworzy bazy danych '%-.192s'; baza danych ju istnieje" - por "No pode criar o banco de dados '%-.192s'; este banco de dados j existe" - rum "Nu pot sa creez baza de date '%-.192s'; baza de date exista deja" - rus " '%-.192s'. " - serbian "Ne mogu da kreiram bazu '%-.192s'; baza ve postoji." - slo "Nemem vytvori databzu '%-.192s'; databza existuje" - spa "No puedo crear base de datos '%-.192s'; la base de datos ya existe" - swe "Databasen '%-.192s' existerar redan" - ukr " '%-.192s'. դ" -ER_DB_DROP_EXISTS - cze "Nemohu zru-Bit databzi '%-.192s', databze neexistuje" - dan "Kan ikke slette (droppe) '%-.192s'; databasen eksisterer ikke" - nla "Kan database '%-.192s' niet verwijderen; database bestaat niet" - eng "Can't drop database '%-.192s'; database doesn't exist" - jps "'%-.192s' f[^x[Xjł܂. ̃f[^x[XȂ̂ł.", - est "Ei suuda kustutada andmebaasi '%-.192s': andmebaasi ei eksisteeri" - fre "Ne peut effacer la base '%-.192s'; elle n'existe pas" - ger "Kann Datenbank '%-.192s' nicht lschen; Datenbank nicht vorhanden" - greek " '%-.192s'. " - hun "A(z) '%-.192s' adatbazis nem szuntetheto meg. Az adatbazis nem letezik" - ita "Impossibile cancellare '%-.192s'; il database non esiste" - jpn "'%-.192s' ǡ١˴Ǥޤ. Υǡ١ʤΤǤ." - kor "Ÿ̽ '%-.192s' ߽ϴ. Ÿ̽ " - nor "Kan ikke fjerne (drop) '%-.192s'; databasen eksisterer ikke" - norwegian-ny "Kan ikkje fjerne (drop) '%-.192s'; databasen eksisterer ikkje" - pol "Nie mona usun? bazy danych '%-.192s'; baza danych nie istnieje" - por "No pode eliminar o banco de dados '%-.192s'; este banco de dados no existe" - rum "Nu pot sa drop baza de date '%-.192s'; baza da date este inexistenta" - rus " '%-.192s'. " - serbian "Ne mogu da izbriem bazu '%-.192s'; baza ne postoji." - slo "Nemem zmaza databzu '%-.192s'; databza neexistuje" - spa "No puedo eliminar base de datos '%-.192s'; la base de datos no existe" - swe "Kan inte radera databasen '%-.192s'; databasen finns inte" - ukr " '%-.192s'. դ" -ER_DB_DROP_DELETE - cze "Chyba p-Bi ruen databze (nemohu vymazat '%-.192s', chyba %d)" - dan "Fejl ved sletning (drop) af databasen (kan ikke slette '%-.192s', Fejlkode %d)" - nla "Fout bij verwijderen database (kan '%-.192s' niet verwijderen, Errcode: %d)" - eng "Error dropping database (can't delete '%-.192s', errno: %d)" - jps "f[^x[XjG[ ('%-.192s' 폜ł܂, errno: %d)", - est "Viga andmebaasi kustutamisel (ei suuda kustutada faili '%-.192s', veakood: %d)" - fre "Ne peut effacer la base '%-.192s' (erreur %d)" - ger "Fehler beim Lschen der Datenbank ('%-.192s' kann nicht gelscht werden, Fehler: %d)" - greek " ( '%-.192s', : %d)" - hun "Adatbazis megszuntetesi hiba ('%-.192s' nem torolheto, hibakod: %d)" - ita "Errore durante la cancellazione del database (impossibile cancellare '%-.192s', errno: %d)" - jpn "ǡ١˴顼 ('%-.192s' Ǥޤ, errno: %d)" - kor "Ÿ̽ ('%-.192s' ϴ, ȣ: %d)" - nor "Feil ved fjerning (drop) av databasen (kan ikke slette '%-.192s', feil %d)" - norwegian-ny "Feil ved fjerning (drop) av databasen (kan ikkje slette '%-.192s', feil %d)" - pol "B?d podczas usuwania bazy danych (nie mona usun? '%-.192s', b?d %d)" - por "Erro ao eliminar banco de dados (no pode eliminar '%-.192s' - erro no. %d)" - rum "Eroare dropuind baza de date (nu pot sa sterg '%-.192s', Eroare: %d)" - rus " ( '%-.192s', : %d)" - serbian "Ne mogu da izbriem bazu (ne mogu da izbriem '%-.192s', errno: %d)" - slo "Chyba pri mazan databzy (nemem zmaza '%-.192s', chybov kd: %d)" - spa "Error eliminando la base de datos(no puedo borrar '%-.192s', error %d)" - swe "Fel vid radering av databasen (Kan inte radera '%-.192s'. Felkod: %d)" - ukr " ( '%-.192s', : %d)" -ER_DB_DROP_RMDIR - cze "Chyba p-Bi ruen databze (nemohu vymazat adres '%-.192s', chyba %d)" - dan "Fejl ved sletting af database (kan ikke slette folderen '%-.192s', Fejlkode %d)" - nla "Fout bij verwijderen database (kan rmdir '%-.192s' niet uitvoeren, Errcode: %d)" - eng "Error dropping database (can't rmdir '%-.192s', errno: %d)" - jps "f[^x[XjG[ ('%-.192s' rmdir ł܂, errno: %d)", - est "Viga andmebaasi kustutamisel (ei suuda kustutada kataloogi '%-.192s', veakood: %d)" - fre "Erreur en effaant la base (rmdir '%-.192s', erreur %d)" - ger "Fehler beim Lschen der Datenbank (Verzeichnis '%-.192s' kann nicht gelscht werden, Fehler: %d)" - greek " ( '%-.192s', : %d)" - hun "Adatbazis megszuntetesi hiba ('%-.192s' nem szuntetheto meg, hibakod: %d)" - ita "Errore durante la cancellazione del database (impossibile rmdir '%-.192s', errno: %d)" - jpn "ǡ١˴顼 ('%-.192s' rmdir Ǥޤ, errno: %d)" - kor "Ÿ̽ (rmdir '%-.192s' ϴ, ȣ: %d)" - nor "Feil ved sletting av database (kan ikke slette katalogen '%-.192s', feil %d)" - norwegian-ny "Feil ved sletting av database (kan ikkje slette katalogen '%-.192s', feil %d)" - pol "B?d podczas usuwania bazy danych (nie mona wykona rmdir '%-.192s', b?d %d)" - por "Erro ao eliminar banco de dados (no pode remover diretrio '%-.192s' - erro no. %d)" - rum "Eroare dropuind baza de date (nu pot sa rmdir '%-.192s', Eroare: %d)" - rus " ( '%-.192s', : %d)" - serbian "Ne mogu da izbriem bazu (ne mogu da izbriem direktorijum '%-.192s', errno: %d)" - slo "Chyba pri mazan databzy (nemem vymaza adresr '%-.192s', chybov kd: %d)" - spa "Error eliminando la base de datos (No puedo borrar directorio '%-.192s', error %d)" - swe "Fel vid radering av databasen (Kan inte radera biblioteket '%-.192s'. Felkod: %d)" - ukr " ( '%-.192s', : %d)" -ER_CANT_DELETE_FILE - cze "Chyba p-Bi vmazu '%-.192s' (chybov kd: %d)" - dan "Fejl ved sletning af '%-.192s' (Fejlkode: %d)" - nla "Fout bij het verwijderen van '%-.192s' (Errcode: %d)" - eng "Error on delete of '%-.192s' (errno: %d)" - jps "'%-.192s' ̍폜G[ (errno: %d)", - est "Viga '%-.192s' kustutamisel (veakood: %d)" - fre "Erreur en effaant '%-.192s' (Errcode: %d)" - ger "Fehler beim Lschen von '%-.192s' (Fehler: %d)" - greek " '%-.192s' ( : %d)" - hun "Torlesi hiba: '%-.192s' (hibakod: %d)" - ita "Errore durante la cancellazione di '%-.192s' (errno: %d)" - jpn "'%-.192s' κ顼 (errno: %d)" - kor "'%-.192s' (ȣ: %d)" - nor "Feil ved sletting av '%-.192s' (Feilkode: %d)" - norwegian-ny "Feil ved sletting av '%-.192s' (Feilkode: %d)" - pol "B?d podczas usuwania '%-.192s' (Kod bdu: %d)" - por "Erro na remoo de '%-.192s' (erro no. %d)" - rum "Eroare incercind sa delete '%-.192s' (Eroare: %d)" - rus " '%-.192s' (: %d)" - serbian "Greka pri brisanju '%-.192s' (errno: %d)" - slo "Chyba pri mazan '%-.192s' (chybov kd: %d)" - spa "Error en el borrado de '%-.192s' (Error: %d)" - swe "Kan inte radera filen '%-.192s' (Felkod: %d)" - ukr " '%-.192s' (: %d)" -ER_CANT_FIND_SYSTEM_REC - cze "Nemohu -Bst zznam v systmov tabulce" - dan "Kan ikke lse posten i systemfolderen" - nla "Kan record niet lezen in de systeem tabel" - eng "Can't read record in system table" - jps "system table ̃R[hǂގł܂ł", - est "Ei suuda lugeda kirjet ssteemsest tabelist" - fre "Ne peut lire un enregistrement de la table 'system'" - ger "Datensatz in der Systemtabelle nicht lesbar" - greek " " - hun "Nem olvashato rekord a rendszertablaban" - ita "Impossibile leggere il record dalla tabella di sistema" - jpn "system table Υ쥳ɤɤǤޤǤ" - kor "system ̺ ڵ带 ϴ." - nor "Kan ikke lese posten i systemkatalogen" - norwegian-ny "Kan ikkje lese posten i systemkatalogen" - pol "Nie mona odczyta rekordu z tabeli systemowej" - por "No pode ler um registro numa tabela do sistema" - rum "Nu pot sa citesc cimpurile in tabla de system (system table)" - rus " " - serbian "Ne mogu da proitam slog iz sistemske tabele" - slo "Nemem ta zznam v systmovej tabuke" - spa "No puedo leer el registro en la tabla del sistema" - swe "Hittar inte posten i systemregistret" - ukr " ϧ æ" -ER_CANT_GET_STAT - cze "Nemohu z-Bskat stav '%-.200s' (chybov kd: %d)" - dan "Kan ikke lse status af '%-.200s' (Fejlkode: %d)" - nla "Kan de status niet krijgen van '%-.200s' (Errcode: %d)" - eng "Can't get status of '%-.200s' (errno: %d)" - jps "'%-.200s' ̃XeC^X܂. (errno: %d)", - est "Ei suuda lugeda '%-.200s' olekut (veakood: %d)" - fre "Ne peut obtenir le status de '%-.200s' (Errcode: %d)" - ger "Kann Status von '%-.200s' nicht ermitteln (Fehler: %d)" - greek " '%-.200s' ( : %d)" - hun "A(z) '%-.200s' statusza nem allapithato meg (hibakod: %d)" - ita "Impossibile leggere lo stato di '%-.200s' (errno: %d)" - jpn "'%-.200s' Υƥޤ. (errno: %d)" - kor "'%-.200s' ¸ ߽ϴ. (ȣ: %d)" - nor "Kan ikke lese statusen til '%-.200s' (Feilkode: %d)" - norwegian-ny "Kan ikkje lese statusen til '%-.200s' (Feilkode: %d)" - pol "Nie mona otrzyma statusu '%-.200s' (Kod bdu: %d)" - por "No pode obter o status de '%-.200s' (erro no. %d)" - rum "Nu pot sa obtin statusul lui '%-.200s' (Eroare: %d)" - rus " '%-.200s' (: %d)" - serbian "Ne mogu da dobijem stanje file-a '%-.200s' (errno: %d)" - slo "Nemem zisti stav '%-.200s' (chybov kd: %d)" - spa "No puedo obtener el estado de '%-.200s' (Error: %d)" - swe "Kan inte lsa filinformationen (stat) frn '%-.200s' (Felkod: %d)" - ukr " '%-.200s' (: %d)" -ER_CANT_GET_WD - cze "Chyba p-Bi zjiovn pracovn adres (chybov kd: %d)" - dan "Kan ikke lse aktive folder (Fejlkode: %d)" - nla "Kan de werkdirectory niet krijgen (Errcode: %d)" - eng "Can't get working directory (errno: %d)" - jps "working directory 𓾂鎖ł܂ł (errno: %d)", - est "Ei suuda identifitseerida jooksvat kataloogi (veakood: %d)" - fre "Ne peut obtenir le rpertoire de travail (Errcode: %d)" - ger "Kann Arbeitsverzeichnis nicht ermitteln (Fehler: %d)" - greek " ( : %d)" - hun "A munkakonyvtar nem allapithato meg (hibakod: %d)" - ita "Impossibile leggere la directory di lavoro (errno: %d)" - jpn "working directory ǤޤǤ (errno: %d)" - kor " 丮 ã ߽ϴ. (ȣ: %d)" - nor "Kan ikke lese aktiv katalog(Feilkode: %d)" - norwegian-ny "Kan ikkje lese aktiv katalog(Feilkode: %d)" - pol "Nie mona rozpozna aktualnego katalogu (Kod bdu: %d)" - por "No pode obter o diretrio corrente (erro no. %d)" - rum "Nu pot sa obtin directorul current (working directory) (Eroare: %d)" - rus " (: %d)" - serbian "Ne mogu da dobijem trenutni direktorijum (errno: %d)" - slo "Nemem zisti pracovn adresr (chybov kd: %d)" - spa "No puedo acceder al directorio (Error: %d)" - swe "Kan inte inte lsa aktivt bibliotek. (Felkod: %d)" - ukr " (: %d)" -ER_CANT_LOCK - cze "Nemohu uzamknout soubor (chybov-B kd: %d)" - dan "Kan ikke lse fil (Fejlkode: %d)" - nla "Kan de file niet blokeren (Errcode: %d)" - eng "Can't lock file (errno: %d)" - jps "t@CbNł܂ (errno: %d)", - est "Ei suuda lukustada faili (veakood: %d)" - fre "Ne peut verrouiller le fichier (Errcode: %d)" - ger "Datei kann nicht gesperrt werden (Fehler: %d)" - greek " ( : %d)" - hun "A file nem zarolhato. (hibakod: %d)" - ita "Impossibile il locking il file (errno: %d)" - jpn "եåǤޤ (errno: %d)" - kor "ȭ (lock) ߽ϴ. (ȣ: %d)" - nor "Kan ikke lse fila (Feilkode: %d)" - norwegian-ny "Kan ikkje lse fila (Feilkode: %d)" - pol "Nie mona zablokowa pliku (Kod bdu: %d)" - por "No pode travar o arquivo (erro no. %d)" - rum "Nu pot sa lock fisierul (Eroare: %d)" - rus " (: %d)" - serbian "Ne mogu da zakljuam file (errno: %d)" - slo "Nemem zamkn sbor (chybov kd: %d)" - spa "No puedo bloquear archivo: (Error: %d)" - swe "Kan inte lsa filen. (Felkod: %d)" - ukr " (: %d)" -ER_CANT_OPEN_FILE - cze "Nemohu otev-Bt soubor '%-.200s' (chybov kd: %d)" - dan "Kan ikke bne fil: '%-.200s' (Fejlkode: %d)" - nla "Kan de file '%-.200s' niet openen (Errcode: %d)" - eng "Can't open file: '%-.200s' (errno: %d)" - jps "'%-.200s' t@CJł܂ (errno: %d)", - est "Ei suuda avada faili '%-.200s' (veakood: %d)" - fre "Ne peut ouvrir le fichier: '%-.200s' (Errcode: %d)" - ger "Kann Datei '%-.200s' nicht ffnen (Fehler: %d)" - greek " : '%-.200s' ( : %d)" - hun "A '%-.200s' file nem nyithato meg (hibakod: %d)" - ita "Impossibile aprire il file: '%-.200s' (errno: %d)" - jpn "'%-.200s' ե򳫤Ǥޤ (errno: %d)" - kor "ȭ ߽ϴ.: '%-.200s' (ȣ: %d)" - nor "Kan ikke pne fila: '%-.200s' (Feilkode: %d)" - norwegian-ny "Kan ikkje pne fila: '%-.200s' (Feilkode: %d)" - pol "Nie mona otworzy pliku: '%-.200s' (Kod bdu: %d)" - por "No pode abrir o arquivo '%-.200s' (erro no. %d)" - rum "Nu pot sa deschid fisierul: '%-.200s' (Eroare: %d)" - rus " : '%-.200s' (: %d)" - serbian "Ne mogu da otvorim file: '%-.200s' (errno: %d)" - slo "Nemem otvori sbor: '%-.200s' (chybov kd: %d)" - spa "No puedo abrir archivo: '%-.200s' (Error: %d)" - swe "Kan inte anvnda '%-.200s' (Felkod: %d)" - ukr " צ : '%-.200s' (: %d)" -ER_FILE_NOT_FOUND - cze "Nemohu naj-Bt soubor '%-.200s' (chybov kd: %d)" - dan "Kan ikke finde fila: '%-.200s' (Fejlkode: %d)" - nla "Kan de file: '%-.200s' niet vinden (Errcode: %d)" - eng "Can't find file: '%-.200s' (errno: %d)" - jps "'%-.200s' t@Ct鎖ł܂.(errno: %d)", - est "Ei suuda leida faili '%-.200s' (veakood: %d)" - fre "Ne peut trouver le fichier: '%-.200s' (Errcode: %d)" - ger "Kann Datei '%-.200s' nicht finden (Fehler: %d)" - greek " : '%-.200s' ( : %d)" - hun "A(z) '%-.200s' file nem talalhato (hibakod: %d)" - ita "Impossibile trovare il file: '%-.200s' (errno: %d)" - jpn "'%-.200s' եդǤޤ.(errno: %d)" - kor "ȭ ã ߽ϴ.: '%-.200s' (ȣ: %d)" - nor "Kan ikke finne fila: '%-.200s' (Feilkode: %d)" - norwegian-ny "Kan ikkje finne fila: '%-.200s' (Feilkode: %d)" - pol "Nie mona znale pliku: '%-.200s' (Kod bdu: %d)" - por "No pode encontrar o arquivo '%-.200s' (erro no. %d)" - rum "Nu pot sa gasesc fisierul: '%-.200s' (Eroare: %d)" - rus " : '%-.200s' (: %d)" - serbian "Ne mogu da pronaem file: '%-.200s' (errno: %d)" - slo "Nemem njs sbor: '%-.200s' (chybov kd: %d)" - spa "No puedo encontrar archivo: '%-.200s' (Error: %d)" - swe "Hittar inte filen '%-.200s' (Felkod: %d)" - ukr " : '%-.200s' (: %d)" -ER_CANT_READ_DIR - cze "Nemohu -Bst adres '%-.192s' (chybov kd: %d)" - dan "Kan ikke lse folder '%-.192s' (Fejlkode: %d)" - nla "Kan de directory niet lezen van '%-.192s' (Errcode: %d)" - eng "Can't read dir of '%-.192s' (errno: %d)" - jps "'%-.192s' fBNgǂ߂܂.(errno: %d)", - est "Ei suuda lugeda kataloogi '%-.192s' (veakood: %d)" - fre "Ne peut lire le rpertoire de '%-.192s' (Errcode: %d)" - ger "Verzeichnis von '%-.192s' nicht lesbar (Fehler: %d)" - greek " '%-.192s' ( : %d)" - hun "A(z) '%-.192s' konyvtar nem olvashato. (hibakod: %d)" - ita "Impossibile leggere la directory di '%-.192s' (errno: %d)" - jpn "'%-.192s' ǥ쥯ȥ꤬ɤޤ.(errno: %d)" - kor "'%-.192s'丮 ߽ϴ. (ȣ: %d)" - nor "Kan ikke lese katalogen '%-.192s' (Feilkode: %d)" - norwegian-ny "Kan ikkje lese katalogen '%-.192s' (Feilkode: %d)" - pol "Nie mona odczyta katalogu '%-.192s' (Kod bdu: %d)" - por "No pode ler o diretrio de '%-.192s' (erro no. %d)" - rum "Nu pot sa citesc directorul '%-.192s' (Eroare: %d)" - rus " '%-.192s' (: %d)" - serbian "Ne mogu da proitam direktorijum '%-.192s' (errno: %d)" - slo "Nemem ta adresr '%-.192s' (chybov kd: %d)" - spa "No puedo leer el directorio de '%-.192s' (Error: %d)" - swe "Kan inte lsa frn bibliotek '%-.192s' (Felkod: %d)" - ukr " '%-.192s' (: %d)" -ER_CANT_SET_WD - cze "Nemohu zm-Bnit adres na '%-.192s' (chybov kd: %d)" - dan "Kan ikke skifte folder til '%-.192s' (Fejlkode: %d)" - nla "Kan de directory niet veranderen naar '%-.192s' (Errcode: %d)" - eng "Can't change dir to '%-.192s' (errno: %d)" - jps "'%-.192s' fBNg chdir ł܂.(errno: %d)", - est "Ei suuda siseneda kataloogi '%-.192s' (veakood: %d)" - fre "Ne peut changer le rpertoire pour '%-.192s' (Errcode: %d)" - ger "Kann nicht in das Verzeichnis '%-.192s' wechseln (Fehler: %d)" - greek " '%-.192s' ( : %d)" - hun "Konyvtarvaltas nem lehetseges a(z) '%-.192s'-ba. (hibakod: %d)" - ita "Impossibile cambiare la directory in '%-.192s' (errno: %d)" - jpn "'%-.192s' ǥ쥯ȥ chdir Ǥޤ.(errno: %d)" - kor "'%-.192s'丮 ̵ ϴ. (ȣ: %d)" - nor "Kan ikke skifte katalog til '%-.192s' (Feilkode: %d)" - norwegian-ny "Kan ikkje skifte katalog til '%-.192s' (Feilkode: %d)" - pol "Nie mona zmieni katalogu na '%-.192s' (Kod bdu: %d)" - por "No pode mudar para o diretrio '%-.192s' (erro no. %d)" - rum "Nu pot sa schimb directorul '%-.192s' (Eroare: %d)" - rus " '%-.192s' (: %d)" - serbian "Ne mogu da promenim direktorijum na '%-.192s' (errno: %d)" - slo "Nemem vojs do adresra '%-.192s' (chybov kd: %d)" - spa "No puedo cambiar al directorio de '%-.192s' (Error: %d)" - swe "Kan inte byta till '%-.192s' (Felkod: %d)" - ukr " '%-.192s' (: %d)" -ER_CHECKREAD - cze "Z-Bznam byl zmnn od poslednho ten v tabulce '%-.192s'" - dan "Posten er ndret siden sidste lsning '%-.192s'" - nla "Record is veranderd sinds de laatste lees activiteit in de tabel '%-.192s'" - eng "Record has changed since last read in table '%-.192s'" - est "Kirje tabelis '%-.192s' on muutunud viimasest lugemisest saadik" - fre "Enregistrement modifi depuis sa dernire lecture dans la table '%-.192s'" - ger "Datensatz hat sich seit dem letzten Zugriff auf Tabelle '%-.192s' gendert" - greek " '%-.192s'" - hun "A(z) '%-.192s' tablaban talalhato rekord megvaltozott az utolso olvasas ota" - ita "Il record e` cambiato dall'ultima lettura della tabella '%-.192s'" - kor "̺ '%-.192s' Record Ǿϴ." - nor "Posten har blitt endret siden den ble lest '%-.192s'" - norwegian-ny "Posten har vorte endra sidan den sist vart lesen '%-.192s'" - pol "Rekord zosta zmieniony od ostaniego odczytania z tabeli '%-.192s'" - por "Registro alterado desde a ltima leitura da tabela '%-.192s'" - rum "Cimpul a fost schimbat de la ultima citire a tabelei '%-.192s'" - rus " '%-.192s'" - serbian "Slog je promenjen od zadnjeg itanja tabele '%-.192s'" - slo "Zznam bol zmenen od poslednho tania v tabuke '%-.192s'" - spa "El registro ha cambiado desde la ultima lectura de la tabla '%-.192s'" - swe "Posten har frndrats sedan den lstes i register '%-.192s'" - ukr " ͦ æ '%-.192s'" -ER_DISK_FULL - cze "Disk je pln-B (%s), ekm na uvolnn njakho msta ..." - dan "Ikke mere diskplads (%s). Venter p at f frigjort plads..." - nla "Schijf vol (%s). Aan het wachten totdat er ruimte vrij wordt gemaakt..." - eng "Disk full (%s); waiting for someone to free some space..." - jps "Disk full (%s). N炷܂ł܂Ă...", - est "Ketas tis (%s). Ootame kuni tekib vaba ruumi..." - fre "Disque plein (%s). J'attend que quelqu'un libre de l'espace..." - ger "Festplatte voll (%s). Warte, bis jemand Platz schafft ..." - greek " (%s). , ..." - hun "A lemez megtelt (%s)." - ita "Disco pieno (%s). In attesa che qualcuno liberi un po' di spazio..." - jpn "Disk full (%s). ï򸺤餹ޤǤޤäƤ..." - kor "Disk full (%s). ٸ ﶧ ٸϴ..." - nor "Ikke mer diskplass (%s). Venter p f frigjort plass..." - norwegian-ny "Ikkje meir diskplass (%s). Ventar p f frigjort plass..." - pol "Dysk peny (%s). Oczekiwanie na zwolnienie miejsca..." - por "Disco cheio (%s). Aguardando algum liberar algum espao..." - rum "Hard-disk-ul este plin (%s). Astept sa se elibereze ceva spatiu..." - rus " . (%s). , - ..." - serbian "Disk je pun (%s). ekam nekoga da doe i oslobodi neto mesta..." - slo "Disk je pln (%s), akm na uvonenie miesta..." - spa "Disco lleno (%s). Esperando para que se libere algo de espacio..." - swe "Disken r full (%s). Vntar tills det finns ledigt utrymme..." - ukr " (%s). , צ ͦ..." -ER_DUP_KEY 23000 - cze "Nemohu zapsat, zdvojen-B kl v tabulce '%-.192s'" - dan "Kan ikke skrive, flere ens ngler i tabellen '%-.192s'" - nla "Kan niet schrijven, dubbele zoeksleutel in tabel '%-.192s'" - eng "Can't write; duplicate key in table '%-.192s'" - jps "table '%-.192s' key dĂď߂܂", - est "Ei saa kirjutada, korduv vti tabelis '%-.192s'" - fre "Ecriture impossible, doublon dans une cl de la table '%-.192s'" - ger "Kann nicht speichern, Grund: doppelter Schlssel in Tabelle '%-.192s'" - greek " , '%-.192s'" - hun "Irasi hiba, duplikalt kulcs a '%-.192s' tablaban." - ita "Scrittura impossibile: chiave duplicata nella tabella '%-.192s'" - jpn "table '%-.192s' key ʣƤƽ񤭤ޤ" - kor " ϴ., ̺ '%-.192s' ߺ Ű" - nor "Kan ikke skrive, flere like nkler i tabellen '%-.192s'" - norwegian-ny "Kan ikkje skrive, flere like nyklar i tabellen '%-.192s'" - pol "Nie mona zapisa, powtrzone klucze w tabeli '%-.192s'" - por "No pode gravar. Chave duplicada na tabela '%-.192s'" - rum "Nu pot sa scriu (can't write), cheie duplicata in tabela '%-.192s'" - rus " , '%-.192s'" - serbian "Ne mogu da piem poto postoji duplirani klju u tabeli '%-.192s'" - slo "Nemem zapsa, duplikt ka v tabuke '%-.192s'" - spa "No puedo escribir, clave duplicada en la tabla '%-.192s'" - swe "Kan inte skriva, dubbel sknyckel i register '%-.192s'" - ukr " , æ '%-.192s'" -ER_ERROR_ON_CLOSE - cze "Chyba p-Bi zavrn '%-.192s' (chybov kd: %d)" - dan "Fejl ved lukning af '%-.192s' (Fejlkode: %d)" - nla "Fout bij het sluiten van '%-.192s' (Errcode: %d)" - eng "Error on close of '%-.192s' (errno: %d)" - est "Viga faili '%-.192s' sulgemisel (veakood: %d)" - fre "Erreur a la fermeture de '%-.192s' (Errcode: %d)" - ger "Fehler beim Schlieen von '%-.192s' (Fehler: %d)" - greek " '%-.192s' ( : %d)" - hun "Hiba a(z) '%-.192s' zarasakor. (hibakod: %d)" - ita "Errore durante la chiusura di '%-.192s' (errno: %d)" - kor "'%-.192s'ݴ (ȣ: %d)" - nor "Feil ved lukking av '%-.192s' (Feilkode: %d)" - norwegian-ny "Feil ved lukking av '%-.192s' (Feilkode: %d)" - pol "B?d podczas zamykania '%-.192s' (Kod bdu: %d)" - por "Erro ao fechar '%-.192s' (erro no. %d)" - rum "Eroare inchizind '%-.192s' (errno: %d)" - rus " '%-.192s' (: %d)" - serbian "Greka pri zatvaranju '%-.192s' (errno: %d)" - slo "Chyba pri zatvran '%-.192s' (chybov kd: %d)" - spa "Error en el cierre de '%-.192s' (Error: %d)" - swe "Fick fel vid stngning av '%-.192s' (Felkod: %d)" - ukr " '%-.192s' (: %d)" -ER_ERROR_ON_READ - cze "Chyba p-Bi ten souboru '%-.200s' (chybov kd: %d)" - dan "Fejl ved lsning af '%-.200s' (Fejlkode: %d)" - nla "Fout bij het lezen van file '%-.200s' (Errcode: %d)" - eng "Error reading file '%-.200s' (errno: %d)" - jps "'%-.200s' t@C̓ǂݍ݃G[ (errno: %d)", - est "Viga faili '%-.200s' lugemisel (veakood: %d)" - fre "Erreur en lecture du fichier '%-.200s' (Errcode: %d)" - ger "Fehler beim Lesen der Datei '%-.200s' (Fehler: %d)" - greek " '%-.200s' ( : %d)" - hun "Hiba a '%-.200s'file olvasasakor. (hibakod: %d)" - ita "Errore durante la lettura del file '%-.200s' (errno: %d)" - jpn "'%-.200s' եɤ߹ߥ顼 (errno: %d)" - kor "'%-.200s'ȭ б (ȣ: %d)" - nor "Feil ved lesing av '%-.200s' (Feilkode: %d)" - norwegian-ny "Feil ved lesing av '%-.200s' (Feilkode: %d)" - pol "B?d podczas odczytu pliku '%-.200s' (Kod bdu: %d)" - por "Erro ao ler arquivo '%-.200s' (erro no. %d)" - rum "Eroare citind fisierul '%-.200s' (errno: %d)" - rus " '%-.200s' (: %d)" - serbian "Greka pri itanju file-a '%-.200s' (errno: %d)" - slo "Chyba pri tan sboru '%-.200s' (chybov kd: %d)" - spa "Error leyendo el fichero '%-.200s' (Error: %d)" - swe "Fick fel vid lsning av '%-.200s' (Felkod %d)" - ukr " '%-.200s' (: %d)" -ER_ERROR_ON_RENAME - cze "Chyba p-Bi pejmenovn '%-.210s' na '%-.210s' (chybov kd: %d)" - dan "Fejl ved omdbning af '%-.210s' til '%-.210s' (Fejlkode: %d)" - nla "Fout bij het hernoemen van '%-.210s' naar '%-.210s' (Errcode: %d)" - eng "Error on rename of '%-.210s' to '%-.210s' (errno: %d)" - jps "'%-.210s' '%-.210s' rename ł܂ (errno: %d)", - est "Viga faili '%-.210s' mbernimetamisel '%-.210s'-ks (veakood: %d)" - fre "Erreur en renommant '%-.210s' en '%-.210s' (Errcode: %d)" - ger "Fehler beim Umbenennen von '%-.210s' in '%-.210s' (Fehler: %d)" - greek " '%-.210s' to '%-.210s' ( : %d)" - hun "Hiba a '%-.210s' file atnevezesekor '%-.210s'. (hibakod: %d)" - ita "Errore durante la rinominazione da '%-.210s' a '%-.210s' (errno: %d)" - jpn "'%-.210s' '%-.210s' rename Ǥޤ (errno: %d)" - kor "'%-.210s' '%-.210s' ̸ (ȣ: %d)" - nor "Feil ved omdping av '%-.210s' til '%-.210s' (Feilkode: %d)" - norwegian-ny "Feil ved omdyping av '%-.210s' til '%-.210s' (Feilkode: %d)" - pol "B?d podczas zmieniania nazwy '%-.210s' na '%-.210s' (Kod bdu: %d)" - por "Erro ao renomear '%-.210s' para '%-.210s' (erro no. %d)" - rum "Eroare incercind sa renumesc '%-.210s' in '%-.210s' (errno: %d)" - rus " '%-.210s' '%-.210s' (: %d)" - serbian "Greka pri promeni imena '%-.210s' na '%-.210s' (errno: %d)" - slo "Chyba pri premenovvan '%-.210s' na '%-.210s' (chybov kd: %d)" - spa "Error en el renombrado de '%-.210s' a '%-.210s' (Error: %d)" - swe "Kan inte byta namn frn '%-.210s' till '%-.210s' (Felkod: %d)" - ukr " '%-.210s' '%-.210s' (: %d)" -ER_ERROR_ON_WRITE - cze "Chyba p-Bi zpisu do souboru '%-.200s' (chybov kd: %d)" - dan "Fejl ved skriving av filen '%-.200s' (Fejlkode: %d)" - nla "Fout bij het wegschrijven van file '%-.200s' (Errcode: %d)" - eng "Error writing file '%-.200s' (errno: %d)" - jps "'%-.200s' t@Cł܂ (errno: %d)", - est "Viga faili '%-.200s' kirjutamisel (veakood: %d)" - fre "Erreur d'criture du fichier '%-.200s' (Errcode: %d)" - ger "Fehler beim Speichern der Datei '%-.200s' (Fehler: %d)" - greek " '%-.200s' ( : %d)" - hun "Hiba a '%-.200s' file irasakor. (hibakod: %d)" - ita "Errore durante la scrittura del file '%-.200s' (errno: %d)" - jpn "'%-.200s' ե񤯻Ǥޤ (errno: %d)" - kor "'%-.200s'ȭ (ȣ: %d)" - nor "Feil ved skriving av fila '%-.200s' (Feilkode: %d)" - norwegian-ny "Feil ved skriving av fila '%-.200s' (Feilkode: %d)" - pol "B?d podczas zapisywania pliku '%-.200s' (Kod bdu: %d)" - por "Erro ao gravar arquivo '%-.200s' (erro no. %d)" - rum "Eroare scriind fisierul '%-.200s' (errno: %d)" - rus " '%-.200s' (: %d)" - serbian "Greka pri upisu '%-.200s' (errno: %d)" - slo "Chyba pri zpise do sboru '%-.200s' (chybov kd: %d)" - spa "Error escribiendo el archivo '%-.200s' (Error: %d)" - swe "Fick fel vid skrivning till '%-.200s' (Felkod %d)" - ukr " '%-.200s' (: %d)" -ER_FILE_USED - cze "'%-.192s' je zam-Ben proti zmnm" - dan "'%-.192s' er lst mod opdateringer" - nla "'%-.192s' is geblokeerd tegen veranderingen" - eng "'%-.192s' is locked against change" - jps "'%-.192s' ̓bNĂ܂", - est "'%-.192s' on lukustatud muudatuste vastu" - fre "'%-.192s' est verrouill contre les modifications" - ger "'%-.192s' ist fr nderungen gesperrt" - greek "'%-.192s' " - hun "'%-.192s' a valtoztatas ellen zarolva" - ita "'%-.192s' e` soggetto a lock contro i cambiamenti" - jpn "'%-.192s' ϥåƤޤ" - kor "'%-.192s' ϴ." - nor "'%-.192s' er lst mot oppdateringer" - norwegian-ny "'%-.192s' er lst mot oppdateringar" - pol "'%-.192s' jest zablokowany na wypadek zmian" - por "'%-.192s' est com travamento contra alteraes" - rum "'%-.192s' este blocat pentry schimbari (loccked against change)" - rus "'%-.192s' " - serbian "'%-.192s' je zakljuan za upis" - slo "'%-.192s' je zamknut proti zmenm" - spa "'%-.192s' esta bloqueado contra cambios" - swe "'%-.192s' r lst mot anvndning" - ukr "'%-.192s' ͦ" -ER_FILSORT_ABORT - cze "T-Bdn perueno" - dan "Sortering afbrudt" - nla "Sorteren afgebroken" - eng "Sort aborted" - jps "Sort f", - est "Sorteerimine katkestatud" - fre "Tri alphabtique abandonn" - ger "Sortiervorgang abgebrochen" - greek " " - hun "Sikertelen rendezes" - ita "Operazione di ordinamento abbandonata" - jpn "Sort " - kor "Ʈ ߴܵǾϴ." - nor "Sortering avbrutt" - norwegian-ny "Sortering avbrote" - pol "Sortowanie przerwane" - por "Ordenao abortada" - rum "Sortare intrerupta" - rus " " - serbian "Sortiranje je prekinuto" - slo "Triedenie preruen" - spa "Ordeancion cancelada" - swe "Sorteringen avbruten" - ukr " " -ER_FORM_NOT_FOUND - cze "Pohled '%-.192s' pro '%-.192s' neexistuje" - dan "View '%-.192s' eksisterer ikke for '%-.192s'" - nla "View '%-.192s' bestaat niet voor '%-.192s'" - eng "View '%-.192s' doesn't exist for '%-.192s'" - jps "View '%-.192s' '%-.192s' ɒ`Ă܂", - est "Vaade '%-.192s' ei eksisteeri '%-.192s' jaoks" - fre "La vue (View) '%-.192s' n'existe pas pour '%-.192s'" - ger "View '%-.192s' existiert fr '%-.192s' nicht" - greek " View '%-.192s' '%-.192s'" - hun "A(z) '%-.192s' nezet nem letezik a(z) '%-.192s'-hoz" - ita "La view '%-.192s' non esiste per '%-.192s'" - jpn "View '%-.192s' '%-.192s' Ƥޤ" - kor " '%-.192s' '%-.192s' ϴ." - nor "View '%-.192s' eksisterer ikke for '%-.192s'" - norwegian-ny "View '%-.192s' eksisterar ikkje for '%-.192s'" - pol "Widok '%-.192s' nie istnieje dla '%-.192s'" - por "Viso '%-.192s' no existe para '%-.192s'" - rum "View '%-.192s' nu exista pentru '%-.192s'" - rus " '%-.192s' '%-.192s'" - serbian "View '%-.192s' ne postoji za '%-.192s'" - slo "Pohad '%-.192s' neexistuje pre '%-.192s'" - spa "La vista '%-.192s' no existe para '%-.192s'" - swe "Formulr '%-.192s' finns inte i '%-.192s'" - ukr " '%-.192s' դ '%-.192s'" -ER_GET_ERRNO - cze "Obsluha tabulky vr-Btila chybu %d" - dan "Modtog fejl %d fra tabel hndteringen" - nla "Fout %d van tabel handler" - eng "Got error %d from storage engine" - est "Tabeli handler tagastas vea %d" - fre "Reu l'erreur %d du handler de la table" - ger "Fehler %d (Speicher-Engine)" - greek " %d (table handler)" - hun "%d hibajelzes a tablakezelotol" - ita "Rilevato l'errore %d dal gestore delle tabelle" - jpn "Got error %d from table handler" - kor "̺ handler %d ߻ Ͽϴ." - nor "Mottok feil %d fra tabell hndterer" - norwegian-ny "Mottok feil %d fra tabell handterar" - pol "Otrzymano b?d %d z obsugi tabeli" - por "Obteve erro %d no manipulador de tabelas" - rum "Eroarea %d obtinuta din handlerul tabelei" - rus " %d " - serbian "Handler tabela je vratio greku %d" - slo "Obsluha tabuky vrtila chybu %d" - spa "Error %d desde el manejador de la tabla" - swe "Fick felkod %d frn databashanteraren" - ukr " %d צ æ" -ER_ILLEGAL_HA - cze "Obsluha tabulky '%-.192s' nem-B tento parametr" - dan "Denne mulighed eksisterer ikke for tabeltypen '%-.192s'" - nla "Tabel handler voor '%-.192s' heeft deze optie niet" - eng "Table storage engine for '%-.192s' doesn't have this option" - est "Tabeli '%-.192s' handler ei toeta antud operatsiooni" - fre "Le handler de la table '%-.192s' n'a pas cette option" - ger "Diese Option gibt es nicht (Speicher-Engine fr '%-.192s')" - greek " (table handler) '%-.192s' " - hun "A(z) '%-.192s' tablakezelonek nincs ilyen opcioja" - ita "Il gestore delle tabelle per '%-.192s' non ha questa opzione" - jpn "Table handler for '%-.192s' doesn't have this option" - kor "'%-.192s' ̺ handler ̷ ɼ ϴ." - nor "Tabell hndtereren for '%-.192s' har ikke denne muligheten" - norwegian-ny "Tabell hndteraren for '%-.192s' har ikkje denne moglegheita" - pol "Obsuga tabeli '%-.192s' nie posiada tej opcji" - por "Manipulador de tabela para '%-.192s' no tem esta opo" - rum "Handlerul tabelei pentru '%-.192s' nu are aceasta optiune" - rus " '%-.192s' " - serbian "Handler tabela za '%-.192s' nema ovu opciju" - slo "Obsluha tabuky '%-.192s' nem tento parameter" - spa "El manejador de la tabla de '%-.192s' no tiene esta opcion" - swe "Tabellhanteraren for tabell '%-.192s' stdjer ej detta" - ukr " æ '%-.192s' æ Ԧ" -ER_KEY_NOT_FOUND - cze "Nemohu naj-Bt zznam v '%-.192s'" - dan "Kan ikke finde posten i '%-.192s'" - nla "Kan record niet vinden in '%-.192s'" - eng "Can't find record in '%-.192s'" - jps "'%-.192s'̂ȂɃR[ht܂", - est "Ei suuda leida kirjet '%-.192s'-s" - fre "Ne peut trouver l'enregistrement dans '%-.192s'" - ger "Kann Datensatz in '%-.192s' nicht finden" - greek " '%-.192s'" - hun "Nem talalhato a rekord '%-.192s'-ben" - ita "Impossibile trovare il record in '%-.192s'" - jpn "'%-.192s'Τʤ˥쥳ɤդޤ" - kor "'%-.192s' ڵ带 ã ϴ." - nor "Kan ikke finne posten i '%-.192s'" - norwegian-ny "Kan ikkje finne posten i '%-.192s'" - pol "Nie mona znale rekordu w '%-.192s'" - por "No pode encontrar registro em '%-.192s'" - rum "Nu pot sa gasesc recordul in '%-.192s'" - rus " '%-.192s'" - serbian "Ne mogu da pronaem slog u '%-.192s'" - slo "Nemem njs zznam v '%-.192s'" - spa "No puedo encontrar el registro en '%-.192s'" - swe "Hittar inte posten '%-.192s'" - ukr " '%-.192s'" -ER_NOT_FORM_FILE - cze "Nespr-Bvn informace v souboru '%-.200s'" - dan "Forkert indhold i: '%-.200s'" - nla "Verkeerde info in file: '%-.200s'" - eng "Incorrect information in file: '%-.200s'" - jps "t@C '%-.200s' info ԈĂ悤ł", - est "Vigane informatsioon failis '%-.200s'" - fre "Information erronne dans le fichier: '%-.200s'" - ger "Falsche Information in Datei '%-.200s'" - greek " : '%-.200s'" - hun "Ervenytelen info a file-ban: '%-.200s'" - ita "Informazione errata nel file: '%-.200s'" - jpn "ե '%-.200s' info ְäƤ褦Ǥ" - kor "ȭ Ȯ : '%-.200s'" - nor "Feil informasjon i filen: '%-.200s'" - norwegian-ny "Feil informasjon i fila: '%-.200s'" - pol "Niewa?ciwa informacja w pliku: '%-.200s'" - por "Informao incorreta no arquivo '%-.200s'" - rum "Informatie incorecta in fisierul: '%-.200s'" - rus " '%-.200s'" - serbian "Pogrena informacija u file-u: '%-.200s'" - slo "Nesprvna informcia v sbore: '%-.200s'" - spa "Informacion erronea en el archivo: '%-.200s'" - swe "Felaktig fil: '%-.200s'" - ukr " æ ̦: '%-.200s'" -ER_NOT_KEYFILE - cze "Nespr-Bvn kl pro tabulku '%-.200s'; pokuste se ho opravit" - dan "Fejl i indeksfilen til tabellen '%-.200s'; prv at reparere den" - nla "Verkeerde zoeksleutel file voor tabel: '%-.200s'; probeer het te repareren" - eng "Incorrect key file for table '%-.200s'; try to repair it" - jps "'%-.200s' e[u key file ԈĂ悤ł. CĂ", - est "Tabeli '%-.200s' vtmefail on vigane; proovi seda parandada" - fre "Index corrompu dans la table: '%-.200s'; essayez de le rparer" - ger "Fehlerhafte Index-Datei fr Tabelle '%-.200s'; versuche zu reparieren" - greek " (key file) : '%-.200s'; , !" - hun "Ervenytelen kulcsfile a tablahoz: '%-.200s'; probalja kijavitani!" - ita "File chiave errato per la tabella : '%-.200s'; prova a riparalo" - jpn "'%-.200s' ơ֥ key file ְäƤ褦Ǥ. 򤷤Ƥ" - kor "'%-.200s' ̺ Ȯ Ű . Ͻÿ!" - nor "Tabellen '%-.200s' har feil i nkkelfilen; forsk reparer den" - norwegian-ny "Tabellen '%-.200s' har feil i nykkelfila; prv reparere den" - pol "Niewa?ciwy plik kluczy dla tabeli: '%-.200s'; sprbuj go naprawi" - por "Arquivo de ndice incorreto para tabela '%-.200s'; tente repar-lo" - rum "Cheia fisierului incorecta pentru tabela: '%-.200s'; incearca s-o repari" - rus " : '%-.200s'. " - serbian "Pogrean key file za tabelu: '%-.200s'; probajte da ga ispravite" - slo "Nesprvny k pre tabuku '%-.200s'; pokste sa ho opravi" - spa "Clave de archivo erronea para la tabla: '%-.200s'; intente repararlo" - swe "Fatalt fel vid hantering av register '%-.200s'; kr en reparation" - ukr " æ: '%-.200s'; צ" -ER_OLD_KEYFILE - cze "Star-B klov soubor pro '%-.192s'; opravte ho." - dan "Gammel indeksfil for tabellen '%-.192s'; reparer den" - nla "Oude zoeksleutel file voor tabel '%-.192s'; repareer het!" - eng "Old key file for table '%-.192s'; repair it!" - jps "'%-.192s' e[u͌Â` key file ̂悤ł; CĂ", - est "Tabeli '%-.192s' vtmefail on aegunud; paranda see!" - fre "Vieux fichier d'index pour la table '%-.192s'; rparez le!" - ger "Alte Index-Datei fr Tabelle '%-.192s'. Bitte reparieren" - greek " (key file) '%-.192s'; , !" - hun "Regi kulcsfile a '%-.192s'tablahoz; probalja kijavitani!" - ita "File chiave vecchio per la tabella '%-.192s'; riparalo!" - jpn "'%-.192s' ơ֥ϸŤ key file Τ褦Ǥ; 򤷤Ƥ" - kor "'%-.192s' ̺ Ű . Ͻÿ!" - nor "Gammel nkkelfil for tabellen '%-.192s'; reparer den!" - norwegian-ny "Gammel nykkelfil for tabellen '%-.192s'; reparer den!" - pol "Plik kluczy dla tabeli '%-.192s' jest starego typu; napraw go!" - por "Arquivo de ndice desatualizado para tabela '%-.192s'; repare-o!" - rum "Cheia fisierului e veche pentru tabela '%-.192s'; repar-o!" - rus " '%-.192s'; !" - serbian "Zastareo key file za tabelu '%-.192s'; ispravite ga" - slo "Star kov sbor pre '%-.192s'; opravte ho!" - spa "Clave de archivo antigua para la tabla '%-.192s'; reparelo!" - swe "Gammal nyckelfil '%-.192s'; reparera registret" - ukr " æ '%-.192s'; צ !" -ER_OPEN_AS_READONLY - cze "'%-.192s' je jen pro -Bten" - dan "'%-.192s' er skrivebeskyttet" - nla "'%-.192s' is alleen leesbaar" - eng "Table '%-.192s' is read only" - jps "'%-.192s' ͓ǂݍݐpł", - est "Tabel '%-.192s' on ainult lugemiseks" - fre "'%-.192s' est en lecture seulement" - ger "Tabelle '%-.192s' ist nur lesbar" - greek "'%-.192s' " - hun "'%-.192s' irasvedett" - ita "'%-.192s' e` di sola lettura" - jpn "'%-.192s' ɤ߹ѤǤ" - kor "̺ '%-.192s' б Դϴ." - nor "'%-.192s' er skrivebeskyttet" - norwegian-ny "'%-.192s' er skrivetryggja" - pol "'%-.192s' jest tylko do odczytu" - por "Tabela '%-.192s' somente para leitura" - rum "Tabela '%-.192s' e read-only" - rus " '%-.192s' " - serbian "Tabelu '%-.192s' je dozvoljeno samo itati" - slo "'%-.192s' is ta only" - spa "'%-.192s' es de solo lectura" - swe "'%-.192s' r skyddad mot frndring" - ukr " '%-.192s' Ԧ " -ER_OUTOFMEMORY HY001 S1001 - cze "M-Blo pamti. Pestartujte daemona a zkuste znovu (je poteba %d byt)" - dan "Ikke mere hukommelse. Genstart serveren og prv igen (mangler %d bytes)" - nla "Geen geheugen meer. Herstart server en probeer opnieuw (%d bytes nodig)" - eng "Out of memory; restart server and try again (needed %d bytes)" - jps "Out of memory. f[X^[gĂ݂Ă (%d bytes Kv)", - est "Mlu sai otsa. Proovi MySQL uuesti kivitada (puudu ji %d baiti)" - fre "Manque de mmoire. Redmarrez le dmon et r-essayez (%d octets ncessaires)" - ger "Kein Speicher vorhanden (%d Bytes bentigt). Bitte Server neu starten" - greek " . , (demon) ( %d bytes)" - hun "Nincs eleg memoria. Inditsa ujra a demont, es probalja ismet. (%d byte szukseges.)" - ita "Memoria esaurita. Fai ripartire il demone e riprova (richiesti %d bytes)" - jpn "Out of memory. ǡꥹȤƤߤƤ (%d bytes ɬ)" - kor "Out of memory. ٽ Ͻÿ (needed %d bytes)" - nor "Ikke mer minne. Star p nytt tjenesten og prv igjen (trengte %d byter)" - norwegian-ny "Ikkje meir minne. Start p nytt tenesten og prv igjen (trengte %d bytar)" - pol "Zbyt mao pamici. Uruchom ponownie demona i sprbuj ponownie (potrzeba %d bajtw)" - por "Sem memria. Reinicie o programa e tente novamente (necessita de %d bytes)" - rum "Out of memory. Porneste daemon-ul din nou si incearca inca o data (e nevoie de %d bytes)" - rus " . ( %d )" - serbian "Nema memorije. Restartujte MySQL server i probajte ponovo (potrebno je %d byte-ova)" - slo "Mlo pamti. Retartujte daemona a skste znova (je potrebnch %d bytov)" - spa "Memoria insuficiente. Reinicie el demonio e intentelo otra vez (necesita %d bytes)" - swe "Ovntat slut p minnet, starta om programmet och frsk p nytt (Behvde %d bytes)" - ukr " 'Ԧ. (Ҧ %d Ԧ)" -ER_OUT_OF_SORTMEMORY HY001 S1001 - cze "M-Blo pamti pro tdn. Zvyte velikost tdcho bufferu" - dan "Ikke mere sorteringshukommelse. g sorteringshukommelse (sort buffer size) for serveren" - nla "Geen geheugen om te sorteren. Verhoog de server sort buffer size" - eng "Out of sort memory; increase server sort buffer size" - jps "Out of sort memory. sort buffer size Ȃ悤ł.", - est "Mlu sai sorteerimisel otsa. Suurenda MySQL-i sorteerimispuhvrit" - fre "Manque de mmoire pour le tri. Augmentez-la." - ger "Kein Speicher zum Sortieren vorhanden. sort_buffer_size sollte im Server erhht werden" - greek " . sort buffer size (demon)" - hun "Nincs eleg memoria a rendezeshez. Novelje a rendezo demon puffermeretet" - ita "Memoria per gli ordinamenti esaurita. Incrementare il 'sort_buffer' al demone" - jpn "Out of sort memory. sort buffer size ­ʤ褦Ǥ." - kor "Out of sort memory. daemon sort buffer ũ⸦ Ű" - nor "Ikke mer sorteringsminne. k sorteringsminnet (sort buffer size) for tjenesten" - norwegian-ny "Ikkje meir sorteringsminne. Auk sorteringsminnet (sorteringsbffer storleik) for tenesten" - pol "Zbyt mao pamici dla sortowania. Zwiksz wielko? bufora demona dla sortowania" - por "Sem memria para ordenao. Aumente tamanho do 'buffer' de ordenao" - rum "Out of memory pentru sortare. Largeste marimea buffer-ului pentru sortare in daemon (sort buffer size)" - rus " . " - serbian "Nema memorije za sortiranje. Poveajte veliinu sort buffer-a MySQL server-u" - slo "Mlo pamti pre triedenie, zvte vekos triediaceho bufferu" - spa "Memoria de ordenacion insuficiente. Incremente el tamano del buffer de ordenacion" - swe "Sorteringsbufferten rcker inte till. Kontrollera startparametrarna" - ukr " 'Ԧ . ¦ ͦ " -ER_UNEXPECTED_EOF - cze "Neo-Bekvan konec souboru pi ten '%-.192s' (chybov kd: %d)" - dan "Uventet afslutning p fil (eof) ved lsning af filen '%-.192s' (Fejlkode: %d)" - nla "Onverwachte eof gevonden tijdens het lezen van file '%-.192s' (Errcode: %d)" - eng "Unexpected EOF found when reading file '%-.192s' (errno: %d)" - jps "'%-.192s' t@Cǂݍݒ EOF \ʏŌ܂. (errno: %d)", - est "Ootamatu faililpumrgend faili '%-.192s' lugemisel (veakood: %d)" - fre "Fin de fichier inattendue en lisant '%-.192s' (Errcode: %d)" - ger "Unerwartetes Ende beim Lesen der Datei '%-.192s' (Fehler: %d)" - greek " , '%-.192s' ( : %d)" - hun "Varatlan filevege-jel a '%-.192s'olvasasakor. (hibakod: %d)" - ita "Fine del file inaspettata durante la lettura del file '%-.192s' (errno: %d)" - jpn "'%-.192s' եɤ߹ EOF ͽ̽Ǹޤ. (errno: %d)" - kor "'%-.192s' ȭ д ߸ eof ߰ (ȣ: %d)" - nor "Uventet slutt p fil (eof) ved lesing av filen '%-.192s' (Feilkode: %d)" - norwegian-ny "Uventa slutt p fil (eof) ved lesing av fila '%-.192s' (Feilkode: %d)" - pol "Nieoczekiwany 'eof' napotkany podczas czytania z pliku '%-.192s' (Kod bdu: %d)" - por "Encontrado fim de arquivo inesperado ao ler arquivo '%-.192s' (erro no. %d)" - rum "Sfirsit de fisier neasteptat in citirea fisierului '%-.192s' (errno: %d)" - rus " '%-.192s' (: %d)" - serbian "Neoekivani kraj pri itanju file-a '%-.192s' (errno: %d)" - slo "Neoakvan koniec sboru pri tan '%-.192s' (chybov kd: %d)" - spa "Inesperado fin de ficheroU mientras leiamos el archivo '%-.192s' (Error: %d)" - swe "Ovntat filslut vid lsning frn '%-.192s' (Felkod: %d)" - ukr " ˦ '%-.192s' (: %d)" -ER_CON_COUNT_ERROR 08004 - cze "P-Bli mnoho spojen" - dan "For mange forbindelser (connections)" - nla "Te veel verbindingen" - eng "Too many connections" - jps "ڑ܂", - est "Liiga palju samaaegseid hendusi" - fre "Trop de connexions" - ger "Zu viele Verbindungen" - greek " ..." - hun "Tul sok kapcsolat" - ita "Troppe connessioni" - jpn "³¿ޤ" - kor "ʹ ... max_connection Űÿ..." - nor "For mange tilkoblinger (connections)" - norwegian-ny "For mange tilkoplingar (connections)" - pol "Zbyt wiele po?cze" - por "Excesso de conexes" - rum "Prea multe conectiuni" - rus " " - serbian "Previe konekcija" - slo "Prli mnoho spojen" - spa "Demasiadas conexiones" - swe "Fr mnga anslutningar" - ukr " '" -ER_OUT_OF_RESOURCES - cze "M-Blo prostoru/pamti pro thread" - dan "Udget for trde/hukommelse" - nla "Geen thread geheugen meer; controleer of mysqld of andere processen al het beschikbare geheugen gebruikt. Zo niet, dan moet u wellicht 'ulimit' gebruiken om mysqld toe te laten meer geheugen te benutten, of u kunt extra swap ruimte toevoegen" - eng "Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space" - jps "Out of memory; mysqld ̑̃vZX[SĎgĂ邩mFĂ. [g؂ĂȂꍇA'ulimit' ݒ肵 mysqld ̃[gpEʂ𑽂邩Aswap space 𑝂₵Ă݂Ă", - est "Mlu sai otsa. Vimalik, et aitab swap-i lisamine vi ksu 'ulimit' abil MySQL-le rohkema mlu kasutamise lubamine" - fre "Manque de 'threads'/mmoire" - ger "Kein Speicher mehr vorhanden. Prfen Sie, ob mysqld oder ein anderer Prozess den gesamten Speicher verbraucht. Wenn nicht, sollten Sie mit 'ulimit' dafr sorgen, dass mysqld mehr Speicher benutzen darf, oder mehr Swap-Speicher einrichten" - greek " (Out of thread space/memory)" - hun "Elfogyott a thread-memoria" - ita "Fine dello spazio/memoria per i thread" - jpn "Out of memory; mysqld ¾Υץ꡼ƻȤäƤ뤫ǧƤ. ꡼ȤڤäƤʤ硢'ulimit' ꤷ mysqld Υ꡼Ѹ³̤¿뤫swap space 䤷ƤߤƤ" - kor "Out of memory; mysqld Ǵٸ μ 밡 ޸𸮸 äũϽÿ. ׷ ʴٸ ulimit ̿Ͽ ޸𸮸 ֵ ϰų ̽ Űÿ" - nor "Tomt for trd plass/minne" - norwegian-ny "Tomt for trd plass/minne" - pol "Zbyt mao miejsca/pamici dla w?tku" - por "Sem memria. Verifique se o mysqld ou algum outro processo est usando toda memria disponvel. Se no, voc pode ter que usar 'ulimit' para permitir ao mysqld usar mais memria ou voc pode adicionar mais rea de 'swap'" - rum "Out of memory; Verifica daca mysqld sau vreun alt proces foloseste toate memoria disponbila. Altfel, trebuie sa folosesi 'ulimit' ca sa permiti lui memoria disponbila. Altfel, trebuie sa folosesi 'ulimit' ca sa permiti lui mysqld sa foloseasca mai multa memorie ori adauga mai mult spatiu pentru swap (swap space)" - rus " ; , mysqld - . , ulimit, mysqld , " - serbian "Nema memorije; Proverite da li MySQL server ili neki drugi proces koristi svu slobodnu memoriju. (UNIX: Ako ne, probajte da upotrebite 'ulimit' komandu da biste dozvolili daemon-u da koristi vie memorije ili probajte da dodate vie swap memorije)" - slo "Mlo miesta-pamti pre vlkno" - spa "Memoria/espacio de tranpaso insuficiente" - swe "Fick slut p minnet. Kontrollera om mysqld eller ngon annan process anvnder allt tillgngligt minne. Om inte, frsk anvnda 'ulimit' eller allokera mera swap" - ukr " 'Ԧ; צ mysqld ˦ ۦ '. Φ, 'ulimit', mysqld ¦ 'Ԧ ¦ ͦ Ц " -ER_BAD_HOST_ERROR 08S01 - cze "Nemohu zjistit jm-Bno stroje pro Vai adresu" - dan "Kan ikke f vrtsnavn for din adresse" - nla "Kan de hostname niet krijgen van uw adres" - eng "Can't get hostname for your address" - jps " address hostname ܂.", - est "Ei suuda lahendada IP aadressi masina nimeks" - fre "Ne peut obtenir de hostname pour votre adresse" - ger "Kann Hostnamen fr diese Adresse nicht erhalten" - greek " hostname address " - hun "A gepnev nem allapithato meg a cimbol" - ita "Impossibile risalire al nome dell'host dall'indirizzo (risoluzione inversa)" - jpn " address hostname ޤ." - kor " ǻ ȣƮ̸ ϴ." - nor "Kan ikke f tak i vertsnavn for din adresse" - norwegian-ny "Kan ikkje f tak i vertsnavn for di adresse" - pol "Nie mona otrzyma nazwy hosta dla twojego adresu" - por "No pode obter nome do 'host' para seu endereo" - rum "Nu pot sa obtin hostname-ul adresei tale" - rus " " - serbian "Ne mogu da dobijem ime host-a za vau IP adresu" - slo "Nemem zisti meno hostitea pre vau adresu" - spa "No puedo obtener el nombre de maquina de tu direccion" - swe "Kan inte hitta 'hostname' fr din adress" - ukr " ' ϧ " -ER_HANDSHAKE_ERROR 08S01 - cze "Chyba p-Bi ustavovn spojen" - dan "Forkert hndtryk (handshake)" - nla "Verkeerde handshake" - eng "Bad handshake" - est "Vr handshake" - fre "Mauvais 'handshake'" - ger "Ungltiger Handshake" - greek " (handshake) " - hun "A kapcsolatfelvetel nem sikerult (Bad handshake)" - ita "Negoziazione impossibile" - nor "Feil hndtrykk (handshake)" - norwegian-ny "Feil handtrykk (handshake)" - pol "Zy uchwyt(handshake)" - por "Negociao de acesso falhou" - rum "Prost inceput de conectie (bad handshake)" - rus " " - serbian "Lo poetak komunikacije (handshake)" - slo "Chyba pri nadvzovan spojenia" - spa "Protocolo erroneo" - swe "Fel vid initiering av kommunikationen med klienten" - ukr "צ '" -ER_DBACCESS_DENIED_ERROR 42000 - cze "P-Bstup pro uivatele '%-.48s'@'%-.64s' k databzi '%-.192s' nen povolen" - dan "Adgang ngtet bruger: '%-.48s'@'%-.64s' til databasen '%-.192s'" - nla "Toegang geweigerd voor gebruiker: '%-.48s'@'%-.64s' naar database '%-.192s'" - eng "Access denied for user '%-.48s'@'%-.64s' to database '%-.192s'" - jps "[U[ '%-.48s'@'%-.64s' '%-.192s' f[^x[Xւ̃ANZXۂ܂", - est "Ligips keelatud kasutajale '%-.48s'@'%-.64s' andmebaasile '%-.192s'" - fre "Accs refus pour l'utilisateur: '%-.48s'@'@%-.64s'. Base '%-.192s'" - ger "Benutzer '%-.48s'@'%-.64s' hat keine Zugriffsberechtigung fr Datenbank '%-.192s'" - greek " : '%-.48s'@'%-.64s' '%-.192s'" - hun "A(z) '%-.48s'@'%-.64s' felhasznalo szamara tiltott eleres az '%-.192s' adabazishoz." - ita "Accesso non consentito per l'utente: '%-.48s'@'%-.64s' al database '%-.192s'" - jpn "桼 '%-.48s'@'%-.64s' '%-.192s' ǡ١ؤΥݤޤ" - kor "'%-.48s'@'%-.64s' ڴ '%-.192s' Ÿ̽ ź Ǿϴ." - nor "Tilgang nektet for bruker: '%-.48s'@'%-.64s' til databasen '%-.192s' nektet" - norwegian-ny "Tilgang ikkje tillate for brukar: '%-.48s'@'%-.64s' til databasen '%-.192s' nekta" - por "Acesso negado para o usurio '%-.48s'@'%-.64s' ao banco de dados '%-.192s'" - rum "Acces interzis pentru utilizatorul: '%-.48s'@'%-.64s' la baza de date '%-.192s'" - rus " '%-.48s'@'%-.64s' '%-.192s' " - serbian "Pristup je zabranjen korisniku '%-.48s'@'%-.64s' za bazu '%-.192s'" - slo "Zakzan prstup pre uvatea: '%-.48s'@'%-.64s' k databzi '%-.192s'" - spa "Acceso negado para usuario: '%-.48s'@'%-.64s' para la base de datos '%-.192s'" - swe "Anvndare '%-.48s'@'%-.64s' r ej berttigad att anvnda databasen %-.192s" - ukr " : '%-.48s'@'%-.64s' '%-.192s'" -ER_ACCESS_DENIED_ERROR 28000 - cze "P-Bstup pro uivatele '%-.48s'@'%-.64s' (s heslem %s)" - dan "Adgang ngtet bruger: '%-.48s'@'%-.64s' (Bruger adgangskode: %s)" - nla "Toegang geweigerd voor gebruiker: '%-.48s'@'%-.64s' (Wachtwoord gebruikt: %s)" - eng "Access denied for user '%-.48s'@'%-.64s' (using password: %s)" - jps "[U[ '%-.48s'@'%-.64s' ۂ܂.uUsing password: %s)", - est "Ligips keelatud kasutajale '%-.48s'@'%-.64s' (kasutab parooli: %s)" - fre "Accs refus pour l'utilisateur: '%-.48s'@'@%-.64s' (mot de passe: %s)" - ger "Benutzer '%-.48s'@'%-.64s' hat keine Zugriffsberechtigung (verwendetes Passwort: %s)" - greek " : '%-.48s'@'%-.64s' ( password: %s)" - hun "A(z) '%-.48s'@'%-.64s' felhasznalo szamara tiltott eleres. (Hasznalja a jelszot: %s)" - ita "Accesso non consentito per l'utente: '%-.48s'@'%-.64s' (Password: %s)" - jpn "桼 '%-.48s'@'%-.64s' ݤޤ.uUsing password: %s)" - kor "'%-.48s'@'%-.64s' ڴ ź Ǿϴ. (using password: %s)" - nor "Tilgang nektet for bruker: '%-.48s'@'%-.64s' (Bruker passord: %s)" - norwegian-ny "Tilgang ikke tillate for brukar: '%-.48s'@'%-.64s' (Brukar passord: %s)" - por "Acesso negado para o usurio '%-.48s'@'%-.64s' (senha usada: %s)" - rum "Acces interzis pentru utilizatorul: '%-.48s'@'%-.64s' (Folosind parola: %s)" - rus " '%-.48s'@'%-.64s' ( : %s)" - serbian "Pristup je zabranjen korisniku '%-.48s'@'%-.64s' (koristi lozinku: '%s')" - slo "Zakzan prstup pre uvatea: '%-.48s'@'%-.64s' (pouitie hesla: %s)" - spa "Acceso negado para usuario: '%-.48s'@'%-.64s' (Usando clave: %s)" - swe "Anvndare '%-.48s'@'%-.64s' r ej berttigad att logga in (Anvnder lsen: %s)" - ukr " : '%-.48s'@'%-.64s' ( : %s)" -ER_NO_DB_ERROR 3D000 - cze "Nebyla vybr-Bna dn databze" - dan "Ingen database valgt" - nla "Geen database geselecteerd" - eng "No database selected" - jps "f[^x[XIĂ܂.", - est "Andmebaasi ei ole valitud" - fre "Aucune base n'a t slectionne" - ger "Keine Datenbank ausgewhlt" - greek " " - hun "Nincs kivalasztott adatbazis" - ita "Nessun database selezionato" - jpn "ǡ١򤵤Ƥޤ." - kor "õ Ÿ̽ ϴ." - nor "Ingen database valgt" - norwegian-ny "Ingen database vald" - pol "Nie wybrano adnej bazy danych" - por "Nenhum banco de dados foi selecionado" - rum "Nici o baza de data nu a fost selectata inca" - rus " " - serbian "Ni jedna baza nije selektovana" - slo "Nebola vybran databza" - spa "Base de datos no seleccionada" - swe "Ingen databas i anvndning" - ukr " " -ER_UNKNOWN_COM_ERROR 08S01 - cze "Nezn-Bm pkaz" - dan "Ukendt kommando" - nla "Onbekend commando" - eng "Unknown command" - jps "̃R}h͉H", - est "Tundmatu ksk" - fre "Commande inconnue" - ger "Unbekannter Befehl" - greek " " - hun "Ervenytelen parancs" - ita "Comando sconosciuto" - jpn "Υޥɤϲ" - kor "ɾ 𸣰ھ..." - nor "Ukjent kommando" - norwegian-ny "Ukjent kommando" - pol "Nieznana komenda" - por "Comando desconhecido" - rum "Comanda invalida" - rus " " - serbian "Nepoznata komanda" - slo "Neznmy prkaz" - spa "Comando desconocido" - swe "Oknt commando" - ukr "צ " -ER_BAD_NULL_ERROR 23000 - cze "Sloupec '%-.192s' nem-Be bt null" - dan "Kolonne '%-.192s' kan ikke vre NULL" - nla "Kolom '%-.192s' kan niet null zijn" - eng "Column '%-.192s' cannot be null" - jps "Column '%-.192s' null ɂ͂łȂ̂ł", - est "Tulp '%-.192s' ei saa omada nullvrtust" - fre "Le champ '%-.192s' ne peut tre vide (null)" - ger "Feld '%-.192s' darf nicht NULL sein" - greek " '%-.192s' (null)" - hun "A(z) '%-.192s' oszlop erteke nem lehet nulla" - ita "La colonna '%-.192s' non puo` essere nulla" - jpn "Column '%-.192s' null ˤϤǤʤΤǤ" - kor "Į '%-.192s' (Null) Ǹ ȵ˴ϴ. " - nor "Kolonne '%-.192s' kan ikke vere null" - norwegian-ny "Kolonne '%-.192s' kan ikkje vere null" - pol "Kolumna '%-.192s' nie moe by null" - por "Coluna '%-.192s' no pode ser vazia" - rum "Coloana '%-.192s' nu poate sa fie null" - rus " '%-.192s' NULL" - serbian "Kolona '%-.192s' ne moe biti NULL" - slo "Pole '%-.192s' neme by null" - spa "La columna '%-.192s' no puede ser nula" - swe "Kolumn '%-.192s' fr inte vara NULL" - ukr " '%-.192s' " -ER_BAD_DB_ERROR 42000 - cze "Nezn-Bm databze '%-.192s'" - dan "Ukendt database '%-.192s'" - nla "Onbekende database '%-.192s'" - eng "Unknown database '%-.192s'" - jps "'%-.192s' Ȃăf[^x[X͒m܂.", - est "Tundmatu andmebaas '%-.192s'" - fre "Base '%-.192s' inconnue" - ger "Unbekannte Datenbank '%-.192s'" - greek " '%-.192s'" - hun "Ervenytelen adatbazis: '%-.192s'" - ita "Database '%-.192s' sconosciuto" - jpn "'%-.192s' ʤƥǡ١Τޤ." - kor "Ÿ̽ '%-.192s' ˼ " - nor "Ukjent database '%-.192s'" - norwegian-ny "Ukjent database '%-.192s'" - pol "Nieznana baza danych '%-.192s'" - por "Banco de dados '%-.192s' desconhecido" - rum "Baza de data invalida '%-.192s'" - rus " '%-.192s'" - serbian "Nepoznata baza '%-.192s'" - slo "Neznma databza '%-.192s'" - spa "Base de datos desconocida '%-.192s'" - swe "Oknd databas: '%-.192s'" - ukr "צ '%-.192s'" -ER_TABLE_EXISTS_ERROR 42S01 - cze "Tabulka '%-.192s' ji-B existuje" - dan "Tabellen '%-.192s' findes allerede" - nla "Tabel '%-.192s' bestaat al" - eng "Table '%-.192s' already exists" - jps "Table '%-.192s' ͊ɂ܂", - est "Tabel '%-.192s' juba eksisteerib" - fre "La table '%-.192s' existe dj" - ger "Tabelle '%-.192s' bereits vorhanden" - greek " '%-.192s' " - hun "A(z) '%-.192s' tabla mar letezik" - ita "La tabella '%-.192s' esiste gia`" - jpn "Table '%-.192s' ϴˤޤ" - kor "̺ '%-.192s' ̹ " - nor "Tabellen '%-.192s' eksisterer allerede" - norwegian-ny "Tabellen '%-.192s' eksisterar allereide" - pol "Tabela '%-.192s' ju istnieje" - por "Tabela '%-.192s' j existe" - rum "Tabela '%-.192s' exista deja" - rus " '%-.192s' " - serbian "Tabela '%-.192s' ve postoji" - slo "Tabuka '%-.192s' u existuje" - spa "La tabla '%-.192s' ya existe" - swe "Tabellen '%-.192s' finns redan" - ukr " '%-.192s' դ" -ER_BAD_TABLE_ERROR 42S02 - cze "Nezn-Bm tabulka '%-.100s'" - dan "Ukendt tabel '%-.100s'" - nla "Onbekende tabel '%-.100s'" - eng "Unknown table '%-.100s'" - jps "table '%-.100s' ͂܂.", - est "Tundmatu tabel '%-.100s'" - fre "Table '%-.100s' inconnue" - ger "Unbekannte Tabelle '%-.100s'" - greek " '%-.100s'" - hun "Ervenytelen tabla: '%-.100s'" - ita "Tabella '%-.100s' sconosciuta" - jpn "table '%-.100s' Ϥޤ." - kor "̺ '%-.100s' ˼ " - nor "Ukjent tabell '%-.100s'" - norwegian-ny "Ukjent tabell '%-.100s'" - pol "Nieznana tabela '%-.100s'" - por "Tabela '%-.100s' desconhecida" - rum "Tabela '%-.100s' este invalida" - rus " '%-.100s'" - serbian "Nepoznata tabela '%-.100s'" - slo "Neznma tabuka '%-.100s'" - spa "Tabla '%-.100s' desconocida" - swe "Oknd tabell '%-.100s'" - ukr "צ '%-.100s'" -ER_NON_UNIQ_ERROR 23000 - cze "Sloupec '%-.192s' v %-.192s nen-B zcela jasn" - dan "Felt: '%-.192s' i tabel %-.192s er ikke entydigt" - nla "Kolom: '%-.192s' in %-.192s is niet eenduidig" - eng "Column '%-.192s' in %-.192s is ambiguous" - est "Vli '%-.192s' %-.192s-s ei ole hene" - fre "Champ: '%-.192s' dans %-.192s est ambigu" - ger "Feld '%-.192s' in %-.192s ist nicht eindeutig" - greek " : '%-.192s' %-.192s " - hun "A(z) '%-.192s' oszlop %-.192s-ben ketertelmu" - ita "Colonna: '%-.192s' di %-.192s e` ambigua" - jpn "Column: '%-.192s' in %-.192s is ambiguous" - kor "Į: '%-.192s' in '%-.192s' ȣ" - nor "Felt: '%-.192s' i tabell %-.192s er ikke entydig" - norwegian-ny "Kolonne: '%-.192s' i tabell %-.192s er ikkje eintydig" - pol "Kolumna: '%-.192s' w %-.192s jest dwuznaczna" - por "Coluna '%-.192s' em '%-.192s' ambgua" - rum "Coloana: '%-.192s' in %-.192s este ambigua" - rus " '%-.192s' %-.192s " - serbian "Kolona '%-.192s' u %-.192s nije jedinstvena u kontekstu" - slo "Pole: '%-.192s' v %-.192s je nejasn" - spa "La columna: '%-.192s' en %-.192s es ambigua" - swe "Kolumn '%-.192s' i %-.192s r inte unik" - ukr " '%-.192s' %-.192s " -ER_SERVER_SHUTDOWN 08S01 - cze "Prob-Bh ukonovn prce serveru" - dan "Database nedlukning er i gang" - nla "Bezig met het stoppen van de server" - eng "Server shutdown in progress" - jps "Server shutdown ...", - est "Serveri seiskamine kib" - fre "Arrt du serveur en cours" - ger "Der Server wird heruntergefahren" - greek " (server shutdown)" - hun "A szerver leallitasa folyamatban" - ita "Shutdown del server in corso" - jpn "Server shutdown ..." - kor "Server ˴ٿ Դϴ." - nor "Database nedkobling er i gang" - norwegian-ny "Tenar nedkopling er i gang" - pol "Trwa koczenie dziaania serwera" - por "'Shutdown' do servidor em andamento" - rum "Terminarea serverului este in desfasurare" - rus " " - serbian "Gaenje servera je u toku" - slo "Prebieha ukonovanie prce servera" - spa "Desconexion de servidor en proceso" - swe "Servern gr nu ned" - ukr "դ " -ER_BAD_FIELD_ERROR 42S22 S0022 - cze "Nezn-Bm sloupec '%-.192s' v %-.192s" - dan "Ukendt kolonne '%-.192s' i tabel %-.192s" - nla "Onbekende kolom '%-.192s' in %-.192s" - eng "Unknown column '%-.192s' in '%-.192s'" - jps "'%-.192s' column '%-.192s' ɂ͂܂.", - est "Tundmatu tulp '%-.192s' '%-.192s'-s" - fre "Champ '%-.192s' inconnu dans %-.192s" - ger "Unbekanntes Tabellenfeld '%-.192s' in %-.192s" - greek " '%-.192s' '%-.192s'" - hun "A(z) '%-.192s' oszlop ervenytelen '%-.192s'-ben" - ita "Colonna sconosciuta '%-.192s' in '%-.192s'" - jpn "'%-.192s' column '%-.192s' ˤϤޤ." - kor "Unknown Į '%-.192s' in '%-.192s'" - nor "Ukjent kolonne '%-.192s' i tabell %-.192s" - norwegian-ny "Ukjent felt '%-.192s' i tabell %-.192s" - pol "Nieznana kolumna '%-.192s' w %-.192s" - por "Coluna '%-.192s' desconhecida em '%-.192s'" - rum "Coloana invalida '%-.192s' in '%-.192s'" - rus " '%-.192s' '%-.192s'" - serbian "Nepoznata kolona '%-.192s' u '%-.192s'" - slo "Neznme pole '%-.192s' v '%-.192s'" - spa "La columna '%-.192s' en %-.192s es desconocida" - swe "Oknd kolumn '%-.192s' i %-.192s" - ukr "צ '%-.192s' '%-.192s'" -ER_WRONG_FIELD_WITH_GROUP 42000 S1009 - cze "Pou-Bit '%-.192s' nebylo v group by" - dan "Brugte '%-.192s' som ikke var i group by" - nla "Opdracht gebruikt '%-.192s' dat niet in de GROUP BY voorkomt" - eng "'%-.192s' isn't in GROUP BY" - jps "'%-.192s' isn't in GROUP BY", - est "'%-.192s' puudub GROUP BY klauslis" - fre "'%-.192s' n'est pas dans 'group by'" - ger "'%-.192s' ist nicht in GROUP BY vorhanden" - greek " '%-.192s' group by" - hun "Used '%-.192s' with wasn't in group by" - ita "Usato '%-.192s' che non e` nel GROUP BY" - kor "'%-.192s' GROUP BYӿ " - nor "Brukte '%-.192s' som ikke var i group by" - norwegian-ny "Brukte '%-.192s' som ikkje var i group by" - pol "Uyto '%-.192s' bez umieszczenia w group by" - por "'%-.192s' no est em 'GROUP BY'" - rum "'%-.192s' nu exista in clauza GROUP BY" - rus "'%-.192s' GROUP BY" - serbian "Entitet '%-.192s' nije naveden u komandi 'GROUP BY'" - slo "Pouit '%-.192s' nebolo v 'group by'" - spa "Usado '%-.192s' el cual no esta group by" - swe "'%-.192s' finns inte i GROUP BY" - ukr "'%-.192s' GROUP BY" -ER_WRONG_GROUP_FIELD 42000 S1009 - cze "Nemohu pou-Bt group na '%-.192s'" - dan "Kan ikke gruppere p '%-.192s'" - nla "Kan '%-.192s' niet groeperen" - eng "Can't group on '%-.192s'" - est "Ei saa grupeerida '%-.192s' jrgi" - fre "Ne peut regrouper '%-.192s'" - ger "Gruppierung ber '%-.192s' nicht mglich" - greek " (group on) '%-.192s'" - hun "A group nem hasznalhato: '%-.192s'" - ita "Impossibile raggruppare per '%-.192s'" - kor "'%-.192s' ׷ " - nor "Kan ikke gruppere p '%-.192s'" - norwegian-ny "Kan ikkje gruppere p '%-.192s'" - pol "Nie mona grupowa po '%-.192s'" - por "No pode agrupar em '%-.192s'" - rum "Nu pot sa grupez pe (group on) '%-.192s'" - rus " '%-.192s'" - serbian "Ne mogu da grupiem po '%-.192s'" - slo "Nemem poui 'group' na '%-.192s'" - spa "No puedo agrupar por '%-.192s'" - swe "Kan inte anvnda GROUP BY med '%-.192s'" - ukr " '%-.192s'" -ER_WRONG_SUM_SELECT 42000 S1009 - cze "P-Bkaz obsahuje zrove funkci sum a sloupce" - dan "Udtrykket har summer (sum) funktioner og kolonner i samme udtryk" - nla "Opdracht heeft totaliseer functies en kolommen in dezelfde opdracht" - eng "Statement has sum functions and columns in same statement" - est "Lauses on korraga nii tulbad kui summeerimisfunktsioonid" - fre "Vous demandez la fonction sum() et des champs dans la mme commande" - ger "Die Verwendung von Summierungsfunktionen und Spalten im selben Befehl ist nicht erlaubt" - greek " sum functions columns " - ita "Il comando ha una funzione SUM e una colonna non specificata nella GROUP BY" - kor "Statement sum ̰ Į statementԴϴ." - nor "Uttrykket har summer (sum) funksjoner og kolonner i samme uttrykk" - norwegian-ny "Uttrykket har summer (sum) funksjoner og kolonner i same uttrykk" - pol "Zapytanie ma funkcje sumuj?ce i kolumny w tym samym zapytaniu" - por "Clusula contm funes de soma e colunas juntas" - rum "Comanda are functii suma si coloane in aceeasi comanda" - rus " , GROUP BY. ?" - serbian "Izraz ima 'SUM' agregatnu funkciju i kolone u isto vreme" - slo "Prkaz obsahuje zrove funkciu 'sum' a poa" - spa "El estamento tiene funciones de suma y columnas en el mismo estamento" - swe "Kommandot har bde sum functions och enkla funktioner" - ukr " ڦ Цަ æ æ" -ER_WRONG_VALUE_COUNT 21S01 - cze "Po-Bet sloupc neodpovd zadan hodnot" - dan "Kolonne tller stemmer ikke med antallet af vrdier" - nla "Het aantal kolommen komt niet overeen met het aantal opgegeven waardes" - eng "Column count doesn't match value count" - est "Tulpade arv erineb vrtuste arvust" - ger "Die Anzahl der Spalten entspricht nicht der Anzahl der Werte" - greek " Column count value count" - hun "Az oszlopban levo ertek nem egyezik meg a szamitott ertekkel" - ita "Il numero delle colonne non e` uguale al numero dei valori" - kor "Į īƮ īƮ ġ ʽϴ." - nor "Felt telling stemmer verdi telling" - norwegian-ny "Kolonne telling stemmer verdi telling" - pol "Liczba kolumn nie odpowiada liczbie warto?ci" - por "Contagem de colunas no confere com a contagem de valores" - rum "Numarul de coloane nu este acelasi cu numarul valoarei" - rus " " - serbian "Broj kolona ne odgovara broju vrednosti" - slo "Poet pol nezodpoved zadanej hodnote" - spa "La columna con count no tiene valores para contar" - swe "Antalet kolumner motsvarar inte antalet vrden" - ukr "˦ æ Ц ˦˦ " -ER_TOO_LONG_IDENT 42000 S1009 - cze "Jm-Bno identifiktoru '%-.100s' je pli dlouh" - dan "Navnet '%-.100s' er for langt" - nla "Naam voor herkenning '%-.100s' is te lang" - eng "Identifier name '%-.100s' is too long" - jps "Identifier name '%-.100s' ͒܂", - est "Identifikaatori '%-.100s' nimi on liiga pikk" - fre "Le nom de l'identificateur '%-.100s' est trop long" - ger "Name des Bezeichners '%-.100s' ist zu lang" - greek " identifier name '%-.100s' " - hun "A(z) '%-.100s' azonositonev tul hosszu." - ita "Il nome dell'identificatore '%-.100s' e` troppo lungo" - jpn "Identifier name '%-.100s' Ĺޤ" - kor "Identifier '%-.100s' ʹ 決." - nor "Identifikator '%-.100s' er for lang" - norwegian-ny "Identifikator '%-.100s' er for lang" - pol "Nazwa identyfikatora '%-.100s' jest zbyt duga" - por "Nome identificador '%-.100s' longo demais" - rum "Numele indentificatorului '%-.100s' este prea lung" - rus " '%-.100s'" - serbian "Ime '%-.100s' je predugako" - slo "Meno identifiktora '%-.100s' je prli dlh" - spa "El nombre del identificador '%-.100s' es demasiado grande" - swe "Kolumnnamn '%-.100s' r fr lngt" - ukr "' Ʀ '%-.100s' " -ER_DUP_FIELDNAME 42S21 S1009 - cze "Zdvojen-B jmno sloupce '%-.192s'" - dan "Feltnavnet '%-.192s' findes allerede" - nla "Dubbele kolom naam '%-.192s'" - eng "Duplicate column name '%-.192s'" - jps "'%-.192s' Ƃ column ͏dĂ܂", - est "Kattuv tulba nimi '%-.192s'" - fre "Nom du champ '%-.192s' dj utilis" - ger "Doppelter Spaltenname: '%-.192s'" - greek " column name '%-.192s'" - hun "Duplikalt oszlopazonosito: '%-.192s'" - ita "Nome colonna duplicato '%-.192s'" - jpn "'%-.192s' Ȥ column ̾ϽʣƤޤ" - kor "ߺ Į ̸: '%-.192s'" - nor "Feltnavnet '%-.192s' eksisterte fra fr" - norwegian-ny "Feltnamnet '%-.192s' eksisterte fr fr" - pol "Powtrzona nazwa kolumny '%-.192s'" - por "Nome da coluna '%-.192s' duplicado" - rum "Numele coloanei '%-.192s' e duplicat" - rus " '%-.192s'" - serbian "Duplirano ime kolone '%-.192s'" - slo "Opakovan meno poa '%-.192s'" - spa "Nombre de columna duplicado '%-.192s'" - swe "Kolumnnamn '%-.192s finns flera gnger" - ukr " ' '%-.192s'" -ER_DUP_KEYNAME 42000 S1009 - cze "Zdvojen-B jmno kle '%-.192s'" - dan "Indeksnavnet '%-.192s' findes allerede" - nla "Dubbele zoeksleutel naam '%-.192s'" - eng "Duplicate key name '%-.192s'" - jps "'%-.192s' Ƃ key ̖O͏dĂ܂", - est "Kattuv vtme nimi '%-.192s'" - fre "Nom de clef '%-.192s' dj utilis" - ger "Doppelter Name fr Schlssel vorhanden: '%-.192s'" - greek " key name '%-.192s'" - hun "Duplikalt kulcsazonosito: '%-.192s'" - ita "Nome chiave duplicato '%-.192s'" - jpn "'%-.192s' Ȥ key ̾ϽʣƤޤ" - kor "ߺ Ű ̸ : '%-.192s'" - nor "Nkkelnavnet '%-.192s' eksisterte fra fr" - norwegian-ny "Nkkelnamnet '%-.192s' eksisterte fr fr" - pol "Powtrzony nazwa klucza '%-.192s'" - por "Nome da chave '%-.192s' duplicado" - rum "Numele cheiei '%-.192s' e duplicat" - rus " '%-.192s'" - serbian "Duplirano ime kljua '%-.192s'" - slo "Opakovan meno ka '%-.192s'" - spa "Nombre de clave duplicado '%-.192s'" - swe "Nyckelnamn '%-.192s' finns flera gnger" - ukr " ' '%-.192s'" -# When using this error code, please use ER(ER_DUP_ENTRY_WITH_KEY_NAME) -# for the message string. See, for example, code in handler.cc. -ER_DUP_ENTRY 23000 S1009 - cze "Zdvojen-B kl '%-.192s' (slo kle %d)" - dan "Ens vrdier '%-.192s' for indeks %d" - nla "Dubbele ingang '%-.192s' voor zoeksleutel %d" - eng "Duplicate entry '%-.192s' for key %d" - jps "'%-.192s' key %d ɂďdĂ܂", - est "Kattuv vrtus '%-.192s' vtmele %d" - fre "Duplicata du champ '%-.192s' pour la clef %d" - ger "Doppelter Eintrag '%-.192s' fr Schlssel %d" - greek " '%-.192s' %d" - hun "Duplikalt bejegyzes '%-.192s' a %d kulcs szerint." - ita "Valore duplicato '%-.192s' per la chiave %d" - jpn "'%-.192s' key %d ˤƽʣƤޤ" - kor "ߺ Է '%-.192s': key %d" - nor "Like verdier '%-.192s' for nkkel %d" - norwegian-ny "Like verdiar '%-.192s' for nykkel %d" - pol "Powtrzone wyst?pienie '%-.192s' dla klucza %d" - por "Entrada '%-.192s' duplicada para a chave %d" - rum "Cimpul '%-.192s' e duplicat pentru cheia %d" - rus " '%-.192s' %d" - serbian "Dupliran unos '%-.192s' za klju '%d'" - slo "Opakovan k '%-.192s' (slo ka %d)" - spa "Entrada duplicada '%-.192s' para la clave %d" - swe "Dubbel nyckel '%-.192s' fr nyckel %d" - ukr " '%-.192s' %d" -ER_WRONG_FIELD_SPEC 42000 S1009 - cze "Chybn-B specifikace sloupce '%-.192s'" - dan "Forkert kolonnespecifikaton for felt '%-.192s'" - nla "Verkeerde kolom specificatie voor kolom '%-.192s'" - eng "Incorrect column specifier for column '%-.192s'" - est "Vigane tulba kirjeldus tulbale '%-.192s'" - fre "Mauvais paramtre de champ pour le champ '%-.192s'" - ger "Falsche Spezifikation fr Feld '%-.192s'" - greek " column specifier '%-.192s'" - hun "Rossz oszlopazonosito: '%-.192s'" - ita "Specifica errata per la colonna '%-.192s'" - kor "Į '%-.192s' Ȯ Į " - nor "Feil kolonne spesifikator for felt '%-.192s'" - norwegian-ny "Feil kolonne spesifikator for kolonne '%-.192s'" - pol "Bdna specyfikacja kolumny dla kolumny '%-.192s'" - por "Especificador de coluna incorreto para a coluna '%-.192s'" - rum "Specificandul coloanei '%-.192s' este incorect" - rus " '%-.192s'" - serbian "Pogrean naziv kolone za kolonu '%-.192s'" - slo "Chyba v pecifikcii poa '%-.192s'" - spa "Especificador de columna erroneo para la columna '%-.192s'" - swe "Felaktigt kolumntyp fr kolumn '%-.192s'" - ukr "צ Ʀ '%-.192s'" -ER_PARSE_ERROR 42000 s1009 - cze "%s bl-Bzko '%-.80s' na dku %d" - dan "%s nr '%-.80s' p linje %d" - nla "%s bij '%-.80s' in regel %d" - eng "%s near '%-.80s' at line %d" - jps "%s : '%-.80s' t : %d s", - est "%s '%-.80s' ligidal real %d" - fre "%s prs de '%-.80s' la ligne %d" - ger "%s bei '%-.80s' in Zeile %d" - greek "%s '%-.80s' %d" - hun "A %s a '%-.80s'-hez kozeli a %d sorban" - ita "%s vicino a '%-.80s' linea %d" - jpn "%s : '%-.80s' ն : %d " - kor "'%s' ϴ. ('%-.80s' ɾ %d)" - nor "%s nr '%-.80s' p linje %d" - norwegian-ny "%s attmed '%-.80s' p line %d" - pol "%s obok '%-.80s' w linii %d" - por "%s prximo a '%-.80s' na linha %d" - rum "%s linga '%-.80s' pe linia %d" - rus "%s '%-.80s' %d" - serbian "'%s' u iskazu '%-.80s' na liniji %d" - slo "%s blzko '%-.80s' na riadku %d" - spa "%s cerca '%-.80s' en la linea %d" - swe "%s nra '%-.80s' p rad %d" - ukr "%s ¦ '%-.80s' æ %d" -ER_EMPTY_QUERY 42000 - cze "V-Bsledek dotazu je przdn" - dan "Foresprgsel var tom" - nla "Query was leeg" - eng "Query was empty" - jps "Query ł.", - est "Thi pring" - fre "Query est vide" - ger "Leere Abfrage" - greek " (query) " - hun "Ures lekerdezes." - ita "La query e` vuota" - jpn "Query Ǥ." - kor " ϴ." - nor "Foresprsel var tom" - norwegian-ny "Frespurnad var tom" - pol "Zapytanie byo puste" - por "Consulta (query) estava vazia" - rum "Query-ul a fost gol" - rus " " - serbian "Upit je bio prazan" - slo "Vsledok poiadavky bol przdny" - spa "La query estaba vacia" - swe "Frgan var tom" - ukr " " -ER_NONUNIQ_TABLE 42000 S1009 - cze "Nejednozna-Bn tabulka/alias: '%-.192s'" - dan "Tabellen/aliaset: '%-.192s' er ikke unikt" - nla "Niet unieke waarde tabel/alias: '%-.192s'" - eng "Not unique table/alias: '%-.192s'" - jps "'%-.192s' ͈ӂ table/alias ł͂܂", - est "Ei ole unikaalne tabel/alias '%-.192s'" - fre "Table/alias: '%-.192s' non unique" - ger "Tabellenname/Alias '%-.192s' nicht eindeutig" - greek " unique table/alias: '%-.192s'" - hun "Nem egyedi tabla/alias: '%-.192s'" - ita "Tabella/alias non unico: '%-.192s'" - jpn "'%-.192s' ϰդ table/alias ̾ǤϤޤ" - kor "Unique ̺/alias: '%-.192s'" - nor "Ikke unikt tabell/alias: '%-.192s'" - norwegian-ny "Ikkje unikt tabell/alias: '%-.192s'" - pol "Tabela/alias nie s? unikalne: '%-.192s'" - por "Tabela/alias '%-.192s' no nica" - rum "Tabela/alias: '%-.192s' nu este unic" - rus " / '%-.192s'" - serbian "Tabela ili alias nisu bili jedinstveni: '%-.192s'" - slo "Nie jednoznan tabuka/alias: '%-.192s'" - spa "Tabla/alias: '%-.192s' es no unica" - swe "Icke unikt tabell/alias: '%-.192s'" - ukr "Φ /Φ: '%-.192s'" -ER_INVALID_DEFAULT 42000 S1009 - cze "Chybn-B defaultn hodnota pro '%-.192s'" - dan "Ugyldig standardvrdi for '%-.192s'" - nla "Foutieve standaard waarde voor '%-.192s'" - eng "Invalid default value for '%-.192s'" - est "Vigane vaikevrtus '%-.192s' jaoks" - fre "Valeur par dfaut invalide pour '%-.192s'" - ger "Fehlerhafter Vorgabewert (DEFAULT) fr '%-.192s'" - greek " (default value) '%-.192s'" - hun "Ervenytelen ertek: '%-.192s'" - ita "Valore di default non valido per '%-.192s'" - kor "'%-.192s' ȿ Ʈ ϼ̽ϴ." - nor "Ugyldig standardverdi for '%-.192s'" - norwegian-ny "Ugyldig standardverdi for '%-.192s'" - pol "Niewa?ciwa warto? domy?lna dla '%-.192s'" - por "Valor padro (default) invlido para '%-.192s'" - rum "Valoarea de default este invalida pentru '%-.192s'" - rus " '%-.192s'" - serbian "Loa default vrednost za '%-.192s'" - slo "Chybn implicitn hodnota pre '%-.192s'" - spa "Valor por defecto invalido para '%-.192s'" - swe "Ogiltigt DEFAULT vrde fr '%-.192s'" - ukr "צ '%-.192s'" -ER_MULTIPLE_PRI_KEY 42000 S1009 - cze "Definov-Bno vce primrnch kl" - dan "Flere primrngler specificeret" - nla "Meerdere primaire zoeksleutels gedefinieerd" - eng "Multiple primary key defined" - jps " primary key `܂", - est "Mitut primaarset vtit ei saa olla" - fre "Plusieurs clefs primaires dfinies" - ger "Mehrere Primrschlssel (PRIMARY KEY) definiert" - greek " primary key " - hun "Tobbszoros elsodleges kulcs definialas." - ita "Definite piu` chiave primarie" - jpn "ʣ primary key ޤ" - kor "Multiple primary key ǵǾ ֽ" - nor "Fleire primrnkle spesifisert" - norwegian-ny "Fleire primrnyklar spesifisert" - pol "Zdefiniowano wiele kluczy podstawowych" - por "Definida mais de uma chave primria" - rum "Chei primare definite de mai multe ori" - rus " " - serbian "Definisani viestruki primarni kljuevi" - slo "Zadefinovanch viac primrnych kov" - spa "Multiples claves primarias definidas" - swe "Flera PRIMARY KEY anvnda" - ukr " " -ER_TOO_MANY_KEYS 42000 S1009 - cze "Zad-Bno pli mnoho kl, je povoleno nejvce %d kl" - dan "For mange ngler specificeret. Kun %d ngler m bruges" - nla "Teveel zoeksleutels gedefinieerd. Maximaal zijn %d zoeksleutels toegestaan" - eng "Too many keys specified; max %d keys allowed" - jps "key ̎w肪܂. key ͍ő %d ܂łł", - est "Liiga palju vtmeid. Maksimaalselt vib olla %d vtit" - fre "Trop de clefs sont dfinies. Maximum de %d clefs allou" - ger "Zu viele Schlssel definiert. Maximal %d Schlssel erlaubt" - greek " key . %d " - hun "Tul sok kulcs. Maximum %d kulcs engedelyezett." - ita "Troppe chiavi. Sono ammesse max %d chiavi" - jpn "key λ꤬¿ޤ. key Ϻ %d ޤǤǤ" - kor "ʹ Ű ǵǾ ϴ.. ִ %d Ű " - nor "For mange nkler spesifisert. Maks %d nkler tillatt" - norwegian-ny "For mange nykler spesifisert. Maks %d nyklar tillatt" - pol "Okre?lono zbyt wiele kluczy. Dostpnych jest maksymalnie %d kluczy" - por "Especificadas chaves demais. O mximo permitido so %d chaves" - rum "Prea multe chei. Numarul de chei maxim este %d" - rus " . %d " - serbian "Navedeno je previe kljueva. Maksimum %d kljueva je dozvoljeno" - slo "Zadanch rli vea kov. Najviac %d kov je povolench" - spa "Demasiadas claves primarias declaradas. Un maximo de %d claves son permitidas" - swe "Fr mnga nycklar anvnda. Man fr ha hgst %d nycklar" - ukr " ަ . ¦ %d ަ" -ER_TOO_MANY_KEY_PARTS 42000 S1009 - cze "Zad-Bno pli mnoho st kl, je povoleno nejvce %d st" - dan "For mange ngledele specificeret. Kun %d dele m bruges" - nla "Teveel zoeksleutel onderdelen gespecificeerd. Maximaal %d onderdelen toegestaan" - eng "Too many key parts specified; max %d parts allowed" - est "Vti koosneb liiga paljudest osadest. Maksimaalselt vib olla %d osa" - fre "Trop de parties specifies dans la clef. Maximum de %d parties" - ger "Zu viele Teilschlssel definiert. Maximal %d Teilschlssel erlaubt" - greek " key parts . %d " - hun "Tul sok kulcsdarabot definialt. Maximum %d resz engedelyezett" - ita "Troppe parti di chiave specificate. Sono ammesse max %d parti" - kor "ʹ Ű κ(parts) ǵǾ ϴ.. ִ %d κ " - nor "For mange nkkeldeler spesifisert. Maks %d deler tillatt" - norwegian-ny "For mange nykkeldelar spesifisert. Maks %d delar tillatt" - pol "Okre?lono zbyt wiele cz?ci klucza. Dostpnych jest maksymalnie %d cz?ci" - por "Especificadas partes de chave demais. O mximo permitido so %d partes" - rum "Prea multe chei. Numarul de chei maxim este %d" - rus " . %d " - serbian "Navedeno je previe delova kljua. Maksimum %d delova je dozvoljeno" - slo "Zadanch rli vea ast kov. Je povolench najviac %d ast" - spa "Demasiadas partes de clave declaradas. Un maximo de %d partes son permitidas" - swe "Fr mnga nyckeldelar anvnda. Man fr ha hgst %d nyckeldelar" - ukr " . ¦ %d " -ER_TOO_LONG_KEY 42000 S1009 - cze "Zadan-B kl byl pli dlouh, nejvt dlka kle je %d" - dan "Specificeret ngle var for lang. Maksimal nglelngde er %d" - nla "Gespecificeerde zoeksleutel was te lang. De maximale lengte is %d" - eng "Specified key was too long; max key length is %d bytes" - jps "key ܂. key ͍̒ő %d ł", - est "Vti on liiga pikk. Maksimaalne vtmepikkus on %d" - fre "La cl est trop longue. Longueur maximale: %d" - ger "Schlssel ist zu lang. Die maximale Schlssellnge betrgt %d" - greek " . %d" - hun "A megadott kulcs tul hosszu. Maximalis kulcshosszusag: %d" - ita "La chiave specificata e` troppo lunga. La max lunghezza della chiave e` %d" - jpn "key Ĺޤ. key ĹϺ %d Ǥ" - kor "ǵ Ű ʹ ϴ. ִ Ű ̴ %dԴϴ." - nor "Spesifisert nkkel var for lang. Maks nkkellengde er is %d" - norwegian-ny "Spesifisert nykkel var for lang. Maks nykkellengde er %d" - pol "Zdefinowany klucz jest zbyt dugi. Maksymaln? dugo?ci? klucza jest %d" - por "Chave especificada longa demais. O comprimento de chave mximo permitido %d" - rum "Cheia specificata este prea lunga. Marimea maxima a unei chei este de %d" - rus " . %d " - serbian "Navedeni klju je predug. Maksimalna duina kljua je %d" - slo "Zadan k je prli dlh, najvia dka ka je %d" - spa "Declaracion de clave demasiado larga. La maxima longitud de clave es %d" - swe "Fr lng nyckel. Hgsta tilltna nyckellngd r %d" - ukr " . ¦ %d Ԧ" -ER_KEY_COLUMN_DOES_NOT_EXITS 42000 S1009 - cze "Kl-Bov sloupec '%-.192s' v tabulce neexistuje" - dan "Nglefeltet '%-.192s' eksisterer ikke i tabellen" - nla "Zoeksleutel kolom '%-.192s' bestaat niet in tabel" - eng "Key column '%-.192s' doesn't exist in table" - jps "Key column '%-.192s' e[uɂ܂.", - est "Vtme tulp '%-.192s' puudub tabelis" - fre "La cl '%-.192s' n'existe pas dans la table" - ger "In der Tabelle gibt es kein Schlsselfeld '%-.192s'" - greek " '%-.192s' " - hun "A(z) '%-.192s'kulcsoszlop nem letezik a tablaban" - ita "La colonna chiave '%-.192s' non esiste nella tabella" - jpn "Key column '%-.192s' ơ֥ˤޤ." - kor "Key Į '%-.192s' ̺ ʽϴ." - nor "Nkkel felt '%-.192s' eksiterer ikke i tabellen" - norwegian-ny "Nykkel kolonne '%-.192s' eksiterar ikkje i tabellen" - pol "Kolumna '%-.192s' zdefiniowana w kluczu nie istnieje w tabeli" - por "Coluna chave '%-.192s' no existe na tabela" - rum "Coloana cheie '%-.192s' nu exista in tabela" - rus " '%-.192s' " - serbian "Kljuna kolona '%-.192s' ne postoji u tabeli" - slo "Kov stpec '%-.192s' v tabuke neexistuje" - spa "La columna clave '%-.192s' no existe en la tabla" - swe "Nyckelkolumn '%-.192s' finns inte" - ukr " '%-.192s' դ æ" -ER_BLOB_USED_AS_KEY 42000 S1009 - cze "Blob sloupec '%-.192s' nem-Be bt pouit jako kl" - dan "BLOB feltet '%-.192s' kan ikke bruges ved specifikation af indeks" - nla "BLOB kolom '%-.192s' kan niet gebruikt worden bij zoeksleutel specificatie" - eng "BLOB column '%-.192s' can't be used in key specification with the used table type" - est "BLOB-tpi tulpa '%-.192s' ei saa kasutada vtmena" - fre "Champ BLOB '%-.192s' ne peut tre utilis dans une cl" - ger "BLOB-Feld '%-.192s' kann beim verwendeten Tabellentyp nicht als Schlssel verwendet werden" - greek " Blob '%-.192s' (key specification)" - hun "Blob objektum '%-.192s' nem hasznalhato kulcskent" - ita "La colonna BLOB '%-.192s' non puo` essere usata nella specifica della chiave" - kor "BLOB Į '%-.192s' Ű ǿ ϴ." - nor "Blob felt '%-.192s' kan ikke brukes ved spesifikasjon av nkler" - norwegian-ny "Blob kolonne '%-.192s' kan ikkje brukast ved spesifikasjon av nyklar" - pol "Kolumna typu Blob '%-.192s' nie moe by uyta w specyfikacji klucza" - por "Coluna BLOB '%-.192s' no pode ser utilizada na especificao de chave para o tipo de tabela usado" - rum "Coloana de tip BLOB '%-.192s' nu poate fi folosita in specificarea cheii cu tipul de tabla folosit" - rus " BLOB '%-.192s' " - serbian "BLOB kolona '%-.192s' ne moe biti upotrebljena za navoenje kljua sa tipom tabele koji se trenutno koristi" - slo "Blob pole '%-.192s' neme by pouit ako k" - spa "La columna Blob '%-.192s' no puede ser usada en una declaracion de clave" - swe "En BLOB '%-.192s' kan inte vara nyckel med den anvnda tabelltypen" - ukr "BLOB '%-.192s' Φ Ц æ" -ER_TOO_BIG_FIELDLENGTH 42000 S1009 - cze "P-Bli velk dlka sloupce '%-.192s' (nejvce %lu). Pouijte BLOB" - dan "For stor feltlngde for kolonne '%-.192s' (maks = %lu). Brug BLOB i stedet" - nla "Te grote kolomlengte voor '%-.192s' (max = %lu). Maak hiervoor gebruik van het type BLOB" - eng "Column length too big for column '%-.192s' (max = %lu); use BLOB or TEXT instead" - jps "column '%-.192s' ,mۂ column ̑傫܂. (ő %lu ܂). BLOB ɎgpĂ.", - est "Tulba '%-.192s' pikkus on liiga pikk (maksimaalne pikkus: %lu). Kasuta BLOB vljatpi" - fre "Champ '%-.192s' trop long (max = %lu). Utilisez un BLOB" - ger "Feldlnge fr Feld '%-.192s' zu gro (maximal %lu). BLOB- oder TEXT-Spaltentyp verwenden!" - greek " '%-.192s' (max = %lu). BLOB" - hun "A(z) '%-.192s' oszlop tul hosszu. (maximum = %lu). Hasznaljon BLOB tipust inkabb." - ita "La colonna '%-.192s' e` troppo grande (max=%lu). Utilizza un BLOB." - jpn "column '%-.192s' ,ݤ column 礭¿ޤ. ( %lu ޤ). BLOB 򤫤˻ѤƤ." - kor "Į '%-.192s' Į ̰ ʹ ϴ (ִ = %lu). ſ BLOB ϼ." - nor "For stor nkkellengde for kolonne '%-.192s' (maks = %lu). Bruk BLOB istedenfor" - norwegian-ny "For stor nykkellengde for felt '%-.192s' (maks = %lu). Bruk BLOB istadenfor" - pol "Zbyt dua dugo? kolumny '%-.192s' (maks. = %lu). W zamian uyj typu BLOB" - por "Comprimento da coluna '%-.192s' grande demais (max = %lu); use BLOB em seu lugar" - rum "Lungimea coloanei '%-.192s' este prea lunga (maximum = %lu). Foloseste BLOB mai bine" - rus " '%-.192s' ( = %lu). BLOB TEXT " - serbian "Previe podataka za kolonu '%-.192s' (maksimum je %lu). Upotrebite BLOB polje" - slo "Prli vek dka pre pole '%-.192s' (maximum = %lu). Pouite BLOB" - spa "Longitud de columna demasiado grande para la columna '%-.192s' (maximo = %lu).Usar BLOB en su lugar" - swe "Fr stor kolumnlngd angiven fr '%-.192s' (max= %lu). Anvnd en BLOB instllet" - ukr " '%-.192s' (max = %lu). BLOB" -ER_WRONG_AUTO_KEY 42000 S1009 - cze "M-Bete mt pouze jedno AUTO pole a to mus bt definovno jako kl" - dan "Der kan kun specificeres eet AUTO_INCREMENT-felt, og det skal vre indekseret" - nla "Er kan slechts 1 autofield zijn en deze moet als zoeksleutel worden gedefinieerd." - eng "Incorrect table definition; there can be only one auto column and it must be defined as a key" - jps "e[u̒`Ⴂ܂; there can be only one auto column and it must be defined as a key", - est "Vigane tabelikirjeldus; Tabelis tohib olla ks auto_increment tpi tulp ning see peab olema defineeritud vtmena" - fre "Un seul champ automatique est permis et il doit tre index" - ger "Falsche Tabellendefinition. Es darf nur eine AUTO_INCREMENT-Spalte geben, und diese muss als Schlssel definiert werden" - greek " auto field key" - hun "Csak egy auto mezo lehetseges, es azt kulcskent kell definialni." - ita "Puo` esserci solo un campo AUTO e deve essere definito come chiave" - jpn "ơ֥㤤ޤ; there can be only one auto column and it must be defined as a key" - kor "Ȯ ̺ ; ̺ ϳ auto Į ϰ Ű ǵǾ մϴ." - nor "Bare ett auto felt kan vre definert som nkkel." - norwegian-ny "Bare eitt auto felt kan vre definert som nkkel." - pol "W tabeli moe by tylko jedno pole auto i musi ono by zdefiniowane jako klucz" - por "Definio incorreta de tabela. Somente permitido um nico campo auto-incrementado e ele tem que ser definido como chave" - rum "Definitia tabelei este incorecta; Nu pot fi mai mult de o singura coloana de tip auto si aceasta trebuie definita ca cheie" - rus " : , " - serbian "Pogrena definicija tabele; U tabeli moe postojati samo jedna 'AUTO' kolona i ona mora biti istovremeno definisana kao kolona kljua" - slo "Mete ma iba jedno AUTO pole a to mus by definovan ako k" - spa "Puede ser solamente un campo automatico y este debe ser definido como una clave" - swe "Det fr finnas endast ett AUTO_INCREMENT-flt och detta mste vara en nyckel" - ukr "צ æ; , " -ER_READY - cze "%s: p-Bipraven na spojen\nVersion: '%s' socket: '%s' port: %d"" - dan "%s: klar til tilslutninger\nVersion: '%s' socket: '%s' port: %d"" - nla "%s: klaar voor verbindingen\nVersion: '%s' socket: '%s' port: %d"" - eng "%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d" - jps "%s: \nVersion: '%s' socket: '%s' port: %d"", - est "%s: ootab hendusi\nVersion: '%s' socket: '%s' port: %d"" - fre "%s: Prt pour des connexions\nVersion: '%s' socket: '%s' port: %d"" - ger "%s: Bereit fr Verbindungen.\nVersion: '%s' Socket: '%s' Port: %d" - greek "%s: \nVersion: '%s' socket: '%s' port: %d"" - hun "%s: kapcsolatra kesz\nVersion: '%s' socket: '%s' port: %d"" - ita "%s: Pronto per le connessioni\nVersion: '%s' socket: '%s' port: %d"" - jpn "%s: λ\nVersion: '%s' socket: '%s' port: %d"" - kor "%s: غԴϴ\nVersion: '%s' socket: '%s' port: %d"" - nor "%s: klar for tilkoblinger\nVersion: '%s' socket: '%s' port: %d"" - norwegian-ny "%s: klar for tilkoblingar\nVersion: '%s' socket: '%s' port: %d"" - pol "%s: gotowe do po?czenia\nVersion: '%s' socket: '%s' port: %d"" - por "%s: Pronto para conexes\nVersion: '%s' socket: '%s' port: %d"" - rum "%s: sint gata pentru conectii\nVersion: '%s' socket: '%s' port: %d"" - rus "%s: .\n: '%s' : '%s' : %d" - serbian "%s: Spreman za konekcije\nVersion: '%s' socket: '%s' port: %d"" - slo "%s: pripraven na spojenie\nVersion: '%s' socket: '%s' port: %d"" - spa "%s: preparado para conexiones\nVersion: '%s' socket: '%s' port: %d"" - swe "%s: klar att ta emot klienter\nVersion: '%s' socket: '%s' port: %d"" - ukr "%s: '!\nVersion: '%s' socket: '%s' port: %d"" -ER_NORMAL_SHUTDOWN - cze "%s: norm-Bln ukonen\n" - dan "%s: Normal nedlukning\n" - nla "%s: Normaal afgesloten \n" - eng "%s: Normal shutdown\n" - est "%s: MySQL lpetas\n" - fre "%s: Arrt normal du serveur\n" - ger "%s: Normal heruntergefahren\n" - greek "%s: shutdown\n" - hun "%s: Normal leallitas\n" - ita "%s: Shutdown normale\n" - kor "%s: shutdown\n" - nor "%s: Normal avslutning\n" - norwegian-ny "%s: Normal nedkopling\n" - pol "%s: Standardowe zakoczenie dziaania\n" - por "%s: 'Shutdown' normal\n" - rum "%s: Terminare normala\n" - rus "%s: \n" - serbian "%s: Normalno gaenje\n" - slo "%s: normlne ukonenie\n" - spa "%s: Apagado normal\n" - swe "%s: Normal avslutning\n" - ukr "%s: \n" -ER_GOT_SIGNAL - cze "%s: p-Bijat signal %d, konm\n" - dan "%s: Fangede signal %d. Afslutter!!\n" - nla "%s: Signaal %d. Systeem breekt af!\n" - eng "%s: Got signal %d. Aborting!\n" - jps "%s: Got signal %d. f!\n", - est "%s: sain signaali %d. Lpetan!\n" - fre "%s: Reu le signal %d. Abandonne!\n" - ger "%s: Signal %d erhalten. Abbruch!\n" - greek "%s: %d. !\n" - hun "%s: %d jelzes. Megszakitva!\n" - ita "%s: Ricevuto segnale %d. Interruzione!\n" - jpn "%s: Got signal %d. !\n" - kor "%s: %d ȣ . !\n" - nor "%s: Oppdaget signal %d. Avslutter!\n" - norwegian-ny "%s: Oppdaga signal %d. Avsluttar!\n" - pol "%s: Otrzymano sygna %d. Koczenie dziaania!\n" - por "%s: Obteve sinal %d. Abortando!\n" - rum "%s: Semnal %d obtinut. Aborting!\n" - rus "%s: %d. !\n" - serbian "%s: Dobio signal %d. Prekidam!\n" - slo "%s: prijat signl %d, ukonenie (Abort)!\n" - spa "%s: Recibiendo signal %d. Abortando!\n" - swe "%s: Fick signal %d. Avslutar!\n" - ukr "%s: %d. !\n" -ER_SHUTDOWN_COMPLETE - cze "%s: ukon-Ben prce hotovo\n" - dan "%s: Server lukket\n" - nla "%s: Afsluiten afgerond\n" - eng "%s: Shutdown complete\n" - jps "%s: Shutdown \n", - est "%s: Lpp\n" - fre "%s: Arrt du serveur termin\n" - ger "%s: Herunterfahren beendet\n" - greek "%s: Shutdown \n" - hun "%s: A leallitas kesz\n" - ita "%s: Shutdown completato\n" - jpn "%s: Shutdown λ\n" - kor "%s: Shutdown Ϸ!\n" - nor "%s: Avslutning komplett\n" - norwegian-ny "%s: Nedkopling komplett\n" - pol "%s: Zakoczenie dziaania wykonane\n" - por "%s: 'Shutdown' completo\n" - rum "%s: Terminare completa\n" - rus "%s: \n" - serbian "%s: Gaenje zavreno\n" - slo "%s: prca ukonen\n" - spa "%s: Apagado completado\n" - swe "%s: Avslutning klar\n" - ukr "%s: \n" -ER_FORCING_CLOSE 08S01 - cze "%s: n-Bsiln uzaven threadu %ld uivatele '%-.48s'\n" - dan "%s: Forceret nedlukning af trd: %ld bruger: '%-.48s'\n" - nla "%s: Afsluiten afgedwongen van thread %ld gebruiker: '%-.48s'\n" - eng "%s: Forcing close of thread %ld user: '%-.48s'\n" - jps "%s: Xbh %ld I user: '%-.48s'\n", - est "%s: Sulgen juga lime %ld kasutaja: '%-.48s'\n" - fre "%s: Arrt forc de la tche (thread) %ld utilisateur: '%-.48s'\n" - ger "%s: Thread %ld zwangsweise beendet. Benutzer: '%-.48s'\n" - greek "%s: thread %ld user: '%-.48s'\n" - hun "%s: A(z) %ld thread kenyszeritett zarasa. Felhasznalo: '%-.48s'\n" - ita "%s: Forzata la chiusura del thread %ld utente: '%-.48s'\n" - jpn "%s: å %ld λ user: '%-.48s'\n" - kor "%s: thread %ld user: '%-.48s'\n" - nor "%s: Ptvinget avslutning av trd %ld bruker: '%-.48s'\n" - norwegian-ny "%s: Ptvinga avslutning av trd %ld brukar: '%-.48s'\n" - pol "%s: Wymuszenie zamknicia w?tku %ld uytkownik: '%-.48s'\n" - por "%s: Forando finalizao da 'thread' %ld - usurio '%-.48s'\n" - rum "%s: Terminare fortata a thread-ului %ld utilizatorului: '%-.48s'\n" - rus "%s: %ld : '%-.48s'\n" - serbian "%s: Usiljeno gaenje thread-a %ld koji pripada korisniku: '%-.48s'\n" - slo "%s: nsiln ukonenie vlkna %ld uvatea '%-.48s'\n" - spa "%s: Forzando a cerrar el thread %ld usuario: '%-.48s'\n" - swe "%s: Stnger av trd %ld; anvndare: '%-.48s'\n" - ukr "%s: Ǧ %ld : '%-.48s'\n" -ER_IPSOCK_ERROR 08S01 - cze "Nemohu vytvo-Bit IP socket" - dan "Kan ikke oprette IP socket" - nla "Kan IP-socket niet openen" - eng "Can't create IP socket" - jps "IP socket ܂", - est "Ei suuda luua IP socketit" - fre "Ne peut crer la connexion IP (socket)" - ger "Kann IP-Socket nicht erzeugen" - greek " IP socket" - hun "Az IP socket nem hozhato letre" - ita "Impossibile creare il socket IP" - jpn "IP socket ޤ" - kor "IP ߽ϴ." - nor "Kan ikke opprette IP socket" - norwegian-ny "Kan ikkje opprette IP socket" - pol "Nie mona stworzy socket'u IP" - por "No pode criar o soquete IP" - rum "Nu pot crea IP socket" - rus " IP-" - serbian "Ne mogu da kreiram IP socket" - slo "Nemem vytvori IP socket" - spa "No puedo crear IP socket" - swe "Kan inte skapa IP-socket" - ukr " IP '" -ER_NO_SUCH_INDEX 42S12 S1009 - cze "Tabulka '%-.192s' nem-B index odpovdajc CREATE INDEX. Vytvote tabulku znovu" - dan "Tabellen '%-.192s' har ikke den ngle, som blev brugt i CREATE INDEX. Genopret tabellen" - nla "Tabel '%-.192s' heeft geen INDEX zoals deze gemaakt worden met CREATE INDEX. Maak de tabel opnieuw" - eng "Table '%-.192s' has no index like the one used in CREATE INDEX; recreate the table" - jps "Table '%-.192s' ͂̂悤 index Ă܂(CREATE INDEX sɎw肳Ă܂). e[u蒼Ă", - est "Tabelil '%-.192s' puuduvad vtmed. Loo tabel uuesti" - fre "La table '%-.192s' n'a pas d'index comme celle utilise dans CREATE INDEX. Recrez la table" - ger "Tabelle '%-.192s' besitzt keinen wie den in CREATE INDEX verwendeten Index. Tabelle neu anlegen" - greek " '%-.192s' (index) CREATE INDEX. , " - hun "A(z) '%-.192s' tablahoz nincs meg a CREATE INDEX altal hasznalt index. Alakitsa at a tablat" - ita "La tabella '%-.192s' non ha nessun indice come quello specificatato dalla CREATE INDEX. Ricrea la tabella" - jpn "Table '%-.192s' ϤΤ褦 index äƤޤ(CREATE INDEX ¹Ի˻ꤵƤޤ). ơ֥ľƤ" - kor "̺ '%-.192s' ε ʾҽϴ. alter ̺ ̿Ͽ ̺ ϼ..." - nor "Tabellen '%-.192s' har ingen index som den som er brukt i CREATE INDEX. Gjenopprett tabellen" - norwegian-ny "Tabellen '%-.192s' har ingen index som den som er brukt i CREATE INDEX. Oprett tabellen p nytt" - pol "Tabela '%-.192s' nie ma indeksu takiego jak w CREATE INDEX. Stwrz tabel" - por "Tabela '%-.192s' no possui um ndice como o usado em CREATE INDEX. Recrie a tabela" - rum "Tabela '%-.192s' nu are un index ca acela folosit in CREATE INDEX. Re-creeaza tabela" - rus " '%-.192s' , CREATE INDEX. " - serbian "Tabela '%-.192s' nema isti indeks kao onaj upotrebljen pri komandi 'CREATE INDEX'. Napravite tabelu ponovo" - slo "Tabuka '%-.192s' nem index zodpovedajci CREATE INDEX. Vytvorte tabulku znova" - spa "La tabla '%-.192s' no tiene indice como el usado en CREATE INDEX. Crea de nuevo la tabla" - swe "Tabellen '%-.192s' har inget index som motsvarar det angivna i CREATE INDEX. Skapa om tabellen" - ukr " '%-.192s' , Ц CREATE INDEX. Ҧ " -ER_WRONG_FIELD_TERMINATORS 42000 S1009 - cze "Argument separ-Btoru poloek nebyl oekvn. Pette si manul" - dan "Felt adskiller er ikke som forventet, se dokumentationen" - nla "De argumenten om velden te scheiden zijn anders dan verwacht. Raadpleeg de handleiding" - eng "Field separator argument is not what is expected; check the manual" - est "Vljade eraldaja erineb oodatust. Tutvu kasutajajuhendiga" - fre "Sparateur de champs inconnu. Vrifiez dans le manuel" - ger "Feldbegrenzer-Argument ist nicht in der erwarteten Form. Bitte im Handbuch nachlesen" - greek " . manual" - hun "A mezoelvalaszto argumentumok nem egyeznek meg a varttal. Nezze meg a kezikonyvben!" - ita "L'argomento 'Field separator' non e` quello atteso. Controlla il manuale" - kor "ʵ μ ʽϴ. ޴ ã ." - nor "Felt skiller argumentene er ikke som forventet, se dokumentasjonen" - norwegian-ny "Felt skiljer argumenta er ikkje som venta, sj dokumentasjonen" - pol "Nie oczekiwano separatora. Sprawd podrcznik" - por "Argumento separador de campos no o esperado. Cheque o manual" - rum "Argumentul pentru separatorul de cimpuri este diferit de ce ma asteptam. Verifica manualul" - rus " - , . " - serbian "Argument separatora polja nije ono to se oekivalo. Proverite uputstvo MySQL server-a" - slo "Argument oddeova pol nezodpoved poiadavkm. Skontrolujte v manuli" - spa "Los separadores de argumentos del campo no son los especificados. Comprueba el manual" - swe "Fltseparatorerna r vad som frvntades. Kontrollera mot manualen" - ukr " Ħ ̦. æ" -ER_BLOBS_AND_NO_TERMINATED 42000 S1009 - cze "Nen-B mon pout pevn rowlength s BLOBem. Pouijte 'fields terminated by'." - dan "Man kan ikke bruge faste feltlngder med BLOB. Brug i stedet 'fields terminated by'." - nla "Bij het gebruik van BLOBs is het niet mogelijk om vaste rijlengte te gebruiken. Maak s.v.p. gebruik van 'fields terminated by'." - eng "You can't use fixed rowlength with BLOBs; please use 'fields terminated by'" - est "BLOB-tpi vljade olemasolul ei saa kasutada fikseeritud vljapikkust. Vajalik 'fields terminated by' mrang." - fre "Vous ne pouvez utiliser des lignes de longueur fixe avec des BLOBs. Utiliser 'fields terminated by'." - ger "Eine feste Zeilenlnge kann fr BLOB-Felder nicht verwendet werden. Bitte 'fields terminated by' verwenden" - greek " fixed rowlength BLOBs. 'fields terminated by'." - hun "Fix hosszusagu BLOB-ok nem hasznalhatok. Hasznalja a 'mezoelvalaszto jelet' ." - ita "Non possono essere usate righe a lunghezza fissa con i BLOB. Usa 'FIELDS TERMINATED BY'." - jpn "You can't use fixed rowlength with BLOBs; please use 'fields terminated by'." - kor "BLOBδ lowlength ϴ. 'fields terminated by' ϼ." - nor "En kan ikke bruke faste feltlengder med BLOB. Vennlisgt bruk 'fields terminated by'." - norwegian-ny "Ein kan ikkje bruke faste feltlengder med BLOB. Vennlisgt bruk 'fields terminated by'." - pol "Nie mona uy staej dugo?ci wiersza z polami typu BLOB. Uyj 'fields terminated by'." - por "Voc no pode usar comprimento de linha fixo com BLOBs. Por favor, use campos com comprimento limitado." - rum "Nu poti folosi lungime de cimp fix pentru BLOB-uri. Foloseste 'fields terminated by'." - rus " BLOB , 'fields terminated by'" - serbian "Ne moete koristiti fiksnu veliinu sloga kada imate BLOB polja. Molim koristite 'fields terminated by' opciju." - slo "Nie je mon poui fixn dku s BLOBom. Pouite 'fields terminated by'." - spa "No puedes usar longitudes de filas fijos con BLOBs. Por favor usa 'campos terminados por '." - swe "Man kan inte anvnda fast radlngd med blobs. Anvnd 'fields terminated by'" - ukr " BLOB. 'fields terminated by'" -ER_TEXTFILE_NOT_READABLE - cze "Soubor '%-.128s' mus-B bt v adresi databze nebo iteln pro vechny" - dan "Filen '%-.128s' skal vre i database-folderen og kunne lses af alle" - nla "Het bestand '%-.128s' dient in de database directory voor the komen of leesbaar voor iedereen te zijn." - eng "The file '%-.128s' must be in the database directory or be readable by all" - jps "t@C '%-.128s' databse directory ɂ邩SẴ[U[ǂ߂悤ɋ‚ĂȂ΂Ȃ܂.", - est "Fail '%-.128s' peab asuma andmebaasi kataloogis vi olema kigile loetav" - fre "Le fichier '%-.128s' doit tre dans le rpertoire de la base et lisible par tous" - ger "Datei '%-.128s' muss im Datenbank-Verzeichnis vorhanden oder lesbar fr alle sein" - greek " '%-.128s' database directory " - hun "A(z) '%-.128s'-nak az adatbazis konyvtarban kell lennie, vagy mindenki szamara olvashatonak" - ita "Il file '%-.128s' deve essere nella directory del database e deve essere leggibile da tutti" - jpn "ե '%-.128s' databse directory ˤ뤫ƤΥ桼ɤ褦˵ĤƤʤФʤޤ." - kor "'%-.128s' ȭϴ Ÿ̽ 丮 ϰų ο б Ͽ մϴ." - nor "Filen '%-.128s' m vre i database-katalogen for vre lesbar for alle" - norwegian-ny "Filen '%-.128s' m vre i database-katalogen for vre lesbar for alle" - pol "Plik '%-.128s' musi znajdowa sie w katalogu bazy danych lub mie prawa czytania przez wszystkich" - por "Arquivo '%-.128s' tem que estar no diretrio do banco de dados ou ter leitura possvel para todos" - rum "Fisierul '%-.128s' trebuie sa fie in directorul bazei de data sau trebuie sa poata sa fie citit de catre toata lumea (verifica permisiile)" - rus " '%-.128s' , , " - serbian "File '%-.128s' mora biti u direktorijumu gde su file-ovi baze i mora imati odgovarajua prava pristupa" - slo "Sbor '%-.128s' mus by v adresri databzy, alebo itaten pre vetkch" - spa "El archivo '%-.128s' debe estar en el directorio de la base de datos o ser de lectura por todos" - swe "Textfilen '%-.128s' mste finnas i databasbiblioteket eller vara lsbar fr alla" - ukr " '%-.128s' æ Ӧ" -ER_FILE_EXISTS_ERROR - cze "Soubor '%-.200s' ji-B existuje" - dan "Filen '%-.200s' eksisterer allerede" - nla "Het bestand '%-.200s' bestaat reeds" - eng "File '%-.200s' already exists" - jps "File '%-.200s' ͊ɑ݂܂", - est "Fail '%-.200s' juba eksisteerib" - fre "Le fichier '%-.200s' existe dj" - ger "Datei '%-.200s' bereits vorhanden" - greek " '%-.200s' " - hun "A '%-.200s' file mar letezik." - ita "Il file '%-.200s' esiste gia`" - jpn "File '%-.200s' ϴ¸ߤޤ" - kor "'%-.200s' ȭ ̹ մϴ." - nor "Filen '%-.200s' eksisterte allerede" - norwegian-ny "Filen '%-.200s' eksisterte allereide" - pol "Plik '%-.200s' ju istnieje" - por "Arquivo '%-.200s' j existe" - rum "Fisierul '%-.200s' exista deja" - rus " '%-.200s' " - serbian "File '%-.200s' ve postoji" - slo "Sbor '%-.200s' u existuje" - spa "El archivo '%-.200s' ya existe" - swe "Filen '%-.200s' existerar redan" - ukr " '%-.200s' դ" -ER_LOAD_INFO - cze "Z-Bznam: %ld Vymazno: %ld Peskoeno: %ld Varovn: %ld" - dan "Poster: %ld Fjernet: %ld Sprunget over: %ld Advarsler: %ld" - nla "Records: %ld Verwijderd: %ld Overgeslagen: %ld Waarschuwingen: %ld" - eng "Records: %ld Deleted: %ld Skipped: %ld Warnings: %ld" - jps "R[h: %ld 폜: %ld Skipped: %ld Warnings: %ld", - est "Kirjeid: %ld Kustutatud: %ld Vahele jetud: %ld Hoiatusi: %ld" - fre "Enregistrements: %ld Effacs: %ld Non traits: %ld Avertissements: %ld" - ger "Datenstze: %ld Gelscht: %ld Ausgelassen: %ld Warnungen: %ld" - greek ": %ld : %ld : %ld : %ld" - hun "Rekordok: %ld Torolve: %ld Skipped: %ld Warnings: %ld" - ita "Records: %ld Cancellati: %ld Saltati: %ld Avvertimenti: %ld" - jpn "쥳ɿ: %ld : %ld Skipped: %ld Warnings: %ld" - kor "ڵ: %ld : %ld ŵ: %ld : %ld" - nor "Poster: %ld Fjernet: %ld Hoppet over: %ld Advarsler: %ld" - norwegian-ny "Poster: %ld Fjerna: %ld Hoppa over: %ld tvaringar: %ld" - pol "Recordw: %ld Usunitych: %ld Pominitych: %ld Ostrzee: %ld" - por "Registros: %ld - Deletados: %ld - Ignorados: %ld - Avisos: %ld" - rum "Recorduri: %ld Sterse: %ld Sarite (skipped): %ld Atentionari (warnings): %ld" - rus ": %ld : %ld : %ld : %ld" - serbian "Slogova: %ld Izbrisano: %ld Preskoeno: %ld Upozorenja: %ld" - slo "Zznamov: %ld Zmazanch: %ld Preskoench: %ld Varovania: %ld" - spa "Registros: %ld Borrados: %ld Saltados: %ld Peligros: %ld" - swe "Rader: %ld Bortagna: %ld Dubletter: %ld Varningar: %ld" - ukr "Ӧ: %ld : %ld : %ld : %ld" -ER_ALTER_INFO - cze "Z-Bznam: %ld Zdvojench: %ld" - dan "Poster: %ld Ens: %ld" - nla "Records: %ld Dubbel: %ld" - eng "Records: %ld Duplicates: %ld" - jps "R[h: %ld d: %ld", - est "Kirjeid: %ld Kattuvaid: %ld" - fre "Enregistrements: %ld Doublons: %ld" - ger "Datenstze: %ld Duplikate: %ld" - greek ": %ld : %ld" - hun "Rekordok: %ld Duplikalva: %ld" - ita "Records: %ld Duplicati: %ld" - jpn "쥳ɿ: %ld ʣ: %ld" - kor "ڵ: %ld ߺ: %ld" - nor "Poster: %ld Like: %ld" - norwegian-ny "Poster: %ld Like: %ld" - pol "Rekordw: %ld Duplikatw: %ld" - por "Registros: %ld - Duplicados: %ld" - rum "Recorduri: %ld Duplicate: %ld" - rus ": %ld : %ld" - serbian "Slogova: %ld Duplikata: %ld" - slo "Zznamov: %ld Opakovanch: %ld" - spa "Registros: %ld Duplicados: %ld" - swe "Rader: %ld Dubletter: %ld" - ukr "Ӧ: %ld ̦Ԧ: %ld" -ER_WRONG_SUB_KEY - cze "Chybn-B podst kle -- nen to etzec nebo je del ne dlka sti kle" - dan "Forkert indeksdel. Den anvendte ngledel er ikke en streng eller lngden er strre end nglelngden" - nla "Foutief sub-gedeelte van de zoeksleutel. De gebruikte zoeksleutel is geen onderdeel van een string of of de gebruikte lengte is langer dan de zoeksleutel" - eng "Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys" - est "Vigane vtme osa. Kasutatud vtmeosa ei ole string tpi, mratud pikkus on pikem kui vtmeosa vi tabelihandler ei toeta seda tpi vtmeid" - fre "Mauvaise sous-clef. Ce n'est pas un 'string' ou la longueur dpasse celle dfinie dans la clef" - ger "Falscher Unterteilschlssel. Der verwendete Schlsselteil ist entweder kein String, die verwendete Lnge ist lnger als der Teilschlssel oder die Speicher-Engine untersttzt keine Unterteilschlssel" - greek " sub part key. key part string " - hun "Rossz alkulcs. A hasznalt kulcsresz nem karaktersorozat vagy hosszabb, mint a kulcsresz" - ita "Sotto-parte della chiave errata. La parte di chiave utilizzata non e` una stringa o la lunghezza e` maggiore della parte di chiave." - jpn "Incorrect prefix key; the used key part isn't a string or the used length is longer than the key part" - kor "Ȯ Ʈ Ű. Ű Ʈ Ʈ ƴϰų Ű Ʈ ̰ ʹ ϴ." - nor "Feil delnkkel. Den brukte delnkkelen er ikke en streng eller den oppgitte lengde er lengre enn nkkel lengden" - norwegian-ny "Feil delnykkel. Den brukte delnykkelen er ikkje ein streng eller den oppgitte lengda er lengre enn nykkellengden" - pol "Bdna podcz? klucza. Uyta cz? klucza nie jest acuchem lub uyta dugo? jest wiksza ni cz? klucza" - por "Sub parte da chave incorreta. A parte da chave usada no uma 'string' ou o comprimento usado maior que parte da chave ou o manipulador de tabelas no suporta sub chaves nicas" - rum "Componentul cheii este incorrect. Componentul folosit al cheii nu este un sir sau lungimea folosita este mai lunga decit lungimea cheii" - rus " . , , , " - serbian "Pogrean pod-klju dela kljua. Upotrebljeni deo kljua nije string, upotrebljena duina je vea od dela kljua ili handler tabela ne podrava jedinstvene pod-kljueve" - slo "Incorrect prefix key; the used key part isn't a string or the used length is longer than the key part" - spa "Parte de la clave es erronea. Una parte de la clave no es una cadena o la longitud usada es tan grande como la parte de la clave" - swe "Felaktig delnyckel. Nyckeldelen r inte en strng eller den angivna lngden r lngre n kolumnlngden" - ukr "צ . , ڦ æ Цդ Φ " -ER_CANT_REMOVE_ALL_FIELDS 42000 - cze "Nen-B mon vymazat vechny poloky s ALTER TABLE. Pouijte DROP TABLE" - dan "Man kan ikke slette alle felter med ALTER TABLE. Brug DROP TABLE i stedet." - nla "Het is niet mogelijk alle velden te verwijderen met ALTER TABLE. Gebruik a.u.b. DROP TABLE hiervoor!" - eng "You can't delete all columns with ALTER TABLE; use DROP TABLE instead" - jps "ALTER TABLE őSĂ column ͍폜ł܂. DROP TABLE gpĂ", - est "ALTER TABLE kasutades ei saa kustutada kiki tulpasid. Kustuta tabel DROP TABLE abil" - fre "Vous ne pouvez effacer tous les champs avec ALTER TABLE. Utilisez DROP TABLE" - ger "Mit ALTER TABLE knnen nicht alle Felder auf einmal gelscht werden. Dafr DROP TABLE verwenden" - greek " ALTER TABLE. DROP TABLE" - hun "Az osszes mezo nem torolheto az ALTER TABLE-lel. Hasznalja a DROP TABLE-t helyette" - ita "Non si possono cancellare tutti i campi con una ALTER TABLE. Utilizzare DROP TABLE" - jpn "ALTER TABLE Ƥ column ϺǤޤ. DROP TABLE ѤƤ" - kor "ALTER TABLE δ Į ϴ. DROP TABLE ̿ϼ." - nor "En kan ikke slette alle felt med ALTER TABLE. Bruk DROP TABLE isteden." - norwegian-ny "Ein kan ikkje slette alle felt med ALTER TABLE. Bruk DROP TABLE istadenfor." - pol "Nie mona usun? wszystkich pl wykorzystuj?c ALTER TABLE. W zamian uyj DROP TABLE" - por "Voc no pode deletar todas as colunas com ALTER TABLE; use DROP TABLE em seu lugar" - rum "Nu poti sterge toate coloanele cu ALTER TABLE. Foloseste DROP TABLE in schimb" - rus " ALTER TABLE. DROP TABLE" - serbian "Ne moete da izbriete sve kolone pomou komande 'ALTER TABLE'. Upotrebite komandu 'DROP TABLE' ako elite to da uradite" - slo "One nemem zmaza all fields with ALTER TABLE; use DROP TABLE instead" - spa "No puede borrar todos los campos con ALTER TABLE. Usa DROP TABLE para hacerlo" - swe "Man kan inte radera alla flt med ALTER TABLE. Anvnd DROP TABLE istllet" - ukr " Ӧ æ ALTER TABLE. DROP TABLE" -ER_CANT_DROP_FIELD_OR_KEY 42000 - cze "Nemohu zru-Bit '%-.192s' (provst DROP). Zkontrolujte, zda neexistuj zznamy/kle" - dan "Kan ikke udfre DROP '%-.192s'. Undersg om feltet/nglen eksisterer." - nla "Kan '%-.192s' niet weggooien. Controleer of het veld of de zoeksleutel daadwerkelijk bestaat." - eng "Can't DROP '%-.192s'; check that column/key exists" - jps "'%-.192s' jł܂ł; check that column/key exists", - est "Ei suuda kustutada '%-.192s'. Kontrolli kas tulp/vti eksisteerib" - fre "Ne peut effacer (DROP) '%-.192s'. Vrifiez s'il existe" - ger "Kann '%-.192s' nicht lschen. Existiert die Spalte oder der Schlssel?" - greek " (DROP) '%-.192s'. / " - hun "A DROP '%-.192s' nem lehetseges. Ellenorizze, hogy a mezo/kulcs letezik-e" - ita "Impossibile cancellare '%-.192s'. Controllare che il campo chiave esista" - jpn "'%-.192s' ˴ǤޤǤ; check that column/key exists" - kor "'%-.192s' DROP ϴ. Į̳ Ű ϴ äũϼ." - nor "Kan ikke DROP '%-.192s'. Undersk om felt/nkkel eksisterer." - norwegian-ny "Kan ikkje DROP '%-.192s'. Undersk om felt/nkkel eksisterar." - pol "Nie mona wykona operacji DROP '%-.192s'. Sprawd, czy to pole/klucz istnieje" - por "No se pode fazer DROP '%-.192s'. Confira se esta coluna/chave existe" - rum "Nu pot sa DROP '%-.192s'. Verifica daca coloana/cheia exista" - rus " (DROP) '%-.192s'. / " - serbian "Ne mogu da izvrim komandu drop 'DROP' na '%-.192s'. Proverite da li ta kolona (odnosno klju) postoji" - slo "Nemem zrui (DROP) '%-.192s'. Skontrolujte, i neexistuj zznamy/ke" - spa "No puedo ELIMINAR '%-.192s'. compuebe que el campo/clave existe" - swe "Kan inte ta bort '%-.192s'. Kontrollera att fltet/nyckel finns" - ukr " DROP '%-.192s'. צ, / դ" -ER_INSERT_INFO - cze "Z-Bznam: %ld Zdvojench: %ld Varovn: %ld" - dan "Poster: %ld Ens: %ld Advarsler: %ld" - nla "Records: %ld Dubbel: %ld Waarschuwing: %ld" - eng "Records: %ld Duplicates: %ld Warnings: %ld" - jps "R[h: %ld d: %ld Warnings: %ld", - est "Kirjeid: %ld Kattuvaid: %ld Hoiatusi: %ld" - fre "Enregistrements: %ld Doublons: %ld Avertissements: %ld" - ger "Datenstze: %ld Duplikate: %ld Warnungen: %ld" - greek ": %ld : %ld : %ld" - hun "Rekordok: %ld Duplikalva: %ld Warnings: %ld" - ita "Records: %ld Duplicati: %ld Avvertimenti: %ld" - jpn "쥳ɿ: %ld ʣ: %ld Warnings: %ld" - kor "ڵ: %ld ߺ: %ld : %ld" - nor "Poster: %ld Like: %ld Advarsler: %ld" - norwegian-ny "Postar: %ld Like: %ld tvaringar: %ld" - pol "Rekordw: %ld Duplikatw: %ld Ostrzee: %ld" - por "Registros: %ld - Duplicados: %ld - Avisos: %ld" - rum "Recorduri: %ld Duplicate: %ld Atentionari (warnings): %ld" - rus ": %ld : %ld : %ld" - serbian "Slogova: %ld Duplikata: %ld Upozorenja: %ld" - slo "Zznamov: %ld Opakovanch: %ld Varovania: %ld" - spa "Registros: %ld Duplicados: %ld Peligros: %ld" - swe "Rader: %ld Dubletter: %ld Varningar: %ld" - ukr "Ӧ: %ld ̦Ԧ: %ld : %ld" -ER_UPDATE_TABLE_USED - eng "You can't specify target table '%-.192s' for update in FROM clause" - ger "Die Verwendung der zu aktualisierenden Zieltabelle '%-.192s' ist in der FROM-Klausel nicht zulssig." - rus " '%-.192s' FROM " - swe "INSERT-table '%-.192s' fr inte finnas i FROM tabell-listan" - ukr " '%-.192s' ͦ ̦ FROM" -ER_NO_SUCH_THREAD - cze "Nezn-Bm identifikace threadu: %lu" - dan "Ukendt trd id: %lu" - nla "Onbekend thread id: %lu" - eng "Unknown thread id: %lu" - jps "thread id: %lu ͂܂", - est "Tundmatu lim: %lu" - fre "Numro de tche inconnu: %lu" - ger "Unbekannte Thread-ID: %lu" - greek " thread id: %lu" - hun "Ervenytelen szal (thread) id: %lu" - ita "Thread id: %lu sconosciuto" - jpn "thread id: %lu Ϥޤ" - kor "˼ id: %lu" - nor "Ukjent trd id: %lu" - norwegian-ny "Ukjent trd id: %lu" - pol "Nieznany identyfikator w?tku: %lu" - por "'Id' de 'thread' %lu desconhecido" - rum "Id-ul: %lu thread-ului este necunoscut" - rus " : %lu" - serbian "Nepoznat thread identifikator: %lu" - slo "Neznma identifikcia vlkna: %lu" - spa "Identificador del thread: %lu desconocido" - swe "Finns ingen trd med id %lu" - ukr "צ Ʀ Ǧ: %lu" -ER_KILL_DENIED_ERROR - cze "Nejste vlastn-Bkem threadu %lu" - dan "Du er ikke ejer af trden %lu" - nla "U bent geen bezitter van thread %lu" - eng "You are not owner of thread %lu" - jps "thread %lu ̃I[i[ł͂܂", - est "Ei ole lime %lu omanik" - fre "Vous n'tes pas propritaire de la tche no: %lu" - ger "Sie sind nicht Eigentmer von Thread %lu" - greek " owner thread %lu" - hun "A %lu thread-nek mas a tulajdonosa" - ita "Utente non proprietario del thread %lu" - jpn "thread %lu ΥʡǤϤޤ" - kor "(Thread) %lu ڰ ƴմϴ." - nor "Du er ikke eier av trden %lu" - norwegian-ny "Du er ikkje eigar av trd %lu" - pol "Nie jeste? wa?cicielem w?tku %lu" - por "Voc no proprietrio da 'thread' %lu" - rum "Nu sinteti proprietarul threadului %lu" - rus " %lu" - serbian "Vi niste vlasnik thread-a %lu" - slo "Nie ste vlastnkom vlkna %lu" - spa "Tu no eres el propietario del thread%lu" - swe "Du r inte gare till trd %lu" - ukr " Ǧ %lu" -ER_NO_TABLES_USED - cze "Nejsou pou-Bity dn tabulky" - dan "Ingen tabeller i brug" - nla "Geen tabellen gebruikt." - eng "No tables used" - est "htegi tabelit pole kasutusel" - fre "Aucune table utilise" - ger "Keine Tabellen verwendet" - greek " " - hun "Nincs hasznalt tabla" - ita "Nessuna tabella usata" - kor " ̺ ʾҽϴ." - nor "Ingen tabeller i bruk" - norwegian-ny "Ingen tabellar i bruk" - pol "Nie ma adej uytej tabeli" - por "Nenhuma tabela usada" - rum "Nici o tabela folosita" - rus " " - serbian "Nema upotrebljenih tabela" - slo "Nie je pouit iadna tabuka" - spa "No ha tablas usadas" - swe "Inga tabeller angivna" - ukr " " -ER_TOO_BIG_SET - cze "P-Bli mnoho etzc pro sloupec %-.192s a SET" - dan "For mange tekststrenge til specifikationen af SET i kolonne %-.192s" - nla "Teveel strings voor kolom %-.192s en SET" - eng "Too many strings for column %-.192s and SET" - est "Liiga palju string tulbale %-.192s tbile SET" - fre "Trop de chanes dans la colonne %-.192s avec SET" - ger "Zu viele Strings fr Feld %-.192s und SET angegeben" - greek " strings %-.192s SET" - hun "Tul sok karakter: %-.192s es SET" - ita "Troppe stringhe per la colonna %-.192s e la SET" - kor "Į %-.192s SET Ʈ ʹ ϴ." - nor "For mange tekststrenger kolonne %-.192s og SET" - norwegian-ny "For mange tekststrengar felt %-.192s og SET" - pol "Zbyt wiele acuchw dla kolumny %-.192s i polecenia SET" - por "'Strings' demais para coluna '%-.192s' e SET" - rum "Prea multe siruri pentru coloana %-.192s si SET" - rus " %-.192s SET" - serbian "Previe string-ova za kolonu '%-.192s' i komandu 'SET'" - slo "Prli mnoho reazcov pre pole %-.192s a SET" - spa "Muchas strings para columna %-.192s y SET" - swe "Fr mnga alternativ till kolumn %-.192s fr SET" - ukr " %-.192s SET" -ER_NO_UNIQUE_LOGFILE - cze "Nemohu vytvo-Bit jednoznan jmno logovacho souboru %-.200s.(1-999)\n" - dan "Kan ikke lave unikt log-filnavn %-.200s.(1-999)\n" - nla "Het is niet mogelijk een unieke naam te maken voor de logfile %-.200s.(1-999)\n" - eng "Can't generate a unique log-filename %-.200s.(1-999)\n" - est "Ei suuda luua unikaalset logifaili nime %-.200s.(1-999)\n" - fre "Ne peut gnrer un unique nom de journal %-.200s.(1-999)\n" - ger "Kann keinen eindeutigen Dateinamen fr die Logdatei %-.200s(1-999) erzeugen\n" - greek " unique log-filename %-.200s.(1-999)\n" - hun "Egyedi log-filenev nem generalhato: %-.200s.(1-999)\n" - ita "Impossibile generare un nome del file log unico %-.200s.(1-999)\n" - kor "Unique αȭ '%-.200s' ϴ.(1-999)\n" - nor "Kan ikke lage unikt loggfilnavn %-.200s.(1-999)\n" - norwegian-ny "Kan ikkje lage unikt loggfilnavn %-.200s.(1-999)\n" - pol "Nie mona stworzy unikalnej nazwy pliku z logiem %-.200s.(1-999)\n" - por "No pode gerar um nome de arquivo de 'log' nico '%-.200s'.(1-999)\n" - rum "Nu pot sa generez un nume de log unic %-.200s.(1-999)\n" - rus " %-.200s.(1-999)\n" - serbian "Ne mogu da generiem jedinstveno ime log-file-a: '%-.200s.(1-999)'\n" - slo "Nemem vytvori uniktne meno log-sboru %-.200s.(1-999)\n" - spa "No puede crear un unico archivo log %-.200s.(1-999)\n" - swe "Kan inte generera ett unikt filnamn %-.200s.(1-999)\n" - ukr " Φ ' log- %-.200s.(1-999)\n" -ER_TABLE_NOT_LOCKED_FOR_WRITE - cze "Tabulka '%-.192s' byla zam-Bena s READ a neme bt zmnna" - dan "Tabellen '%-.192s' var lst med READ ls og kan ikke opdateres" - nla "Tabel '%-.192s' was gelocked met een lock om te lezen. Derhalve kunnen geen wijzigingen worden opgeslagen." - eng "Table '%-.192s' was locked with a READ lock and can't be updated" - jps "Table '%-.192s' READ lock ɂȂĂāAXV͂ł܂", - est "Tabel '%-.192s' on lukustatud READ lukuga ning ei ole muudetav" - fre "Table '%-.192s' verrouille lecture (READ): modification impossible" - ger "Tabelle '%-.192s' ist mit Lesesperre versehen und kann nicht aktualisiert werden" - greek " '%-.192s' READ lock " - hun "A(z) '%-.192s' tabla zarolva lett (READ lock) es nem lehet frissiteni" - ita "La tabella '%-.192s' e` soggetta a lock in lettura e non puo` essere aggiornata" - jpn "Table '%-.192s' READ lock ˤʤäƤơϤǤޤ" - kor "̺ '%-.192s' READ ־ ϴ." - nor "Tabellen '%-.192s' var lst med READ ls og kan ikke oppdateres" - norwegian-ny "Tabellen '%-.192s' var lst med READ ls og kan ikkje oppdaterast" - pol "Tabela '%-.192s' zostaa zablokowana przez READ i nie moe zosta zaktualizowana" - por "Tabela '%-.192s' foi travada com trava de leitura e no pode ser atualizada" - rum "Tabela '%-.192s' a fost locked cu un READ lock si nu poate fi actualizata" - rus " '%-.192s' READ lock " - serbian "Tabela '%-.192s' je zakljuana READ lock-om; iz nje se moe samo itati ali u nju se ne moe pisati" - slo "Tabuka '%-.192s' bola zamknut s READ a neme by zmenen" - spa "Tabla '%-.192s' fue trabada con un READ lock y no puede ser actualizada" - swe "Tabell '%-.192s' kan inte uppdateras emedan den r lst fr lsning" - ukr " '%-.192s' Ԧ , " -ER_TABLE_NOT_LOCKED - cze "Tabulka '%-.192s' nebyla zam-Bena s LOCK TABLES" - dan "Tabellen '%-.192s' var ikke lst med LOCK TABLES" - nla "Tabel '%-.192s' was niet gelocked met LOCK TABLES" - eng "Table '%-.192s' was not locked with LOCK TABLES" - jps "Table '%-.192s' LOCK TABLES ɂăbNĂ܂", - est "Tabel '%-.192s' ei ole lukustatud ksuga LOCK TABLES" - fre "Table '%-.192s' non verrouille: utilisez LOCK TABLES" - ger "Tabelle '%-.192s' wurde nicht mit LOCK TABLES gesperrt" - greek " '%-.192s' LOCK TABLES" - hun "A(z) '%-.192s' tabla nincs zarolva a LOCK TABLES-szel" - ita "Non e` stato impostato il lock per la tabella '%-.192s' con LOCK TABLES" - jpn "Table '%-.192s' LOCK TABLES ˤäƥåƤޤ" - kor "̺ '%-.192s' LOCK TABLES ʾҽϴ." - nor "Tabellen '%-.192s' var ikke lst med LOCK TABLES" - norwegian-ny "Tabellen '%-.192s' var ikkje lst med LOCK TABLES" - pol "Tabela '%-.192s' nie zostaa zablokowana poleceniem LOCK TABLES" - por "Tabela '%-.192s' no foi travada com LOCK TABLES" - rum "Tabela '%-.192s' nu a fost locked cu LOCK TABLES" - rus " '%-.192s' LOCK TABLES" - serbian "Tabela '%-.192s' nije bila zakljuana komandom 'LOCK TABLES'" - slo "Tabuka '%-.192s' nebola zamknut s LOCK TABLES" - spa "Tabla '%-.192s' no fue trabada con LOCK TABLES" - swe "Tabell '%-.192s' r inte lst med LOCK TABLES" - ukr " '%-.192s' LOCK TABLES" -ER_BLOB_CANT_HAVE_DEFAULT 42000 - cze "Blob polo-Bka '%-.192s' neme mt defaultn hodnotu" - dan "BLOB feltet '%-.192s' kan ikke have en standard vrdi" - nla "Blob veld '%-.192s' can geen standaardwaarde bevatten" - eng "BLOB/TEXT column '%-.192s' can't have a default value" - est "BLOB-tpi tulp '%-.192s' ei saa omada vaikevrtust" - fre "BLOB '%-.192s' ne peut avoir de valeur par dfaut" - ger "BLOB/TEXT-Feld '%-.192s' darf keinen Vorgabewert (DEFAULT) haben" - greek " Blob '%-.192s' (default value)" - hun "A(z) '%-.192s' blob objektumnak nem lehet alapertelmezett erteke" - ita "Il campo BLOB '%-.192s' non puo` avere un valore di default" - jpn "BLOB column '%-.192s' can't have a default value" - kor "BLOB Į '%-.192s' Ʈ ϴ." - nor "Blob feltet '%-.192s' kan ikke ha en standard verdi" - norwegian-ny "Blob feltet '%-.192s' kan ikkje ha ein standard verdi" - pol "Pole typu blob '%-.192s' nie moe mie domy?lnej warto?ci" - por "Coluna BLOB '%-.192s' no pode ter um valor padro (default)" - rum "Coloana BLOB '%-.192s' nu poate avea o valoare default" - rus " BLOB '%-.192s'" - serbian "BLOB kolona '%-.192s' ne moe imati default vrednost" - slo "Pole BLOB '%-.192s' neme ma implicitn hodnotu" - spa "Campo Blob '%-.192s' no puede tener valores patron" - swe "BLOB flt '%-.192s' kan inte ha ett DEFAULT-vrde" - ukr " BLOB '%-.192s' " -ER_WRONG_DB_NAME 42000 - cze "Nep-Bpustn jmno databze '%-.100s'" - dan "Ugyldigt database navn '%-.100s'" - nla "Databasenaam '%-.100s' is niet getoegestaan" - eng "Incorrect database name '%-.100s'" - jps "w肵 database '%-.100s' ԈĂ܂", - est "Vigane andmebaasi nimi '%-.100s'" - fre "Nom de base de donne illgal: '%-.100s'" - ger "Unerlaubter Datenbankname '%-.100s'" - greek " '%-.100s'" - hun "Hibas adatbazisnev: '%-.100s'" - ita "Nome database errato '%-.100s'" - jpn "ꤷ database ̾ '%-.100s' ְäƤޤ" - kor "'%-.100s' Ÿ̽ ̸ Ȯմϴ." - nor "Ugyldig database navn '%-.100s'" - norwegian-ny "Ugyldig database namn '%-.100s'" - pol "Niedozwolona nazwa bazy danych '%-.100s'" - por "Nome de banco de dados '%-.100s' incorreto" - rum "Numele bazei de date este incorect '%-.100s'" - rus " '%-.100s'" - serbian "Pogreno ime baze '%-.100s'" - slo "Neprpustn meno databzy '%-.100s'" - spa "Nombre de base de datos ilegal '%-.100s'" - swe "Felaktigt databasnamn '%-.100s'" - ukr "צ ' '%-.100s'" -ER_WRONG_TABLE_NAME 42000 - cze "Nep-Bpustn jmno tabulky '%-.100s'" - dan "Ugyldigt tabel navn '%-.100s'" - nla "Niet toegestane tabelnaam '%-.100s'" - eng "Incorrect table name '%-.100s'" - jps "w肵 table '%-.100s' ͂܂Ă܂", - est "Vigane tabeli nimi '%-.100s'" - fre "Nom de table illgal: '%-.100s'" - ger "Unerlaubter Tabellenname '%-.100s'" - greek " '%-.100s'" - hun "Hibas tablanev: '%-.100s'" - ita "Nome tabella errato '%-.100s'" - jpn "ꤷ table ̾ '%-.100s' ϤޤäƤޤ" - kor "'%-.100s' ̺ ̸ Ȯմϴ." - nor "Ugyldig tabell navn '%-.100s'" - norwegian-ny "Ugyldig tabell namn '%-.100s'" - pol "Niedozwolona nazwa tabeli '%-.100s'..." - por "Nome de tabela '%-.100s' incorreto" - rum "Numele tabelei este incorect '%-.100s'" - rus " '%-.100s'" - serbian "Pogreno ime tabele '%-.100s'" - slo "Neprpustn meno tabuky '%-.100s'" - spa "Nombre de tabla ilegal '%-.100s'" - swe "Felaktigt tabellnamn '%-.100s'" - ukr "צ ' æ '%-.100s'" -ER_TOO_BIG_SELECT 42000 - cze "Zadan-B SELECT by prochzel pli mnoho zznam a trval velmi dlouho. Zkontrolujte tvar WHERE a je-li SELECT v podku, pouijte SET SQL_BIG_SELECTS=1" - dan "SELECT ville undersge for mange poster og ville sandsynligvis tage meget lang tid. Undersg WHERE delen og brug SET SQL_BIG_SELECTS=1 hvis udtrykket er korrekt" - nla "Het SELECT-statement zou te veel records analyseren en dus veel tijd in beslagnemen. Kijk het WHERE-gedeelte van de query na en kies SET SQL_BIG_SELECTS=1 als het stament in orde is." - eng "The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay" - est "SELECT lause peab lbi vaatama suure hulga kirjeid ja vtaks tenoliselt liiga kaua aega. Tasub kontrollida WHERE klauslit ja vajadusel kasutada ksku SET SQL_BIG_SELECTS=1" - fre "SELECT va devoir examiner beaucoup d'enregistrements ce qui va prendre du temps. Vrifiez la clause WHERE et utilisez SET SQL_BIG_SELECTS=1 si SELECT se passe bien" - ger "Die Ausfhrung des SELECT wrde zu viele Datenstze untersuchen und wahrscheinlich sehr lange dauern. Bitte WHERE-Klausel berprfen und gegebenenfalls SET SQL_BIG_SELECTS=1 oder SET SQL_MAX_JOIN_SIZE=# verwenden" - greek " SELECT . WHERE SET SQL_BIG_SELECTS=1 SELECT " - hun "A SELECT tul sok rekordot fog megvizsgalni es nagyon sokaig fog tartani. Ellenorizze a WHERE-t es hasznalja a SET SQL_BIG_SELECTS=1 beallitast, ha a SELECT okay" - ita "La SELECT dovrebbe esaminare troppi record e usare troppo tempo. Controllare la WHERE e usa SET SQL_BIG_SELECTS=1 se e` tutto a posto." - kor "SELECT ɿ ʹ ڵ带 ã ð ҿ˴ϴ. WHERE ϰų, SELECT okǸ SET SQL_BIG_SELECTS=1 ɼ ϼ." - nor "SELECT ville underske for mange poster og ville sannsynligvis ta veldig lang tid. Undersk WHERE klausulen og bruk SET SQL_BIG_SELECTS=1 om SELECTen er korrekt" - norwegian-ny "SELECT ville underskje for mange postar og ville sannsynligvis ta veldig lang tid. Undersk WHERE klausulen og bruk SET SQL_BIG_SELECTS=1 om SELECTen er korrekt" - pol "Operacja SELECT bdzie dotyczya zbyt wielu rekordw i prawdopodobnie zajmie bardzo duo czasu. Sprawd warunek WHERE i uyj SQL_OPTION BIG_SELECTS=1 je?li operacja SELECT jest poprawna" - por "O SELECT examinaria registros demais e provavelmente levaria muito tempo. Cheque sua clusula WHERE e use SET SQL_BIG_SELECTS=1, se o SELECT estiver correto" - rum "SELECT-ul ar examina prea multe cimpuri si probabil ar lua prea mult timp; verifica clauza WHERE si foloseste SET SQL_BIG_SELECTS=1 daca SELECT-ul e okay" - rus " SELECT , , . WHERE, , , SET SQL_BIG_SELECTS=1" - serbian "Komanda 'SELECT' e ispitati previe slogova i potroiti previe vremena. Proverite va 'WHERE' filter i upotrebite 'SET OPTION SQL_BIG_SELECTS=1' ako elite ba ovakvu komandu" - slo "Zadan poiadavka SELECT by prechdzala prli mnoho zznamov a trvala by prli dlho. Skontrolujte tvar WHERE a ak je v poriadku, pouite SET SQL_BIG_SELECTS=1" - spa "El SELECT puede examinar muchos registros y probablemente con mucho tiempo. Verifique tu WHERE y usa SET SQL_BIG_SELECTS=1 si el SELECT esta correcto" - swe "Den angivna frgan skulle lsa mer n MAX_JOIN_SIZE rader. Kontrollera din WHERE och anvnd SET SQL_BIG_SELECTS=1 eller SET MAX_JOIN_SIZE=# ifall du vill hantera stora joins" - ukr " SELECT Ҧ Ӧ, , , . צ WHERE SET SQL_BIG_SELECTS=1, SELECT צ" -ER_UNKNOWN_ERROR - cze "Nezn-Bm chyba" - dan "Ukendt fejl" - nla "Onbekende Fout" - eng "Unknown error" - est "Tundmatu viga" - fre "Erreur inconnue" - ger "Unbekannter Fehler" - greek " " - hun "Ismeretlen hiba" - ita "Errore sconosciuto" - kor "˼ Դϴ." - nor "Ukjent feil" - norwegian-ny "Ukjend feil" - por "Erro desconhecido" - rum "Eroare unknown" - rus " " - serbian "Nepoznata greka" - slo "Neznm chyba" - spa "Error desconocido" - swe "Oidentifierat fel" - ukr "צ " -ER_UNKNOWN_PROCEDURE 42000 - cze "Nezn-Bm procedura %-.192s" - dan "Ukendt procedure %-.192s" - nla "Onbekende procedure %-.192s" - eng "Unknown procedure '%-.192s'" - est "Tundmatu protseduur '%-.192s'" - fre "Procdure %-.192s inconnue" - ger "Unbekannte Prozedur '%-.192s'" - greek " '%-.192s'" - hun "Ismeretlen eljaras: '%-.192s'" - ita "Procedura '%-.192s' sconosciuta" - kor "˼ ๮ : '%-.192s'" - nor "Ukjent prosedyre %-.192s" - norwegian-ny "Ukjend prosedyre %-.192s" - pol "Unkown procedure %-.192s" - por "'Procedure' '%-.192s' desconhecida" - rum "Procedura unknown '%-.192s'" - rus " '%-.192s'" - serbian "Nepoznata procedura '%-.192s'" - slo "Neznm procedra '%-.192s'" - spa "Procedimiento desconocido %-.192s" - swe "Oknd procedur: %-.192s" - ukr "צ '%-.192s'" -ER_WRONG_PARAMCOUNT_TO_PROCEDURE 42000 - cze "Chybn-B poet parametr procedury %-.192s" - dan "Forkert antal parametre til proceduren %-.192s" - nla "Foutief aantal parameters doorgegeven aan procedure %-.192s" - eng "Incorrect parameter count to procedure '%-.192s'" - est "Vale parameetrite hulk protseduurile '%-.192s'" - fre "Mauvais nombre de paramtres pour la procedure %-.192s" - ger "Falsche Parameterzahl fr Prozedur '%-.192s'" - greek " '%-.192s'" - hun "Rossz parameter a(z) '%-.192s'eljaras szamitasanal" - ita "Numero di parametri errato per la procedura '%-.192s'" - kor "'%-.192s' ๮ Ȯ Ķ" - nor "Feil parameter antall til prosedyren %-.192s" - norwegian-ny "Feil parameter tal til prosedyra %-.192s" - pol "Incorrect parameter count to procedure %-.192s" - por "Nmero de parmetros incorreto para a 'procedure' '%-.192s'" - rum "Procedura '%-.192s' are un numar incorect de parametri" - rus " '%-.192s'" - serbian "Pogrean broj parametara za proceduru '%-.192s'" - slo "Chybn poet parametrov procedry '%-.192s'" - spa "Equivocado parametro count para procedimiento %-.192s" - swe "Felaktigt antal parametrar till procedur %-.192s" - ukr " ˦˦ Ҧ '%-.192s'" -ER_WRONG_PARAMETERS_TO_PROCEDURE - cze "Chybn-B parametry procedury %-.192s" - dan "Forkert(e) parametre til proceduren %-.192s" - nla "Foutieve parameters voor procedure %-.192s" - eng "Incorrect parameters to procedure '%-.192s'" - est "Vigased parameetrid protseduurile '%-.192s'" - fre "Paramtre erron pour la procedure %-.192s" - ger "Falsche Parameter fr Prozedur '%-.192s'" - greek " '%-.192s'" - hun "Rossz parameter a(z) '%-.192s' eljarasban" - ita "Parametri errati per la procedura '%-.192s'" - kor "'%-.192s' ๮ Ȯ Ķ" - nor "Feil parametre til prosedyren %-.192s" - norwegian-ny "Feil parameter til prosedyra %-.192s" - pol "Incorrect parameters to procedure %-.192s" - por "Parmetros incorretos para a 'procedure' '%-.192s'" - rum "Procedura '%-.192s' are parametrii incorecti" - rus " '%-.192s'" - serbian "Pogreni parametri prosleeni proceduri '%-.192s'" - slo "Chybn parametre procedry '%-.192s'" - spa "Equivocados parametros para procedimiento %-.192s" - swe "Felaktiga parametrar till procedur %-.192s" - ukr " '%-.192s'" -ER_UNKNOWN_TABLE 42S02 - cze "Nezn-Bm tabulka '%-.192s' v %-.32s" - dan "Ukendt tabel '%-.192s' i %-.32s" - nla "Onbekende tabel '%-.192s' in %-.32s" - eng "Unknown table '%-.192s' in %-.32s" - est "Tundmatu tabel '%-.192s' %-.32s-s" - fre "Table inconnue '%-.192s' dans %-.32s" - ger "Unbekannte Tabelle '%-.192s' in '%-.32s'" - greek " '%-.192s' %-.32s" - hun "Ismeretlen tabla: '%-.192s' %-.32s-ban" - ita "Tabella '%-.192s' sconosciuta in %-.32s" - jpn "Unknown table '%-.192s' in %-.32s" - kor "˼ ̺ '%-.192s' (Ÿ̽ %-.32s)" - nor "Ukjent tabell '%-.192s' i %-.32s" - norwegian-ny "Ukjend tabell '%-.192s' i %-.32s" - pol "Unknown table '%-.192s' in %-.32s" - por "Tabela '%-.192s' desconhecida em '%-.32s'" - rum "Tabla '%-.192s' invalida in %-.32s" - rus " '%-.192s' %-.32s" - serbian "Nepoznata tabela '%-.192s' u '%-.32s'" - slo "Neznma tabuka '%-.192s' v %-.32s" - spa "Tabla desconocida '%-.192s' in %-.32s" - swe "Oknd tabell '%-.192s' i '%-.32s'" - ukr "צ '%-.192s' %-.32s" -ER_FIELD_SPECIFIED_TWICE 42000 - cze "Polo-Bka '%-.192s' je zadna dvakrt" - dan "Feltet '%-.192s' er anvendt to gange" - nla "Veld '%-.192s' is dubbel gespecificeerd" - eng "Column '%-.192s' specified twice" - est "Tulp '%-.192s' on mratletud topelt" - fre "Champ '%-.192s' spcifi deux fois" - ger "Feld '%-.192s' wurde zweimal angegeben" - greek " '%-.192s' " - hun "A(z) '%-.192s' mezot ketszer definialta" - ita "Campo '%-.192s' specificato 2 volte" - kor "Į '%-.192s' ι ǵǾ ϴ." - nor "Feltet '%-.192s' er spesifisert to ganger" - norwegian-ny "Feltet '%-.192s' er spesifisert to gangar" - pol "Field '%-.192s' specified twice" - por "Coluna '%-.192s' especificada duas vezes" - rum "Coloana '%-.192s' specificata de doua ori" - rus " '%-.192s' " - serbian "Kolona '%-.192s' je navedena dva puta" - slo "Pole '%-.192s' je zadan dvakrt" - spa "Campo '%-.192s' especificado dos veces" - swe "Flt '%-.192s' r redan anvnt" - ukr " '%-.192s' צަ" -ER_INVALID_GROUP_FUNC_USE - cze "Nespr-Bvn pouit funkce group" - dan "Forkert brug af grupperings-funktion" - nla "Ongeldig gebruik van GROUP-functie" - eng "Invalid use of group function" - est "Vigane grupeerimisfunktsiooni kasutus" - fre "Utilisation invalide de la clause GROUP" - ger "Falsche Verwendung einer Gruppierungsfunktion" - greek " group function" - hun "A group funkcio ervenytelen hasznalata" - ita "Uso non valido di una funzione di raggruppamento" - kor "߸ ׷ Լ Ͽϴ." - por "Uso invlido de funo de agrupamento (GROUP)" - rum "Folosire incorecta a functiei group" - rus " " - serbian "Pogrena upotreba 'GROUP' funkcije" - slo "Nesprvne pouitie funkcie GROUP" - spa "Invalido uso de funcin en grupo" - swe "Felaktig anvndning av SQL grupp function" - ukr " æ " -ER_UNSUPPORTED_EXTENSION 42000 - cze "Tabulka '%-.192s' pou-Bv rozen, kter v tto verzi MySQL nen" - dan "Tabellen '%-.192s' bruger et filtypenavn som ikke findes i denne MySQL version" - nla "Tabel '%-.192s' gebruikt een extensie, die niet in deze MySQL-versie voorkomt." - eng "Table '%-.192s' uses an extension that doesn't exist in this MySQL version" - est "Tabel '%-.192s' kasutab laiendust, mis ei eksisteeri antud MySQL versioonis" - fre "Table '%-.192s' : utilise une extension invalide pour cette version de MySQL" - ger "Tabelle '%-.192s' verwendet eine Erweiterung, die in dieser MySQL-Version nicht verfgbar ist" - greek " '%-.192s' extension MySQL" - hun "A(z) '%-.192s' tabla olyan bovitest hasznal, amely nem letezik ebben a MySQL versioban." - ita "La tabella '%-.192s' usa un'estensione che non esiste in questa versione di MySQL" - kor "̺ '%-.192s' Ȯ ̿ MySQL ʽϴ." - nor "Table '%-.192s' uses a extension that doesn't exist in this MySQL version" - norwegian-ny "Table '%-.192s' uses a extension that doesn't exist in this MySQL version" - pol "Table '%-.192s' uses a extension that doesn't exist in this MySQL version" - por "Tabela '%-.192s' usa uma extenso que no existe nesta verso do MySQL" - rum "Tabela '%-.192s' foloseste o extensire inexistenta in versiunea curenta de MySQL" - rus " '%-.192s' , MySQL" - serbian "Tabela '%-.192s' koristi ekstenziju koje ne postoji u ovoj verziji MySQL-a" - slo "Tabuka '%-.192s' pouva rozrenie, ktor v tejto verzii MySQL nie je" - spa "Tabla '%-.192s' usa una extensin que no existe en esta MySQL versin" - swe "Tabell '%-.192s' har en extension som inte finns i denna version av MySQL" - ukr " '%-.192s' դ , դ æ Ӧ MySQL" -ER_TABLE_MUST_HAVE_COLUMNS 42000 - cze "Tabulka mus-B mt alespo jeden sloupec" - dan "En tabel skal have mindst een kolonne" - nla "Een tabel moet minstens 1 kolom bevatten" - eng "A table must have at least 1 column" - jps "e[u͍Œ 1 ‚ column Kvł", - est "Tabelis peab olema vhemalt ks tulp" - fre "Une table doit comporter au moins une colonne" - ger "Eine Tabelle muss mindestens eine Spalte besitzen" - greek " " - hun "A tablanak legalabb egy oszlopot tartalmazni kell" - ita "Una tabella deve avere almeno 1 colonna" - jpn "ơ֥Ϻ 1 Ĥ column ɬפǤ" - kor "ϳ ̺  ϳ Į Ͽ մϴ." - por "Uma tabela tem que ter pelo menos uma (1) coluna" - rum "O tabela trebuie sa aiba cel putin o coloana" - rus " " - serbian "Tabela mora imati najmanje jednu kolonu" - slo "Tabuka mus ma aspo 1 pole" - spa "Una tabla debe tener al menos 1 columna" - swe "Tabeller mste ha minst 1 kolumn" - ukr " " -ER_RECORD_FILE_FULL - cze "Tabulka '%-.192s' je pln-B" - dan "Tabellen '%-.192s' er fuld" - nla "De tabel '%-.192s' is vol" - eng "The table '%-.192s' is full" - jps "table '%-.192s' ͂ςł", - est "Tabel '%-.192s' on tis" - fre "La table '%-.192s' est pleine" - ger "Tabelle '%-.192s' ist voll" - greek " '%-.192s' " - hun "A '%-.192s' tabla megtelt" - ita "La tabella '%-.192s' e` piena" - jpn "table '%-.192s' ϤäѤǤ" - kor "̺ '%-.192s' fullϴ. " - por "Tabela '%-.192s' est cheia" - rum "Tabela '%-.192s' e plina" - rus " '%-.192s' " - serbian "Tabela '%-.192s' je popunjena do kraja" - slo "Tabuka '%-.192s' je pln" - spa "La tabla '%-.192s' est llena" - swe "Tabellen '%-.192s' r full" - ukr " '%-.192s' " -ER_UNKNOWN_CHARACTER_SET 42000 - cze "Nezn-Bm znakov sada: '%-.64s'" - dan "Ukendt tegnst: '%-.64s'" - nla "Onbekende character set: '%-.64s'" - eng "Unknown character set: '%-.64s'" - jps "character set '%-.64s' ̓T|[gĂ܂", - est "Vigane kooditabel '%-.64s'" - fre "Jeu de caractres inconnu: '%-.64s'" - ger "Unbekannter Zeichensatz: '%-.64s'" - greek " character set: '%-.64s'" - hun "Ervenytelen karakterkeszlet: '%-.64s'" - ita "Set di caratteri '%-.64s' sconosciuto" - jpn "character set '%-.64s' ϥݡȤƤޤ" - kor "˼ Set: '%-.64s'" - por "Conjunto de caracteres '%-.64s' desconhecido" - rum "Set de caractere invalid: '%-.64s'" - rus " '%-.64s'" - serbian "Nepoznati karakter-set: '%-.64s'" - slo "Neznma znakov sada: '%-.64s'" - spa "Juego de caracteres desconocido: '%-.64s'" - swe "Oknd teckenuppsttning: '%-.64s'" - ukr "צ : '%-.64s'" -ER_TOO_MANY_TABLES - cze "P-Bli mnoho tabulek, MySQL jich me mt v joinu jen %d" - dan "For mange tabeller. MySQL kan kun bruge %d tabeller i et join" - nla "Teveel tabellen. MySQL kan slechts %d tabellen in een join bevatten" - eng "Too many tables; MySQL can only use %d tables in a join" - jps "e[u܂; MySQL can only use %d tables in a join", - est "Liiga palju tabeleid. MySQL suudab JOINiga hendada kuni %d tabelit" - fre "Trop de tables. MySQL ne peut utiliser que %d tables dans un JOIN" - ger "Zu viele Tabellen. MySQL kann in einem Join maximal %d Tabellen verwenden" - greek " . MySQL %d join" - hun "Tul sok tabla. A MySQL csak %d tablat tud kezelni osszefuzeskor" - ita "Troppe tabelle. MySQL puo` usare solo %d tabelle in una join" - jpn "ơ֥뤬¿ޤ; MySQL can only use %d tables in a join" - kor "ʹ ̺ JoinǾϴ. MySQL JOIN %d ̺ ֽϴ." - por "Tabelas demais. O MySQL pode usar somente %d tabelas em uma juno (JOIN)" - rum "Prea multe tabele. MySQL nu poate folosi mai mult de %d tabele intr-un join" - rus " . MySQL %d " - serbian "Previe tabela. MySQL moe upotrebiti maksimum %d tabela pri 'JOIN' operaciji" - slo "Prli mnoho tabuliek. MySQL me poui len %d v JOIN-e" - spa "Muchas tablas. MySQL solamente puede usar %d tablas en un join" - swe "Fr mnga tabeller. MySQL can ha hgst %d tabeller i en och samma join" - ukr " . MySQL %d 'Φ" -ER_TOO_MANY_FIELDS - cze "P-Bli mnoho poloek" - dan "For mange felter" - nla "Te veel velden" - eng "Too many columns" - jps "column ܂", - est "Liiga palju tulpasid" - fre "Trop de champs" - ger "Zu viele Felder" - greek " " - hun "Tul sok mezo" - ita "Troppi campi" - jpn "column ¿ޤ" - kor "Į ʹ ϴ." - por "Colunas demais" - rum "Prea multe coloane" - rus " " - serbian "Previe kolona" - slo "Prli mnoho pol" - spa "Muchos campos" - swe "Fr mnga flt" - ukr " æ" -ER_TOO_BIG_ROWSIZE 42000 - cze "-Bdek je pli velk. Maximln velikost dku, nepotaje poloky blob, je %ld. Muste zmnit nkter poloky na blob" - dan "For store poster. Max post strrelse, uden BLOB's, er %ld. Du m lave nogle felter til BLOB's" - nla "Rij-grootte is groter dan toegestaan. Maximale rij grootte, blobs niet meegeteld, is %ld. U dient sommige velden in blobs te veranderen." - eng "Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some columns to TEXT or BLOBs" - jps "row size 傫܂. BLOB ܂܂Ȃꍇ row size ̍ő %ld ł. ‚ field BLOB ɕςĂ.", - est "Liiga pikk kirje. Kirje maksimumpikkus arvestamata BLOB-tpi vlju on %ld. Muuda mned vljad BLOB-tpi vljadeks" - fre "Ligne trop grande. Le taille maximale d'une ligne, sauf les BLOBs, est %ld. Changez le type de quelques colonnes en BLOB" - ger "Zeilenlnge zu gro. Die maximale Zeilenlnge fr den verwendeten Tabellentyp (ohne BLOB-Felder) betrgt %ld. Einige Felder mssen in BLOB oder TEXT umgewandelt werden" - greek " . , blobs, %ld. blobs" - hun "Tul nagy sormeret. A maximalis sormeret (nem szamolva a blob objektumokat) %ld. Nehany mezot meg kell valtoztatnia" - ita "Riga troppo grande. La massima grandezza di una riga, non contando i BLOB, e` %ld. Devi cambiare alcuni campi in BLOB" - jpn "row size 礭ޤ. BLOB ޤޤʤ row size κ %ld Ǥ. Ĥ field BLOB ѤƤ." - kor "ʹ ū row Դϴ. BLOB ʰ ִ row %ldԴϴ. 󸶰 ʵ BLOB ٲټž ڱ.." - por "Tamanho de linha grande demais. O mximo tamanho de linha, no contando BLOBs, %ld. Voc tem que mudar alguns campos para BLOBs" - rum "Marimea liniei (row) prea mare. Marimea maxima a liniei, excluzind BLOB-urile este de %ld. Trebuie sa schimbati unele cimpuri in BLOB-uri" - rus " . , BLOB, - %ld. , BLOB" - serbian "Prevelik slog. Maksimalna veliina sloga, ne raunajui BLOB polja, je %ld. Trebali bi da promenite tip nekih polja u BLOB" - slo "Riadok je prli vek. Maximlna vekos riadku, okrem 'BLOB', je %ld. Muste zmeni niektor poloky na BLOB" - spa "Tamao de lnea muy grande. Mximo tamao de lnea, no contando blob, es %ld. Tu tienes que cambiar algunos campos para blob" - swe "Fr stor total radlngd. Den hgst tilltna radlngden, frutom BLOBs, r %ld. ndra ngra av dina flt till BLOB" - ukr " . ¦ , BLOB, %ld. Ҧ ˦ æ BLOB" -ER_STACK_OVERRUN - cze "P-Beteen zsobnku threadu: pouito %ld z %ld. Pouijte 'mysqld -O thread_stack=#' k zadn vtho zsobnku" - dan "Thread stack brugt: Brugt: %ld af en %ld stak. Brug 'mysqld -O thread_stack=#' for at allokere en strre stak om ndvendigt" - nla "Thread stapel overrun: Gebruikte: %ld van een %ld stack. Gebruik 'mysqld -O thread_stack=#' om een grotere stapel te definieren (indien noodzakelijk)." - eng "Thread stack overrun: Used: %ld of a %ld stack. Use 'mysqld -O thread_stack=#' to specify a bigger stack if needed" - jps "Thread stack overrun: Used: %ld of a %ld stack. X^bN𑽂̈Ƃ肽ꍇA'mysqld -O thread_stack=#' Ǝw肵Ă", - fre "Dbordement de la pile des tches (Thread stack). Utilises: %ld pour une pile de %ld. Essayez 'mysqld -O thread_stack=#' pour indiquer une plus grande valeur" - ger "Thread-Stack-berlauf. Benutzt: %ld von %ld Stack. 'mysqld -O thread_stack=#' verwenden, um bei Bedarf einen greren Stack anzulegen" - greek "Stack overrun thread: Used: %ld of a %ld stack. 'mysqld -O thread_stack=#' stack " - hun "Thread verem tullepes: Used: %ld of a %ld stack. Hasznalja a 'mysqld -O thread_stack=#' nagyobb verem definialasahoz" - ita "Thread stack overrun: Usati: %ld di uno stack di %ld. Usa 'mysqld -O thread_stack=#' per specificare uno stack piu` grande." - jpn "Thread stack overrun: Used: %ld of a %ld stack. åΰ¿Ȥꤿ硢'mysqld -O thread_stack=#' ȻꤷƤ" - kor " ƽϴ. : %ld : %ld. ʿ ū Ҷ 'mysqld -O thread_stack=#' ϼ" - por "Estouro da pilha do 'thread'. Usados %ld de uma pilha de %ld. Use 'mysqld -O thread_stack=#' para especificar uma pilha maior, se necessrio" - rum "Stack-ul thread-ului a fost depasit (prea mic): Folositi: %ld intr-un stack de %ld. Folositi 'mysqld -O thread_stack=#' ca sa specifici un stack mai mare" - rus " : : %ld %ld . 'mysqld -O thread_stack=#' , " - serbian "Prepisivanje thread stack-a: Upotrebljeno: %ld od %ld stack memorije. Upotrebite 'mysqld -O thread_stack=#' da navedete vei stack ako je potrebno" - slo "Preteenie zsobnku vlkna: pouit: %ld z %ld. Pouite 'mysqld -O thread_stack=#' k zadaniu vieho zsobnka" - spa "Sobrecarga de la pila de thread: Usada: %ld de una %ld pila. Use 'mysqld -O thread_stack=#' para especificar una mayor pila si necesario" - swe "Trdstacken tog slut: Har anvnt %ld av %ld bytes. Anvnd 'mysqld -O thread_stack=#' ifall du behver en strre stack" - ukr " Ǧ : : %ld %ld. 'mysqld -O thread_stack=#' ¦ , Ȧ" -ER_WRONG_OUTER_JOIN 42000 - cze "V OUTER JOIN byl nalezen k-Bov odkaz. Provte ON podmnky" - dan "Krydsreferencer fundet i OUTER JOIN; check dine ON conditions" - nla "Gekruiste afhankelijkheid gevonden in OUTER JOIN. Controleer uw ON-conditions" - eng "Cross dependency found in OUTER JOIN; examine your ON conditions" - est "Ristsltuvus OUTER JOIN klauslis. Kontrolli oma ON tingimusi" - fre "Dpendance croise dans une clause OUTER JOIN. Vrifiez la condition ON" - ger "OUTER JOIN enthlt fehlerhafte Abhngigkeiten. In ON verwendete Bedingungen berprfen" - greek "Cross dependency OUTER JOIN. ON" - hun "Keresztfuggoseg van az OUTER JOIN-ban. Ellenorizze az ON felteteleket" - ita "Trovata una dipendenza incrociata nella OUTER JOIN. Controlla le condizioni ON" - por "Dependncia cruzada encontrada em juno externa (OUTER JOIN); examine as condies utilizadas nas clusulas 'ON'" - rum "Dependinta incrucisata (cross dependency) gasita in OUTER JOIN. Examinati conditiile ON" - rus " OUTER JOIN . ON" - serbian "Unakrsna zavisnost pronaena u komandi 'OUTER JOIN'. Istraite vae 'ON' uslove" - slo "V OUTER JOIN bol njden krov odkaz. Skontrolujte podmienky ON" - spa "Dependencia cruzada encontrada en OUTER JOIN. Examine su condicin ON" - swe "Felaktigt referens i OUTER JOIN. Kontrollera ON-uttrycket" - ukr " Φ OUTER JOIN. צ ON" -ER_NULL_COLUMN_IN_INDEX 42000 - eng "Table handler doesn't support NULL in given index. Please change column '%-.192s' to be NOT NULL or use another handler" - swe "Tabell hanteraren kan inte indexera NULL kolumner fr den givna index typen. ndra '%-.192s' till NOT NULL eller anvnd en annan hanterare" -ER_CANT_FIND_UDF - cze "Nemohu na-Bst funkci '%-.192s'" - dan "Kan ikke lse funktionen '%-.192s'" - nla "Kan functie '%-.192s' niet laden" - eng "Can't load function '%-.192s'" - jps "function '%-.192s' [hł܂", - est "Ei suuda avada funktsiooni '%-.192s'" - fre "Imposible de charger la fonction '%-.192s'" - ger "Kann Funktion '%-.192s' nicht laden" - greek " load '%-.192s'" - hun "A(z) '%-.192s' fuggveny nem toltheto be" - ita "Impossibile caricare la funzione '%-.192s'" - jpn "function '%-.192s' ɤǤޤ" - kor "'%-.192s' Լ ε ߽ϴ." - por "No pode carregar a funo '%-.192s'" - rum "Nu pot incarca functia '%-.192s'" - rus " '%-.192s'" - serbian "Ne mogu da uitam funkciju '%-.192s'" - slo "Nemem nata funkciu '%-.192s'" - spa "No puedo cargar funcin '%-.192s'" - swe "Kan inte ladda funktionen '%-.192s'" - ukr " æ '%-.192s'" -ER_CANT_INITIALIZE_UDF - cze "Nemohu inicializovat funkci '%-.192s'; %-.80s" - dan "Kan ikke starte funktionen '%-.192s'; %-.80s" - nla "Kan functie '%-.192s' niet initialiseren; %-.80s" - eng "Can't initialize function '%-.192s'; %-.80s" - jps "function '%-.192s' ł܂; %-.80s", - est "Ei suuda algvrtustada funktsiooni '%-.192s'; %-.80s" - fre "Impossible d'initialiser la fonction '%-.192s'; %-.80s" - ger "Kann Funktion '%-.192s' nicht initialisieren: %-.80s" - greek " '%-.192s'; %-.80s" - hun "A(z) '%-.192s' fuggveny nem inicializalhato; %-.80s" - ita "Impossibile inizializzare la funzione '%-.192s'; %-.80s" - jpn "function '%-.192s' Ǥޤ; %-.80s" - kor "'%-.192s' Լ ʱȭ ߽ϴ.; %-.80s" - por "No pode inicializar a funo '%-.192s' - '%-.80s'" - rum "Nu pot initializa functia '%-.192s'; %-.80s" - rus " '%-.192s'; %-.80s" - serbian "Ne mogu da inicijalizujem funkciju '%-.192s'; %-.80s" - slo "Nemem inicializova funkciu '%-.192s'; %-.80s" - spa "No puedo inicializar funcin '%-.192s'; %-.80s" - swe "Kan inte initialisera funktionen '%-.192s'; '%-.80s'" - ukr " Φæ̦ æ '%-.192s'; %-.80s" -ER_UDF_NO_PATHS - cze "Pro sd-Blenou knihovnu nejsou povoleny cesty" - dan "Angivelse af sti ikke tilladt for delt bibliotek" - nla "Geen pad toegestaan voor shared library" - eng "No paths allowed for shared library" - jps "shared library ւ̃pXʂĂ܂", - est "Teegi nimes ei tohi olla kataloogi" - fre "Chemin interdit pour les bibliothques partages" - ger "Keine Pfade gestattet fr Shared Library" - greek " paths shared library" - hun "Nincs ut a megosztott konyvtarakhoz (shared library)" - ita "Non sono ammessi path per le librerie condivisa" - jpn "shared library ؤΥѥ̤äƤޤ" - kor " ̹ н ǵǾ ʽϴ." - por "No h caminhos (paths) permitidos para biblioteca compartilhada" - rum "Nici un paths nu e permis pentru o librarie shared" - rus " " - serbian "Ne postoje dozvoljene putanje do share-ovane biblioteke" - slo "Neprpustn iadne cesty k zdieanej kninici" - spa "No pasos permitidos para librarias conjugadas" - swe "Man fr inte ange skvg fr dynamiska bibliotek" - ukr " Ԧ Ħ ¦̦" -ER_UDF_EXISTS - cze "Funkce '%-.192s' ji-B existuje" - dan "Funktionen '%-.192s' findes allerede" - nla "Functie '%-.192s' bestaat reeds" - eng "Function '%-.192s' already exists" - jps "Function '%-.192s' ͊ɒ`Ă܂", - est "Funktsioon '%-.192s' juba eksisteerib" - fre "La fonction '%-.192s' existe dj" - ger "Funktion '%-.192s' existiert schon" - greek " '%-.192s' " - hun "A '%-.192s' fuggveny mar letezik" - ita "La funzione '%-.192s' esiste gia`" - jpn "Function '%-.192s' ϴƤޤ" - kor "'%-.192s' Լ ̹ մϴ." - por "Funo '%-.192s' j existe" - rum "Functia '%-.192s' exista deja" - rus " '%-.192s' " - serbian "Funkcija '%-.192s' ve postoji" - slo "Funkcia '%-.192s' u existuje" - spa "Funcin '%-.192s' ya existe" - swe "Funktionen '%-.192s' finns redan" - ukr "æ '%-.192s' դ" -ER_CANT_OPEN_LIBRARY - cze "Nemohu otev-Bt sdlenou knihovnu '%-.192s' (errno: %d %-.128s)" - dan "Kan ikke bne delt bibliotek '%-.192s' (errno: %d %-.128s)" - nla "Kan shared library '%-.192s' niet openen (Errcode: %d %-.128s)" - eng "Can't open shared library '%-.192s' (errno: %d %-.128s)" - jps "shared library '%-.192s' Jł܂ (errno: %d %-.128s)", - est "Ei suuda avada jagatud teeki '%-.192s' (veakood: %d %-.128s)" - fre "Impossible d'ouvrir la bibliothque partage '%-.192s' (errno: %d %-.128s)" - ger "Kann Shared Library '%-.192s' nicht ffnen (Fehler: %d %-.128s)" - greek " shared library '%-.192s' ( : %d %-.128s)" - hun "A(z) '%-.192s' megosztott konyvtar nem hasznalhato (hibakod: %d %-.128s)" - ita "Impossibile aprire la libreria condivisa '%-.192s' (errno: %d %-.128s)" - jpn "shared library '%-.192s' 򳫤Ǥޤ (errno: %d %-.128s)" - kor "'%-.192s' ̹ ϴ.(ȣ: %d %-.128s)" - nor "Can't open shared library '%-.192s' (errno: %d %-.128s)" - norwegian-ny "Can't open shared library '%-.192s' (errno: %d %-.128s)" - pol "Can't open shared library '%-.192s' (errno: %d %-.128s)" - por "No pode abrir biblioteca compartilhada '%-.192s' (erro no. %d '%-.128s')" - rum "Nu pot deschide libraria shared '%-.192s' (Eroare: %d %-.128s)" - rus " '%-.192s' (: %d %-.128s)" - serbian "Ne mogu da otvorim share-ovanu biblioteku '%-.192s' (errno: %d %-.128s)" - slo "Nemem otvori zdiean kninicu '%-.192s' (chybov kd: %d %-.128s)" - spa "No puedo abrir libraria conjugada '%-.192s' (errno: %d %-.128s)" - swe "Kan inte ppna det dynamiska biblioteket '%-.192s' (Felkod: %d %-.128s)" - ukr " צ Ħ ¦̦ '%-.192s' (: %d %-.128s)" -ER_CANT_FIND_DL_ENTRY - cze "Nemohu naj-Bt funkci '%-.128s' v knihovn" - dan "Kan ikke finde funktionen '%-.128s' i bibliotek" - nla "Kan functie '%-.128s' niet in library vinden" - eng "Can't find symbol '%-.128s' in library" - jps "function '%-.128s' Cu[Ɍt鎖ł܂", - est "Ei leia funktsiooni '%-.128s' antud teegis" - fre "Impossible de trouver la fonction '%-.128s' dans la bibliothque" - ger "Kann Funktion '%-.128s' in der Library nicht finden" - greek " '%-.128s' " - hun "A(z) '%-.128s' fuggveny nem talalhato a konyvtarban" - ita "Impossibile trovare la funzione '%-.128s' nella libreria" - jpn "function '%-.128s' 饤֥꡼˸դǤޤ" - kor "̹ '%-.128s' Լ ã ϴ." - por "No pode encontrar a funo '%-.128s' na biblioteca" - rum "Nu pot gasi functia '%-.128s' in libraria" - rus " '%-.128s' " - serbian "Ne mogu da pronadjem funkciju '%-.128s' u biblioteci" - slo "Nemem njs funkciu '%-.128s' v kninici" - spa "No puedo encontrar funcin '%-.128s' en libraria" - swe "Hittar inte funktionen '%-.128s' in det dynamiska biblioteket" - ukr " æ '%-.128s' ¦̦æ" -ER_FUNCTION_NOT_DEFINED - cze "Funkce '%-.192s' nen-B definovna" - dan "Funktionen '%-.192s' er ikke defineret" - nla "Functie '%-.192s' is niet gedefinieerd" - eng "Function '%-.192s' is not defined" - jps "Function '%-.192s' ͒`Ă܂", - est "Funktsioon '%-.192s' ei ole defineeritud" - fre "La fonction '%-.192s' n'est pas dfinie" - ger "Funktion '%-.192s' ist nicht definiert" - greek " '%-.192s' " - hun "A '%-.192s' fuggveny nem definialt" - ita "La funzione '%-.192s' non e` definita" - jpn "Function '%-.192s' Ƥޤ" - kor "'%-.192s' Լ ǵǾ ʽϴ." - por "Funo '%-.192s' no est definida" - rum "Functia '%-.192s' nu e definita" - rus " '%-.192s' " - serbian "Funkcija '%-.192s' nije definisana" - slo "Funkcia '%-.192s' nie je definovan" - spa "Funcin '%-.192s' no est definida" - swe "Funktionen '%-.192s' r inte definierad" - ukr "æ '%-.192s' " -ER_HOST_IS_BLOCKED - cze "Stroj '%-.64s' je zablokov-Bn kvli mnoha chybm pi pipojovn. Odblokujete pouitm 'mysqladmin flush-hosts'" - dan "Vrten '%-.64s' er blokeret p grund af mange fejlforesprgsler. Ls op med 'mysqladmin flush-hosts'" - nla "Host '%-.64s' is geblokkeeerd vanwege te veel verbindings fouten. Deblokkeer met 'mysqladmin flush-hosts'" - eng "Host '%-.64s' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'" - jps "Host '%-.64s' many connection error ̂߁Aۂ܂. 'mysqladmin flush-hosts' ʼnĂ", - est "Masin '%-.64s' on blokeeritud hulgaliste hendusvigade tttu. Blokeeringu saab thistada 'mysqladmin flush-hosts' ksuga" - fre "L'hte '%-.64s' est bloqu cause d'un trop grand nombre d'erreur de connexion. Dbloquer le par 'mysqladmin flush-hosts'" - ger "Host '%-.64s' blockiert wegen zu vieler Verbindungsfehler. Aufheben der Blockierung mit 'mysqladmin flush-hosts'" - greek " '%-.64s' . 'mysqladmin flush-hosts'" - hun "A '%-.64s' host blokkolodott, tul sok kapcsolodasi hiba miatt. Hasznalja a 'mysqladmin flush-hosts' parancsot" - ita "Sistema '%-.64s' bloccato a causa di troppi errori di connessione. Per sbloccarlo: 'mysqladmin flush-hosts'" - jpn "Host '%-.64s' many connection error Τᡢݤޤ. 'mysqladmin flush-hosts' DzƤ" - kor "ʹ Ͽ ȣƮ '%-.64s' Ǿϴ. 'mysqladmin flush-hosts' ̿Ͽ ϼ" - por "'Host' '%-.64s' est bloqueado devido a muitos erros de conexo. Desbloqueie com 'mysqladmin flush-hosts'" - rum "Host-ul '%-.64s' e blocat din cauza multelor erori de conectie. Poti deploca folosind 'mysqladmin flush-hosts'" - rus " '%-.64s' - . 'mysqladmin flush-hosts'" - serbian "Host '%-.64s' je blokiran zbog previe greaka u konekciji. Moete ga odblokirati pomou komande 'mysqladmin flush-hosts'" - spa "Servidor '%-.64s' est bloqueado por muchos errores de conexin. Desbloquear con 'mysqladmin flush-hosts'" - swe "Denna dator, '%-.64s', r blockerad pga mnga felaktig paket. Gr 'mysqladmin flush-hosts' fr att ta bort alla blockeringarna" - ukr " '%-.64s' ϧ ˦Ԧ '. 'mysqladmin flush-hosts'" -ER_HOST_NOT_PRIVILEGED - cze "Stroj '%-.64s' nem-B povoleno se k tomuto MySQL serveru pipojit" - dan "Vrten '%-.64s' kan ikke tilkoble denne MySQL-server" - nla "Het is host '%-.64s' is niet toegestaan verbinding te maken met deze MySQL server" - eng "Host '%-.64s' is not allowed to connect to this MySQL server" - jps "Host '%-.64s' MySQL server ɐڑ‚Ă܂", - est "Masinal '%-.64s' puudub ligips sellele MySQL serverile" - fre "Le hte '%-.64s' n'est pas authoris se connecter ce serveur MySQL" - ger "Host '%-.64s' hat keine Berechtigung, sich mit diesem MySQL-Server zu verbinden" - greek " '%-.64s' MySQL server" - hun "A '%-.64s' host szamara nem engedelyezett a kapcsolodas ehhez a MySQL szerverhez" - ita "Al sistema '%-.64s' non e` consentita la connessione a questo server MySQL" - jpn "Host '%-.64s' MySQL server ³ĤƤޤ" - kor "'%-.64s' ȣƮ MySQL 㰡 ߽ϴ." - por "'Host' '%-.64s' no tem permisso para se conectar com este servidor MySQL" - rum "Host-ul '%-.64s' nu este permis a se conecta la aceste server MySQL" - rus " '%-.64s' MySQL" - serbian "Host-u '%-.64s' nije dozvoljeno da se konektuje na ovaj MySQL server" - spa "Servidor '%-.64s' no est permitido para conectar con este servidor MySQL" - swe "Denna dator, '%-.64s', har inte privileger att anvnda denna MySQL server" - ukr " '%-.64s' ' MySQL" -ER_PASSWORD_ANONYMOUS_USER 42000 - cze "Pou-Bvte MySQL jako anonymn uivatel a anonymn uivatel nemaj povoleno mnit hesla" - dan "Du bruger MySQL som anonym bruger. Anonyme brugere m ikke ndre adgangskoder" - nla "U gebruikt MySQL als anonieme gebruiker en deze mogen geen wachtwoorden wijzigen" - eng "You are using MySQL as an anonymous user and anonymous users are not allowed to change passwords" - jps "MySQL anonymous users ŎgpĂԂł́ApX[h̕ύX͂ł܂", - est "Te kasutate MySQL-i anonmse kasutajana, kelledel pole parooli muutmise igust" - fre "Vous utilisez un utilisateur anonyme et les utilisateurs anonymes ne sont pas autoriss changer les mots de passe" - ger "Sie benutzen MySQL als anonymer Benutzer und drfen daher keine Passwrter ndern" - greek " MySQL anonymous user passwords " - hun "Nevtelen (anonymous) felhasznalokent nem negedelyezett a jelszovaltoztatas" - ita "Impossibile cambiare la password usando MySQL come utente anonimo" - jpn "MySQL anonymous users ǻѤƤ֤ǤϡѥɤѹϤǤޤ" - kor " MySQL ͸ ڷ ϼ̽ϴ.͸ ڴ ȣ ϴ." - por "Voc est usando o MySQL como usurio annimo e usurios annimos no tm permisso para mudar senhas" - rum "Dumneavoastra folositi MySQL ca un utilizator anonim si utilizatorii anonimi nu au voie sa schime parolele" - rus " MySQL , " - serbian "Vi koristite MySQL kao anonimni korisnik a anonimnim korisnicima nije dozvoljeno da menjaju lozinke" - spa "Tu ests usando MySQL como un usuario anonimo y usuarios anonimos no tienen permiso para cambiar las claves" - swe "Du anvnder MySQL som en anonym anvndare och som sdan fr du inte ndra ditt lsenord" - ukr " դ MySQL Φ , ͦ ̦" -ER_PASSWORD_NOT_ALLOWED 42000 - cze "Na zm-Bnu hesel ostatnm muste mt prvo provst update tabulek v databzi mysql" - dan "Du skal have tilladelse til at opdatere tabeller i MySQL databasen for at ndre andres adgangskoder" - nla "U moet tabel update priveleges hebben in de mysql database om wachtwoorden voor anderen te mogen wijzigen" - eng "You must have privileges to update tables in the mysql database to be able to change passwords for others" - jps "̃[U[̃pX[hύX邽߂ɂ, mysql f[^x[Xɑ΂ update ̋‚Ȃ΂Ȃ܂.", - est "Teiste paroolide muutmiseks on nutav tabelite muutmisigus 'mysql' andmebaasis" - fre "Vous devez avoir le privilge update sur les tables de la base de donne mysql pour pouvoir changer les mots de passe des autres" - ger "Sie bentigen die Berechtigung zum Aktualisieren von Tabellen in der Datenbank 'mysql', um die Passwrter anderer Benutzer ndern zu knnen" - greek " (update) mysql passwords " - hun "Onnek tabla-update joggal kell rendelkeznie a mysql adatbazisban masok jelszavanak megvaltoztatasahoz" - ita "E` necessario il privilegio di update sulle tabelle del database mysql per cambiare le password per gli altri utenti" - jpn "¾Υ桼Υѥɤѹ뤿ˤ, mysql ǡ١Ф update εĤʤФʤޤ." - kor " ٸڵ ȣ ֵ Ÿ̽ մϴ." - por "Voc deve ter privilgios para atualizar tabelas no banco de dados mysql para ser capaz de mudar a senha de outros" - rum "Trebuie sa aveti privilegii sa actualizati tabelele in bazele de date mysql ca sa puteti sa schimati parolele altora" - rus " , mysql" - serbian "Morate imati privilegije da moete da update-ujete odreene tabele ako elite da menjate lozinke za druge korisnike" - spa "Tu debes de tener permiso para actualizar tablas en la base de datos mysql para cambiar las claves para otros" - swe "Fr att ndra lsenord fr andra mste du ha rttigheter att uppdatera mysql-databasen" - ukr " Φ ڦ mysql, צ ͦ " -ER_PASSWORD_NO_MATCH 42000 - cze "V tabulce user nen-B dn odpovdajc dek" - dan "Kan ikke finde nogen tilsvarende poster i bruger tabellen" - nla "Kan geen enkele passende rij vinden in de gebruikers tabel" - eng "Can't find any matching row in the user table" - est "Ei leia vastavat kirjet kasutajate tabelis" - fre "Impossible de trouver un enregistrement correspondant dans la table user" - ger "Kann keinen passenden Datensatz in Tabelle 'user' finden" - greek " " - hun "Nincs megegyezo sor a user tablaban" - ita "Impossibile trovare la riga corrispondente nella tabella user" - kor " ̺ ġϴ ã ϴ." - por "No pode encontrar nenhuma linha que combine na tabela usurio (user table)" - rum "Nu pot gasi nici o linie corespunzatoare in tabela utilizatorului" - rus " " - serbian "Ne mogu da pronaem odgovarajui slog u 'user' tabeli" - spa "No puedo encontrar una lnea correponsdiente en la tabla user" - swe "Hittade inte anvndaren i 'user'-tabellen" - ukr " צצ Ӧ æ " -ER_UPDATE_INFO - cze "Nalezen-Bch dk: %ld Zmnno: %ld Varovn: %ld" - dan "Poster fundet: %ld ndret: %ld Advarsler: %ld" - nla "Passende rijen: %ld Gewijzigd: %ld Waarschuwingen: %ld" - eng "Rows matched: %ld Changed: %ld Warnings: %ld" - jps "v(Rows matched): %ld ύX: %ld Warnings: %ld", - est "Sobinud kirjeid: %ld Muudetud: %ld Hoiatusi: %ld" - fre "Enregistrements correspondants: %ld Modifis: %ld Warnings: %ld" - ger "Datenstze gefunden: %ld Gendert: %ld Warnungen: %ld" - hun "Megegyezo sorok szama: %ld Valtozott: %ld Warnings: %ld" - ita "Rows riconosciute: %ld Cambiate: %ld Warnings: %ld" - jpn "׿(Rows matched): %ld ѹ: %ld Warnings: %ld" - kor "ġϴ Rows : %ld : %ld : %ld" - por "Linhas que combinaram: %ld - Alteradas: %ld - Avisos: %ld" - rum "Linii identificate (matched): %ld Schimbate: %ld Atentionari (warnings): %ld" - rus " : %ld : %ld : %ld" - serbian "Odgovarajuih slogova: %ld Promenjeno: %ld Upozorenja: %ld" - spa "Lneas correspondientes: %ld Cambiadas: %ld Avisos: %ld" - swe "Rader: %ld Uppdaterade: %ld Varningar: %ld" - ukr "Ӧ צצ: %ld ͦ: %ld : %ld" -ER_CANT_CREATE_THREAD - cze "Nemohu vytvo-Bit nov thread (errno %d). Pokud je jet njak voln pam, podvejte se do manulu na st o chybch specifickch pro jednotliv operan systmy" - dan "Kan ikke danne en ny trd (fejl nr. %d). Hvis computeren ikke er lbet tr for hukommelse, kan du se i brugervejledningen for en mulig operativ-system - afhngig fejl" - nla "Kan geen nieuwe thread aanmaken (Errcode: %d). Indien er geen tekort aan geheugen is kunt u de handleiding consulteren over een mogelijke OS afhankelijke fout" - eng "Can't create a new thread (errno %d); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug" - jps "VKɃXbh܂ł (errno %d). őgpƒ[zĂȂ̂ɃG[ĂȂ, }jA̒ 'possible OS-dependent bug' ƂTĂ݂Ă.", - est "Ei suuda luua uut lime (veakood %d). Kui mlu ei ole otsas, on tenoliselt tegemist operatsioonissteemispetsiifilise veaga" - fre "Impossible de crer une nouvelle tche (errno %d). S'il reste de la mmoire libre, consultez le manual pour trouver un ventuel bug dpendant de l'OS" - ger "Kann keinen neuen Thread erzeugen (Fehler: %d). Sollte noch Speicher verfgbar sein, bitte im Handbuch wegen mglicher Fehler im Betriebssystem nachschlagen" - hun "Uj thread letrehozasa nem lehetseges (Hibakod: %d). Amenyiben van meg szabad memoria, olvassa el a kezikonyv operacios rendszerfuggo hibalehetosegekrol szolo reszet" - ita "Impossibile creare un nuovo thread (errno %d). Se non ci sono problemi di memoria disponibile puoi consultare il manuale per controllare possibili problemi dipendenti dal SO" - jpn "˥åɤޤǤ (errno %d). ⤷ѵĥ꡼ۤƤʤΤ˥顼ȯƤʤ, ޥ˥奢椫 'possible OS-dependent bug' ȤʸõƤߤƤ." - kor "ο 带 ϴ.(ȣ %d). ޸𸮰 ִٸ OS-dependent ޴ κ ãƺÿ." - nor "Can't create a new thread (errno %d); if you are not out of available memory you can consult the manual for any possible OS dependent bug" - norwegian-ny "Can't create a new thread (errno %d); if you are not out of available memory you can consult the manual for any possible OS dependent bug" - pol "Can't create a new thread (errno %d); if you are not out of available memory you can consult the manual for any possible OS dependent bug" - por "No pode criar uma nova 'thread' (erro no. %d). Se voc no estiver sem memria disponvel, voc pode consultar o manual sobre um possvel 'bug' dependente do sistema operacional" - rum "Nu pot crea un thread nou (Eroare %d). Daca mai aveti memorie disponibila in sistem, puteti consulta manualul - ar putea exista un potential bug in legatura cu sistemul de operare" - rus " ( %d). , , " - serbian "Ne mogu da kreiram novi thread (errno %d). Ako imate jo slobodne memorije, trebali biste da pogledate u priruniku da li je ovo specifina greka vaeg operativnog sistema" - spa "No puedo crear un nuevo thread (errno %d). Si tu est con falta de memoria disponible, tu puedes consultar el Manual para posibles problemas con SO" - swe "Kan inte skapa en ny trd (errno %d)" - ukr " Ǧ ( %d). ', æ ϧ - " -ER_WRONG_VALUE_COUNT_ON_ROW 21S01 - cze "Po-Bet sloupc neodpovd potu hodnot na dku %ld" - dan "Kolonne antallet stemmer ikke overens med antallet af vrdier i post %ld" - nla "Kolom aantal komt niet overeen met waarde aantal in rij %ld" - eng "Column count doesn't match value count at row %ld" - est "Tulpade hulk erineb vrtuste hulgast real %ld" - ger "Anzahl der Felder stimmt nicht mit der Anzahl der Werte in Zeile %ld berein" - hun "Az oszlopban talalhato ertek nem egyezik meg a %ld sorban szamitott ertekkel" - ita "Il numero delle colonne non corrisponde al conteggio alla riga %ld" - kor "Row %ld Į īƮ value īͿ ġ ʽϴ." - por "Contagem de colunas no confere com a contagem de valores na linha %ld" - rum "Numarul de coloane nu corespunde cu numarul de valori la linia %ld" - rus " %ld" - serbian "Broj kolona ne odgovara broju vrednosti u slogu %ld" - spa "El nmero de columnas no corresponde al nmero en la lnea %ld" - swe "Antalet kolumner motsvarar inte antalet vrden p rad: %ld" - ukr "˦ æ Ц ˦˦ æ %ld" -ER_CANT_REOPEN_TABLE - cze "Nemohu znovuotev-Bt tabulku: '%-.192s" - dan "Kan ikke genbne tabel '%-.192s" - nla "Kan tabel niet opnieuw openen: '%-.192s" - eng "Can't reopen table: '%-.192s'" - est "Ei suuda taasavada tabelit '%-.192s'" - fre "Impossible de rouvrir la table: '%-.192s" - ger "Kann Tabelle'%-.192s' nicht erneut ffnen" - hun "Nem lehet ujra-megnyitni a tablat: '%-.192s" - ita "Impossibile riaprire la tabella: '%-.192s'" - kor "̺ ٽ : '%-.192s" - nor "Can't reopen table: '%-.192s" - norwegian-ny "Can't reopen table: '%-.192s" - pol "Can't reopen table: '%-.192s" - por "No pode reabrir a tabela '%-.192s" - rum "Nu pot redeschide tabela: '%-.192s'" - rus " '%-.192s'" - serbian "Ne mogu da ponovo otvorim tabelu '%-.192s'" - slo "Can't reopen table: '%-.192s" - spa "No puedo reabrir tabla: '%-.192s" - swe "Kunde inte stnga och ppna tabell '%-.192s" - ukr " צ : '%-.192s'" -ER_INVALID_USE_OF_NULL 22004 - cze "Neplatn-B uit hodnoty NULL" - dan "Forkert brug af nulvrdi (NULL)" - nla "Foutief gebruik van de NULL waarde" - eng "Invalid use of NULL value" - jps "NULL l̎gp@sK؂ł", - est "NULL vrtuse vrkasutus" - fre "Utilisation incorrecte de la valeur NULL" - ger "Unerlaubte Verwendung eines NULL-Werts" - hun "A NULL ervenytelen hasznalata" - ita "Uso scorretto del valore NULL" - jpn "NULL ͤλˡŬڤǤ" - kor "NULL ߸ ϼ̱..." - por "Uso invlido do valor NULL" - rum "Folosirea unei value NULL e invalida" - rus " NULL" - serbian "Pogrena upotreba vrednosti NULL" - spa "Invalido uso de valor NULL" - swe "Felaktig anvnding av NULL" - ukr " NULL" -ER_REGEXP_ERROR 42000 - cze "Regul-Brn vraz vrtil chybu '%-.64s'" - dan "Fik fejl '%-.64s' fra regexp" - nla "Fout '%-.64s' ontvangen van regexp" - eng "Got error '%-.64s' from regexp" - est "regexp tagastas vea '%-.64s'" - fre "Erreur '%-.64s' provenant de regexp" - ger "regexp lieferte Fehler '%-.64s'" - hun "'%-.64s' hiba a regularis kifejezes hasznalata soran (regexp)" - ita "Errore '%-.64s' da regexp" - kor "regexp '%-.64s' ϴ." - por "Obteve erro '%-.64s' em regexp" - rum "Eroarea '%-.64s' obtinuta din expresia regulara (regexp)" - rus " '%-.64s' " - serbian "Funkcija regexp je vratila greku '%-.64s'" - spa "Obtenido error '%-.64s' de regexp" - swe "Fick fel '%-.64s' frn REGEXP" - ukr " '%-.64s' צ " -ER_MIX_OF_GROUP_FUNC_AND_FIELDS 42000 - cze "Pokud nen-B dn GROUP BY klauzule, nen dovoleno souasn pouit GROUP poloek (MIN(),MAX(),COUNT()...) s ne GROUP polokami" - dan "Sammenblanding af GROUP kolonner (MIN(),MAX(),COUNT()...) uden GROUP kolonner er ikke tilladt, hvis der ikke er noget GROUP BY prdikat" - nla "Het mixen van GROUP kolommen (MIN(),MAX(),COUNT()...) met no-GROUP kolommen is foutief indien er geen GROUP BY clausule is" - eng "Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause" - est "GROUP tulpade (MIN(),MAX(),COUNT()...) kooskasutamine tavaliste tulpadega ilma GROUP BY klauslita ei ole lubatud" - fre "Mlanger les colonnes GROUP (MIN(),MAX(),COUNT()...) avec des colonnes normales est interdit s'il n'y a pas de clause GROUP BY" - ger "Das Vermischen von GROUP-Feldern (MIN(),MAX(),COUNT()...) mit Nicht-GROUP-Feldern ist nicht zulssig, wenn keine GROUP-BY-Klausel vorhanden ist" - hun "A GROUP mezok (MIN(),MAX(),COUNT()...) kevert hasznalata nem lehetseges GROUP BY hivatkozas nelkul" - ita "Il mescolare funzioni di aggregazione (MIN(),MAX(),COUNT()...) e non e` illegale se non c'e` una clausula GROUP BY" - kor "Mixing of GROUP Įs (MIN(),MAX(),COUNT(),...) with no GROUP Įs is illegal if there is no GROUP BY clause" - por "Mistura de colunas agrupadas (com MIN(), MAX(), COUNT(), ...) com colunas no agrupadas ilegal, se no existir uma clusula de agrupamento (clusula GROUP BY)" - rum "Amestecarea de coloane GROUP (MIN(),MAX(),COUNT()...) fara coloane GROUP este ilegala daca nu exista o clauza GROUP BY" - rus " (GROUP) (MIN(),MAX(),COUNT(),...) , GROUP BY" - serbian "Upotreba agregatnih funkcija (MIN(),MAX(),COUNT()...) bez 'GROUP' kolona je pogrena ako ne postoji 'GROUP BY' iskaz" - spa "Mezcla de columnas GROUP (MIN(),MAX(),COUNT()...) con no GROUP columnas es ilegal si no hat la clausula GROUP BY" - swe "Man fr ha bde GROUP-kolumner (MIN(),MAX(),COUNT()...) och flt i en frga om man inte har en GROUP BY-del" - ukr "ͦ GROUP æ (MIN(),MAX(),COUNT()...) GROUP , GROUP BY" -ER_NONEXISTING_GRANT 42000 - cze "Neexistuje odpov-Bdajc grant pro uivatele '%-.48s' na stroji '%-.64s'" - dan "Denne tilladelse findes ikke for brugeren '%-.48s' p vrt '%-.64s'" - nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.48s' op host '%-.64s'" - eng "There is no such grant defined for user '%-.48s' on host '%-.64s'" - jps "[U[ '%-.48s' (zXg '%-.64s' ̃[U[) ͋‚Ă܂", - est "Sellist igust ei ole defineeritud kasutajale '%-.48s' masinast '%-.64s'" - fre "Un tel droit n'est pas dfini pour l'utilisateur '%-.48s' sur l'hte '%-.64s'" - ger "Fr Benutzer '%-.48s' auf Host '%-.64s' gibt es keine solche Berechtigung" - hun "A '%-.48s' felhasznalonak nincs ilyen joga a '%-.64s' host-on" - ita "GRANT non definita per l'utente '%-.48s' dalla macchina '%-.64s'" - jpn "桼 '%-.48s' (ۥ '%-.64s' Υ桼) ϵĤƤޤ" - kor " '%-.48s' (ȣƮ '%-.64s') Ͽ ǵ ׷ ϴ." - por "No existe tal permisso (grant) definida para o usurio '%-.48s' no 'host' '%-.64s'" - rum "Nu exista un astfel de grant definit pentru utilzatorul '%-.48s' de pe host-ul '%-.64s'" - rus " '%-.48s' '%-.64s'" - serbian "Ne postoji odobrenje za pristup korisniku '%-.48s' na host-u '%-.64s'" - spa "No existe permiso definido para usuario '%-.48s' en el servidor '%-.64s'" - swe "Det finns inget privilegium definierat fr anvndare '%-.48s' p '%-.64s'" - ukr " '%-.48s' '%-.64s'" -ER_TABLEACCESS_DENIED_ERROR 42000 - cze "%-.16s p-Bkaz nepstupn pro uivatele: '%-.48s'@'%-.64s' pro tabulku '%-.192s'" - dan "%-.16s-kommandoen er ikke tilladt for brugeren '%-.48s'@'%-.64s' for tabellen '%-.192s'" - nla "%-.16s commando geweigerd voor gebruiker: '%-.48s'@'%-.64s' voor tabel '%-.192s'" - eng "%-.16s command denied to user '%-.48s'@'%-.64s' for table '%-.192s'" - jps "R}h %-.16s [U[ '%-.48s'@'%-.64s' ,e[u '%-.192s' ɑ΂ċ‚Ă܂", - est "%-.16s ksk ei ole lubatud kasutajale '%-.48s'@'%-.64s' tabelis '%-.192s'" - fre "La commande '%-.16s' est interdite l'utilisateur: '%-.48s'@'@%-.64s' sur la table '%-.192s'" - ger "%-.16s Befehl nicht erlaubt fr Benutzer '%-.48s'@'%-.64s' auf Tabelle '%-.192s'" - hun "%-.16s parancs a '%-.48s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.192s' tablaban" - ita "Comando %-.16s negato per l'utente: '%-.48s'@'%-.64s' sulla tabella '%-.192s'" - jpn "ޥ %-.16s 桼 '%-.48s'@'%-.64s' ,ơ֥ '%-.192s' ФƵĤƤޤ" - kor "'%-.16s' ڿ źεǾϴ. : '%-.48s'@'%-.64s' for ̺ '%-.192s'" - por "Comando '%-.16s' negado para o usurio '%-.48s'@'%-.64s' na tabela '%-.192s'" - rum "Comanda %-.16s interzisa utilizatorului: '%-.48s'@'%-.64s' pentru tabela '%-.192s'" - rus " %-.16s '%-.48s'@'%-.64s' '%-.192s'" - serbian "%-.16s komanda zabranjena za korisnika '%-.48s'@'%-.64s' za tabelu '%-.192s'" - spa "%-.16s comando negado para usuario: '%-.48s'@'%-.64s' para tabla '%-.192s'" - swe "%-.16s ej tilltet fr '%-.48s'@'%-.64s' fr tabell '%-.192s'" - ukr "%-.16s : '%-.48s'@'%-.64s' æ '%-.192s'" -ER_COLUMNACCESS_DENIED_ERROR 42000 - cze "%-.16s p-Bkaz nepstupn pro uivatele: '%-.48s'@'%-.64s' pro sloupec '%-.192s' v tabulce '%-.192s'" - dan "%-.16s-kommandoen er ikke tilladt for brugeren '%-.48s'@'%-.64s' for kolonne '%-.192s' in tabellen '%-.192s'" - nla "%-.16s commando geweigerd voor gebruiker: '%-.48s'@'%-.64s' voor kolom '%-.192s' in tabel '%-.192s'" - eng "%-.16s command denied to user '%-.48s'@'%-.64s' for column '%-.192s' in table '%-.192s'" - jps "R}h %-.16s [U[ '%-.48s'@'%-.64s'\n J '%-.192s' e[u '%-.192s' ɑ΂ċ‚Ă܂", - est "%-.16s ksk ei ole lubatud kasutajale '%-.48s'@'%-.64s' tulbale '%-.192s' tabelis '%-.192s'" - fre "La commande '%-.16s' est interdite l'utilisateur: '%-.48s'@'@%-.64s' sur la colonne '%-.192s' de la table '%-.192s'" - ger "%-.16s Befehl nicht erlaubt fr Benutzer '%-.48s'@'%-.64s' und Feld '%-.192s' in Tabelle '%-.192s'" - hun "%-.16s parancs a '%-.48s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.192s' mezo eseten a '%-.192s' tablaban" - ita "Comando %-.16s negato per l'utente: '%-.48s'@'%-.64s' sulla colonna '%-.192s' della tabella '%-.192s'" - jpn "ޥ %-.16s 桼 '%-.48s'@'%-.64s'\n '%-.192s' ơ֥ '%-.192s' ФƵĤƤޤ" - kor "'%-.16s' ڿ źεǾϴ. : '%-.48s'@'%-.64s' for Į '%-.192s' in ̺ '%-.192s'" - por "Comando '%-.16s' negado para o usurio '%-.48s'@'%-.64s' na coluna '%-.192s', na tabela '%-.192s'" - rum "Comanda %-.16s interzisa utilizatorului: '%-.48s'@'%-.64s' pentru coloana '%-.192s' in tabela '%-.192s'" - rus " %-.16s '%-.48s'@'%-.64s' '%-.192s' '%-.192s'" - serbian "%-.16s komanda zabranjena za korisnika '%-.48s'@'%-.64s' za kolonu '%-.192s' iz tabele '%-.192s'" - spa "%-.16s comando negado para usuario: '%-.48s'@'%-.64s' para columna '%-.192s' en la tabla '%-.192s'" - swe "%-.16s ej tilltet fr '%-.48s'@'%-.64s' fr kolumn '%-.192s' i tabell '%-.192s'" - ukr "%-.16s : '%-.48s'@'%-.64s' '%-.192s' æ '%-.192s'" -ER_ILLEGAL_GRANT_FOR_TABLE 42000 - cze "Neplatn-B pkaz GRANT/REVOKE. Prosm, pette si v manulu, jak privilegia je mon pout." - dan "Forkert GRANT/REVOKE kommando. Se i brugervejledningen hvilke privilegier der kan specificeres." - nla "Foutief GRANT/REVOKE commando. Raadpleeg de handleiding welke priveleges gebruikt kunnen worden." - eng "Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used" - est "Vigane GRANT/REVOKE ksk. Tutvu kasutajajuhendiga" - fre "Commande GRANT/REVOKE incorrecte. Consultez le manuel." - ger "Unzulssiger GRANT- oder REVOKE-Befehl. Verfgbare Berechtigungen sind im Handbuch aufgefhrt" - greek "Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used." - hun "Ervenytelen GRANT/REVOKE parancs. Kerem, nezze meg a kezikonyvben, milyen jogok lehetsegesek" - ita "Comando GRANT/REVOKE illegale. Prego consultare il manuale per sapere quali privilegi possono essere usati." - jpn "Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used." - kor "߸ GRANT/REVOKE .  Ǹ Ǿ ִ ޴ ÿ." - nor "Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used." - norwegian-ny "Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used." - pol "Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used." - por "Comando GRANT/REVOKE ilegal. Por favor consulte no manual quais privilgios podem ser usados." - rum "Comanda GRANT/REVOKE ilegala. Consultati manualul in privinta privilegiilor ce pot fi folosite." - rus " GRANT REVOKE. , , " - serbian "Pogrena 'GRANT' odnosno 'REVOKE' komanda. Molim Vas pogledajte u priruniku koje vrednosti mogu biti upotrebljene." - slo "Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used." - spa "Ilegal comando GRANT/REVOKE. Por favor consulte el manual para cuales permisos pueden ser usados." - swe "Felaktigt GRANT-privilegium anvnt" - ukr " GRANT/REVOKE ; æ , ˦ " -ER_GRANT_WRONG_HOST_OR_USER 42000 - cze "Argument p-Bkazu GRANT uivatel nebo stroj je pli dlouh" - dan "Vrts- eller brugernavn for langt til GRANT" - nla "De host of gebruiker parameter voor GRANT is te lang" - eng "The host or user argument to GRANT is too long" - est "Masina vi kasutaja nimi GRANT lauses on liiga pikk" - fre "L'hte ou l'utilisateur donn en argument GRANT est trop long" - ger "Das Host- oder User-Argument fr GRANT ist zu lang" - hun "A host vagy felhasznalo argumentuma tul hosszu a GRANT parancsban" - ita "L'argomento host o utente per la GRANT e` troppo lungo" - kor "(GRANT) Ͽ ڳ ȣƮ ʹ ϴ." - por "Argumento de 'host' ou de usurio para o GRANT longo demais" - rum "Argumentul host-ului sau utilizatorului pentru GRANT e prea lung" - rus " / GRANT" - serbian "Argument 'host' ili 'korisnik' prosleen komandi 'GRANT' je predugaak" - spa "El argumento para servidor o usuario para GRANT es demasiado grande" - swe "Felaktigt maskinnamn eller anvndarnamn anvnt med GRANT" - ukr " host user GRANT " -ER_NO_SUCH_TABLE 42S02 - cze "Tabulka '%-.192s.%-.192s' neexistuje" - dan "Tabellen '%-.192s.%-.192s' eksisterer ikke" - nla "Tabel '%-.192s.%-.192s' bestaat niet" - eng "Table '%-.192s.%-.192s' doesn't exist" - est "Tabelit '%-.192s.%-.192s' ei eksisteeri" - fre "La table '%-.192s.%-.192s' n'existe pas" - ger "Tabelle '%-.192s.%-.192s' existiert nicht" - hun "A '%-.192s.%-.192s' tabla nem letezik" - ita "La tabella '%-.192s.%-.192s' non esiste" - jpn "Table '%-.192s.%-.192s' doesn't exist" - kor "̺ '%-.192s.%-.192s' ʽϴ." - nor "Table '%-.192s.%-.192s' doesn't exist" - norwegian-ny "Table '%-.192s.%-.192s' doesn't exist" - pol "Table '%-.192s.%-.192s' doesn't exist" - por "Tabela '%-.192s.%-.192s' no existe" - rum "Tabela '%-.192s.%-.192s' nu exista" - rus " '%-.192s.%-.192s' " - serbian "Tabela '%-.192s.%-.192s' ne postoji" - slo "Table '%-.192s.%-.192s' doesn't exist" - spa "Tabla '%-.192s.%-.192s' no existe" - swe "Det finns ingen tabell som heter '%-.192s.%-.192s'" - ukr " '%-.192s.%-.192s' դ" -ER_NONEXISTING_TABLE_GRANT 42000 - cze "Neexistuje odpov-Bdajc grant pro uivatele '%-.48s' na stroji '%-.64s' pro tabulku '%-.192s'" - dan "Denne tilladelse eksisterer ikke for brugeren '%-.48s' p vrt '%-.64s' for tabellen '%-.192s'" - nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.48s' op host '%-.64s' op tabel '%-.192s'" - eng "There is no such grant defined for user '%-.48s' on host '%-.64s' on table '%-.192s'" - est "Sellist igust ei ole defineeritud kasutajale '%-.48s' masinast '%-.64s' tabelile '%-.192s'" - fre "Un tel droit n'est pas dfini pour l'utilisateur '%-.48s' sur l'hte '%-.64s' sur la table '%-.192s'" - ger "Eine solche Berechtigung ist fr User '%-.48s' auf Host '%-.64s' an Tabelle '%-.192s' nicht definiert" - hun "A '%-.48s' felhasznalo szamara a '%-.64s' host '%-.192s' tablajaban ez a parancs nem engedelyezett" - ita "GRANT non definita per l'utente '%-.48s' dalla macchina '%-.64s' sulla tabella '%-.192s'" - kor " '%-.48s'(ȣƮ '%-.64s') ̺ '%-.192s' ϱ Ͽ ǵ ϴ. " - por "No existe tal permisso (grant) definido para o usurio '%-.48s' no 'host' '%-.64s', na tabela '%-.192s'" - rum "Nu exista un astfel de privilegiu (grant) definit pentru utilizatorul '%-.48s' de pe host-ul '%-.64s' pentru tabela '%-.192s'" - rus " '%-.48s' '%-.64s' '%-.192s'" - serbian "Ne postoji odobrenje za pristup korisniku '%-.48s' na host-u '%-.64s' tabeli '%-.192s'" - spa "No existe tal permiso definido para usuario '%-.48s' en el servidor '%-.64s' en la tabla '%-.192s'" - swe "Det finns inget privilegium definierat fr anvndare '%-.48s' p '%-.64s' fr tabell '%-.192s'" - ukr " '%-.48s' '%-.64s' æ '%-.192s'" -ER_NOT_ALLOWED_COMMAND 42000 - cze "Pou-Bit pkaz nen v tto verzi MySQL povolen" - dan "Den brugte kommando er ikke tilladt med denne udgave af MySQL" - nla "Het used commando is niet toegestaan in deze MySQL versie" - eng "The used command is not allowed with this MySQL version" - est "Antud ksk ei ole lubatud kesolevas MySQL versioonis" - fre "Cette commande n'existe pas dans cette version de MySQL" - ger "Der verwendete Befehl ist in dieser MySQL-Version nicht zulssig" - hun "A hasznalt parancs nem engedelyezett ebben a MySQL verzioban" - ita "Il comando utilizzato non e` supportato in questa versione di MySQL" - kor " MySQL ̿ ʽϴ." - por "Comando usado no permitido para esta verso do MySQL" - rum "Comanda folosita nu este permisa pentru aceasta versiune de MySQL" - rus " MySQL" - serbian "Upotrebljena komanda nije dozvoljena sa ovom verzijom MySQL servera" - spa "El comando usado no es permitido con esta versin de MySQL" - swe "Du kan inte anvnda detta kommando med denna MySQL version" - ukr " æ Ӧ MySQL" -ER_SYNTAX_ERROR 42000 - cze "Va-Be syntaxe je njak divn" - dan "Der er en fejl i SQL syntaksen" - nla "Er is iets fout in de gebruikte syntax" - eng "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use" - est "Viga SQL sntaksis" - fre "Erreur de syntaxe" - ger "Fehler in der SQL-Syntax. Bitte die korrekte Syntax im Handbuch nachschlagen" - greek "You have an error in your SQL syntax" - hun "Szintaktikai hiba" - ita "Errore di sintassi nella query SQL" - jpn "Something is wrong in your syntax" - kor "SQL ֽϴ." - nor "Something is wrong in your syntax" - norwegian-ny "Something is wrong in your syntax" - pol "Something is wrong in your syntax" - por "Voc tem um erro de sintaxe no seu SQL" - rum "Aveti o eroare in sintaxa RSQL" - rus " . MySQL " - serbian "Imate greku u vaoj SQL sintaksi" - slo "Something is wrong in your syntax" - spa "Algo est equivocado en su sintax" - swe "Du har ngot fel i din syntax" - ukr " Ӧ SQL" -ER_DELAYED_CANT_CHANGE_LOCK - cze "Zpo-Bdn insert threadu nebyl schopen zskat poadovan zmek pro tabulku %-.192s" - dan "Forsinket indsttelse trden (delayed insert thread) kunne ikke opn ls p tabellen %-.192s" - nla "'Delayed insert' thread kon de aangevraagde 'lock' niet krijgen voor tabel %-.192s" - eng "Delayed insert thread couldn't get requested lock for table %-.192s" - est "INSERT DELAYED lim ei suutnud saada soovitud lukku tabelile %-.192s" - fre "La tche 'delayed insert' n'a pas pu obtenir le verrou dmand sur la table %-.192s" - ger "Verzgerter (DELAYED) Einfge-Thread konnte die angeforderte Sperre fr Tabelle '%-.192s' nicht erhalten" - hun "A kesleltetett beillesztes (delayed insert) thread nem kapott zatolast a %-.192s tablahoz" - ita "Il thread di inserimento ritardato non riesce ad ottenere il lock per la tabella %-.192s" - kor " insert 尡 ̺ %-.192s 䱸 ŷ ó ϴ." - por "'Thread' de insero retardada (atrasada) pois no conseguiu obter a trava solicitada para tabela '%-.192s'" - rum "Thread-ul pentru inserarea aminata nu a putut obtine lacatul (lock) pentru tabela %-.192s" - rus ", (delayed insert), %-.192s" - serbian "Prolongirani 'INSERT' thread nije mogao da dobije traeno zakljuavanje tabele '%-.192s'" - spa "Thread de insercin retarda no pudiendo bloquear para la tabla %-.192s" - swe "DELAYED INSERT-trden kunde inte lsa tabell '%-.192s'" - ukr " INSERT DELAYED æ %-.192s" -ER_TOO_MANY_DELAYED_THREADS - cze "P-Bli mnoho zpodnch thread" - dan "For mange slettede trde (threads) i brug" - nla "Te veel 'delayed' threads in gebruik" - eng "Too many delayed threads in use" - est "Liiga palju DELAYED limesid kasutusel" - fre "Trop de tche 'delayed' en cours" - ger "Zu viele verzgerte (DELAYED) Threads in Verwendung" - hun "Tul sok kesletetett thread (delayed)" - ita "Troppi threads ritardati in uso" - kor "ʹ 带 ϰ ֽϴ." - por "Excesso de 'threads' retardadas (atrasadas) em uso" - rum "Prea multe threaduri aminate care sint in uz" - rus " , (delayed insert)" - serbian "Previe prolongiranih thread-ova je u upotrebi" - spa "Muchos threads retardados en uso" - swe "Det finns redan 'max_delayed_threads' trdar i anvnding" - ukr " Ǧ դ" -ER_ABORTING_CONNECTION 08S01 - cze "Zru-Beno spojen %ld do databze: '%-.192s' uivatel: '%-.48s' (%-.64s)" - dan "Afbrudt forbindelse %ld til database: '%-.192s' bruger: '%-.48s' (%-.64s)" - nla "Afgebroken verbinding %ld naar db: '%-.192s' gebruiker: '%-.48s' (%-.64s)" - eng "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" - est "hendus katkestatud %ld andmebaasile: '%-.192s' kasutajale: '%-.48s' (%-.64s)" - fre "Connection %ld avorte vers la bd: '%-.192s' utilisateur: '%-.48s' (%-.64s)" - ger "Abbruch der Verbindung %ld zur Datenbank '%-.192s'. Benutzer: '%-.48s' (%-.64s)" - hun "Megszakitott kapcsolat %ld db: '%-.192s' adatbazishoz, felhasznalo: '%-.48s' (%-.64s)" - ita "Interrotta la connessione %ld al db: '%-.192s' utente: '%-.48s' (%-.64s)" - jpn "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" - kor "Ÿ̽ %ld ߴܵ : '%-.192s' : '%-.48s' (%-.64s)" - nor "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" - norwegian-ny "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" - pol "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" - por "Conexo %ld abortou para o banco de dados '%-.192s' - usurio '%-.48s' (%-.64s)" - rum "Conectie terminata %ld la baza de date: '%-.192s' utilizator: '%-.48s' (%-.64s)" - rus " %ld '%-.192s' '%-.48s' (%-.64s)" - serbian "Prekinuta konekcija broj %ld ka bazi: '%-.192s' korisnik je bio: '%-.48s' (%-.64s)" - slo "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" - spa "Conexin abortada %ld para db: '%-.192s' usuario: '%-.48s' (%-.64s)" - swe "Avbrt lnken fr trd %ld till db '%-.192s', anvndare '%-.48s' (%-.64s)" - ukr " ' %ld : '%-.192s' : '%-.48s' (%-.64s)" -ER_NET_PACKET_TOO_LARGE 08S01 - cze "Zji-Btn pchoz packet del ne 'max_allowed_packet'" - dan "Modtog en datapakke som var strre end 'max_allowed_packet'" - nla "Groter pakket ontvangen dan 'max_allowed_packet'" - eng "Got a packet bigger than 'max_allowed_packet' bytes" - est "Saabus suurem pakett kui lubatud 'max_allowed_packet' muutujaga" - fre "Paquet plus grand que 'max_allowed_packet' reu" - ger "Empfangenes Paket ist grer als 'max_allowed_packet' Bytes" - hun "A kapott csomag nagyobb, mint a maximalisan engedelyezett: 'max_allowed_packet'" - ita "Ricevuto un pacchetto piu` grande di 'max_allowed_packet'" - kor "'max_allowed_packet' ū Ŷ ޾ҽϴ." - por "Obteve um pacote maior do que a taxa mxima de pacotes definida (max_allowed_packet)" - rum "Un packet mai mare decit 'max_allowed_packet' a fost primit" - rus " , 'max_allowed_packet'" - serbian "Primio sam mreni paket vei od definisane vrednosti 'max_allowed_packet'" - spa "Obtenido un paquete mayor que 'max_allowed_packet'" - swe "Kommunkationspaketet r strre n 'max_allowed_packet'" - ukr " ¦ Φ max_allowed_packet" -ER_NET_READ_ERROR_FROM_PIPE 08S01 - cze "Zji-Btna chyba pi ten z roury spojen" - dan "Fik lsefejl fra forbindelse (connection pipe)" - nla "Kreeg leesfout van de verbindings pipe" - eng "Got a read error from the connection pipe" - est "Viga hendustoru lugemisel" - fre "Erreur de lecture reue du pipe de connexion" - ger "Lese-Fehler bei einer Verbindungs-Pipe" - hun "Olvasasi hiba a kapcsolat soran" - ita "Rilevato un errore di lettura dalla pipe di connessione" - kor " κ ߻Ͽϴ." - por "Obteve um erro de leitura no 'pipe' da conexo" - rum "Eroare la citire din cauza lui 'connection pipe'" - rus " (connection pipe)" - serbian "Greka pri itanju podataka sa pipe-a" - spa "Obtenido un error de lectura de la conexin pipe" - swe "Fick lsfel frn klienten vid lsning frn 'PIPE'" - ukr " Φæ " -ER_NET_FCNTL_ERROR 08S01 - cze "Zji-Btna chyba fcntl()" - dan "Fik fejlmeddelelse fra fcntl()" - nla "Kreeg fout van fcntl()" - eng "Got an error from fcntl()" - est "fcntl() tagastas vea" - fre "Erreur reue de fcntl() " - ger "fcntl() lieferte einen Fehler" - hun "Hiba a fcntl() fuggvenyben" - ita "Rilevato un errore da fcntl()" - kor "fcntl() Լκ ߻Ͽϴ." - por "Obteve um erro em fcntl()" - rum "Eroare obtinuta de la fcntl()" - rus " fcntl()" - serbian "Greka pri izvravanju funkcije fcntl()" - spa "Obtenido un error de fcntl()" - swe "Fick fatalt fel frn 'fcntl()'" - ukr " צ fcntl()" -ER_NET_PACKETS_OUT_OF_ORDER 08S01 - cze "P-Bchoz packety v chybnm poad" - dan "Modtog ikke datapakker i korrekt rkkeflge" - nla "Pakketten in verkeerde volgorde ontvangen" - eng "Got packets out of order" - est "Paketid saabusid vales jrjekorras" - fre "Paquets reus dans le dsordre" - ger "Pakete nicht in der richtigen Reihenfolge empfangen" - hun "Helytelen sorrendben erkezett adatcsomagok" - ita "Ricevuti pacchetti non in ordine" - kor " ʴ Ŷ ޾ҽϴ." - por "Obteve pacotes fora de ordem" - rum "Packets care nu sint ordonati au fost gasiti" - rus " " - serbian "Primio sam mrene pakete van reda" - spa "Obtenido paquetes desordenados" - swe "Kommunikationspaketen kom i fel ordning" - ukr " " -ER_NET_UNCOMPRESS_ERROR 08S01 - cze "Nemohu rozkomprimovat komunika-Bn packet" - dan "Kunne ikke dekomprimere kommunikations-pakke (communication packet)" - nla "Communicatiepakket kon niet worden gedecomprimeerd" - eng "Couldn't uncompress communication packet" - est "Viga andmepaketi lahtipakkimisel" - fre "Impossible de dcompresser le paquet reu" - ger "Kommunikationspaket lsst sich nicht entpacken" - hun "A kommunikacios adatcsomagok nem tomorithetok ki" - ita "Impossibile scompattare i pacchetti di comunicazione" - kor " Ŷ ϴ." - por "No conseguiu descomprimir pacote de comunicao" - rum "Nu s-a putut decompresa pachetul de comunicatie (communication packet)" - rus " , " - serbian "Ne mogu da dekompresujem mrene pakete" - spa "No puedo descomprimir paquetes de comunicacin" - swe "Kunde inte packa up kommunikationspaketet" - ukr " Φæ " -ER_NET_READ_ERROR 08S01 - cze "Zji-Btna chyba pi ten komunikanho packetu" - dan "Fik fejlmeddelelse ved lsning af kommunikations-pakker (communication packets)" - nla "Fout bij het lezen van communicatiepakketten" - eng "Got an error reading communication packets" - est "Viga andmepaketi lugemisel" - fre "Erreur de lecture des paquets reus" - ger "Fehler beim Lesen eines Kommunikationspakets" - hun "HIba a kommunikacios adatcsomagok olvasasa soran" - ita "Rilevato un errore ricevendo i pacchetti di comunicazione" - kor " Ŷ д ߻Ͽϴ." - por "Obteve um erro na leitura de pacotes de comunicao" - rum "Eroare obtinuta citind pachetele de comunicatie (communication packets)" - rus " " - serbian "Greka pri primanju mrenih paketa" - spa "Obtenido un error leyendo paquetes de comunicacin" - swe "Fick ett fel vid lsning frn klienten" - ukr " Φæ Ԧ" -ER_NET_READ_INTERRUPTED 08S01 - cze "Zji-Btn timeout pi ten komunikanho packetu" - dan "Timeout-fejl ved lsning af kommunukations-pakker (communication packets)" - nla "Timeout bij het lezen van communicatiepakketten" - eng "Got timeout reading communication packets" - est "Kontrollaja letamine andmepakettide lugemisel" - fre "Timeout en lecture des paquets reus" - ger "Zeitberschreitung beim Lesen eines Kommunikationspakets" - hun "Idotullepes a kommunikacios adatcsomagok olvasasa soran" - ita "Rilevato un timeout ricevendo i pacchetti di comunicazione" - kor " Ŷ д timeout ߻Ͽϴ." - por "Obteve expirao de tempo (timeout) na leitura de pacotes de comunicao" - rum "Timeout obtinut citind pachetele de comunicatie (communication packets)" - rus " " - serbian "Vremenski limit za itanje mrenih paketa je istekao" - spa "Obtenido timeout leyendo paquetes de comunicacin" - swe "Fick 'timeout' vid lsning frn klienten" - ukr " Φæ Ԧ" -ER_NET_ERROR_ON_WRITE 08S01 - cze "Zji-Btna chyba pi zpisu komunikanho packetu" - dan "Fik fejlmeddelelse ved skrivning af kommunukations-pakker (communication packets)" - nla "Fout bij het schrijven van communicatiepakketten" - eng "Got an error writing communication packets" - est "Viga andmepaketi kirjutamisel" - fre "Erreur d'criture des paquets envoys" - ger "Fehler beim Schreiben eines Kommunikationspakets" - hun "Hiba a kommunikacios csomagok irasa soran" - ita "Rilevato un errore inviando i pacchetti di comunicazione" - kor " Ŷ ϴ ߻Ͽϴ." - por "Obteve um erro na escrita de pacotes de comunicao" - rum "Eroare in scrierea pachetelor de comunicatie (communication packets)" - rus " " - serbian "Greka pri slanju mrenih paketa" - spa "Obtenido un error de escribiendo paquetes de comunicacin" - swe "Fick ett fel vid skrivning till klienten" - ukr " Φæ Ԧ" -ER_NET_WRITE_INTERRUPTED 08S01 - cze "Zji-Btn timeout pi zpisu komunikanho packetu" - dan "Timeout-fejl ved skrivning af kommunukations-pakker (communication packets)" - nla "Timeout bij het schrijven van communicatiepakketten" - eng "Got timeout writing communication packets" - est "Kontrollaja letamine andmepakettide kirjutamisel" - fre "Timeout d'criture des paquets envoys" - ger "Zeitberschreitung beim Schreiben eines Kommunikationspakets" - hun "Idotullepes a kommunikacios csomagok irasa soran" - ita "Rilevato un timeout inviando i pacchetti di comunicazione" - kor " ϴ timeout ߻Ͽϴ." - por "Obteve expirao de tempo ('timeout') na escrita de pacotes de comunicao" - rum "Timeout obtinut scriind pachetele de comunicatie (communication packets)" - rus " " - serbian "Vremenski limit za slanje mrenih paketa je istekao" - spa "Obtenido timeout escribiendo paquetes de comunicacin" - swe "Fick 'timeout' vid skrivning till klienten" - ukr " Φæ Ԧ" -ER_TOO_LONG_STRING 42000 - cze "V-Bsledn etzec je del ne 'max_allowed_packet'" - dan "Strengen med resultater er strre end 'max_allowed_packet'" - nla "Resultaat string is langer dan 'max_allowed_packet'" - eng "Result string is longer than 'max_allowed_packet' bytes" - est "Tulemus on pikem kui lubatud 'max_allowed_packet' muutujaga" - fre "La chane rsultat est plus grande que 'max_allowed_packet'" - ger "Ergebnis-String ist lnger als 'max_allowed_packet' Bytes" - hun "Ez eredmeny sztring nagyobb, mint a lehetseges maximum: 'max_allowed_packet'" - ita "La stringa di risposta e` piu` lunga di 'max_allowed_packet'" - por "'String' resultante mais longa do que 'max_allowed_packet'" - rum "Sirul rezultat este mai lung decit 'max_allowed_packet'" - rus " , 'max_allowed_packet'" - serbian "Rezultujui string je dui nego to to dozvoljava parametar servera 'max_allowed_packet'" - spa "La string resultante es mayor que max_allowed_packet" - swe "Resultatstrngen r lngre n max_allowed_packet" - ukr " Φ max_allowed_packet" -ER_TABLE_CANT_HANDLE_BLOB 42000 - cze "Typ pou-Bit tabulky nepodporuje BLOB/TEXT sloupce" - dan "Denne tabeltype understtter ikke brug af BLOB og TEXT kolonner" - nla "Het gebruikte tabel type ondersteunt geen BLOB/TEXT kolommen" - eng "The used table type doesn't support BLOB/TEXT columns" - est "Valitud tabelitp ei toeta BLOB/TEXT tpi vlju" - fre "Ce type de table ne supporte pas les colonnes BLOB/TEXT" - ger "Der verwendete Tabellentyp untersttzt keine BLOB- und TEXT-Felder" - hun "A hasznalt tabla tipus nem tamogatja a BLOB/TEXT mezoket" - ita "Il tipo di tabella usata non supporta colonne di tipo BLOB/TEXT" - por "Tipo de tabela usado no permite colunas BLOB/TEXT" - rum "Tipul de tabela folosit nu suporta coloane de tip BLOB/TEXT" - rus " BLOB/TEXT" - serbian "Iskoriteni tip tabele ne podrava kolone tipa 'BLOB' odnosno 'TEXT'" - spa "El tipo de tabla usada no permite soporte para columnas BLOB/TEXT" - swe "Den anvnda tabelltypen kan inte hantera BLOB/TEXT-kolumner" - ukr " æ Цդ BLOB/TEXT æ" -ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 42000 - cze "Typ pou-Bit tabulky nepodporuje AUTO_INCREMENT sloupce" - dan "Denne tabeltype understtter ikke brug af AUTO_INCREMENT kolonner" - nla "Het gebruikte tabel type ondersteunt geen AUTO_INCREMENT kolommen" - eng "The used table type doesn't support AUTO_INCREMENT columns" - est "Valitud tabelitp ei toeta AUTO_INCREMENT tpi vlju" - fre "Ce type de table ne supporte pas les colonnes AUTO_INCREMENT" - ger "Der verwendete Tabellentyp untersttzt keine AUTO_INCREMENT-Felder" - hun "A hasznalt tabla tipus nem tamogatja az AUTO_INCREMENT tipusu mezoket" - ita "Il tipo di tabella usata non supporta colonne di tipo AUTO_INCREMENT" - por "Tipo de tabela usado no permite colunas AUTO_INCREMENT" - rum "Tipul de tabela folosit nu suporta coloane de tip AUTO_INCREMENT" - rus " " - serbian "Iskoriteni tip tabele ne podrava kolone tipa 'AUTO_INCREMENT'" - spa "El tipo de tabla usada no permite soporte para columnas AUTO_INCREMENT" - swe "Den anvnda tabelltypen kan inte hantera AUTO_INCREMENT-kolumner" - ukr " æ Цդ AUTO_INCREMENT æ" -ER_DELAYED_INSERT_TABLE_LOCKED - cze "INSERT DELAYED nen-B mono s tabulkou '%-.192s' pout, protoe je zamen pomoc LOCK TABLES" - dan "INSERT DELAYED kan ikke bruges med tabellen '%-.192s', fordi tabellen er lst med LOCK TABLES" - nla "INSERT DELAYED kan niet worden gebruikt bij table '%-.192s', vanwege een 'lock met LOCK TABLES" - eng "INSERT DELAYED can't be used with table '%-.192s' because it is locked with LOCK TABLES" - est "INSERT DELAYED ei saa kasutada tabeli '%-.192s' peal, kuna see on lukustatud LOCK TABLES ksuga" - fre "INSERT DELAYED ne peut tre utilis avec la table '%-.192s', car elle est verroue avec LOCK TABLES" - ger "INSERT DELAYED kann fr Tabelle '%-.192s' nicht verwendet werden, da sie mit LOCK TABLES gesperrt ist" - greek "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" - hun "Az INSERT DELAYED nem hasznalhato a '%-.192s' tablahoz, mert a tabla zarolt (LOCK TABLES)" - ita "L'inserimento ritardato (INSERT DELAYED) non puo` essere usato con la tabella '%-.192s', perche` soggetta a lock da 'LOCK TABLES'" - jpn "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" - kor "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" - nor "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" - norwegian-ny "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" - pol "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" - por "INSERT DELAYED no pode ser usado com a tabela '%-.192s', porque ela est travada com LOCK TABLES" - rum "INSERT DELAYED nu poate fi folosit cu tabela '%-.192s', deoarece este locked folosing LOCK TABLES" - rus " INSERT DELAYED '%-.192s', LOCK TABLES" - serbian "Komanda 'INSERT DELAYED' ne moe biti iskoritena u tabeli '%-.192s', zbog toga to je zakljuana komandom 'LOCK TABLES'" - slo "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" - spa "INSERT DELAYED no puede ser usado con tablas '%-.192s', porque esta bloqueada con LOCK TABLES" - swe "INSERT DELAYED kan inte anvndas med tabell '%-.192s', emedan den r lst med LOCK TABLES" - ukr "INSERT DELAYED '%-.192s', LOCK TABLES" -ER_WRONG_COLUMN_NAME 42000 - cze "Nespr-Bvn jmno sloupce '%-.100s'" - dan "Forkert kolonnenavn '%-.100s'" - nla "Incorrecte kolom naam '%-.100s'" - eng "Incorrect column name '%-.100s'" - est "Vigane tulba nimi '%-.100s'" - fre "Nom de colonne '%-.100s' incorrect" - ger "Falscher Spaltenname '%-.100s'" - hun "Ervenytelen mezonev: '%-.100s'" - ita "Nome colonna '%-.100s' non corretto" - por "Nome de coluna '%-.100s' incorreto" - rum "Nume increct de coloana '%-.100s'" - rus " '%-.100s'" - serbian "Pogreno ime kolone '%-.100s'" - spa "Incorrecto nombre de columna '%-.100s'" - swe "Felaktigt kolumnnamn '%-.100s'" - ukr "צ ' '%-.100s'" -ER_WRONG_KEY_COLUMN 42000 - cze "Handler pou-Bit tabulky neum indexovat sloupce '%-.192s'" - dan "Den brugte tabeltype kan ikke indeksere kolonnen '%-.192s'" - nla "De gebruikte tabel 'handler' kan kolom '%-.192s' niet indexeren" - eng "The used storage engine can't index column '%-.192s'" - est "Tabelihandler ei oska indekseerida tulpa '%-.192s'" - fre "Le handler de la table ne peut index la colonne '%-.192s'" - ger "Die verwendete Speicher-Engine kann die Spalte '%-.192s' nicht indizieren" - greek "The used table handler can't index column '%-.192s'" - hun "A hasznalt tablakezelo nem tudja a '%-.192s' mezot indexelni" - ita "Il gestore delle tabelle non puo` indicizzare la colonna '%-.192s'" - jpn "The used table handler can't index column '%-.192s'" - kor "The used table handler can't index column '%-.192s'" - nor "The used table handler can't index column '%-.192s'" - norwegian-ny "The used table handler can't index column '%-.192s'" - pol "The used table handler can't index column '%-.192s'" - por "O manipulador de tabela usado no pode indexar a coluna '%-.192s'" - rum "Handler-ul tabelei folosite nu poate indexa coloana '%-.192s'" - rus " '%-.192s'" - serbian "Handler tabele ne moe da indeksira kolonu '%-.192s'" - slo "The used table handler can't index column '%-.192s'" - spa "El manipulador de tabla usado no puede indexar columna '%-.192s'" - swe "Den anvnda tabelltypen kan inte indexera kolumn '%-.192s'" - ukr " ڦ æ '%-.192s'" -ER_WRONG_MRG_TABLE - cze "V-Bechny tabulky v MERGE tabulce nejsou definovny stejn" - dan "Tabellerne i MERGE er ikke defineret ens" - nla "Niet alle tabellen in de MERGE tabel hebben identieke gedefinities" - eng "Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist" - est "Kik tabelid MERGE tabeli mratluses ei ole identsed" - fre "Toutes les tables de la table de type MERGE n'ont pas la mme dfinition" - ger "Nicht alle Tabellen in der MERGE-Tabelle sind gleich definiert" - hun "A MERGE tablaban talalhato tablak definicioja nem azonos" - ita "Non tutte le tabelle nella tabella di MERGE sono definite in maniera identica" - jpn "All tables in the MERGE table are not defined identically" - kor "All tables in the MERGE table are not defined identically" - nor "All tables in the MERGE table are not defined identically" - norwegian-ny "All tables in the MERGE table are not defined identically" - pol "All tables in the MERGE table are not defined identically" - por "Todas as tabelas contidas na tabela fundida (MERGE) no esto definidas identicamente" - rum "Toate tabelele din tabela MERGE nu sint definite identic" - rus " MERGE " - serbian "Tabele iskoritene u 'MERGE' tabeli nisu definisane na isti nain" - slo "All tables in the MERGE table are not defined identically" - spa "Todas las tablas en la MERGE tabla no estan definidas identicamente" - swe "Tabellerna i MERGE-tabellen r inte identiskt definierade" - ukr "æ MERGE TABLE Ҧ " -ER_DUP_UNIQUE 23000 - cze "Kv-Bli unique constraintu nemozu zapsat do tabulky '%-.192s'" - dan "Kan ikke skrive til tabellen '%-.192s' fordi det vil bryde CONSTRAINT regler" - nla "Kan niet opslaan naar table '%-.192s' vanwege 'unique' beperking" - eng "Can't write, because of unique constraint, to table '%-.192s'" - est "Ei suuda kirjutada tabelisse '%-.192s', kuna see rikub hesuse kitsendust" - fre "criture impossible cause d'un index UNIQUE sur la table '%-.192s'" - ger "Schreiben in Tabelle '%-.192s' nicht mglich wegen einer Eindeutigkeitsbeschrnkung (unique constraint)" - hun "A '%-.192s' nem irhato, az egyedi mezok miatt" - ita "Impossibile scrivere nella tabella '%-.192s' per limitazione di unicita`" - por "No pode gravar, devido restrio UNIQUE, na tabela '%-.192s'" - rum "Nu pot scrie pe hard-drive, din cauza constraintului unic (unique constraint) pentru tabela '%-.192s'" - rus " '%-.192s' - " - serbian "Zbog provere jedinstvenosti ne mogu da upiem podatke u tabelu '%-.192s'" - spa "No puedo escribir, debido al nico constraint, para tabla '%-.192s'" - swe "Kan inte skriva till tabell '%-.192s'; UNIQUE-test" - ukr " æ '%-.192s', ΦԦ" -ER_BLOB_KEY_WITHOUT_LENGTH 42000 - cze "BLOB sloupec '%-.192s' je pou-Bit ve specifikaci kle bez dlky" - dan "BLOB kolonnen '%-.192s' brugt i nglespecifikation uden nglelngde" - nla "BLOB kolom '%-.192s' gebruikt in zoeksleutel specificatie zonder zoeksleutel lengte" - eng "BLOB/TEXT column '%-.192s' used in key specification without a key length" - est "BLOB-tpi tulp '%-.192s' on kasutusel vtmes ilma pikkust mratlemata" - fre "La colonne '%-.192s' de type BLOB est utilise dans une dfinition d'index sans longueur d'index" - ger "BLOB- oder TEXT-Spalte '%-.192s' wird in der Schlsseldefinition ohne Schlssellngenangabe verwendet" - greek "BLOB column '%-.192s' used in key specification without a key length" - hun "BLOB mezo '%-.192s' hasznalt a mezo specifikacioban, a mezohossz megadasa nelkul" - ita "La colonna '%-.192s' di tipo BLOB e` usata in una chiave senza specificarne la lunghezza" - jpn "BLOB column '%-.192s' used in key specification without a key length" - kor "BLOB column '%-.192s' used in key specification without a key length" - nor "BLOB column '%-.192s' used in key specification without a key length" - norwegian-ny "BLOB column '%-.192s' used in key specification without a key length" - pol "BLOB column '%-.192s' used in key specification without a key length" - por "Coluna BLOB '%-.192s' usada na especificao de chave sem o comprimento da chave" - rum "Coloana BLOB '%-.192s' este folosita in specificarea unei chei fara ca o lungime de cheie sa fie folosita" - rus " BLOB '%-.192s' " - serbian "BLOB kolona '%-.192s' je upotrebljena u specifikaciji kljua bez navoenja duine kljua" - slo "BLOB column '%-.192s' used in key specification without a key length" - spa "Columna BLOB column '%-.192s' usada en especificacin de clave sin tamao de la clave" - swe "Du har inte angett ngon nyckellngd fr BLOB '%-.192s'" - ukr " BLOB '%-.192s' Φ " -ER_PRIMARY_CANT_HAVE_NULL 42000 - cze "V-Bechny sti primrnho kle musej bt NOT NULL; pokud potebujete NULL, pouijte UNIQUE" - dan "Alle dele af en PRIMARY KEY skal vre NOT NULL; Hvis du skal bruge NULL i nglen, brug UNIQUE istedet" - nla "Alle delen van een PRIMARY KEY moeten NOT NULL zijn; Indien u NULL in een zoeksleutel nodig heeft kunt u UNIQUE gebruiken" - eng "All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead" - est "Kik PRIMARY KEY peavad olema mratletud NOT NULL piiranguga; vajadusel kasuta UNIQUE tpi vtit" - fre "Toutes les parties d'un index PRIMARY KEY doivent tre NOT NULL; Si vous avez besoin d'un NULL dans l'index, utilisez un index UNIQUE" - ger "Alle Teile eines PRIMARY KEY mssen als NOT NULL definiert sein. Wenn NULL in einem Schlssel bentigt wird, muss ein UNIQUE-Schlssel verwendet werden" - hun "Az elsodleges kulcs teljes egeszeben csak NOT NULL tipusu lehet; Ha NULL mezot szeretne a kulcskent, hasznalja inkabb a UNIQUE-ot" - ita "Tutte le parti di una chiave primaria devono essere dichiarate NOT NULL; se necessitano valori NULL nelle chiavi utilizzare UNIQUE" - por "Todas as partes de uma chave primria devem ser no-nulas. Se voc precisou usar um valor nulo (NULL) em uma chave, use a clusula UNIQUE em seu lugar" - rum "Toate partile unei chei primare (PRIMARY KEY) trebuie sa fie NOT NULL; Daca aveti nevoie de NULL in vreo cheie, folositi UNIQUE in schimb" - rus " (PRIMARY KEY) NOT NULL; NULL , UNIQUE" - serbian "Svi delovi primarnog kljua moraju biti razliiti od NULL; Ako Vam ipak treba NULL vrednost u kljuu, upotrebite 'UNIQUE'" - spa "Todas las partes de un PRIMARY KEY deben ser NOT NULL; Si necesitas NULL en una clave, use UNIQUE" - swe "Alla delar av en PRIMARY KEY mste vara NOT NULL; Om du vill ha en nyckel med NULL, anvnd UNIQUE istllet" - ukr "Ӧ PRIMARY KEY Φ NOT NULL; դ NULL ަ, UNIQUE" -ER_TOO_MANY_ROWS 42000 - cze "V-Bsledek obsahuje vce ne jeden dek" - dan "Resultatet bestod af mere end een rkke" - nla "Resultaat bevatte meer dan een rij" - eng "Result consisted of more than one row" - est "Tulemis oli rohkem kui ks kirje" - fre "Le rsultat contient plus d'un enregistrement" - ger "Ergebnis besteht aus mehr als einer Zeile" - hun "Az eredmeny tobb, mint egy sort tartalmaz" - ita "Il risultato consiste di piu` di una riga" - por "O resultado consistiu em mais do que uma linha" - rum "Resultatul constista din mai multe linii" - rus " " - serbian "Rezultat je sainjen od vie slogova" - spa "Resultado compuesto de mas que una lnea" - swe "Resultet bestod av mera n en rad" - ukr " ¦ Φ Φ æ" -ER_REQUIRES_PRIMARY_KEY 42000 - cze "Tento typ tabulky vy-Baduje primrn kl" - dan "Denne tabeltype krver en primrngle" - nla "Dit tabel type heeft een primaire zoeksleutel nodig" - eng "This table type requires a primary key" - est "Antud tabelitp nuab primaarset vtit" - fre "Ce type de table ncessite une cl primaire (PRIMARY KEY)" - ger "Dieser Tabellentyp bentigt einen Primrschlssel (PRIMARY KEY)" - hun "Az adott tablatipushoz elsodleges kulcs hasznalata kotelezo" - ita "Questo tipo di tabella richiede una chiave primaria" - por "Este tipo de tabela requer uma chave primria" - rum "Aceast tip de tabela are nevoie de o cheie primara" - rus " " - serbian "Ovaj tip tabele zahteva da imate definisan primarni klju" - spa "Este tipo de tabla necesita de una primary key" - swe "Denna tabelltyp krver en PRIMARY KEY" - ukr " æ դ " -ER_NO_RAID_COMPILED - cze "Tato verze MySQL nen-B zkompilovna s podporou RAID" - dan "Denne udgave af MySQL er ikke oversat med understttelse af RAID" - nla "Deze versie van MySQL is niet gecompileerd met RAID ondersteuning" - eng "This version of MySQL is not compiled with RAID support" - est "Antud MySQL versioon on kompileeritud ilma RAID toeta" - fre "Cette version de MySQL n'est pas compile avec le support RAID" - ger "Diese MySQL-Version ist nicht mit RAID-Untersttzung kompiliert" - hun "Ezen leforditott MySQL verzio nem tartalmaz RAID support-ot" - ita "Questa versione di MYSQL non e` compilata con il supporto RAID" - por "Esta verso do MySQL no foi compilada com suporte a RAID" - rum "Aceasta versiune de MySQL, nu a fost compilata cu suport pentru RAID" - rus " MySQL RAID" - serbian "Ova verzija MySQL servera nije kompajlirana sa podrkom za RAID ureaje" - spa "Esta versin de MySQL no es compilada con soporte RAID" - swe "Denna version av MySQL r inte kompilerad med RAID" - ukr " Ӧ MySQL Ц Ц RAID" -ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE - cze "Update tabulky bez WHERE s kl-Bem nen v mdu bezpench update dovoleno" - dan "Du bruger sikker opdaterings modus ('safe update mode') og du forsgte at opdatere en tabel uden en WHERE klausul, der gr brug af et KEY felt" - nla "U gebruikt 'safe update mode' en u probeerde een tabel te updaten zonder een WHERE met een KEY kolom" - eng "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column" - est "Katse muuta tabelit turvalises rezhiimis ilma WHERE klauslita" - fre "Vous tes en mode 'safe update' et vous essayez de faire un UPDATE sans clause WHERE utilisant un index" - ger "MySQL luft im sicheren Aktualisierungsmodus (safe update mode). Sie haben versucht, eine Tabelle zu aktualisieren, ohne in der WHERE-Klausel ein KEY-Feld anzugeben" - hun "On a biztonsagos update modot hasznalja, es WHERE that uses a KEY column" - ita "In modalita` 'safe update' si e` cercato di aggiornare una tabella senza clausola WHERE su una chiave" - por "Voc est usando modo de atualizao seguro e tentou atualizar uma tabela sem uma clusula WHERE que use uma coluna chave" - rus " (safe update mode) WHERE" - serbian "Vi koristite safe update mod servera, a probali ste da promenite podatke bez 'WHERE' komande koja koristi kolonu kljua" - spa "Tu ests usando modo de actualizacin segura y tentado actualizar una tabla sin un WHERE que usa una KEY columna" - swe "Du anvnder 'sker uppdateringsmod' och frskte uppdatera en tabell utan en WHERE-sats som anvnder sig av en nyckel" - ukr " ͦ WHERE, դ KEY " -ER_KEY_DOES_NOT_EXITS 42000 S1009 - cze "Kl-B '%-.192s' v tabulce '%-.192s' neexistuje" - dan "Nglen '%-.192s' eksisterer ikke i tabellen '%-.192s'" - nla "Zoeksleutel '%-.192s' bestaat niet in tabel '%-.192s'" - eng "Key '%-.192s' doesn't exist in table '%-.192s'" - est "Vti '%-.192s' ei eksisteeri tabelis '%-.192s'" - fre "L'index '%-.192s' n'existe pas sur la table '%-.192s'" - ger "Schlssel '%-.192s' existiert in der Tabelle '%-.192s' nicht" - hun "A '%-.192s' kulcs nem letezik a '%-.192s' tablaban" - ita "La chiave '%-.192s' non esiste nella tabella '%-.192s'" - por "Chave '%-.192s' no existe na tabela '%-.192s'" - rus " '%-.192s' '%-.192s'" - serbian "Klju '%-.192s' ne postoji u tabeli '%-.192s'" - spa "Clave '%-.192s' no existe en la tabla '%-.192s'" - swe "Nyckel '%-.192s' finns inte in tabell '%-.192s'" - ukr " '%-.192s' դ æ '%-.192s'" -ER_CHECK_NO_SUCH_TABLE 42000 - cze "Nemohu otev-Bt tabulku" - dan "Kan ikke bne tabellen" - nla "Kan tabel niet openen" - eng "Can't open table" - est "Ei suuda avada tabelit" - fre "Impossible d'ouvrir la table" - ger "Kann Tabelle nicht ffnen" - hun "Nem tudom megnyitni a tablat" - ita "Impossibile aprire la tabella" - por "No pode abrir a tabela" - rus " " - serbian "Ne mogu da otvorim tabelu" - spa "No puedo abrir tabla" - swe "Kan inte ppna tabellen" - ukr " צ " -ER_CHECK_NOT_IMPLEMENTED 42000 - cze "Handler tabulky nepodporuje %s" - dan "Denne tabeltype understtter ikke %s" - nla "De 'handler' voor de tabel ondersteund geen %s" - eng "The storage engine for the table doesn't support %s" - est "Antud tabelitp ei toeta %s kske" - fre "Ce type de table ne supporte pas les %s" - ger "Die Speicher-Engine fr diese Tabelle untersttzt kein %s" - greek "The handler for the table doesn't support %s" - hun "A tabla kezeloje (handler) nem tamogatja az %s" - ita "Il gestore per la tabella non supporta il %s" - jpn "The handler for the table doesn't support %s" - kor "The handler for the table doesn't support %s" - nor "The handler for the table doesn't support %s" - norwegian-ny "The handler for the table doesn't support %s" - pol "The handler for the table doesn't support %s" - por "O manipulador de tabela no suporta %s" - rum "The handler for the table doesn't support %s" - rus " : %s" - serbian "Handler za ovu tabelu ne dozvoljava %s komande" - slo "The handler for the table doesn't support %s" - spa "El manipulador de la tabla no permite soporte para %s" - swe "Tabellhanteraren fr denna tabell kan inte gra %s" - ukr "ڦ æ Ц %s" -ER_CANT_DO_THIS_DURING_AN_TRANSACTION 25000 - cze "Proveden-B tohoto pkazu nen v transakci dovoleno" - dan "Du m ikke bruge denne kommando i en transaktion" - nla "Het is u niet toegestaan dit commando uit te voeren binnen een transactie" - eng "You are not allowed to execute this command in a transaction" - est "Seda ksku ei saa kasutada transaktsiooni sees" - fre "Vous n'tes pas autoris excute cette commande dans une transaction" - ger "Sie drfen diesen Befehl nicht in einer Transaktion ausfhren" - hun "Az On szamara nem engedelyezett a parancs vegrehajtasa a tranzakcioban" - ita "Non puoi eseguire questo comando in una transazione" - por "No lhe permitido executar este comando em uma transao" - rus " " - serbian "Nije Vam dozvoljeno da izvrite ovu komandu u transakciji" - spa "No tienes el permiso para ejecutar este comando en una transicin" - swe "Du fr inte utfra detta kommando i en transaktion" - ukr " æ" -ER_ERROR_DURING_COMMIT - cze "Chyba %d p-Bi COMMIT" - dan "Modtog fejl %d mens kommandoen COMMIT blev udfrt" - nla "Kreeg fout %d tijdens COMMIT" - eng "Got error %d during COMMIT" - est "Viga %d ksu COMMIT titmisel" - fre "Erreur %d lors du COMMIT" - ger "Fehler %d beim COMMIT" - hun "%d hiba a COMMIT vegrehajtasa soran" - ita "Rilevato l'errore %d durante il COMMIT" - por "Obteve erro %d durante COMMIT" - rus " %d COMMIT" - serbian "Greka %d za vreme izvravanja komande 'COMMIT'" - spa "Obtenido error %d durante COMMIT" - swe "Fick fel %d vid COMMIT" - ukr " %d Ц COMMIT" -ER_ERROR_DURING_ROLLBACK - cze "Chyba %d p-Bi ROLLBACK" - dan "Modtog fejl %d mens kommandoen ROLLBACK blev udfrt" - nla "Kreeg fout %d tijdens ROLLBACK" - eng "Got error %d during ROLLBACK" - est "Viga %d ksu ROLLBACK titmisel" - fre "Erreur %d lors du ROLLBACK" - ger "Fehler %d beim ROLLBACK" - hun "%d hiba a ROLLBACK vegrehajtasa soran" - ita "Rilevato l'errore %d durante il ROLLBACK" - por "Obteve erro %d durante ROLLBACK" - rus " %d ROLLBACK" - serbian "Greka %d za vreme izvravanja komande 'ROLLBACK'" - spa "Obtenido error %d durante ROLLBACK" - swe "Fick fel %d vid ROLLBACK" - ukr " %d Ц ROLLBACK" -ER_ERROR_DURING_FLUSH_LOGS - cze "Chyba %d p-Bi FLUSH_LOGS" - dan "Modtog fejl %d mens kommandoen FLUSH_LOGS blev udfrt" - nla "Kreeg fout %d tijdens FLUSH_LOGS" - eng "Got error %d during FLUSH_LOGS" - est "Viga %d ksu FLUSH_LOGS titmisel" - fre "Erreur %d lors du FLUSH_LOGS" - ger "Fehler %d bei FLUSH_LOGS" - hun "%d hiba a FLUSH_LOGS vegrehajtasa soran" - ita "Rilevato l'errore %d durante il FLUSH_LOGS" - por "Obteve erro %d durante FLUSH_LOGS" - rus " %d FLUSH_LOGS" - serbian "Greka %d za vreme izvravanja komande 'FLUSH_LOGS'" - spa "Obtenido error %d durante FLUSH_LOGS" - swe "Fick fel %d vid FLUSH_LOGS" - ukr " %d Ц FLUSH_LOGS" -ER_ERROR_DURING_CHECKPOINT - cze "Chyba %d p-Bi CHECKPOINT" - dan "Modtog fejl %d mens kommandoen CHECKPOINT blev udfrt" - nla "Kreeg fout %d tijdens CHECKPOINT" - eng "Got error %d during CHECKPOINT" - est "Viga %d ksu CHECKPOINT titmisel" - fre "Erreur %d lors du CHECKPOINT" - ger "Fehler %d bei CHECKPOINT" - hun "%d hiba a CHECKPOINT vegrehajtasa soran" - ita "Rilevato l'errore %d durante il CHECKPOINT" - por "Obteve erro %d durante CHECKPOINT" - rus " %d CHECKPOINT" - serbian "Greka %d za vreme izvravanja komande 'CHECKPOINT'" - spa "Obtenido error %d durante CHECKPOINT" - swe "Fick fel %d vid CHECKPOINT" - ukr " %d Ц CHECKPOINT" -ER_NEW_ABORTING_CONNECTION 08S01 - cze "Spojen-B %ld do databze: '%-.192s' uivatel: '%-.48s' stroj: '%-.64s' (%-.64s) bylo perueno" - dan "Afbrd forbindelsen %ld til databasen '%-.192s' bruger: '%-.48s' vrt: '%-.64s' (%-.64s)" - nla "Afgebroken verbinding %ld naar db: '%-.192s' gebruiker: '%-.48s' host: '%-.64s' (%-.64s)" - eng "Aborted connection %ld to db: '%-.192s' user: '%-.48s' host: '%-.64s' (%-.64s)" - est "hendus katkestatud %ld andmebaas: '%-.192s' kasutaja: '%-.48s' masin: '%-.64s' (%-.64s)" - fre "Connection %ld avorte vers la bd: '%-.192s' utilisateur: '%-.48s' hte: '%-.64s' (%-.64s)" - ger "Abbruch der Verbindung %ld zur Datenbank '%-.192s'. Benutzer: '%-.48s', Host: '%-.64s' (%-.64s)" - ita "Interrotta la connessione %ld al db: ''%-.192s' utente: '%-.48s' host: '%-.64s' (%-.64s)" - por "Conexo %ld abortada para banco de dados '%-.192s' - usurio '%-.48s' - 'host' '%-.64s' ('%-.64s')" - rus " %ld '%-.192s' '%-.48s' '%-.64s' (%-.64s)" - serbian "Prekinuta konekcija broj %ld ka bazi: '%-.192s' korisnik je bio: '%-.48s' a host: '%-.64s' (%-.64s)" - spa "Abortada conexin %ld para db: '%-.192s' usuario: '%-.48s' servidor: '%-.64s' (%-.64s)" - swe "Avbrt lnken fr trd %ld till db '%-.192s', anvndare '%-.48s', host '%-.64s' (%-.64s)" - ukr " ' %ld : '%-.192s' : '%-.48s' : '%-.64s' (%-.64s)" -ER_DUMP_NOT_IMPLEMENTED - cze "Handler tabulky nepodporuje bin-Brn dump" - dan "Denne tabeltype unsersttter ikke binrt tabeldump" - nla "De 'handler' voor de tabel ondersteund geen binaire tabel dump" - eng "The storage engine for the table does not support binary table dump" - fre "Ce type de table ne supporte pas les copies binaires" - ger "Die Speicher-Engine fr die Tabelle untersttzt keinen binren Tabellen-Dump" - ita "Il gestore per la tabella non supporta il dump binario" - jpn "The handler for the table does not support binary table dump" - por "O manipulador de tabela no suporta 'dump' binrio de tabela" - rum "The handler for the table does not support binary table dump" - rus " (dump)" - serbian "Handler tabele ne podrava binarni dump tabele" - spa "El manipulador de tabla no soporta dump para tabla binaria" - swe "Tabellhanteraren klarar inte en binr kopiering av tabellen" - ukr " æ Цդ ¦ æ" -ER_FLUSH_MASTER_BINLOG_CLOSED - eng "Binlog closed, cannot RESET MASTER" - ger "Binlog geschlossen. Kann RESET MASTER nicht ausfhren" - por "Binlog fechado. No pode fazer RESET MASTER" - rus " , RESET MASTER" - serbian "Binarni log file zatvoren, ne mogu da izvrim komandu 'RESET MASTER'" - ukr "̦æ , RESET MASTER" -ER_INDEX_REBUILD - cze "P-Bebudovn indexu dumpnut tabulky '%-.192s' nebylo spn" - dan "Kunne ikke genopbygge indekset for den dumpede tabel '%-.192s'" - nla "Gefaald tijdens heropbouw index van gedumpte tabel '%-.192s'" - eng "Failed rebuilding the index of dumped table '%-.192s'" - fre "La reconstruction de l'index de la table copie '%-.192s' a chou" - ger "Neuerstellung des Index der Dump-Tabelle '%-.192s' fehlgeschlagen" - greek "Failed rebuilding the index of dumped table '%-.192s'" - hun "Failed rebuilding the index of dumped table '%-.192s'" - ita "Fallita la ricostruzione dell'indice della tabella copiata '%-.192s'" - por "Falhou na reconstruo do ndice da tabela 'dumped' '%-.192s'" - rus " '%-.192s'" - serbian "Izgradnja indeksa dump-ovane tabele '%-.192s' nije uspela" - spa "Falla reconstruyendo el indice de la tabla dumped '%-.192s'" - ukr " צ ϧ æ '%-.192s'" -ER_MASTER - cze "Chyba masteru: '%-.64s'" - dan "Fejl fra master: '%-.64s'" - nla "Fout van master: '%-.64s'" - eng "Error from master: '%-.64s'" - fre "Erreur reue du matre: '%-.64s'" - ger "Fehler vom Master: '%-.64s'" - ita "Errore dal master: '%-.64s" - por "Erro no 'master' '%-.64s'" - rus " : '%-.64s'" - serbian "Greka iz glavnog servera '%-.64s' u klasteru" - spa "Error del master: '%-.64s'" - swe "Fick en master: '%-.64s'" - ukr " צ : '%-.64s'" -ER_MASTER_NET_READ 08S01 - cze "S-Bov chyba pi ten z masteru" - dan "Netvrksfejl ved lsning fra master" - nla "Net fout tijdens lezen van master" - eng "Net error reading from master" - fre "Erreur de lecture rseau reue du matre" - ger "Netzfehler beim Lesen vom Master" - ita "Errore di rete durante la ricezione dal master" - por "Erro de rede lendo do 'master'" - rus " " - serbian "Greka u primanju mrenih paketa sa glavnog servera u klasteru" - spa "Error de red leyendo del master" - swe "Fick ntverksfel vid lsning frn master" - ukr " צ " -ER_MASTER_NET_WRITE 08S01 - cze "S-Bov chyba pi zpisu na master" - dan "Netvrksfejl ved skrivning til master" - nla "Net fout tijdens schrijven naar master" - eng "Net error writing to master" - fre "Erreur d'criture rseau reue du matre" - ger "Netzfehler beim Schreiben zum Master" - ita "Errore di rete durante l'invio al master" - por "Erro de rede gravando no 'master'" - rus " " - serbian "Greka u slanju mrenih paketa na glavni server u klasteru" - spa "Error de red escribiendo para el master" - swe "Fick ntverksfel vid skrivning till master" - ukr " " -ER_FT_MATCHING_KEY_NOT_FOUND - cze "-Bdn sloupec nem vytvoen fulltextov index" - dan "Kan ikke finde en FULLTEXT ngle som svarer til kolonne listen" - nla "Kan geen FULLTEXT index vinden passend bij de kolom lijst" - eng "Can't find FULLTEXT index matching the column list" - est "Ei suutnud leida FULLTEXT indeksit, mis kattuks kasutatud tulpadega" - fre "Impossible de trouver un index FULLTEXT correspondant cette liste de colonnes" - ger "Kann keinen FULLTEXT-Index finden, der der Feldliste entspricht" - ita "Impossibile trovare un indice FULLTEXT che corrisponda all'elenco delle colonne" - por "No pode encontrar um ndice para o texto todo que combine com a lista de colunas" - rus " (FULLTEXT) , " - serbian "Ne mogu da pronaem 'FULLTEXT' indeks koli odgovara listi kolona" - spa "No puedo encontrar ndice FULLTEXT correspondiendo a la lista de columnas" - swe "Hittar inte ett FULLTEXT-index i kolumnlistan" - ukr " FULLTEXT , צצ ̦ æ" -ER_LOCK_OR_ACTIVE_TRANSACTION - cze "Nemohu prov-Bst zadan pkaz, protoe existuj aktivn zamen tabulky nebo aktivn transakce" - dan "Kan ikke udfre den givne kommando fordi der findes aktive, lste tabeller eller fordi der udfres en transaktion" - nla "Kan het gegeven commando niet uitvoeren, want u heeft actieve gelockte tabellen of een actieve transactie" - eng "Can't execute the given command because you have active locked tables or an active transaction" - est "Ei suuda tita antud ksku kuna on aktiivseid lukke vi kimasolev transaktsioon" - fre "Impossible d'excuter la commande car vous avez des tables verrouilles ou une transaction active" - ger "Kann den angegebenen Befehl wegen einer aktiven Tabellensperre oder einer aktiven Transaktion nicht ausfhren" - ita "Impossibile eseguire il comando richiesto: tabelle sotto lock o transazione in atto" - por "No pode executar o comando dado porque voc tem tabelas ativas travadas ou uma transao ativa" - rus " , " - serbian "Ne mogu da izvrim datu komandu zbog toga to su tabele zakljuane ili je transakcija u toku" - spa "No puedo ejecutar el comando dado porque tienes tablas bloqueadas o una transicin activa" - swe "Kan inte utfra kommandot emedan du har en lst tabell eller an aktiv transaktion" - ukr " , դ æ" -ER_UNKNOWN_SYSTEM_VARIABLE - cze "Nezn-Bm systmov promnn '%-.64s'" - dan "Ukendt systemvariabel '%-.64s'" - nla "Onbekende systeem variabele '%-.64s'" - eng "Unknown system variable '%-.64s'" - est "Tundmatu ssteemne muutuja '%-.64s'" - fre "Variable systme '%-.64s' inconnue" - ger "Unbekannte Systemvariable '%-.64s'" - ita "Variabile di sistema '%-.64s' sconosciuta" - por "Varivel de sistema '%-.64s' desconhecida" - rus " '%-.64s'" - serbian "Nepoznata sistemska promenljiva '%-.64s'" - spa "Desconocida variable de sistema '%-.64s'" - swe "Oknd systemvariabel: '%-.64s'" - ukr "צ ͦ '%-.64s'" -ER_CRASHED_ON_USAGE - cze "Tabulka '%-.192s' je ozna-Bena jako poruen a mla by bt opravena" - dan "Tabellen '%-.192s' er markeret med fejl og br repareres" - nla "Tabel '%-.192s' staat als gecrashed gemarkeerd en dient te worden gerepareerd" - eng "Table '%-.192s' is marked as crashed and should be repaired" - est "Tabel '%-.192s' on mrgitud vigaseks ja tuleb parandada" - fre "La table '%-.192s' est marque 'crashed' et devrait tre rpare" - ger "Tabelle '%-.192s' ist als defekt markiert und sollte repariert werden" - ita "La tabella '%-.192s' e` segnalata come corrotta e deve essere riparata" - por "Tabela '%-.192s' est marcada como danificada e deve ser reparada" - rus " '%-.192s' " - serbian "Tabela '%-.192s' je markirana kao oteena i trebala bi biti popravljena" - spa "Tabla '%-.192s' est marcada como crashed y debe ser reparada" - swe "Tabell '%-.192s' r trasig och br repareras med REPAIR TABLE" - ukr " '%-.192s' ڦ Ҧ צ" -ER_CRASHED_ON_REPAIR - cze "Tabulka '%-.192s' je ozna-Bena jako poruen a posledn (automatick?) oprava se nezdaila" - dan "Tabellen '%-.192s' er markeret med fejl og sidste (automatiske?) REPAIR fejlede" - nla "Tabel '%-.192s' staat als gecrashed gemarkeerd en de laatste (automatische?) reparatie poging mislukte" - eng "Table '%-.192s' is marked as crashed and last (automatic?) repair failed" - est "Tabel '%-.192s' on mrgitud vigaseks ja viimane (automaatne?) parandus ebannestus" - fre "La table '%-.192s' est marque 'crashed' et le dernier 'repair' a chou" - ger "Tabelle '%-.192s' ist als defekt markiert und der letzte (automatische?) Reparaturversuch schlug fehl" - ita "La tabella '%-.192s' e` segnalata come corrotta e l'ultima ricostruzione (automatica?) e` fallita" - por "Tabela '%-.192s' est marcada como danificada e a ltima reparao (automtica?) falhou" - rus " '%-.192s' (?) " - serbian "Tabela '%-.192s' je markirana kao oteena, a zadnja (automatska?) popravka je bila neuspela" - spa "Tabla '%-.192s' est marcada como crashed y la ltima reparacin (automactica?) fall" - swe "Tabell '%-.192s' r trasig och senast (automatiska?) reparation misslyckades" - ukr " '%-.192s' ڦ Τ (?) צ " -ER_WARNING_NOT_COMPLETE_ROLLBACK - dan "Advarsel: Visse data i tabeller der ikke understtter transaktioner kunne ikke tilbagestilles" - nla "Waarschuwing: Roll back mislukt voor sommige buiten transacties gewijzigde tabellen" - eng "Some non-transactional changed tables couldn't be rolled back" - est "Hoiatus: mnesid transaktsioone mittetoetavaid tabeleid ei suudetud tagasi kerida" - fre "Attention: certaines tables ne supportant pas les transactions ont t changes et elles ne pourront pas tre restitues" - ger "nderungen an einigen nicht transaktionalen Tabellen konnten nicht zurckgerollt werden" - ita "Attenzione: Alcune delle modifiche alle tabelle non transazionali non possono essere ripristinate (roll back impossibile)" - por "Aviso: Algumas tabelas no-transacionais alteradas no puderam ser reconstitudas (rolled back)" - rus ": " - serbian "Upozorenje: Neke izmenjene tabele ne podravaju komandu 'ROLLBACK'" - spa "Aviso: Algunas tablas no transancionales no pueden tener rolled back" - swe "Warning: Ngra icke transaktionella tabeller kunde inte terstllas vid ROLLBACK" - ukr ": ˦ æΦ ͦ " -ER_TRANS_CACHE_FULL - dan "Fler-udtryks transaktion krvede mere plads en 'max_binlog_cache_size' bytes. Forhj vrdien af denne variabel og prv igen" - nla "Multi-statement transactie vereist meer dan 'max_binlog_cache_size' bytes opslag. Verhoog deze mysqld variabele en probeer opnieuw" - eng "Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again" - est "Mitme lausendiga transaktsioon nudis rohkem ruumi kui lubatud 'max_binlog_cache_size' muutujaga. Suurenda muutuja vrtust ja proovi uuesti" - fre "Cette transaction commandes multiples ncessite plus de 'max_binlog_cache_size' octets de stockage, augmentez cette variable de mysqld et ressayez" - ger "Transaktionen, die aus mehreren Befehlen bestehen, bentigten mehr als 'max_binlog_cache_size' Bytes an Speicher. Btte vergrssern Sie diese Server-Variable versuchen Sie es noch einmal" - ita "La transazione a comandi multipli (multi-statement) ha richiesto piu` di 'max_binlog_cache_size' bytes di disco: aumentare questa variabile di mysqld e riprovare" - por "Transaes multi-declaradas (multi-statement transactions) requeriram mais do que o valor limite (max_binlog_cache_size) de bytes para armazenagem. Aumente o valor desta varivel do mysqld e tente novamente" - rus ", , 'max_binlog_cache_size' . mysqld " - spa "Multipla transicin necesita mas que 'max_binlog_cache_size' bytes de almacenamiento. Aumente esta variable mysqld y tente de nuevo" - swe "Transaktionen krvde mera n 'max_binlog_cache_size' minne. ka denna mysqld-variabel och frsk p nytt" - ukr "æ ¦ Φ 'max_binlog_cache_size' Ԧ Ҧ. ¦ ͦ mysqld " -ER_SLAVE_MUST_STOP - dan "Denne handling kunne ikke udfres med krende slave, brug frst kommandoen STOP SLAVE" - nla "Deze operatie kan niet worden uitgevoerd met een actieve slave, doe eerst STOP SLAVE" - eng "This operation cannot be performed with a running slave; run STOP SLAVE first" - fre "Cette opration ne peut tre ralise avec un esclave actif, faites STOP SLAVE d'abord" - ger "Diese Operation kann bei einem aktiven Slave nicht durchgefhrt werden. Bitte zuerst STOP SLAVE ausfhren" - ita "Questa operazione non puo' essere eseguita con un database 'slave' che gira, lanciare prima STOP SLAVE" - por "Esta operao no pode ser realizada com um 'slave' em execuo. Execute STOP SLAVE primeiro" - rus " . STOP SLAVE" - serbian "Ova operacija ne moe biti izvrena dok je aktivan podreeni server. Zadajte prvo komandu 'STOP SLAVE' da zaustavite podreeni server." - spa "Esta operacin no puede ser hecha con el esclavo funcionando, primero use STOP SLAVE" - swe "Denna operation kan inte gras under replikering; Gr STOP SLAVE frst" - ukr "æ Ц, STOP SLAVE" -ER_SLAVE_NOT_RUNNING - dan "Denne handling krver en krende slave. Konfigurer en slave og brug kommandoen START SLAVE" - nla "Deze operatie vereist een actieve slave, configureer slave en doe dan START SLAVE" - eng "This operation requires a running slave; configure slave and do START SLAVE" - fre "Cette opration ncessite un esclave actif, configurez les esclaves et faites START SLAVE" - ger "Diese Operation bentigt einen aktiven Slave. Bitte Slave konfigurieren und mittels START SLAVE aktivieren" - ita "Questa operaione richiede un database 'slave', configurarlo ed eseguire START SLAVE" - por "Esta operao requer um 'slave' em execuo. Configure o 'slave' e execute START SLAVE" - rus " . START SLAVE" - serbian "Ova operacija zahteva da je aktivan podreeni server. Konfiguriite prvo podreeni server i onda izvrite komandu 'START SLAVE'" - spa "Esta operacin necesita el esclavo funcionando, configure esclavo y haga el START SLAVE" - swe "Denna operation kan endast gras under replikering; Konfigurera slaven och gr START SLAVE" - ukr "æ Ц, Ʀ Ц START SLAVE" -ER_BAD_SLAVE - dan "Denne server er ikke konfigureret som slave. Ret in config-filen eller brug kommandoen CHANGE MASTER TO" - nla "De server is niet geconfigureerd als slave, fix in configuratie bestand of met CHANGE MASTER TO" - eng "The server is not configured as slave; fix with CHANGE MASTER TO" - fre "Le server n'est pas configur comme un esclave, changez le fichier de configuration ou utilisez CHANGE MASTER TO" - ger "Der Server ist nicht als Slave konfiguriert. Bitte mittels CHANGE MASTER TO beheben" - ita "Il server non e' configurato come 'slave', correggere il file di configurazione cambiando CHANGE MASTER TO" - por "O servidor no est configurado como 'slave'. Acerte o arquivo de configurao ou use CHANGE MASTER TO" - rus " . CHANGE MASTER TO" - serbian "Server nije konfigurisan kao podreeni server, ispravite konfiguracioni file ili na njemu izvrite komandu 'CHANGE MASTER TO'" - spa "El servidor no est configurado como esclavo, edite el archivo config file o con CHANGE MASTER TO" - swe "Servern r inte konfigurerade som en replikationsslav. ndra konfigurationsfilen eller gr CHANGE MASTER TO" - ukr " Ʀ Ц, CHANGE MASTER TO" -ER_MASTER_INFO - eng "Could not initialize master info structure; more error messages can be found in the MySQL error log" - fre "Impossible d'initialiser les structures d'information de matre, vous trouverez des messages d'erreur supplmentaires dans le journal des erreurs de MySQL" - ger "Konnte Master-Info-Struktur nicht initialisieren. Weitere Fehlermeldungen knnen im MySQL-Error-Log eingesehen werden" - serbian "Nisam mogao da inicijalizujem informacionu strukturu glavnog servera, proverite da li imam privilegije potrebne za pristup file-u 'master.info'" - swe "Kunde inte initialisera replikationsstrukturerna. See MySQL fel fil fr mera information" -ER_SLAVE_THREAD - dan "Kunne ikke danne en slave-trd; check systemressourcerne" - nla "Kon slave thread niet aanmaken, controleer systeem resources" - eng "Could not create slave thread; check system resources" - fre "Impossible de crer une tche esclave, vrifiez les ressources systme" - ger "Konnte Slave-Thread nicht starten. Bitte System-Ressourcen berprfen" - ita "Impossibile creare il thread 'slave', controllare le risorse di sistema" - por "No conseguiu criar 'thread' de 'slave'. Verifique os recursos do sistema" - rus " . " - serbian "Nisam mogao da startujem thread za podreeni server, proverite sistemske resurse" - spa "No puedo crear el thread esclavo, verifique recursos del sistema" - swe "Kunde inte starta en trd fr replikering" - ukr " Ц Ǧ, צ Φ " -ER_TOO_MANY_USER_CONNECTIONS 42000 - dan "Brugeren %-.64s har allerede mere end 'max_user_connections' aktive forbindelser" - nla "Gebruiker %-.64s heeft reeds meer dan 'max_user_connections' actieve verbindingen" - eng "User %-.64s already has more than 'max_user_connections' active connections" - est "Kasutajal %-.64s on juba rohkem hendusi kui lubatud 'max_user_connections' muutujaga" - fre "L'utilisateur %-.64s possde dj plus de 'max_user_connections' connexions actives" - ger "Benutzer '%-.64s' hat mehr als 'max_user_connections' aktive Verbindungen" - ita "L'utente %-.64s ha gia' piu' di 'max_user_connections' connessioni attive" - por "Usurio '%-.64s' j possui mais que o valor mximo de conexes (max_user_connections) ativas" - rus " %-.64s 'max_user_connections' " - serbian "Korisnik %-.64s ve ima vie aktivnih konekcija nego to je to odreeno 'max_user_connections' promenljivom" - spa "Usario %-.64s ya tiene mas que 'max_user_connections' conexiones activas" - swe "Anvndare '%-.64s' har redan 'max_user_connections' aktiva inloggningar" - ukr " %-.64s ¦ Φ 'max_user_connections' '" -ER_SET_CONSTANTS_ONLY - dan "Du m kun bruge konstantudtryk med SET" - nla "U mag alleen constante expressies gebruiken bij SET" - eng "You may only use constant expressions with SET" - est "Ainult konstantsed suurused on lubatud SET klauslis" - fre "Seules les expressions constantes sont autorises avec SET" - ger "Bei SET drfen nur konstante Ausdrcke verwendet werden" - ita "Si possono usare solo espressioni costanti con SET" - por "Voc pode usar apenas expresses constantes com SET" - rus " SET " - serbian "Moete upotrebiti samo konstantan iskaz sa komandom 'SET'" - spa "Tu solo debes usar expresiones constantes con SET" - swe "Man kan endast anvnda konstantuttryck med SET" - ukr " ڦ SET" -ER_LOCK_WAIT_TIMEOUT - dan "Lock wait timeout overskredet" - nla "Lock wacht tijd overschreden" - eng "Lock wait timeout exceeded; try restarting transaction" - est "Kontrollaeg letatud luku jrel ootamisel; Proovi transaktsiooni otsast alata" - fre "Timeout sur l'obtention du verrou" - ger "Beim Warten auf eine Sperre wurde die zulssige Wartezeit berschritten. Bitte versuchen Sie, die Transaktion neu zu starten" - ita "E' scaduto il timeout per l'attesa del lock" - por "Tempo de espera (timeout) de travamento excedido. Tente reiniciar a transao." - rus " ; " - serbian "Vremenski limit za zakljuavanje tabele je istekao; Probajte da ponovo startujete transakciju" - spa "Tiempo de bloqueo de espera excedido" - swe "Fick inte ett ls i tid ; Frsk att starta om transaktionen" - ukr " ަ " -ER_LOCK_TABLE_FULL - dan "Det totale antal lse overstiger strrelsen p lse-tabellen" - nla "Het totale aantal locks overschrijdt de lock tabel grootte" - eng "The total number of locks exceeds the lock table size" - est "Lukkude koguarv letab lukutabeli suuruse" - fre "Le nombre total de verrou dpasse la taille de la table des verrous" - ger "Die Gesamtzahl der Sperren berschreitet die Gre der Sperrtabelle" - ita "Il numero totale di lock e' maggiore della grandezza della tabella di lock" - por "O nmero total de travamentos excede o tamanho da tabela de travamentos" - rus " " - serbian "Broj totalnih zakljuavanja tabele premauje veliinu tabele zakljuavanja" - spa "El nmero total de bloqueos excede el tamao de bloqueo de la tabla" - swe "Antal ls verskrider antalet reserverade ls" - ukr " ˦˦ ͦ æ" -ER_READ_ONLY_TRANSACTION 25000 - dan "Update ls kan ikke opns under en READ UNCOMMITTED transaktion" - nla "Update locks kunnen niet worden verkregen tijdens een READ UNCOMMITTED transactie" - eng "Update locks cannot be acquired during a READ UNCOMMITTED transaction" - est "Uuenduslukke ei saa kasutada READ UNCOMMITTED transaktsiooni kigus" - fre "Un verrou en update ne peut tre acquit pendant une transaction READ UNCOMMITTED" - ger "Whrend einer READ-UNCOMMITTED-Transaktion knnen keine UPDATE-Sperren angefordert werden" - ita "I lock di aggiornamento non possono essere acquisiti durante una transazione 'READ UNCOMMITTED'" - por "Travamentos de atualizao no podem ser obtidos durante uma transao de tipo READ UNCOMMITTED" - rus " ( READ UNCOMMITTED) " - serbian "Zakljuavanja izmena ne mogu biti realizovana sve dok traje 'READ UNCOMMITTED' transakcija" - spa "Bloqueos de actualizacin no pueden ser adqueridos durante una transicin READ UNCOMMITTED" - swe "Updateringsls kan inte gras nr man anvnder READ UNCOMMITTED" - ukr " ڦ æ READ UNCOMMITTED" -ER_DROP_DB_WITH_READ_LOCK - dan "DROP DATABASE er ikke tilladt mens en trd holder p globalt read lock" - nla "DROP DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit" - eng "DROP DATABASE not allowed while thread is holding global read lock" - est "DROP DATABASE ei ole lubatud kui lim omab globaalset READ lukku" - fre "DROP DATABASE n'est pas autorise pendant qu'une tche possde un verrou global en lecture" - ger "DROP DATABASE ist nicht erlaubt, solange der Thread eine globale Lesesperre hlt" - ita "DROP DATABASE non e' permesso mentre il thread ha un lock globale di lettura" - por "DROP DATABASE no permitido enquanto uma 'thread' est mantendo um travamento global de leitura" - rus " DROP DATABASE, " - serbian "Komanda 'DROP DATABASE' nije dozvoljena dok thread globalno zakljuava itanje podataka" - spa "DROP DATABASE no permitido mientras un thread est ejerciendo un bloqueo de lectura global" - swe "DROP DATABASE r inte tilltet nr man har ett globalt lsls" - ukr "DROP DATABASE Ǧ Ц " -ER_CREATE_DB_WITH_READ_LOCK - dan "CREATE DATABASE er ikke tilladt mens en trd holder p globalt read lock" - nla "CREATE DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit" - eng "CREATE DATABASE not allowed while thread is holding global read lock" - est "CREATE DATABASE ei ole lubatud kui lim omab globaalset READ lukku" - fre "CREATE DATABASE n'est pas autorise pendant qu'une tche possde un verrou global en lecture" - ger "CREATE DATABASE ist nicht erlaubt, solange der Thread eine globale Lesesperre hlt" - ita "CREATE DATABASE non e' permesso mentre il thread ha un lock globale di lettura" - por "CREATE DATABASE no permitido enquanto uma 'thread' est mantendo um travamento global de leitura" - rus " CREATE DATABASE, " - serbian "Komanda 'CREATE DATABASE' nije dozvoljena dok thread globalno zakljuava itanje podataka" - spa "CREATE DATABASE no permitido mientras un thread est ejerciendo un bloqueo de lectura global" - swe "CREATE DATABASE r inte tilltet nr man har ett globalt lsls" - ukr "CREATE DATABASE Ǧ Ц " -ER_WRONG_ARGUMENTS - nla "Foutieve parameters voor %s" - eng "Incorrect arguments to %s" - est "Vigased parameetrid %s-le" - fre "Mauvais arguments %s" - ger "Falsche Argumente fr %s" - ita "Argomenti errati a %s" - por "Argumentos errados para %s" - rus " %s" - serbian "Pogreni argumenti prosleeni na %s" - spa "Argumentos errados para %s" - swe "Felaktiga argument till %s" - ukr " %s" -ER_NO_PERMISSION_TO_CREATE_USER 42000 - nla "'%-.48s'@'%-.64s' mag geen nieuwe gebruikers creeren" - eng "'%-.48s'@'%-.64s' is not allowed to create new users" - est "Kasutajal '%-.48s'@'%-.64s' ei ole lubatud luua uusi kasutajaid" - fre "'%-.48s'@'%-.64s' n'est pas autoris crer de nouveaux utilisateurs" - ger "'%-.48s'@'%-.64s' ist nicht berechtigt, neue Benutzer hinzuzufgen" - ita "A '%-.48s'@'%-.64s' non e' permesso creare nuovi utenti" - por "No permitido a '%-.48s'@'%-.64s' criar novos usurios" - rus "'%-.48s'@'%-.64s' " - serbian "Korisniku '%-.48s'@'%-.64s' nije dozvoljeno da kreira nove korisnike" - spa "'%-.48s`@`%-.64s` no es permitido para crear nuevos usuarios" - swe "'%-.48s'@'%-.64s' har inte rttighet att skapa nya anvndare" - ukr " '%-.48s'@'%-.64s' ަ" -ER_UNION_TABLES_IN_DIFFERENT_DIR - nla "Incorrecte tabel definitie; alle MERGE tabellen moeten tot dezelfde database behoren" - eng "Incorrect table definition; all MERGE tables must be in the same database" - est "Vigane tabelimratlus; kik MERGE tabeli liikmed peavad asuma samas andmebaasis" - fre "Dfinition de table incorrecte; toutes les tables MERGE doivent tre dans la mme base de donne" - ger "Falsche Tabellendefinition. Alle MERGE-Tabellen mssen sich in derselben Datenbank befinden" - ita "Definizione della tabella errata; tutte le tabelle di tipo MERGE devono essere nello stesso database" - por "Definio incorreta da tabela. Todas as tabelas contidas na juno devem estar no mesmo banco de dados." - rus " ; MERGE " - serbian "Pogrena definicija tabele; sve 'MERGE' tabele moraju biti u istoj bazi podataka" - spa "Incorrecta definicin de la tabla; Todas las tablas MERGE deben estar en el mismo banco de datos" - swe "Felaktig tabelldefinition; alla tabeller i en MERGE-tabell mste vara i samma databas" -ER_LOCK_DEADLOCK 40001 - nla "Deadlock gevonden tijdens lock-aanvraag poging; Probeer herstart van de transactie" - eng "Deadlock found when trying to get lock; try restarting transaction" - est "Lukustamisel tekkis tupik (deadlock); alusta transaktsiooni otsast" - fre "Deadlock dcouvert en essayant d'obtenir les verrous : essayez de redmarrer la transaction" - ger "Beim Versuch, eine Sperre anzufordern, ist ein Deadlock aufgetreten. Versuchen Sie, die Transaktion neu zu starten" - ita "Trovato deadlock durante il lock; Provare a far ripartire la transazione" - por "Encontrado um travamento fatal (deadlock) quando tentava obter uma trava. Tente reiniciar a transao." - rus " ; " - serbian "Unakrsno zakljuavanje pronaeno kada sam pokuao da dobijem pravo na zakljuavanje; Probajte da restartujete transakciju" - spa "Encontrado deadlock cuando tentando obtener el bloqueo; Tente recomenzar la transicin" - swe "Fick 'DEADLOCK' vid lsfrsk av block/rad. Frsk att starta om transaktionen" -ER_TABLE_CANT_HANDLE_FT - nla "Het gebruikte tabel type ondersteund geen FULLTEXT indexen" - eng "The used table type doesn't support FULLTEXT indexes" - est "Antud tabelitp ei toeta FULLTEXT indekseid" - fre "Le type de table utilis ne supporte pas les index FULLTEXT" - ger "Der verwendete Tabellentyp untersttzt keine FULLTEXT-Indizes" - ita "La tabella usata non supporta gli indici FULLTEXT" - por "O tipo de tabela utilizado no suporta ndices de texto completo (fulltext indexes)" - rus " " - serbian "Upotrebljeni tip tabele ne podrava 'FULLTEXT' indekse" - spa "El tipo de tabla usada no soporta ndices FULLTEXT" - swe "Tabelltypen har inte hantering av FULLTEXT-index" - ukr " æ Цդ FULLTEXT Ӧ" -ER_CANNOT_ADD_FOREIGN - nla "Kan foreign key beperking niet toevoegen" - eng "Cannot add foreign key constraint" - fre "Impossible d'ajouter des contraintes d'index externe" - ger "Fremdschlssel-Beschrnkung kann nicht hinzugefgt werden" - ita "Impossibile aggiungere il vincolo di integrita' referenziale (foreign key constraint)" - por "No pode acrescentar uma restrio de chave estrangeira" - rus " " - serbian "Ne mogu da dodam proveru spoljnog kljua" - spa "No puede adicionar clave extranjera constraint" - swe "Kan inte lgga till 'FOREIGN KEY constraint'" -ER_NO_REFERENCED_ROW 23000 - nla "Kan onderliggende rij niet toevoegen: foreign key beperking gefaald" - eng "Cannot add or update a child row: a foreign key constraint fails" - fre "Impossible d'ajouter un enregistrement fils : une constrainte externe l'empche" - ger "Hinzufgen oder Aktualisieren eines Kind-Datensatzes schlug aufgrund einer Fremdschlssel-Beschrnkung fehl" - greek "Cannot add a child row: a foreign key constraint fails" - hun "Cannot add a child row: a foreign key constraint fails" - ita "Impossibile aggiungere la riga: un vincolo d'integrita' referenziale non e' soddisfatto" - norwegian-ny "Cannot add a child row: a foreign key constraint fails" - por "No pode acrescentar uma linha filha: uma restrio de chave estrangeira falhou" - rus " : " - spa "No puede adicionar una lnea hijo: falla de clave extranjera constraint" - swe "FOREIGN KEY-konflikt: Kan inte skriva barn" -ER_ROW_IS_REFERENCED 23000 - eng "Cannot delete or update a parent row: a foreign key constraint fails" - fre "Impossible de supprimer un enregistrement pre : une constrainte externe l'empche" - ger "Lschen oder Aktualisieren eines Eltern-Datensatzes schlug aufgrund einer Fremdschlssel-Beschrnkung fehl" - greek "Cannot delete a parent row: a foreign key constraint fails" - hun "Cannot delete a parent row: a foreign key constraint fails" - ita "Impossibile cancellare la riga: un vincolo d'integrita' referenziale non e' soddisfatto" - por "No pode apagar uma linha pai: uma restrio de chave estrangeira falhou" - rus " : " - serbian "Ne mogu da izbriem roditeljski slog: provera spoljnog kljua je neuspela" - spa "No puede deletar una lnea padre: falla de clave extranjera constraint" - swe "FOREIGN KEY-konflikt: Kan inte radera fader" -ER_CONNECT_TO_MASTER 08S01 - nla "Fout bij opbouwen verbinding naar master: %-.128s" - eng "Error connecting to master: %-.128s" - ger "Fehler bei der Verbindung zum Master: %-.128s" - ita "Errore durante la connessione al master: %-.128s" - por "Erro conectando com o master: %-.128s" - rus " : %-.128s" - spa "Error de coneccion a master: %-.128s" - swe "Fick fel vid anslutning till master: %-.128s" -ER_QUERY_ON_MASTER - nla "Fout bij uitvoeren query op master: %-.128s" - eng "Error running query on master: %-.128s" - ger "Beim Ausfhren einer Abfrage auf dem Master trat ein Fehler auf: %-.128s" - ita "Errore eseguendo una query sul master: %-.128s" - por "Erro rodando consulta no master: %-.128s" - rus " : %-.128s" - spa "Error executando el query en master: %-.128s" - swe "Fick fel vid utfrande av command p mastern: %-.128s" -ER_ERROR_WHEN_EXECUTING_COMMAND - nla "Fout tijdens uitvoeren van commando %s: %-.128s" - eng "Error when executing command %s: %-.128s" - est "Viga ksu %s titmisel: %-.128s" - ger "Fehler beim Ausfhren des Befehls %s: %-.128s" - ita "Errore durante l'esecuzione del comando %s: %-.128s" - por "Erro quando executando comando %s: %-.128s" - rus " %s: %-.128s" - serbian "Greka pri izvravanju komande %s: %-.128s" - spa "Error de %s: %-.128s" - swe "Fick fel vid utfrande av %s: %-.128s" -ER_WRONG_USAGE - nla "Foutief gebruik van %s en %s" - eng "Incorrect usage of %s and %s" - est "Vigane %s ja %s kasutus" - ger "Falsche Verwendung von %s und %s" - ita "Uso errato di %s e %s" - por "Uso errado de %s e %s" - rus " %s %s" - serbian "Pogrena upotreba %s i %s" - spa "Equivocado uso de %s y %s" - swe "Felaktig anvnding av %s and %s" - ukr "Wrong usage of %s and %s" -ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 21000 - nla "De gebruikte SELECT commando's hebben een verschillend aantal kolommen" - eng "The used SELECT statements have a different number of columns" - est "Tulpade arv kasutatud SELECT lausetes ei kattu" - ger "Die verwendeten SELECT-Befehle liefern unterschiedliche Anzahlen von Feldern zurck" - ita "La SELECT utilizzata ha un numero di colonne differente" - por "Os comandos SELECT usados tm diferente nmero de colunas" - rus " (SELECT) " - serbian "Upotrebljene 'SELECT' komande adresiraju razliit broj kolona" - spa "El comando SELECT usado tiene diferente nmero de columnas" - swe "SELECT-kommandona har olika antal kolumner" -ER_CANT_UPDATE_WITH_READLOCK - nla "Kan de query niet uitvoeren vanwege een conflicterende read lock" - eng "Can't execute the query because you have a conflicting read lock" - est "Ei suuda tita pringut konfliktse luku tttu" - ger "Augrund eines READ-LOCK-Konflikts kann die Abfrage nicht ausgefhrt werden" - ita "Impossibile eseguire la query perche' c'e' un conflitto con in lock di lettura" - por "No posso executar a consulta porque voc tem um conflito de travamento de leitura" - rus " , " - serbian "Ne mogu da izvrim upit zbog toga to imate zakljuavanja itanja podataka u konfliktu" - spa "No puedo ejecutar el query porque usted tiene conflicto de traba de lectura" - swe "Kan inte utfra kommandot emedan du har ett READ-ls" -ER_MIXING_NOT_ALLOWED - nla "Het combineren van transactionele en niet-transactionele tabellen is uitgeschakeld." - eng "Mixing of transactional and non-transactional tables is disabled" - est "Transaktsioone toetavate ning mittetoetavate tabelite kooskasutamine ei ole lubatud" - ger "Die gleichzeitige Verwendung von Tabellen mit und ohne Transaktionsuntersttzung ist deaktiviert" - ita "E' disabilitata la possibilita' di mischiare tabelle transazionali e non-transazionali" - por "Mistura de tabelas transacional e no-transacional est desabilitada" - rus " " - serbian "Meanje tabela koje podravaju transakcije i onih koje ne podravaju transakcije je iskljueno" - spa "Mezla de transancional y no-transancional tablas est deshabilitada" - swe "Blandning av transaktionella och icke-transaktionella tabeller r inaktiverat" -ER_DUP_ARGUMENT - nla "Optie '%s' tweemaal gebruikt in opdracht" - eng "Option '%s' used twice in statement" - est "Mrangut '%s' on lauses kasutatud topelt" - ger "Option '%s' wird im Befehl zweimal verwendet" - ita "L'opzione '%s' e' stata usata due volte nel comando" - por "Opo '%s' usada duas vezes no comando" - rus " '%s' " - spa "Opcin '%s' usada dos veces en el comando" - swe "Option '%s' anvndes tv gnger" -ER_USER_LIMIT_REACHED 42000 - nla "Gebruiker '%-.64s' heeft het maximale gebruik van de '%s' faciliteit overschreden (huidige waarde: %ld)" - eng "User '%-.64s' has exceeded the '%s' resource (current value: %ld)" - ger "Benutzer '%-.64s' hat die Ressourcenbeschrnkung '%s' berschritten (aktueller Wert: %ld)" - ita "L'utente '%-.64s' ha ecceduto la risorsa '%s' (valore corrente: %ld)" - por "Usurio '%-.64s' tem excedido o '%s' recurso (atual valor: %ld)" - rus " '%-.64s' '%s' ( : %ld)" - spa "Usuario '%-.64s' ha excedido el recurso '%s' (actual valor: %ld)" - swe "Anvndare '%-.64s' har verskridit '%s' (nuvarande vrde: %ld)" -ER_SPECIFIC_ACCESS_DENIED_ERROR 42000 - nla "Toegang geweigerd. U moet het %-.128s privilege hebben voor deze operatie" - eng "Access denied; you need (at least one of) the %-.128s privilege(s) for this operation" - ger "Kein Zugriff. Hierfr wird die Berechtigung %-.128s bentigt" - ita "Accesso non consentito. Serve il privilegio %-.128s per questa operazione" - por "Acesso negado. Voc precisa o privilgio %-.128s para essa operao" - rus " . %-.128s " - spa "Acceso negado. Usted necesita el privilegio %-.128s para esta operacin" - swe "Du har inte privlegiet '%-.128s' som behvs fr denna operation" - ukr "Access denied. You need the %-.128s privilege for this operation" -ER_LOCAL_VARIABLE - nla "Variabele '%-.64s' is SESSION en kan niet worden gebruikt met SET GLOBAL" - eng "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL" - ger "Variable '%-.64s' ist eine lokale Variable und kann nicht mit SET GLOBAL verndert werden" - ita "La variabile '%-.64s' e' una variabile locale ( SESSION ) e non puo' essere cambiata usando SET GLOBAL" - por "Varivel '%-.64s' uma SESSION varivel e no pode ser usada com SET GLOBAL" - rus " '%-.64s' (SESSION) SET GLOBAL" - spa "Variable '%-.64s' es una SESSION variable y no puede ser usada con SET GLOBAL" - swe "Variabel '%-.64s' r en SESSION variabel och kan inte ndrad med SET GLOBAL" -ER_GLOBAL_VARIABLE - nla "Variabele '%-.64s' is GLOBAL en dient te worden gewijzigd met SET GLOBAL" - eng "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL" - ger "Variable '%-.64s' ist eine globale Variable und muss mit SET GLOBAL verndert werden" - ita "La variabile '%-.64s' e' una variabile globale ( GLOBAL ) e deve essere cambiata usando SET GLOBAL" - por "Varivel '%-.64s' uma GLOBAL varivel e deve ser configurada com SET GLOBAL" - rus " '%-.64s' (GLOBAL) , SET GLOBAL" - spa "Variable '%-.64s' es una GLOBAL variable y no puede ser configurada con SET GLOBAL" - swe "Variabel '%-.64s' r en GLOBAL variabel och br sttas med SET GLOBAL" -ER_NO_DEFAULT 42000 - nla "Variabele '%-.64s' heeft geen standaard waarde" - eng "Variable '%-.64s' doesn't have a default value" - ger "Variable '%-.64s' hat keinen Vorgabewert" - ita "La variabile '%-.64s' non ha un valore di default" - por "Varivel '%-.64s' no tem um valor padro" - rus " '%-.64s' " - spa "Variable '%-.64s' no tiene un valor patrn" - swe "Variabel '%-.64s' har inte ett DEFAULT-vrde" -ER_WRONG_VALUE_FOR_VAR 42000 - nla "Variabele '%-.64s' kan niet worden gewijzigd naar de waarde '%-.200s'" - eng "Variable '%-.64s' can't be set to the value of '%-.200s'" - ger "Variable '%-.64s' kann nicht auf '%-.200s' gesetzt werden" - ita "Alla variabile '%-.64s' non puo' essere assegato il valore '%-.200s'" - por "Varivel '%-.64s' no pode ser configurada para o valor de '%-.200s'" - rus " '%-.64s' '%-.200s'" - spa "Variable '%-.64s' no puede ser configurada para el valor de '%-.200s'" - swe "Variabel '%-.64s' kan inte sttas till '%-.200s'" -ER_WRONG_TYPE_FOR_VAR 42000 - nla "Foutief argumenttype voor variabele '%-.64s'" - eng "Incorrect argument type to variable '%-.64s'" - ger "Falscher Argumenttyp fr Variable '%-.64s'" - ita "Tipo di valore errato per la variabile '%-.64s'" - por "Tipo errado de argumento para varivel '%-.64s'" - rus " '%-.64s'" - spa "Tipo de argumento equivocado para variable '%-.64s'" - swe "Fel typ av argument till variabel '%-.64s'" -ER_VAR_CANT_BE_READ - nla "Variabele '%-.64s' kan alleen worden gewijzigd, niet gelezen" - eng "Variable '%-.64s' can only be set, not read" - ger "Variable '%-.64s' kann nur verndert, nicht gelesen werden" - ita "Alla variabile '%-.64s' e' di sola scrittura quindi puo' essere solo assegnato un valore, non letto" - por "Varivel '%-.64s' somente pode ser configurada, no lida" - rus " '%-.64s' , " - spa "Variable '%-.64s' solamente puede ser configurada, no leda" - swe "Variabeln '%-.64s' kan endast sttas, inte lsas" -ER_CANT_USE_OPTION_HERE 42000 - nla "Foutieve toepassing/plaatsing van '%s'" - eng "Incorrect usage/placement of '%s'" - ger "Falsche Verwendung oder Platzierung von '%s'" - ita "Uso/posizione di '%s' sbagliato" - por "Errado uso/colocao de '%s'" - rus " '%s'" - spa "Equivocado uso/colocacin de '%s'" - swe "Fel anvnding/placering av '%s'" -ER_NOT_SUPPORTED_YET 42000 - nla "Deze versie van MySQL ondersteunt nog geen '%s'" - eng "This version of MySQL doesn't yet support '%s'" - ger "Diese MySQL-Version untersttzt '%s' nicht" - ita "Questa versione di MySQL non supporta ancora '%s'" - por "Esta verso de MySQL no suporta ainda '%s'" - rus " MySQL '%s'" - spa "Esta versin de MySQL no soporta todavia '%s'" - swe "Denna version av MySQL kan nnu inte utfra '%s'" -ER_MASTER_FATAL_ERROR_READING_BINLOG - nla "Kreeg fatale fout %d: '%-.128s' van master tijdens lezen van data uit binaire log" - eng "Got fatal error %d from master when reading data from binary log: '%-.128s'" - ger "Schwerer Fehler %d: '%-.128s vom Master beim Lesen des binren Logs" - ita "Errore fatale %d: '%-.128s' dal master leggendo i dati dal log binario" - por "Obteve fatal erro %d: '%-.128s' do master quando lendo dados do binary log" - rus " %d: '%-.128s' " - spa "Recibi fatal error %d: '%-.128s' del master cuando leyendo datos del binary log" - swe "Fick fatalt fel %d: '%-.128s' frn master vid lsning av binrloggen" -ER_SLAVE_IGNORED_TABLE - eng "Slave SQL thread ignored the query because of replicate-*-table rules" - ger "Slave-SQL-Thread hat die Abfrage aufgrund von replicate-*-table-Regeln ignoriert" - nla "Slave SQL thread negeerde de query vanwege replicate-*-table opties" - por "Slave SQL thread ignorado a consulta devido s normas de replicao-*-tabela" - spa "Slave SQL thread ignorado el query debido a las reglas de replicacin-*-tabla" - swe "Slav SQL trden ignorerade frgan pga en replicate-*-table regel" -ER_INCORRECT_GLOBAL_LOCAL_VAR - eng "Variable '%-.192s' is a %s variable" - serbian "Promenljiva '%-.192s' je %s promenljiva" - ger "Variable '%-.192s' ist eine %s-Variable" - nla "Variabele '%-.192s' is geen %s variabele" - spa "Variable '%-.192s' es una %s variable" - swe "Variabel '%-.192s' r av typ %s" -ER_WRONG_FK_DEF 42000 - eng "Incorrect foreign key definition for '%-.192s': %s" - ger "Falsche Fremdschlssel-Definition fr '%-.192s': %s" - nla "Incorrecte foreign key definitie voor '%-.192s': %s" - por "Definio errada da chave estrangeira para '%-.192s': %s" - spa "Equivocada definicin de llave extranjera para '%-.192s': %s" - swe "Felaktig FOREIGN KEY-definition fr '%-.192s': %s" -ER_KEY_REF_DO_NOT_MATCH_TABLE_REF - eng "Key reference and table reference don't match" - ger "Schlssel- und Tabellenverweis passen nicht zusammen" - nla "Sleutel- en tabelreferentie komen niet overeen" - por "Referncia da chave e referncia da tabela no coincidem" - spa "Referencia de llave y referencia de tabla no coinciden" - swe "Nyckelreferensen och tabellreferensen stmmer inte verens" -ER_OPERAND_COLUMNS 21000 - eng "Operand should contain %d column(s)" - ger "Operand sollte %d Spalte(n) enthalten" - nla "Operand behoort %d kolommen te bevatten" - rus " %d " - spa "Operando debe tener %d columna(s)" - ukr " %d æ" -ER_SUBQUERY_NO_1_ROW 21000 - eng "Subquery returns more than 1 row" - ger "Unterabfrage lieferte mehr als einen Datensatz zurck" - nla "Subquery retourneert meer dan 1 rij" - por "Subconsulta retorna mais que 1 registro" - rus " " - spa "Subconsulta retorna mas que 1 lnea" - swe "Subquery returnerade mer n 1 rad" - ukr " ¦ i 1 " -ER_UNKNOWN_STMT_HANDLER - dan "Unknown prepared statement handler (%.*s) given to %s" - eng "Unknown prepared statement handler (%.*s) given to %s" - ger "Unbekannter Prepared-Statement-Handler (%.*s) fr %s angegeben" - nla "Onebekende prepared statement handler (%.*s) voor %s aangegeven" - por "Desconhecido manipulador de declarao preparado (%.*s) determinado para %s" - spa "Desconocido preparado comando handler (%.*s) dado para %s" - swe "Oknd PREPARED STATEMENT id (%.*s) var given till %s" - ukr "Unknown prepared statement handler (%.*s) given to %s" -ER_CORRUPT_HELP_DB - eng "Help database is corrupt or does not exist" - ger "Die Hilfe-Datenbank ist beschdigt oder existiert nicht" - nla "Help database is beschadigd of bestaat niet" - por "Banco de dado de ajuda corrupto ou no existente" - spa "Base de datos Help est corrupto o no existe" - swe "Hjlpdatabasen finns inte eller r skadad" -ER_CYCLIC_REFERENCE - eng "Cyclic reference on subqueries" - ger "Zyklischer Verweis in Unterabfragen" - nla "Cyclische verwijzing in subqueries" - por "Referncia cclica em subconsultas" - rus " " - spa "Cclica referencia en subconsultas" - swe "Cyklisk referens i subqueries" - ukr "̦ Ц" -ER_AUTO_CONVERT - eng "Converting column '%s' from %s to %s" - ger "Feld '%s' wird von %s nach %s umgewandelt" - nla "Veld '%s' wordt van %s naar %s geconverteerd" - por "Convertendo coluna '%s' de %s para %s" - rus " '%s' %s %s" - spa "Convirtiendo columna '%s' de %s para %s" - swe "Konvertar kolumn '%s' frn %s till %s" - ukr " '%s' %s %s" -ER_ILLEGAL_REFERENCE 42S22 - eng "Reference '%-.64s' not supported (%s)" - ger "Verweis '%-.64s' wird nicht untersttzt (%s)" - nla "Verwijzing '%-.64s' niet ondersteund (%s)" - por "Referncia '%-.64s' no suportada (%s)" - rus " '%-.64s' (%s)" - spa "Referencia '%-.64s' no soportada (%s)" - swe "Referens '%-.64s' stds inte (%s)" - ukr " '%-.64s' i (%s)" -ER_DERIVED_MUST_HAVE_ALIAS 42000 - eng "Every derived table must have its own alias" - ger "Fr jede abgeleitete Tabelle muss ein eigener Alias angegeben werden" - nla "Voor elke afgeleide tabel moet een unieke alias worden gebruikt" - por "Cada tabela derivada deve ter seu prprio alias" - spa "Cada tabla derivada debe tener su propio alias" - swe "Varje 'derived table' mste ha sitt eget alias" -ER_SELECT_REDUCED 01000 - eng "Select %u was reduced during optimization" - ger "Select %u wurde whrend der Optimierung reduziert" - nla "Select %u werd geredureerd tijdens optimtalisatie" - por "Select %u foi reduzido durante otimizao" - rus "Select %u " - spa "Select %u fu reducido durante optimizacin" - swe "Select %u reducerades vid optimiering" - ukr "Select %u was iii" -ER_TABLENAME_NOT_ALLOWED_HERE 42000 - eng "Table '%-.192s' from one of the SELECTs cannot be used in %-.32s" - ger "Tabelle '%-.192s', die in einem der SELECT-Befehle verwendet wurde, kann nicht in %-.32s verwendet werden" - nla "Tabel '%-.192s' uit een van de SELECTS kan niet in %-.32s gebruikt worden" - por "Tabela '%-.192s' de um dos SELECTs no pode ser usada em %-.32s" - spa "Tabla '%-.192s' de uno de los SELECT no puede ser usada en %-.32s" - swe "Tabell '%-.192s' frn en SELECT kan inte anvndas i %-.32s" -ER_NOT_SUPPORTED_AUTH_MODE 08004 - eng "Client does not support authentication protocol requested by server; consider upgrading MySQL client" - ger "Client untersttzt das vom Server erwartete Authentifizierungsprotokoll nicht. Bitte aktualisieren Sie Ihren MySQL-Client" - nla "Client ondersteunt het door de server verwachtte authenticatieprotocol niet. Overweeg een nieuwere MySQL client te gebruiken" - por "Cliente no suporta o protocolo de autenticao exigido pelo servidor; considere a atualizao do cliente MySQL" - spa "Cliente no soporta protocolo de autenticacin solicitado por el servidor; considere actualizar el cliente MySQL" - swe "Klienten stder inte autentiseringsprotokollet som begrts av servern; vervg uppgradering av klientprogrammet." -ER_SPATIAL_CANT_HAVE_NULL 42000 - eng "All parts of a SPATIAL index must be NOT NULL" - ger "Alle Teile eines SPATIAL-Index mssen als NOT NULL deklariert sein" - nla "Alle delete van een SPATIAL index dienen als NOT NULL gedeclareerd te worden" - por "Todas as partes de uma SPATIAL index devem ser NOT NULL" - spa "Todas las partes de una SPATIAL index deben ser NOT NULL" - swe "Alla delar av en SPATIAL index mste vara NOT NULL" -ER_COLLATION_CHARSET_MISMATCH 42000 - eng "COLLATION '%s' is not valid for CHARACTER SET '%s'" - ger "COLLATION '%s' ist fr CHARACTER SET '%s' ungltig" - nla "COLLATION '%s' is niet geldig voor CHARACTER SET '%s'" - por "COLLATION '%s' no vlida para CHARACTER SET '%s'" - spa "COLLATION '%s' no es vlido para CHARACTER SET '%s'" - swe "COLLATION '%s' r inte tilltet fr CHARACTER SET '%s'" -ER_SLAVE_WAS_RUNNING - eng "Slave is already running" - ger "Slave luft bereits" - nla "Slave is reeds actief" - por "O slave j est rodando" - spa "Slave ya est funcionando" - swe "Slaven har redan startat" -ER_SLAVE_WAS_NOT_RUNNING - eng "Slave already has been stopped" - ger "Slave wurde bereits angehalten" - nla "Slave is reeds gestopt" - por "O slave j est parado" - spa "Slave ya fu parado" - swe "Slaven har redan stoppat" -ER_TOO_BIG_FOR_UNCOMPRESS - eng "Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)" - ger "Unkomprimierte Daten sind zu gro. Die maximale Gre betrgt %d (wahrscheinlich wurde die Lnge der unkomprimierten Daten beschdigt)" - nla "Ongecomprimeerder data is te groot; de maximum lengte is %d (waarschijnlijk, de lengte van de gecomprimeerde data was beschadigd)" - por "Tamanho muito grande dos dados des comprimidos. O mximo tamanho %d. (provavelmente, o comprimento dos dados descomprimidos est corrupto)" - spa "Tamao demasiado grande para datos descomprimidos. El mximo tamao es %d. (probablemente, extensin de datos descomprimidos fu corrompida)" -ER_ZLIB_Z_MEM_ERROR - eng "ZLIB: Not enough memory" - ger "ZLIB: Nicht genug Speicher" - nla "ZLIB: Onvoldoende geheugen" - por "ZLIB: No suficiente memria disponvel" - spa "Z_MEM_ERROR: No suficiente memoria para zlib" -ER_ZLIB_Z_BUF_ERROR - eng "ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)" - ger "ZLIB: Im Ausgabepuffer ist nicht genug Platz vorhanden (wahrscheinlich wurde die Lnge der unkomprimierten Daten beschdigt)" - nla "ZLIB: Onvoldoende ruimte in uitgaande buffer (waarschijnlijk, de lengte van de ongecomprimeerde data was beschadigd)" - por "ZLIB: No suficiente espao no buffer emissor (provavelmente, o comprimento dos dados descomprimidos est corrupto)" - spa "Z_BUF_ERROR: No suficiente espacio en el bfer de salida para zlib (probablemente, extensin de datos descomprimidos fu corrompida)" -ER_ZLIB_Z_DATA_ERROR - eng "ZLIB: Input data corrupted" - ger "ZLIB: Eingabedaten beschdigt" - nla "ZLIB: Invoer data beschadigd" - por "ZLIB: Dados de entrada est corrupto" - spa "ZLIB: Dato de entrada fu corrompido para zlib" -ER_CUT_VALUE_GROUP_CONCAT - eng "Row %u was cut by GROUP_CONCAT()" - por "Linha %u foi cortada por GROUP_CONCAT()" -ER_WARN_TOO_FEW_RECORDS 01000 - eng "Row %ld doesn't contain data for all columns" - ger "Zeile %ld enthlt nicht fr alle Felder Daten" - nla "Rij %ld bevat niet de data voor alle kolommen" - por "Conta de registro menor que a conta de coluna na linha %ld" - spa "Lnea %ld no contiene datos para todas las columnas" -ER_WARN_TOO_MANY_RECORDS 01000 - eng "Row %ld was truncated; it contained more data than there were input columns" - ger "Zeile %ld gekrzt, die Zeile enthielt mehr Daten, als es Eingabefelder gibt" - nla "Regel %ld ingekort, bevatte meer data dan invoer kolommen" - por "Conta de registro maior que a conta de coluna na linha %ld" - spa "Lnea %ld fu truncada; La misma contine mas datos que las que existen en las columnas de entrada" -ER_WARN_NULL_TO_NOTNULL 22004 - eng "Column set to default value; NULL supplied to NOT NULL column '%s' at row %ld" - ger "Feld auf Vorgabewert gesetzt, da NULL fr NOT-NULL-Feld '%s' in Zeile %ld angegeben" - por "Dado truncado, NULL fornecido para NOT NULL coluna '%s' na linha %ld" - spa "Datos truncado, NULL suministrado para NOT NULL columna '%s' en la lnea %ld" -ER_WARN_DATA_OUT_OF_RANGE 22003 - eng "Out of range value for column '%s' at row %ld" -WARN_DATA_TRUNCATED 01000 - eng "Data truncated for column '%s' at row %ld" - ger "Daten abgeschnitten fr Feld '%s' in Zeile %ld" - por "Dado truncado para coluna '%s' na linha %ld" - spa "Datos truncados para columna '%s' en la lnea %ld" -ER_WARN_USING_OTHER_HANDLER - eng "Using storage engine %s for table '%s'" - ger "Fr Tabelle '%s' wird Speicher-Engine %s benutzt" - por "Usando engine de armazenamento %s para tabela '%s'" - spa "Usando motor de almacenamiento %s para tabla '%s'" - swe "Anvnder handler %s fr tabell '%s'" -ER_CANT_AGGREGATE_2COLLATIONS - eng "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'" - ger "Unerlaubte Mischung von Sortierreihenfolgen (%s, %s) und (%s, %s) fr Operation '%s'" - por "Combinao ilegal de collations (%s,%s) e (%s,%s) para operao '%s'" - spa "Ilegal mezcla de collations (%s,%s) y (%s,%s) para operacin '%s'" -ER_DROP_USER - eng "Cannot drop one or more of the requested users" - ger "Kann einen oder mehrere der angegebenen Benutzer nicht lschen" -ER_REVOKE_GRANTS - eng "Can't revoke all privileges for one or more of the requested users" - ger "Kann nicht alle Berechtigungen widerrufen, die fr einen oder mehrere Benutzer gewhrt wurden" - por "No pode revocar todos os privilgios, grant para um ou mais dos usurios pedidos" - spa "No puede revocar todos los privilegios, derecho para uno o mas de los usuarios solicitados" -ER_CANT_AGGREGATE_3COLLATIONS - eng "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'" - ger "Unerlaubte Mischung von Sortierreihenfolgen (%s, %s), (%s, %s), (%s, %s) fr Operation '%s'" - por "Ilegal combinao de collations (%s,%s), (%s,%s), (%s,%s) para operao '%s'" - spa "Ilegal mezcla de collations (%s,%s), (%s,%s), (%s,%s) para operacin '%s'" -ER_CANT_AGGREGATE_NCOLLATIONS - eng "Illegal mix of collations for operation '%s'" - ger "Unerlaubte Mischung von Sortierreihenfolgen fr Operation '%s'" - por "Ilegal combinao de collations para operao '%s'" - spa "Ilegal mezcla de collations para operacin '%s'" -ER_VARIABLE_IS_NOT_STRUCT - eng "Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)" - ger "Variable '%-.64s' ist keine Variablen-Komponente (kann nicht als XXXX.variablen_name verwendet werden)" - por "Varivel '%-.64s' no uma varivel componente (No pode ser usada como XXXX.varivel_nome)" - spa "Variable '%-.64s' no es una variable componente (No puede ser usada como XXXX.variable_name)" -ER_UNKNOWN_COLLATION - eng "Unknown collation: '%-.64s'" - ger "Unbekannte Sortierreihenfolge: '%-.64s'" - por "Collation desconhecida: '%-.64s'" - spa "Collation desconocida: '%-.64s'" -ER_SLAVE_IGNORED_SSL_PARAMS - eng "SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started" - ger "SSL-Parameter in CHANGE MASTER werden ignoriert, weil dieser MySQL-Slave ohne SSL-Untersttzung kompiliert wurde. Sie knnen aber spter verwendet werden, wenn ein MySQL-Slave mit SSL gestartet wird" - por "SSL parmetros em CHANGE MASTER so ignorados porque este escravo MySQL foi compilado sem o SSL suporte. Os mesmos podem ser usados mais tarde quando o escravo MySQL com SSL seja iniciado." - spa "Parametros SSL en CHANGE MASTER son ignorados porque este slave MySQL fue compilado sin soporte SSL; pueden ser usados despues cuando el slave MySQL con SSL sea inicializado" -ER_SERVER_IS_IN_SECURE_AUTH_MODE - eng "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format" - ger "Server luft im Modus --secure-auth, aber '%s'@'%s' hat ein Passwort im alten Format. Bitte Passwort ins neue Format ndern" - por "Servidor est rodando em --secure-auth modo, porm '%s'@'%s' tem senha no formato antigo; por favor troque a senha para o novo formato" - rus " --secure-auth ( ), '%s'@'%s' Σ ; " - spa "Servidor est rodando en modo --secure-auth, pero '%s'@'%s' tiene clave en el antiguo formato; por favor cambie la clave para el nuevo formato" -ER_WARN_FIELD_RESOLVED - eng "Field or reference '%-.192s%s%-.192s%s%-.192s' of SELECT #%d was resolved in SELECT #%d" - ger "Feld oder Verweis '%-.192s%s%-.192s%s%-.192s' im SELECT-Befehl Nr. %d wurde im SELECT-Befehl Nr. %d aufgelst" - por "Campo ou referncia '%-.192s%s%-.192s%s%-.192s' de SELECT #%d foi resolvido em SELECT #%d" - rus " '%-.192s%s%-.192s%s%-.192s' SELECT #%d SELECT #%d" - spa "Campo o referencia '%-.192s%s%-.192s%s%-.192s' de SELECT #%d fue resolvido en SELECT #%d" - ukr " '%-.192s%s%-.192s%s%-.192s' SELECT #%d SELECT #%d" -ER_BAD_SLAVE_UNTIL_COND - eng "Incorrect parameter or combination of parameters for START SLAVE UNTIL" - ger "Falscher Parameter oder falsche Kombination von Parametern fr START SLAVE UNTIL" - por "Parmetro ou combinao de parmetros errado para START SLAVE UNTIL" - spa "Parametro equivocado o combinacin de parametros para START SLAVE UNTIL" -ER_MISSING_SKIP_SLAVE - eng "It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart" - ger "Es wird empfohlen, mit --skip-slave-start zu starten, wenn mit START SLAVE UNTIL eine Schritt-fr-Schritt-Replikation ausgefhrt wird. Ansonsten gibt es Probleme, wenn ein Slave-Server unerwartet neu startet" - por " recomendado para rodar com --skip-slave-start quando fazendo replicao passo-por-passo com START SLAVE UNTIL, de outra forma voc no est seguro em caso de inesperada reinicialio do mysqld escravo" - spa "Es recomendado rodar con --skip-slave-start cuando haciendo replicacin step-by-step con START SLAVE UNTIL, a menos que usted no est seguro en caso de inesperada reinicializacin del mysqld slave" -ER_UNTIL_COND_IGNORED - eng "SQL thread is not to be started so UNTIL options are ignored" - ger "SQL-Thread soll nicht gestartet werden. Daher werden UNTIL-Optionen ignoriert" - por "Thread SQL no pode ser inicializado tal que opes UNTIL so ignoradas" - spa "SQL thread no es inicializado tal que opciones UNTIL son ignoradas" -ER_WRONG_NAME_FOR_INDEX 42000 - eng "Incorrect index name '%-.100s'" - ger "Falscher Indexname '%-.100s'" - por "Incorreto nome de ndice '%-.100s'" - spa "Nombre de ndice incorrecto '%-.100s'" - swe "Felaktigt index namn '%-.100s'" -ER_WRONG_NAME_FOR_CATALOG 42000 - eng "Incorrect catalog name '%-.100s'" - ger "Falscher Katalogname '%-.100s'" - por "Incorreto nome de catlogo '%-.100s'" - spa "Nombre de catalog incorrecto '%-.100s'" - swe "Felaktigt katalog namn '%-.100s'" -ER_WARN_QC_RESIZE - eng "Query cache failed to set size %lu; new query cache size is %lu" - ger "nderung der Query-Cache-Gre auf %lu fehlgeschlagen; neue Query-Cache-Gre ist %lu" - por "Falha em Query cache para configurar tamanho %lu, novo tamanho de query cache %lu" - rus " %lu, - %lu" - spa "Query cache fallada para configurar tamao %lu, nuevo tamao de query cache es %lu" - swe "Storleken av "Query cache" kunde inte sttas till %lu, ny storlek r %lu" - ukr " Ԧ ͦ %lu, ͦ Ԧ - %lu" -ER_BAD_FT_COLUMN - eng "Column '%-.192s' cannot be part of FULLTEXT index" - ger "Feld '%-.192s' kann nicht Teil eines FULLTEXT-Index sein" - por "Coluna '%-.192s' no pode ser parte de ndice FULLTEXT" - spa "Columna '%-.192s' no puede ser parte de FULLTEXT index" - swe "Kolumn '%-.192s' kan inte vara del av ett FULLTEXT index" -ER_UNKNOWN_KEY_CACHE - eng "Unknown key cache '%-.100s'" - ger "Unbekannter Schlssel-Cache '%-.100s'" - por "Key cache desconhecida '%-.100s'" - spa "Desconocida key cache '%-.100s'" - swe "Oknd nyckel cache '%-.100s'" -ER_WARN_HOSTNAME_WONT_WORK - eng "MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work" - ger "MySQL wurde mit --skip-name-resolve gestartet. Diese Option darf nicht verwendet werden, damit diese Rechtevergabe mglich ist" - por "MySQL foi inicializado em modo --skip-name-resolve. Voc necesita reincializ-lo sem esta opo para este grant funcionar" - spa "MySQL esta inicializado en modo --skip-name-resolve. Usted necesita reinicializarlo sin esta opcin para este derecho funcionar" -ER_UNKNOWN_STORAGE_ENGINE 42000 - eng "Unknown table engine '%s'" - ger "Unbekannte Speicher-Engine '%s'" - por "Motor de tabela desconhecido '%s'" - spa "Desconocido motor de tabla '%s'" -# When using this error code, use ER(ER_WARN_DEPRECATED_SYNTAX_WITH_VER) -# for the message string. See, for example, code in mysql_priv.h. -ER_WARN_DEPRECATED_SYNTAX - eng "'%s' is deprecated; use '%s' instead" - ger "'%s' ist veraltet. Bitte benutzen Sie '%s'" - por "'%s' desatualizado. Use '%s' em seu lugar" - spa "'%s' est desaprobado, use '%s' en su lugar" -ER_NON_UPDATABLE_TABLE - eng "The target table %-.100s of the %s is not updatable" - ger "Die Zieltabelle %-.100s von %s ist nicht aktualisierbar" - por "A tabela destino %-.100s do %s no atualizvel" - rus " %-.100s %s " - spa "La tabla destino %-.100s del %s no es actualizable" - swe "Tabell %-.100s anvnd med '%s' r inte uppdateringsbar" - ukr " %-.100s %s " -ER_FEATURE_DISABLED - eng "The '%s' feature is disabled; you need MySQL built with '%s' to have it working" - ger "Das Feature '%s' ist ausgeschaltet, Sie mssen MySQL mit '%s' bersetzen, damit es verfgbar ist" - por "O recurso '%s' foi desativado; voc necessita MySQL construdo com '%s' para ter isto funcionando" - spa "El recurso '%s' fue deshabilitado; usted necesita construir MySQL con '%s' para tener eso funcionando" - swe "'%s' r inte aktiverad; Fr att aktivera detta mste du bygga om MySQL med '%s' definerad" -ER_OPTION_PREVENTS_STATEMENT - eng "The MySQL server is running with the %s option so it cannot execute this statement" - ger "Der MySQL-Server luft mit der Option %s und kann diese Anweisung deswegen nicht ausfhren" - por "O servidor MySQL est rodando com a opo %s razo pela qual no pode executar esse commando" - spa "El servidor MySQL est rodando con la opcin %s tal que no puede ejecutar este comando" - swe "MySQL r startad med %s. Pga av detta kan du inte anvnda detta kommando" -ER_DUPLICATED_VALUE_IN_TYPE - eng "Column '%-.100s' has duplicated value '%-.64s' in %s" - ger "Feld '%-.100s' hat doppelten Wert '%-.64s' in %s" - por "Coluna '%-.100s' tem valor duplicado '%-.64s' em %s" - spa "Columna '%-.100s' tiene valor doblado '%-.64s' en %s" -ER_TRUNCATED_WRONG_VALUE 22007 - eng "Truncated incorrect %-.32s value: '%-.128s'" - ger "Falscher %-.32s-Wert gekrzt: '%-.128s'" - por "Truncado errado %-.32s valor: '%-.128s'" - spa "Equivocado truncado %-.32s valor: '%-.128s'" -ER_TOO_MUCH_AUTO_TIMESTAMP_COLS - eng "Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" - ger "Fehlerhafte Tabellendefinition. Es kann nur eine einzige TIMESTAMP-Spalte mit CURRENT_TIMESTAMP als DEFAULT oder in einer ON-UPDATE-Klausel geben" - por "Incorreta definio de tabela; Pode ter somente uma coluna TIMESTAMP com CURRENT_TIMESTAMP em DEFAULT ou ON UPDATE clusula" - spa "Incorrecta definicin de tabla; Solamente debe haber una columna TIMESTAMP con CURRENT_TIMESTAMP en DEFAULT o ON UPDATE clusula" -ER_INVALID_ON_UPDATE - eng "Invalid ON UPDATE clause for '%-.192s' column" - ger "Ungltige ON-UPDATE-Klausel fr Spalte '%-.192s'" - por "Invlida clusula ON UPDATE para campo '%-.192s'" - spa "Invlido ON UPDATE clusula para campo '%-.192s'" -ER_UNSUPPORTED_PS - eng "This command is not supported in the prepared statement protocol yet" - ger "Dieser Befehl wird im Protokoll fr vorbereitete Anweisungen noch nicht untersttzt" -ER_GET_ERRMSG - dan "Modtog fejl %d '%-.100s' fra %s" - eng "Got error %d '%-.100s' from %s" - ger "Fehler %d '%-.100s' von %s" - nor "Mottok feil %d '%-.100s' fa %s" - norwegian-ny "Mottok feil %d '%-.100s' fra %s" -ER_GET_TEMPORARY_ERRMSG - dan "Modtog temporary fejl %d '%-.100s' fra %s" - eng "Got temporary error %d '%-.100s' from %s" - ger "Temporrer Fehler %d '%-.100s' von %s" - nor "Mottok temporary feil %d '%-.100s' fra %s" - norwegian-ny "Mottok temporary feil %d '%-.100s' fra %s" -ER_UNKNOWN_TIME_ZONE - eng "Unknown or incorrect time zone: '%-.64s'" - ger "Unbekannte oder falsche Zeitzone: '%-.64s'" -ER_WARN_INVALID_TIMESTAMP - eng "Invalid TIMESTAMP value in column '%s' at row %ld" - ger "Ungltiger TIMESTAMP-Wert in Feld '%s', Zeile %ld" -ER_INVALID_CHARACTER_STRING - eng "Invalid %s character string: '%.64s'" - ger "Ungltiger %s-Zeichen-String: '%.64s'" -ER_WARN_ALLOWED_PACKET_OVERFLOWED - eng "Result of %s() was larger than max_allowed_packet (%ld) - truncated" - ger "Ergebnis von %s() war grer als max_allowed_packet (%ld) Bytes und wurde deshalb gekrzt" -ER_CONFLICTING_DECLARATIONS - eng "Conflicting declarations: '%s%s' and '%s%s'" - ger "Widersprchliche Deklarationen: '%s%s' und '%s%s'" -ER_SP_NO_RECURSIVE_CREATE 2F003 - eng "Can't create a %s from within another stored routine" - ger "Kann kein %s innerhalb einer anderen gespeicherten Routine erzeugen" -ER_SP_ALREADY_EXISTS 42000 - eng "%s %s already exists" - ger "%s %s existiert bereits" -ER_SP_DOES_NOT_EXIST 42000 - eng "%s %s does not exist" - ger "%s %s existiert nicht" -ER_SP_DROP_FAILED - eng "Failed to DROP %s %s" - ger "DROP %s %s ist fehlgeschlagen" -ER_SP_STORE_FAILED - eng "Failed to CREATE %s %s" - ger "CREATE %s %s ist fehlgeschlagen" -ER_SP_LILABEL_MISMATCH 42000 - eng "%s with no matching label: %s" - ger "%s ohne passende Marke: %s" -ER_SP_LABEL_REDEFINE 42000 - eng "Redefining label %s" - ger "Neudefinition der Marke %s" -ER_SP_LABEL_MISMATCH 42000 - eng "End-label %s without match" - ger "Ende-Marke %s ohne zugehrigen Anfang" -ER_SP_UNINIT_VAR 01000 - eng "Referring to uninitialized variable %s" - ger "Zugriff auf nichtinitialisierte Variable %s" -ER_SP_BADSELECT 0A000 - eng "PROCEDURE %s can't return a result set in the given context" - ger "PROCEDURE %s kann im gegebenen Kontext keine Ergebnismenge zurckgeben" -ER_SP_BADRETURN 42000 - eng "RETURN is only allowed in a FUNCTION" - ger "RETURN ist nur innerhalb einer FUNCTION erlaubt" -ER_SP_BADSTATEMENT 0A000 - eng "%s is not allowed in stored procedures" - ger "%s ist in gespeicherten Prozeduren nicht erlaubt" -ER_UPDATE_LOG_DEPRECATED_IGNORED 42000 - eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored" - ger "Das Update-Log ist veraltet und wurde durch das Binr-Log ersetzt. SET SQL_LOG_UPDATE wird ignoriert" -ER_UPDATE_LOG_DEPRECATED_TRANSLATED 42000 - eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been translated to SET SQL_LOG_BIN" - ger "Das Update-Log ist veraltet und wurde durch das Binr-Log ersetzt. SET SQL_LOG_UPDATE wurde in SET SQL_LOG_BIN bersetzt" -ER_QUERY_INTERRUPTED 70100 - eng "Query execution was interrupted" - ger "Ausfhrung der Abfrage wurde unterbrochen" -ER_SP_WRONG_NO_OF_ARGS 42000 - eng "Incorrect number of arguments for %s %s; expected %u, got %u" - ger "Falsche Anzahl von Argumenten fr %s %s; erwarte %u, erhalte %u" -ER_SP_COND_MISMATCH 42000 - eng "Undefined CONDITION: %s" - ger "Undefinierte CONDITION: %s" -ER_SP_NORETURN 42000 - eng "No RETURN found in FUNCTION %s" - ger "Kein RETURN in FUNCTION %s gefunden" -ER_SP_NORETURNEND 2F005 - eng "FUNCTION %s ended without RETURN" - ger "FUNCTION %s endete ohne RETURN" -ER_SP_BAD_CURSOR_QUERY 42000 - eng "Cursor statement must be a SELECT" - ger "Cursor-Anweisung muss ein SELECT sein" -ER_SP_BAD_CURSOR_SELECT 42000 - eng "Cursor SELECT must not have INTO" - ger "Cursor-SELECT darf kein INTO haben" -ER_SP_CURSOR_MISMATCH 42000 - eng "Undefined CURSOR: %s" - ger "Undefinierter CURSOR: %s" -ER_SP_CURSOR_ALREADY_OPEN 24000 - eng "Cursor is already open" - ger "Cursor ist schon geffnet" -ER_SP_CURSOR_NOT_OPEN 24000 - eng "Cursor is not open" - ger "Cursor ist nicht geffnet" -ER_SP_UNDECLARED_VAR 42000 - eng "Undeclared variable: %s" - ger "Nicht deklarierte Variable: %s" -ER_SP_WRONG_NO_OF_FETCH_ARGS - eng "Incorrect number of FETCH variables" - ger "Falsche Anzahl von FETCH-Variablen" -ER_SP_FETCH_NO_DATA 02000 - eng "No data - zero rows fetched, selected, or processed" - ger "Keine Daten - null Zeilen geholt (fetch), ausgewhlt oder verarbeitet" -ER_SP_DUP_PARAM 42000 - eng "Duplicate parameter: %s" - ger "Doppelter Parameter: %s" -ER_SP_DUP_VAR 42000 - eng "Duplicate variable: %s" - ger "Doppelte Variable: %s" -ER_SP_DUP_COND 42000 - eng "Duplicate condition: %s" - ger "Doppelte Bedingung: %s" -ER_SP_DUP_CURS 42000 - eng "Duplicate cursor: %s" - ger "Doppelter Cursor: %s" -ER_SP_CANT_ALTER - eng "Failed to ALTER %s %s" - ger "ALTER %s %s fehlgeschlagen" -ER_SP_SUBSELECT_NYI 0A000 - eng "Subquery value not supported" - ger "Subquery-Wert wird nicht untersttzt" -ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG 0A000 - eng "%s is not allowed in stored function or trigger" - ger "%s ist in gespeicherten Funktionen und in Triggern nicht erlaubt" -ER_SP_VARCOND_AFTER_CURSHNDLR 42000 - eng "Variable or condition declaration after cursor or handler declaration" - ger "Deklaration einer Variablen oder einer Bedingung nach der Deklaration eines Cursors oder eines Handlers" -ER_SP_CURSOR_AFTER_HANDLER 42000 - eng "Cursor declaration after handler declaration" - ger "Deklaration eines Cursors nach der Deklaration eines Handlers" -ER_SP_CASE_NOT_FOUND 20000 - eng "Case not found for CASE statement" - ger "Fall fr CASE-Anweisung nicht gefunden" -ER_FPARSER_TOO_BIG_FILE - eng "Configuration file '%-.192s' is too big" - ger "Konfigurationsdatei '%-.192s' ist zu gro" - rus " '%-.192s'" - ukr " Ʀæ '%-.192s'" -ER_FPARSER_BAD_HEADER - eng "Malformed file type header in file '%-.192s'" - ger "Nicht wohlgeformter Dateityp-Header in Datei '%-.192s'" - rus " '%-.192s'" - ukr "צ ̦ '%-.192s'" -ER_FPARSER_EOF_IN_COMMENT - eng "Unexpected end of file while parsing comment '%-.200s'" - ger "Unerwartetes Dateiende beim Parsen des Kommentars '%-.200s'" - rus " '%-.200s'" - ukr "Ħ ˦ Ҧ '%-.200s'" -ER_FPARSER_ERROR_IN_PARAMETER - eng "Error while parsing parameter '%-.192s' (line: '%-.192s')" - ger "Fehler beim Parsen des Parameters '%-.192s' (Zeile: '%-.192s')" - rus " '%-.192s' (: '%-.192s')" - ukr " ЦΦ '%-.192s' (: '%-.192s')" -ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER - eng "Unexpected end of file while skipping unknown parameter '%-.192s'" - ger "Unerwartetes Dateiende beim berspringen des unbekannten Parameters '%-.192s'" - rus " '%-.192s'" - ukr "Ħ ˦ ¦ צ '%-.192s'" -ER_VIEW_NO_EXPLAIN - eng "EXPLAIN/SHOW can not be issued; lacking privileges for underlying table" - ger "EXPLAIN/SHOW kann nicht verlangt werden. Rechte fr zugrunde liegende Tabelle fehlen" - rus "EXPLAIN/SHOW ; " - ukr "EXPLAIN/SHOW צ; æ " -ER_FRM_UNKNOWN_TYPE - eng "File '%-.192s' has unknown type '%-.64s' in its header" - ger "Datei '%-.192s' hat unbekannten Typ '%-.64s' im Header" - rus " '%-.192s' '%-.64s' " - ukr " '%-.192s' צ '%-.64s' " -ER_WRONG_OBJECT - eng "'%-.192s.%-.192s' is not %s" - ger "'%-.192s.%-.192s' ist nicht %s" - rus "'%-.192s.%-.192s' - %s" - ukr "'%-.192s.%-.192s' %s" -ER_NONUPDATEABLE_COLUMN - eng "Column '%-.192s' is not updatable" - ger "Feld '%-.192s' ist nicht aktualisierbar" - rus " '%-.192s' " - ukr " '%-.192s' " -ER_VIEW_SELECT_DERIVED - eng "View's SELECT contains a subquery in the FROM clause" - ger "SELECT der View enthlt eine Subquery in der FROM-Klausel" - rus "View SELECT FROM" - ukr "View SELECT Ц æ FROM" -ER_VIEW_SELECT_CLAUSE - eng "View's SELECT contains a '%s' clause" - ger "SELECT der View enthlt eine '%s'-Klausel" - rus "View SELECT '%s'" - ukr "View SELECT æ '%s'" -ER_VIEW_SELECT_VARIABLE - eng "View's SELECT contains a variable or parameter" - ger "SELECT der View enthlt eine Variable oder einen Parameter" - rus "View SELECT " - ukr "View SELECT " -ER_VIEW_SELECT_TMPTABLE - eng "View's SELECT refers to a temporary table '%-.192s'" - ger "SELECT der View verweist auf eine temporre Tabelle '%-.192s'" - rus "View SELECT '%-.192s'" - ukr "View SELECT դ '%-.192s'" -ER_VIEW_WRONG_LIST - eng "View's SELECT and view's field list have different column counts" - ger "SELECT- und Feldliste der Views haben unterschiedliche Anzahlen von Spalten" - rus "View SELECT view " - ukr "View SELECT ̦ æ view Ҧ ˦˦ æ" -ER_WARN_VIEW_MERGE - eng "View merge algorithm can't be used here for now (assumed undefined algorithm)" - ger "View-Merge-Algorithmus kann hier momentan nicht verwendet werden (undefinierter Algorithmus wird angenommen)" - rus " view ( )" - ukr " view ( )" -ER_WARN_VIEW_WITHOUT_KEY - eng "View being updated does not have complete key of underlying table in it" - ger "Die aktualisierte View enthlt nicht den vollstndigen Schlssel der zugrunde liegenden Tabelle" - rus " view () ()" - ukr "View, , ͦ æ(), Ҧ " -ER_VIEW_INVALID - eng "View '%-.192s.%-.192s' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" -ER_SP_NO_DROP_SP - eng "Can't drop or alter a %s from within another stored routine" - ger "Kann eine %s nicht von innerhalb einer anderen gespeicherten Routine lschen oder ndern" -ER_SP_GOTO_IN_HNDLR - eng "GOTO is not allowed in a stored procedure handler" - ger "GOTO ist im Handler einer gespeicherten Prozedur nicht erlaubt" -ER_TRG_ALREADY_EXISTS - eng "Trigger already exists" - ger "Trigger existiert bereits" -ER_TRG_DOES_NOT_EXIST - eng "Trigger does not exist" - ger "Trigger existiert nicht" -ER_TRG_ON_VIEW_OR_TEMP_TABLE - eng "Trigger's '%-.192s' is view or temporary table" - ger "'%-.192s' des Triggers ist View oder temporre Tabelle" -ER_TRG_CANT_CHANGE_ROW - eng "Updating of %s row is not allowed in %strigger" - ger "Aktualisieren einer %s-Zeile ist in einem %s-Trigger nicht erlaubt" -ER_TRG_NO_SUCH_ROW_IN_TRG - eng "There is no %s row in %s trigger" - ger "Es gibt keine %s-Zeile im %s-Trigger" -ER_NO_DEFAULT_FOR_FIELD - eng "Field '%-.192s' doesn't have a default value" - ger "Feld '%-.192s' hat keinen Vorgabewert" -ER_DIVISION_BY_ZERO 22012 - eng "Division by 0" - ger "Division durch 0" -ER_TRUNCATED_WRONG_VALUE_FOR_FIELD - eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld" - ger "Falscher %-.32s-Wert: '%-.128s' fr Feld '%.192s' in Zeile %ld" -ER_ILLEGAL_VALUE_FOR_TYPE 22007 - eng "Illegal %s '%-.192s' value found during parsing" - ger "Nicht zulssiger %s-Wert '%-.192s' beim Parsen gefunden" -ER_VIEW_NONUPD_CHECK - eng "CHECK OPTION on non-updatable view '%-.192s.%-.192s'" - ger "CHECK OPTION auf nicht-aktualisierbarem View '%-.192s.%-.192s'" - rus "CHECK OPTION VIEW '%-.192s.%-.192s'" - ukr "CHECK OPTION VIEW '%-.192s.%-.192s' " -ER_VIEW_CHECK_FAILED - eng "CHECK OPTION failed '%-.192s.%-.192s'" - ger "CHECK OPTION fehlgeschlagen: '%-.192s.%-.192s'" - rus " CHECK OPTION VIEW '%-.192s.%-.192s' " - ukr "צ CHECK OPTION VIEW '%-.192s.%-.192s' " -ER_PROCACCESS_DENIED_ERROR 42000 - eng "%-.16s command denied to user '%-.48s'@'%-.64s' for routine '%-.192s'" - ger "Befehl %-.16s nicht zulssig fr Benutzer '%-.48s'@'%-.64s' in Routine '%-.192s'" -ER_RELAY_LOG_FAIL - eng "Failed purging old relay logs: %s" - ger "Bereinigen alter Relais-Logs fehlgeschlagen: %s" -ER_PASSWD_LENGTH - eng "Password hash should be a %d-digit hexadecimal number" - ger "Passwort-Hash sollte eine Hexdaezimalzahl mit %d Stellen sein" -ER_UNKNOWN_TARGET_BINLOG - eng "Target log not found in binlog index" - ger "Ziel-Log im Binlog-Index nicht gefunden" -ER_IO_ERR_LOG_INDEX_READ - eng "I/O error reading log index file" - ger "Fehler beim Lesen der Log-Index-Datei" -ER_BINLOG_PURGE_PROHIBITED - eng "Server configuration does not permit binlog purge" - ger "Server-Konfiguration erlaubt keine Binlog-Bereinigung" -ER_FSEEK_FAIL - eng "Failed on fseek()" - ger "fseek() fehlgeschlagen" -ER_BINLOG_PURGE_FATAL_ERR - eng "Fatal error during log purge" - ger "Schwerwiegender Fehler bei der Log-Bereinigung" -ER_LOG_IN_USE - eng "A purgeable log is in use, will not purge" - ger "Ein zu bereinigendes Log wird gerade benutzt, daher keine Bereinigung" -ER_LOG_PURGE_UNKNOWN_ERR - eng "Unknown error during log purge" - ger "Unbekannter Fehler bei Log-Bereinigung" -ER_RELAY_LOG_INIT - eng "Failed initializing relay log position: %s" - ger "Initialisierung der Relais-Log-Position fehlgeschlagen: %s" -ER_NO_BINARY_LOGGING - eng "You are not using binary logging" - ger "Sie verwenden keine Binrlogs" -ER_RESERVED_SYNTAX - eng "The '%-.64s' syntax is reserved for purposes internal to the MySQL server" - ger "Die Schreibweise '%-.64s' ist fr interne Zwecke des MySQL-Servers reserviert" -ER_WSAS_FAILED - eng "WSAStartup Failed" - ger "WSAStartup fehlgeschlagen" -ER_DIFF_GROUPS_PROC - eng "Can't handle procedures with different groups yet" - ger "Kann Prozeduren mit unterschiedlichen Gruppen noch nicht verarbeiten" -ER_NO_GROUP_FOR_PROC - eng "Select must have a group with this procedure" - ger "SELECT muss bei dieser Prozedur ein GROUP BY haben" -ER_ORDER_WITH_PROC - eng "Can't use ORDER clause with this procedure" - ger "Kann bei dieser Prozedur keine ORDER-BY-Klausel verwenden" -ER_LOGGING_PROHIBIT_CHANGING_OF - eng "Binary logging and replication forbid changing the global server %s" - ger "Binrlogs und Replikation verhindern Wechsel des globalen Servers %s" -ER_NO_FILE_MAPPING - eng "Can't map file: %-.200s, errno: %d" - ger "Kann Datei nicht abbilden: %-.200s, Fehler: %d" -ER_WRONG_MAGIC - eng "Wrong magic in %-.64s" - ger "Falsche magische Zahlen in %-.64s" -ER_PS_MANY_PARAM - eng "Prepared statement contains too many placeholders" - ger "Vorbereitete Anweisung enthlt zu viele Platzhalter" -ER_KEY_PART_0 - eng "Key part '%-.192s' length cannot be 0" - ger "Lnge des Schlsselteils '%-.192s' kann nicht 0 sein" -ER_VIEW_CHECKSUM - eng "View text checksum failed" - ger "View-Text-Prfsumme fehlgeschlagen" - rus " VIEW " - ukr "צ ϧ VIEW " -ER_VIEW_MULTIUPDATE - eng "Can not modify more than one base table through a join view '%-.192s.%-.192s'" - ger "Kann nicht mehr als eine Basistabelle ber Join-View '%-.192s.%-.192s' ndern" - rus " VIEW '%-.192s.%-.192s'" - ukr " ¦ VIEW '%-.192s.%-.192s', ͦԦ ˦ " -ER_VIEW_NO_INSERT_FIELD_LIST - eng "Can not insert into join view '%-.192s.%-.192s' without fields list" - ger "Kann nicht ohne Feldliste in Join-View '%-.192s.%-.192s' einfgen" - rus " VIEW '%-.192s.%-.192s' " - ukr " VIEW '%-.192s.%-.192s', ͦ ˦ , æ" -ER_VIEW_DELETE_MERGE_VIEW - eng "Can not delete from join view '%-.192s.%-.192s'" - ger "Kann nicht aus Join-View '%-.192s.%-.192s' lschen" - rus " VIEW '%-.192s.%-.192s'" - ukr " VIEW '%-.192s.%-.192s', ͦ ˦ " -ER_CANNOT_USER - eng "Operation %s failed for %.256s" - ger "Operation %s schlug fehl fr %.256s" - norwegian-ny "Operation %s failed for '%.256s'" -ER_XAER_NOTA XAE04 - eng "XAER_NOTA: Unknown XID" - ger "XAER_NOTA: Unbekannte XID" -ER_XAER_INVAL XAE05 - eng "XAER_INVAL: Invalid arguments (or unsupported command)" - ger "XAER_INVAL: Ungltige Argumente (oder nicht untersttzter Befehl)" -ER_XAER_RMFAIL XAE07 - eng "XAER_RMFAIL: The command cannot be executed when global transaction is in the %.64s state" - ger "XAER_RMFAIL: DEr Befehl kann nicht ausgefhrt werden, wenn die globale Transaktion im Zustand %.64s ist" - rus "XAER_RMFAIL: '%.64s'" -ER_XAER_OUTSIDE XAE09 - eng "XAER_OUTSIDE: Some work is done outside global transaction" - ger "XAER_OUTSIDE: Einige Arbeiten werden auerhalb der globalen Transaktion verrichtet" -ER_XAER_RMERR XAE03 - eng "XAER_RMERR: Fatal error occurred in the transaction branch - check your data for consistency" - ger "XAER_RMERR: Schwerwiegender Fehler im Transaktionszweig - prfen Sie Ihre Daten auf Konsistenz" -ER_XA_RBROLLBACK XA100 - eng "XA_RBROLLBACK: Transaction branch was rolled back" - ger "XA_RBROLLBACK: Transaktionszweig wurde zurckgerollt" -ER_NONEXISTING_PROC_GRANT 42000 - eng "There is no such grant defined for user '%-.48s' on host '%-.64s' on routine '%-.192s'" - ger "Es gibt diese Berechtigung fr Benutzer '%-.48s' auf Host '%-.64s' fr Routine '%-.192s' nicht" -ER_PROC_AUTO_GRANT_FAIL - eng "Failed to grant EXECUTE and ALTER ROUTINE privileges" - ger "Gewhrung von EXECUTE- und ALTER-ROUTINE-Rechten fehlgeschlagen" -ER_PROC_AUTO_REVOKE_FAIL - eng "Failed to revoke all privileges to dropped routine" - ger "Rcknahme aller Rechte fr die gelschte Routine fehlgeschlagen" -ER_DATA_TOO_LONG 22001 - eng "Data too long for column '%s' at row %ld" - ger "Daten zu lang fr Feld '%s' in Zeile %ld" -ER_SP_BAD_SQLSTATE 42000 - eng "Bad SQLSTATE: '%s'" - ger "Ungltiger SQLSTATE: '%s'" -ER_STARTUP - eng "%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d %s" - ger "%s: bereit fr Verbindungen.\nVersion: '%s' Socket: '%s' Port: %d %s" -ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR - eng "Can't load value from file with fixed size rows to variable" - ger "Kann Wert aus Datei mit Zeilen fester Gre nicht in Variable laden" -ER_CANT_CREATE_USER_WITH_GRANT 42000 - eng "You are not allowed to create a user with GRANT" - ger "Sie drfen keinen Benutzer mit GRANT anlegen" -ER_WRONG_VALUE_FOR_TYPE - eng "Incorrect %-.32s value: '%-.128s' for function %-.32s" - ger "Falscher %-.32s-Wert: '%-.128s' fr Funktion %-.32s" -ER_TABLE_DEF_CHANGED - eng "Table definition has changed, please retry transaction" - ger "Tabellendefinition wurde gendert, bitte starten Sie die Transaktion neu" -ER_SP_DUP_HANDLER 42000 - eng "Duplicate handler declared in the same block" - ger "Doppelter Handler im selben Block deklariert" -ER_SP_NOT_VAR_ARG 42000 - eng "OUT or INOUT argument %d for routine %s is not a variable or NEW pseudo-variable in BEFORE trigger" - ger "OUT- oder INOUT-Argument %d fr Routine %s ist keine Variable" -ER_SP_NO_RETSET 0A000 - eng "Not allowed to return a result set from a %s" - ger "Rckgabe einer Ergebnismenge aus einer %s ist nicht erlaubt" -ER_CANT_CREATE_GEOMETRY_OBJECT 22003 - eng "Cannot get geometry object from data you send to the GEOMETRY field" - ger "Kann kein Geometrieobjekt aus den Daten machen, die Sie dem GEOMETRY-Feld bergeben haben" -ER_FAILED_ROUTINE_BREAK_BINLOG - eng "A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes" - ger "Eine Routine, die weder NO SQL noch READS SQL DATA in der Deklaration hat, schlug fehl und Binrlogging ist aktiv. Wenn Nicht-Transaktions-Tabellen aktualisiert wurden, enthlt das Binrlog ihre nderungen nicht" -ER_BINLOG_UNSAFE_ROUTINE - eng "This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)" - ger "Diese Routine hat weder DETERMINISTIC, NO SQL noch READS SQL DATA in der Deklaration und Binrlogging ist aktiv (*vielleicht* sollten Sie die weniger sichere Variable log_bin_trust_routine_creators verwenden)" -ER_BINLOG_CREATE_ROUTINE_NEED_SUPER - eng "You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)" - ger "Sie haben keine SUPER-Berechtigung und Binrlogging ist aktiv (*vielleicht* sollten Sie die weniger sichere Variable log_bin_trust_routine_creators verwenden)" -ER_EXEC_STMT_WITH_OPEN_CURSOR - eng "You can't execute a prepared statement which has an open cursor associated with it. Reset the statement to re-execute it." - ger "Sie knnen keine vorbereitete Anweisung ausfhren, die mit einem geffneten Cursor verknpft ist. Setzen Sie die Anweisung zurck, um sie neu auszufhren" -ER_STMT_HAS_NO_OPEN_CURSOR - eng "The statement (%lu) has no open cursor." - ger "Die Anweisung (%lu) hat keinen geffneten Cursor" -ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG - eng "Explicit or implicit commit is not allowed in stored function or trigger." - ger "Explizites oder implizites Commit ist in gespeicherten Funktionen und in Triggern nicht erlaubt" -ER_NO_DEFAULT_FOR_VIEW_FIELD - eng "Field of view '%-.192s.%-.192s' underlying table doesn't have a default value" - ger "Ein Feld der dem View '%-.192s.%-.192s' zugrundeliegenden Tabelle hat keinen Vorgabewert" -ER_SP_NO_RECURSION - eng "Recursive stored functions and triggers are not allowed." - ger "Rekursive gespeicherte Routinen und Triggers sind nicht erlaubt" -ER_TOO_BIG_SCALE 42000 S1009 - eng "Too big scale %d specified for column '%-.192s'. Maximum is %lu." - ger "Zu groer Skalierungsfaktor %d fr Feld '%-.192s' angegeben. Maximum ist %lu" -ER_TOO_BIG_PRECISION 42000 S1009 - eng "Too big precision %d specified for column '%-.192s'. Maximum is %lu." - ger "Zu groe Genauigkeit %d fr Feld '%-.192s' angegeben. Maximum ist %lu" -ER_M_BIGGER_THAN_D 42000 S1009 - eng "For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%-.192s')." - ger "Fr FLOAT(M,D), DOUBLE(M,D) oder DECIMAL(M,D) muss M >= D sein (Feld '%-.192s')" -ER_WRONG_LOCK_OF_SYSTEM_TABLE - eng "You can't combine write-locking of system tables with other tables or lock types" - ger "Sie knnen Schreibsperren auf der Systemtabelle nicht mit anderen Tabellen kombinieren" -ER_CONNECT_TO_FOREIGN_DATA_SOURCE - eng "Unable to connect to foreign data source: %.64s" - ger "Kann nicht mit Fremddatenquelle verbinden: %.64s" -ER_QUERY_ON_FOREIGN_DATA_SOURCE - eng "There was a problem processing the query on the foreign data source. Data source error: %-.64s" - ger "Bei der Verarbeitung der Abfrage ist in der Fremddatenquelle ein Problem aufgetreten. Datenquellenfehlermeldung: %-.64s" -ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST - eng "The foreign data source you are trying to reference does not exist. Data source error: %-.64s" - ger "Die Fremddatenquelle, auf die Sie zugreifen wollen, existiert nicht. Datenquellenfehlermeldung: %-.64s" -ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE - eng "Can't create federated table. The data source connection string '%-.64s' is not in the correct format" - ger "Kann fderierte Tabelle nicht erzeugen. Der Datenquellen-Verbindungsstring '%-.64s' hat kein korrektes Format" -ER_FOREIGN_DATA_STRING_INVALID - eng "The data source connection string '%-.64s' is not in the correct format" - ger "Der Datenquellen-Verbindungsstring '%-.64s' hat kein korrektes Format" -ER_CANT_CREATE_FEDERATED_TABLE - eng "Can't create federated table. Foreign data src error: %-.64s" - ger "Kann fderierte Tabelle nicht erzeugen. Fremddatenquellenfehlermeldung: %-.64s" -ER_TRG_IN_WRONG_SCHEMA - eng "Trigger in wrong schema" - ger "Trigger im falschen Schema" -ER_STACK_OVERRUN_NEED_MORE - eng "Thread stack overrun: %ld bytes used of a %ld byte stack, and %ld bytes needed. Use 'mysqld -O thread_stack=#' to specify a bigger stack." - ger "Thread-Stack-berlauf: %ld Bytes eines %ld-Byte-Stacks in Verwendung, und %ld Bytes bentigt. Verwenden Sie 'mysqld -O thread_stack=#', um einen greren Stack anzugeben" -ER_TOO_LONG_BODY 42000 S1009 - eng "Routine body for '%-.100s' is too long" - ger "Routinen-Body fr '%-.100s' ist zu lang" -ER_WARN_CANT_DROP_DEFAULT_KEYCACHE - eng "Cannot drop default keycache" - ger "Der vorgabemige Schlssel-Cache kann nicht gelscht werden" -ER_TOO_BIG_DISPLAYWIDTH 42000 S1009 - eng "Display width out of range for column '%-.192s' (max = %lu)" - ger "Anzeigebreite auerhalb des zulssigen Bereichs fr Spalte '%-.192s' (Maximum: %lu)" -ER_XAER_DUPID XAE08 - eng "XAER_DUPID: The XID already exists" - ger "XAER_DUPID: Die XID existiert bereits" -ER_DATETIME_FUNCTION_OVERFLOW 22008 - eng "Datetime function: %-.32s field overflow" - ger "Datetime-Funktion: %-.32s Feldberlauf" -ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG - eng "Can't update table '%-.192s' in stored function/trigger because it is already used by statement which invoked this stored function/trigger." - ger "Kann Tabelle '%-.192s' in gespeicherter Funktion oder Trigger nicht aktualisieren, weil sie bereits von der Anweisung verwendet wird, die diese gespeicherte Funktion oder den Trigger aufrief" -ER_VIEW_PREVENT_UPDATE - eng "The definition of table '%-.192s' prevents operation %.192s on table '%-.192s'." - ger "Die Definition der Tabelle '%-.192s' verhindert die Operation %.192s auf Tabelle '%-.192s'" -ER_PS_NO_RECURSION - eng "The prepared statement contains a stored routine call that refers to that same statement. It's not allowed to execute a prepared statement in such a recursive manner" - ger "Die vorbereitete Anweisung enthlt einen Aufruf einer gespeicherten Routine, die auf eben dieselbe Anweisung verweist. Es ist nicht erlaubt, eine vorbereitete Anweisung in solch rekursiver Weise auszufhren" -ER_SP_CANT_SET_AUTOCOMMIT - eng "Not allowed to set autocommit from a stored function or trigger" - ger "Es ist nicht erlaubt, innerhalb einer gespeicherten Funktion oder eines Triggers AUTOCOMMIT zu setzen" -ER_MALFORMED_DEFINER - eng "Definer is not fully qualified" - ger "Definierer des View ist nicht vollstndig spezifiziert" -ER_VIEW_FRM_NO_USER - eng "View '%-.192s'.'%-.192s' has no definer information (old table format). Current user is used as definer. Please recreate the view!" - ger "View '%-.192s'.'%-.192s' hat keine Definierer-Information (altes Tabellenformat). Der aktuelle Benutzer wird als Definierer verwendet. Bitte erstellen Sie den View neu" -ER_VIEW_OTHER_USER - eng "You need the SUPER privilege for creation view with '%-.192s'@'%-.192s' definer" - ger "Sie brauchen die SUPER-Berechtigung, um einen View mit dem Definierer '%-.192s'@'%-.192s' zu erzeugen" -ER_NO_SUCH_USER - eng "The user specified as a definer ('%-.64s'@'%-.64s') does not exist" -ER_FORBID_SCHEMA_CHANGE - eng "Changing schema from '%-.192s' to '%-.192s' is not allowed." - ger "Wechsel des Schemas von '%-.192s' auf '%-.192s' ist nicht erlaubt" -ER_ROW_IS_REFERENCED_2 23000 - eng "Cannot delete or update a parent row: a foreign key constraint fails (%.192s)" - ger "Kann Eltern-Zeile nicht lschen oder aktualisieren: eine Fremdschlsselbedingung schlgt fehl (%.192s)" -ER_NO_REFERENCED_ROW_2 23000 - eng "Cannot add or update a child row: a foreign key constraint fails (%.192s)" - ger "Kann Kind-Zeile nicht hinzufgen oder aktualisieren: eine Fremdschlsselbedingung schlgt fehl (%.192s)" -ER_SP_BAD_VAR_SHADOW 42000 - eng "Variable '%-.64s' must be quoted with `...`, or renamed" - ger "Variable '%-.64s' muss mit `...` geschtzt oder aber umbenannt werden" -ER_TRG_NO_DEFINER - eng "No definer attribute for trigger '%-.192s'.'%-.192s'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger." - ger "Kein Definierer-Attribut fr Trigger '%-.192s'.'%-.192s'. Der Trigger wird mit der Autorisierung des Aufrufers aktiviert, der mglicherweise keine zureichenden Berechtigungen hat. Bitte legen Sie den Trigger neu an." -ER_OLD_FILE_FORMAT - eng "'%-.192s' has an old format, you should re-create the '%s' object(s)" - ger "'%-.192s' hat altes Format, Sie sollten die '%s'-Objekt(e) neu erzeugen" -ER_SP_RECURSION_LIMIT - eng "Recursive limit %d (as set by the max_sp_recursion_depth variable) was exceeded for routine %.192s" - ger "Rekursionsgrenze %d (durch Variable max_sp_recursion_depth gegeben) wurde fr Routine %.192s berschritten" -ER_SP_PROC_TABLE_CORRUPT - eng "Failed to load routine %-.192s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)" - ger "Routine %-.192s konnte nicht geladen werden. Die Tabelle mysql.proc fehlt, ist beschdigt, oder enthlt fehlerhaften Daten (interner Code: %d)" -ER_SP_WRONG_NAME 42000 - eng "Incorrect routine name '%-.192s'" - ger "Ungltiger Routinenname '%-.192s'" -ER_TABLE_NEEDS_UPGRADE - eng "Table upgrade required. Please do \"REPAIR TABLE `%-.32s`\" or dump/reload to fix it!" - ger "Tabellenaktualisierung erforderlich. Bitte zum Reparieren \"REPAIR TABLE `%-.32s`\" eingeben!" -ER_SP_NO_AGGREGATE 42000 - eng "AGGREGATE is not supported for stored functions" - ger "AGGREGATE wird bei gespeicherten Funktionen nicht untersttzt" -ER_MAX_PREPARED_STMT_COUNT_REACHED 42000 - eng "Can't create more than max_prepared_stmt_count statements (current value: %lu)" - ger "Kann nicht mehr Anweisungen als max_prepared_stmt_count erzeugen (aktueller Wert: %lu)" -ER_VIEW_RECURSIVE - eng "`%-.192s`.`%-.192s` contains view recursion" - ger "`%-.192s`.`%-.192s` enthlt View-Rekursion" -ER_NON_GROUPING_FIELD_USED 42000 - eng "non-grouping field '%-.192s' is used in %-.64s clause" - ger "In der %-.192s-Klausel wird das die Nicht-Gruppierungsspalte '%-.64s' verwendet" -ER_TABLE_CANT_HANDLE_SPKEYS - eng "The used table type doesn't support SPATIAL indexes" - ger "Der verwendete Tabellentyp untersttzt keine SPATIAL-Indizes" -ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA - eng "Triggers can not be created on system tables" - ger "Trigger knnen nicht auf Systemtabellen erzeugt werden" -ER_REMOVED_SPACES - eng "Leading spaces are removed from name '%s'" - ger "Fhrende Leerzeichen werden aus dem Namen '%s' entfernt" -ER_AUTOINC_READ_FAILED - eng "Failed to read auto-increment value from storage engine" - ger "Lesen des Autoincrement-Werts von der Speicher-Engine fehlgeschlagen" -ER_USERNAME - eng "user name" - ger "Benutzername" -ER_HOSTNAME - eng "host name" - ger "Hostname" -ER_WRONG_STRING_LENGTH - eng "String '%-.70s' is too long for %s (should be no longer than %d)" - ger "String '%-.70s' ist zu lang fr %s (sollte nicht lnger sein als %d)" -ER_NON_INSERTABLE_TABLE - eng "The target table %-.100s of the %s is not insertable-into" - ger "Die Zieltabelle %-.100s von %s ist nicht einfgbar" -ER_ADMIN_WRONG_MRG_TABLE - eng "Table '%-.64s' is differently defined or of non-MyISAM type or doesn't exist" -ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT - eng "Too high level of nesting for select" -ER_NAME_BECOMES_EMPTY - eng "Name '%-.64s' has become ''" -ER_AMBIGUOUS_FIELD_TERM - eng "First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY" -ER_FOREIGN_SERVER_EXISTS - eng "The foreign server, %s, you are trying to create already exists." -ER_FOREIGN_SERVER_DOESNT_EXIST - eng "The foreign server name you are trying to reference does not exist. Data source error: %-.64s" - ger "Die externe Verbindung, auf die Sie zugreifen wollen, existiert nicht. Datenquellenfehlermeldung: %-.64s" -ER_ILLEGAL_HA_CREATE_OPTION - eng "Table storage engine '%-.64s' does not support the create option '%.64s'" - ger "Speicher-Engine '%-.64s' der Tabelle untersttzt die Option '%.64s' nicht" -ER_PARTITION_REQUIRES_VALUES_ERROR - eng "Syntax error: %-.64s PARTITIONING requires definition of VALUES %-.64s for each partition" - ger "Fehler in der SQL-Syntax: %-.64s-PARTITIONierung erfordert Definition von VALUES %-.64s fr jede Partition" - swe "Syntaxfel: %-.64s PARTITIONering krver definition av VALUES %-.64s fr varje partition" -ER_PARTITION_WRONG_VALUES_ERROR - eng "Only %-.64s PARTITIONING can use VALUES %-.64s in partition definition" - ger "Nur %-.64s-PARTITIONierung kann VALUES %-.64s in der Partitionsdefinition verwenden" - swe "Endast %-.64s partitionering kan anvnda VALUES %-.64s i definition av partitionen" -ER_PARTITION_MAXVALUE_ERROR - eng "MAXVALUE can only be used in last partition definition" - ger "MAXVALUE kann nur fr die Definition der letzten Partition verwendet werden" - swe "MAXVALUE kan bara anvndas i definitionen av den sista partitionen" -ER_PARTITION_SUBPARTITION_ERROR - eng "Subpartitions can only be hash partitions and by key" - ger "Unterpartitionen drfen nur HASH- oder KEY-Partitionen sein" - swe "Subpartitioner kan bara vara hash och key partitioner" -ER_PARTITION_SUBPART_MIX_ERROR - eng "Must define subpartitions on all partitions if on one partition" - ger "Unterpartitionen knnen nur Hash- oder Key-Partitionen sein" - swe "Subpartitioner måste definieras på alla partitioner om på en" -ER_PARTITION_WRONG_NO_PART_ERROR - eng "Wrong number of partitions defined, mismatch with previous setting" - ger "Falsche Anzahl von Partitionen definiert, stimmt nicht mit vorherigen Einstellungen berein" - swe "Antal partitioner definierade och antal partitioner r inte lika" -ER_PARTITION_WRONG_NO_SUBPART_ERROR - eng "Wrong number of subpartitions defined, mismatch with previous setting" - ger "Falsche Anzahl von Unterpartitionen definiert, stimmt nicht mit vorherigen Einstellungen berein" - swe "Antal subpartitioner definierade och antal subpartitioner r inte lika" -ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR - eng "Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed" - ger "Konstante oder Random-Ausdrcke in (Unter-)Partitionsfunktionen sind nicht erlaubt" - swe "Konstanta uttryck eller slumpmssiga uttryck r inte tilltna (sub)partitioneringsfunktioner" -ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR - eng "Expression in RANGE/LIST VALUES must be constant" - ger "Ausdrcke in RANGE/LIST VALUES mssen konstant sein" - swe "Uttryck i RANGE/LIST VALUES mste vara ett konstant uttryck" -ER_FIELD_NOT_FOUND_PART_ERROR - eng "Field in list of fields for partition function not found in table" - ger "Felder in der Feldliste der Partitionierungsfunktion wurden in der Tabelle nicht gefunden" - swe "Flt i listan av flt fr partitionering med key inte funnen i tabellen" -ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR - eng "List of fields is only allowed in KEY partitions" - ger "Eine Feldliste ist nur in KEY-Partitionen erlaubt" - swe "En lista av flt r endast tilltet fr KEY partitioner" -ER_INCONSISTENT_PARTITION_INFO_ERROR - eng "The partition info in the frm file is not consistent with what can be written into the frm file" - ger "Die Partitionierungsinformationen in der frm-Datei stimmen nicht mit dem berein, was in die frm-Datei geschrieben werden kann" - swe "Partitioneringsinformationen i frm-filen r inte konsistent med vad som kan skrivas i frm-filen" -ER_PARTITION_FUNC_NOT_ALLOWED_ERROR - eng "The %-.192s function returns the wrong type" - ger "Die %-.192s-Funktion gibt einen falschen Typ zurck" - swe "%-.192s-funktionen returnerar felaktig typ" -ER_PARTITIONS_MUST_BE_DEFINED_ERROR - eng "For %-.64s partitions each partition must be defined" - ger "Fr %-.64s-Partitionen muss jede Partition definiert sein" - swe "Fr %-.64s partitionering s mste varje partition definieras" -ER_RANGE_NOT_INCREASING_ERROR - eng "VALUES LESS THAN value must be strictly increasing for each partition" - ger "Werte in VALUES LESS THAN mssen fr jede Partition strikt aufsteigend sein" - swe "Vrden i VALUES LESS THAN mste vara strikt vxande fr varje partition" -ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR - eng "VALUES value must be of same type as partition function" - ger "VALUES-Werte mssen vom selben Typ wie die Partitionierungsfunktion sein" - swe "Vrden i VALUES mste vara av samma typ som partitioneringsfunktionen" -ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR - eng "Multiple definition of same constant in list partitioning" - ger "Mehrfachdefinition derselben Konstante bei Listen-Partitionierung" - swe "Multipel definition av samma konstant i list partitionering" -ER_PARTITION_ENTRY_ERROR - eng "Partitioning can not be used stand-alone in query" - ger "Partitionierung kann in einer Abfrage nicht alleinstehend benutzt werden" - swe "Partitioneringssyntax kan inte anvndas p egen hand i en SQL-frga" -ER_MIX_HANDLER_ERROR - eng "The mix of handlers in the partitions is not allowed in this version of MySQL" - ger "Das Vermischen von Handlern in Partitionen ist in dieser Version von MySQL nicht erlaubt" - swe "Denna mix av lagringsmotorer r inte tillten i denna version av MySQL" -ER_PARTITION_NOT_DEFINED_ERROR - eng "For the partitioned engine it is necessary to define all %-.64s" - ger "Fr die partitionierte Engine mssen alle %-.64s definiert sein" - swe "Fr partitioneringsmotorn s r det ndvndigt att definiera alla %-.64s" -ER_TOO_MANY_PARTITIONS_ERROR - eng "Too many partitions (including subpartitions) were defined" - ger "Es wurden zu vielen Partitionen (einschlielich Unterpartitionen) definiert" - swe "Fr mnga partitioner (inkluderande subpartitioner) definierades" -ER_SUBPARTITION_ERROR - eng "It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning" - ger "RANGE/LIST-Partitionierung kann bei Unterpartitionen nur zusammen mit HASH/KEY-Partitionierung verwendet werden" - swe "Det r endast mjligt att blanda RANGE/LIST partitionering med HASH/KEY partitionering fr subpartitionering" -ER_CANT_CREATE_HANDLER_FILE - eng "Failed to create specific handler file" - ger "Erzeugen einer spezifischen Handler-Datei fehlgeschlagen" - swe "Misslyckades med att skapa specifik fil i lagringsmotor" -ER_BLOB_FIELD_IN_PART_FUNC_ERROR - eng "A BLOB field is not allowed in partition function" - ger "In der Partitionierungsfunktion sind BLOB-Spalten nicht erlaubt" - swe "Ett BLOB-flt r inte tilltet i partitioneringsfunktioner" -ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF - eng "A %-.192s must include all columns in the table's partitioning function" -ER_NO_PARTS_ERROR - eng "Number of %-.64s = 0 is not an allowed value" - ger "Eine Anzahl von %-.64s = 0 ist kein erlaubter Wert" - swe "Antal %-.64s = 0 r inte ett tillten vrde" -ER_PARTITION_MGMT_ON_NONPARTITIONED - eng "Partition management on a not partitioned table is not possible" - ger "Partitionsverwaltung einer nicht partitionierten Tabelle ist nicht mglich" - swe "Partitioneringskommando p en opartitionerad tabell r inte mjligt" -ER_FOREIGN_KEY_ON_PARTITIONED - eng "Foreign key clause is not yet supported in conjunction with partitioning" - ger "Fremdschlssel-Beschrnkungen sind im Zusammenhang mit Partitionierung nicht zulssig" - swe "Foreign key klausul r inte nnu implementerad i kombination med partitionering" -ER_DROP_PARTITION_NON_EXISTENT - eng "Error in list of partitions to %-.64s" - ger "Fehler in der Partitionsliste bei %-.64s" - swe "Fel i listan av partitioner att %-.64s" -ER_DROP_LAST_PARTITION - eng "Cannot remove all partitions, use DROP TABLE instead" - ger "Es lassen sich nicht smtliche Partitionen lschen, benutzen Sie statt dessen DROP TABLE" - swe "Det r inte tilltet att ta bort alla partitioner, anvnd DROP TABLE istllet" -ER_COALESCE_ONLY_ON_HASH_PARTITION - eng "COALESCE PARTITION can only be used on HASH/KEY partitions" - ger "COALESCE PARTITION kann nur auf HASH- oder KEY-Partitionen benutzt werden" - swe "COALESCE PARTITION kan bara anvndas p HASH/KEY partitioner" -ER_REORG_HASH_ONLY_ON_SAME_NO - eng "REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers" - ger "REORGANIZE PARTITION kann nur zur Reorganisation von Partitionen verwendet werden, nicht, um ihre Nummern zu ndern" - swe "REORGANIZE PARTITION kan bara anvndas fr att omorganisera partitioner, inte fr att ndra deras antal" -ER_REORG_NO_PARAM_ERROR - eng "REORGANIZE PARTITION without parameters can only be used on auto-partitioned tables using HASH PARTITIONs" - ger "REORGANIZE PARTITION ohne Parameter kann nur fr auto-partitionierte Tabellen verwendet werden, die HASH-Partitionierung benutzen" - swe "REORGANIZE PARTITION utan parametrar kan bara anvndas p auto-partitionerade tabeller som anvnder HASH partitionering" -ER_ONLY_ON_RANGE_LIST_PARTITION - eng "%-.64s PARTITION can only be used on RANGE/LIST partitions" - ger "%-.64s PARTITION kann nur fr RANGE- oder LIST-Partitionen verwendet werden" - swe "%-.64s PARTITION kan bara anvndas p RANGE/LIST-partitioner" -ER_ADD_PARTITION_SUBPART_ERROR - eng "Trying to Add partition(s) with wrong number of subpartitions" - ger "Es wurde versucht, eine oder mehrere Partitionen mit der falschen Anzahl von Unterpartitionen hinzuzufgen" - swe "ADD PARTITION med fel antal subpartitioner" -ER_ADD_PARTITION_NO_NEW_PARTITION - eng "At least one partition must be added" - ger "Es muss zumindest eine Partition hinzugefgt werden" - swe "tminstone en partition mste lggas till vid ADD PARTITION" -ER_COALESCE_PARTITION_NO_PARTITION - eng "At least one partition must be coalesced" - ger "Zumindest eine Partition muss mit COALESCE PARTITION zusammengefgt werden" - swe "tminstone en partition mste sls ihop vid COALESCE PARTITION" -ER_REORG_PARTITION_NOT_EXIST - eng "More partitions to reorganize than there are partitions" - ger "Es wurde versucht, mehr Partitionen als vorhanden zu reorganisieren" - swe "Fler partitioner att reorganisera n det finns partitioner" -ER_SAME_NAME_PARTITION - eng "Duplicate partition name %-.192s" - ger "Doppelter Partitionsname: %-.192s" - swe "Duplicerat partitionsnamn %-.192s" -ER_NO_BINLOG_ERROR - eng "It is not allowed to shut off binlog on this command" - ger "Es es nicht erlaubt, bei diesem Befehl binlog abzuschalten" - swe "Det r inte tilltet att stnga av binlog p detta kommando" -ER_CONSECUTIVE_REORG_PARTITIONS - eng "When reorganizing a set of partitions they must be in consecutive order" - ger "Bei der Reorganisation eines Satzes von Partitionen mssen diese in geordneter Reihenfolge vorliegen" - swe "Nr ett antal partitioner omorganiseras mste de vara i konsekutiv ordning" -ER_REORG_OUTSIDE_RANGE - eng "Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range" - ger "Die Reorganisation von RANGE-Partitionen kann Gesamtbereiche nicht verndern, mit Ausnahme der letzten Partition, die den Bereich erweitern kann" - swe "Reorganisering av rangepartitioner kan inte ndra den totala intervallet utom fr den sista partitionen dr intervallet kan utkas" -ER_PARTITION_FUNCTION_FAILURE - eng "Partition function not supported in this version for this handler" - ger "Partitionsfunktion in dieser Version dieses Handlers nicht untersttzt" -ER_PART_STATE_ERROR - eng "Partition state cannot be defined from CREATE/ALTER TABLE" - ger "Partitionszustand kann nicht von CREATE oder ALTER TABLE aus definiert werden" - swe "Partition state kan inte definieras frn CREATE/ALTER TABLE" -ER_LIMITED_PART_RANGE - eng "The %-.64s handler only supports 32 bit integers in VALUES" - ger "Der Handler %-.64s untersttzt in VALUES nur 32-Bit-Integers" - swe "%-.64s stdjer endast 32 bitar i integers i VALUES" -ER_PLUGIN_IS_NOT_LOADED - eng "Plugin '%-.192s' is not loaded" - ger "Plugin '%-.192s' ist nicht geladen" -ER_WRONG_VALUE - eng "Incorrect %-.32s value: '%-.128s'" - ger "Falscher %-.32s-Wert: '%-.128s'" -ER_NO_PARTITION_FOR_GIVEN_VALUE - eng "Table has no partition for value %-.64s" - ger "Tabelle hat fr den Wert %-.64s keine Partition" -ER_FILEGROUP_OPTION_ONLY_ONCE - eng "It is not allowed to specify %s more than once" - ger "%s darf nicht mehr als einmal angegegeben werden" -ER_CREATE_FILEGROUP_FAILED - eng "Failed to create %s" - ger "Anlegen von %s fehlgeschlagen" -ER_DROP_FILEGROUP_FAILED - eng "Failed to drop %s" - ger "Lschen (drop) von %s fehlgeschlagen" -ER_TABLESPACE_AUTO_EXTEND_ERROR - eng "The handler doesn't support autoextend of tablespaces" - ger "Der Handler untersttzt keine automatische Erweiterung (Autoextend) von Tablespaces" -ER_WRONG_SIZE_NUMBER - eng "A size parameter was incorrectly specified, either number or on the form 10M" - ger "Ein Gren-Parameter wurde unkorrekt angegeben, muss entweder Zahl sein oder im Format 10M" -ER_SIZE_OVERFLOW_ERROR - eng "The size number was correct but we don't allow the digit part to be more than 2 billion" - ger "Die Zahl fr die Gre war korrekt, aber der Zahlanteil darf nicht grer als 2 Milliarden sein" -ER_ALTER_FILEGROUP_FAILED - eng "Failed to alter: %s" - ger "nderung von %s fehlgeschlagen" -ER_BINLOG_ROW_LOGGING_FAILED - eng "Writing one row to the row-based binary log failed" - ger "Schreiben einer Zeilen ins zeilenbasierte Binrlog fehlgeschlagen" -ER_BINLOG_ROW_WRONG_TABLE_DEF - eng "Table definition on master and slave does not match: %s" - ger "Tabellendefinition auf Master und Slave stimmt nicht berein: %s" -ER_BINLOG_ROW_RBR_TO_SBR - eng "Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events" - ger "Slave, die mit --log-slave-updates laufen, mssen zeilenbasiertes Loggen verwenden, um zeilenbasierte Binrlog-Ereignisse loggen zu knnen" -ER_EVENT_ALREADY_EXISTS - eng "Event '%-.192s' already exists" - ger "Event '%-.192s' existiert bereits" -ER_EVENT_STORE_FAILED - eng "Failed to store event %s. Error code %d from storage engine." - ger "Speichern von Event %s fehlgeschlagen. Fehlercode der Speicher-Engine: %d" -ER_EVENT_DOES_NOT_EXIST - eng "Unknown event '%-.192s'" - ger "Unbekanntes Event '%-.192s'" -ER_EVENT_CANT_ALTER - eng "Failed to alter event '%-.192s'" - ger "ndern des Events '%-.192s' fehlgeschlagen" -ER_EVENT_DROP_FAILED - eng "Failed to drop %s" - ger "Lschen von %s fehlgeschlagen" -ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG - eng "INTERVAL is either not positive or too big" - ger "INTERVAL ist entweder nicht positiv oder zu gro" -ER_EVENT_ENDS_BEFORE_STARTS - eng "ENDS is either invalid or before STARTS" - ger "ENDS ist entweder ungltig oder liegt vor STARTS" -ER_EVENT_EXEC_TIME_IN_THE_PAST - eng "Event execution time is in the past. Event has been disabled" -ER_EVENT_OPEN_TABLE_FAILED - eng "Failed to open mysql.event" - ger "ffnen von mysql.event fehlgeschlagen" -ER_EVENT_NEITHER_M_EXPR_NOR_M_AT - eng "No datetime expression provided" - ger "Kein DATETIME-Ausdruck angegeben" -ER_COL_COUNT_DOESNT_MATCH_CORRUPTED - eng "Column count of mysql.%s is wrong. Expected %d, found %d. The table is probably corrupted" - ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d gefunden. Tabelle ist wahrscheinlich beschdigt" -ER_CANNOT_LOAD_FROM_TABLE - eng "Cannot load from mysql.%s. The table is probably corrupted" - ger "Kann mysql.%s nicht einlesen. Tabelle ist wahrscheinlich beschdigt" -ER_EVENT_CANNOT_DELETE - eng "Failed to delete the event from mysql.event" - ger "Lschen des Events aus mysql.event fehlgeschlagen" -ER_EVENT_COMPILE_ERROR - eng "Error during compilation of event's body" - ger "Fehler beim Kompilieren des Event-Bodys" -ER_EVENT_SAME_NAME - eng "Same old and new event name" - ger "Alter und neuer Event-Name sind gleich" -ER_EVENT_DATA_TOO_LONG - eng "Data for column '%s' too long" - ger "Daten der Spalte '%s' zu lang" -ER_DROP_INDEX_FK - eng "Cannot drop index '%-.192s': needed in a foreign key constraint" - ger "Kann Index '%-.192s' nicht lschen: wird fr einen Fremdschlssel bentigt" -# When using this error message, use the ER_WARN_DEPRECATED_SYNTAX error -# code. See, for example, code in mysql_priv.h. -ER_WARN_DEPRECATED_SYNTAX_WITH_VER - eng "The syntax '%s' is deprecated and will be removed in MySQL %s. Please use %s instead" - ger "Die Syntax '%s' ist veraltet und wird in MySQL %s entfernt. Bitte benutzen Sie statt dessen %s" -ER_CANT_WRITE_LOCK_LOG_TABLE - eng "You can't write-lock a log table. Only read access is possible" - ger "Eine Log-Tabelle kann nicht schreibgesperrt werden. Es ist ohnehin nur Lesezugriff mglich" -ER_CANT_LOCK_LOG_TABLE - eng "You can't use locks with log tables." - ger "Log-Tabellen knnen nicht mit normalen Lesesperren gesperrt werden. Verwenden Sie statt dessen READ LOCAL" -ER_FOREIGN_DUPLICATE_KEY 23000 S1009 - eng "Upholding foreign key constraints for table '%.192s', entry '%-.192s', key %d would lead to a duplicate entry" - ger "Aufrechterhalten der Fremdschlssel-Constraints fr Tabelle '%.192s', Eintrag '%-.192s', Schlssel %d wrde zu einem doppelten Eintrag fhren" -ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE - eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use mysql_upgrade to fix this error." - ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d erhalten. Erzeugt mit MySQL %d, jetzt unter %d. Bitte benutzen Sie mysql_upgrade, um den Fehler zu beheben" -ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR - eng "Cannot switch out of the row-based binary log format when the session has open temporary tables" - ger "Kann nicht aus dem zeilenbasierten Binrlog-Format herauswechseln, wenn die Sitzung offene temporre Tabellen hat" -ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT - eng "Cannot change the binary logging format inside a stored function or trigger" - ger "Das Binrlog-Format kann innerhalb einer gespeicherten Funktion oder eines Triggers nicht gendert werden" -ER_NDB_CANT_SWITCH_BINLOG_FORMAT - eng "The NDB cluster engine does not support changing the binlog format on the fly yet" - ger "Die Speicher-Engine NDB Cluster untersttzt das ndern des Binrlog-Formats zur Laufzeit noch nicht" -ER_PARTITION_NO_TEMPORARY - eng "Cannot create temporary table with partitions" - ger "Anlegen temporrer Tabellen mit Partitionen nicht mglich" -ER_PARTITION_CONST_DOMAIN_ERROR - eng "Partition constant is out of partition function domain" - ger "Partitionskonstante liegt auerhalb der Partitionsfunktionsdomne" - swe "Partitionskonstanten r utanfr partitioneringsfunktionens domn" -ER_PARTITION_FUNCTION_IS_NOT_ALLOWED - eng "This partition function is not allowed" - ger "Diese Partitionierungsfunktion ist nicht erlaubt" - swe "Denna partitioneringsfunktion r inte tillten" -ER_DDL_LOG_ERROR - eng "Error in DDL log" - ger "Fehler im DDL-Log" -ER_NULL_IN_VALUES_LESS_THAN - eng "Not allowed to use NULL value in VALUES LESS THAN" - ger "In VALUES LESS THAN drfen keine NULL-Werte verwendet werden" - swe "Det r inte tilltet att anvnda NULL-vrden i VALUES LESS THAN" -ER_WRONG_PARTITION_NAME - eng "Incorrect partition name" - ger "Falscher Partitionsname" - swe "Felaktigt partitionsnamn" -ER_CANT_CHANGE_TX_ISOLATION 25001 - eng "Transaction isolation level can't be changed while a transaction is in progress" - ger "Transaktionsisolationsebene kann whrend einer laufenden Transaktion nicht gendert werden" -ER_DUP_ENTRY_AUTOINCREMENT_CASE - eng "ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '%-.192s' for key '%-.192s'" - ger "ALTER TABLE fhrt zur Neusequenzierung von auto_increment, wodurch der doppelte Eintrag '%-.192s' fr Schlssel '%-.192s' auftritt" -ER_EVENT_MODIFY_QUEUE_ERROR - eng "Internal scheduler error %d" - ger "Interner Scheduler-Fehler %d" -ER_EVENT_SET_VAR_ERROR - eng "Error during starting/stopping of the scheduler. Error code %u" - ger "Fehler whrend des Startens oder Anhalten des Schedulers. Fehlercode %u" -ER_PARTITION_MERGE_ERROR - eng "Engine cannot be used in partitioned tables" - ger "Engine kann in partitionierten Tabellen nicht verwendet werden" - swe "Engine inte anvndas i en partitionerad tabell" -ER_CANT_ACTIVATE_LOG - eng "Cannot activate '%-.64s' log" - ger "Kann Logdatei '%-.64s' nicht aktivieren" -ER_RBR_NOT_AVAILABLE - eng "The server was not built with row-based replication" -ER_BASE64_DECODE_ERROR - eng "Decoding of base64 string failed" - swe "Avkodning av base64 strng misslyckades" - ger "Der Server hat keine zeilenbasierte Replikation" -ER_EVENT_RECURSION_FORBIDDEN - eng "Recursion of EVENT DDL statements is forbidden when body is present" - ger "Rekursivitt von EVENT-DDL-Anweisungen ist unzulssig wenn ein Hauptteil (Body) existiert" -ER_EVENTS_DB_ERROR - eng "Cannot proceed because system tables used by Event Scheduler were found damaged at server start" - ger "Kann nicht weitermachen, weil die Tabellen, die von Events verwendet werden, beim Serverstart als beschdigt markiert wurden" -ER_ONLY_INTEGERS_ALLOWED - eng "Only integers allowed as number here" - ger "An dieser Stelle sind nur Ganzzahlen zulssig" -ER_UNSUPORTED_LOG_ENGINE - eng "This storage engine cannot be used for log tables"" - ger "Diese Speicher-Engine kann fr Logtabellen nicht verwendet werden" -ER_BAD_LOG_STATEMENT - eng "You cannot '%s' a log table if logging is enabled" - ger "Sie knnen eine Logtabelle nicht '%s', wenn Loggen angeschaltet ist" -ER_CANT_RENAME_LOG_TABLE - eng "Cannot rename '%s'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to '%s'" - ger "Kann '%s' nicht umbenennen. Wenn Loggen angeschaltet ist, mssen beim Umbenennen zu/von einer Logtabelle zwei Tabellen angegeben werden: die Logtabelle zu einer Archivtabelle und eine weitere Tabelle zurck zu '%s'" -ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT 42000 - eng "Incorrect parameter count in the call to native function '%-.192s'" - ger "Falsche Anzahl von Parametern beim Aufruf der nativen Funktion '%-.192s'" -ER_WRONG_PARAMETERS_TO_NATIVE_FCT 42000 - eng "Incorrect parameters in the call to native function '%-.192s'" - ger "Falscher Parameter beim Aufruf der nativen Funktion '%-.192s'" -ER_WRONG_PARAMETERS_TO_STORED_FCT 42000 - eng "Incorrect parameters in the call to stored function '%-.192s'" - ger "Falsche Parameter beim Aufruf der gespeicherten Funktion '%-.192s'" -ER_NATIVE_FCT_NAME_COLLISION - eng "This function '%-.192s' has the same name as a native function" - ger "Die Funktion '%-.192s' hat denselben Namen wie eine native Funktion" -# When using this error message, use the ER_DUP_ENTRY error code. See, for -# example, code in handler.cc. -ER_DUP_ENTRY_WITH_KEY_NAME 23000 S1009 - cze "Zvojen-B kl '%-.64s' (slo kle '%-.192s')" - dan "Ens vrdier '%-.64s' for indeks '%-.192s'" - nla "Dubbele ingang '%-.64s' voor zoeksleutel '%-.192s'" - eng "Duplicate entry '%-.64s' for key '%-.192s'" - jps "'%-.64s' key '%-.192s' ɂďdĂ܂", - est "Kattuv vrtus '%-.64s' vtmele '%-.192s'" - fre "Duplicata du champ '%-.64s' pour la clef '%-.192s'" - ger "Doppelter Eintrag '%-.64s' fr Schlssel '%-.192s'" - greek " '%-.64s' '%-.192s'" - hun "Duplikalt bejegyzes '%-.64s' a '%-.192s' kulcs szerint." - ita "Valore duplicato '%-.64s' per la chiave '%-.192s'" - jpn "'%-.64s' key '%-.192s' ˤƽʣƤޤ" - kor "ߺ Է '%-.64s': key '%-.192s'" - nor "Like verdier '%-.64s' for nkkel '%-.192s'" - norwegian-ny "Like verdiar '%-.64s' for nykkel '%-.192s'" - pol "Powtrzone wyst?pienie '%-.64s' dla klucza '%-.192s'" - por "Entrada '%-.64s' duplicada para a chave '%-.192s'" - rum "Cimpul '%-.64s' e duplicat pentru cheia '%-.192s'" - rus " '%-.64s' '%-.192s'" - serbian "Dupliran unos '%-.64s' za klju '%-.192s'" - slo "Opakovan k '%-.64s' (slo ka '%-.192s')" - spa "Entrada duplicada '%-.64s' para la clave '%-.192s'" - swe "Dubbel nyckel '%-.64s' fr nyckel '%-.192s'" - ukr " '%-.64s' '%-.192s'" -ER_BINLOG_PURGE_EMFILE - eng "Too many files opened, please execute the command again" - ger "Zu viele offene Dateien, bitte fhren Sie den Befehl noch einmal aus" -ER_EVENT_CANNOT_CREATE_IN_THE_PAST - eng "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation." -ER_EVENT_CANNOT_ALTER_IN_THE_PAST - eng "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation." -ER_SLAVE_INCIDENT - eng "The incident %s occured on the master. Message: %-.64s" -ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT - eng "Table has no partition for some existing values" -ER_BINLOG_UNSAFE_STATEMENT - eng "Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: %s" -ER_SLAVE_FATAL_ERROR - eng "Fatal error: %s" -ER_SLAVE_RELAY_LOG_READ_FAILURE - eng "Relay log read failure: %s" -ER_SLAVE_RELAY_LOG_WRITE_FAILURE - eng "Relay log write failure: %s" -ER_SLAVE_CREATE_EVENT_FAILURE - eng "Failed to create %s" -ER_SLAVE_MASTER_COM_FAILURE - eng "Master command %s failed: %s" -ER_BINLOG_LOGGING_IMPOSSIBLE - eng "Binary logging not possible. Message: %s" - -ER_VIEW_NO_CREATION_CTX - eng "View `%-.64s`.`%-.64s` has no creation context" -ER_VIEW_INVALID_CREATION_CTX - eng "Creation context of view `%-.64s`.`%-.64s' is invalid" - -ER_SR_INVALID_CREATION_CTX - eng "Creation context of stored routine `%-.64s`.`%-.64s` is invalid" - -ER_TRG_CORRUPTED_FILE - eng "Corrupted TRG file for table `%-.64s`.`%-.64s`" -ER_TRG_NO_CREATION_CTX - eng "Triggers for table `%-.64s`.`%-.64s` have no creation context" -ER_TRG_INVALID_CREATION_CTX - eng "Trigger creation context of table `%-.64s`.`%-.64s` is invalid" - -ER_EVENT_INVALID_CREATION_CTX - eng "Creation context of event `%-.64s`.`%-.64s` is invalid" - -ER_TRG_CANT_OPEN_TABLE - eng "Cannot open table for trigger `%-.64s`.`%-.64s`" - -ER_CANT_CREATE_SROUTINE - eng "Cannot create stored routine `%-.64s`. Check warnings" -ER_NEVER_USED - eng "Ambiguous slave modes combination. %s" - -ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT - eng "The BINLOG statement of type `%s` was not preceded by a format description BINLOG statement." -ER_SLAVE_CORRUPT_EVENT - eng "Corrupted replication event was detected" - -ER_LOAD_DATA_INVALID_COLUMN - eng "Invalid column reference (%-.64s) in LOAD DATA" - -ER_LOG_PURGE_NO_FILE - eng "Being purged log %s was not found" - -ER_XA_RBTIMEOUT XA106 - eng "XA_RBTIMEOUT: Transaction branch was rolled back: took too long" - -ER_XA_RBDEADLOCK XA102 - eng "XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected" - -ER_NEED_REPREPARE - eng "Prepared statement needs to be re-prepared" - -ER_DELAYED_NOT_SUPPORTED - eng "DELAYED option not supported for table '%-.192s'" - -WARN_NO_MASTER_INFO - eng "The master info structure does not exist" - -WARN_OPTION_IGNORED - eng "<%-.64s> option ignored" - -WARN_PLUGIN_DELETE_BUILTIN - eng "Built-in plugins cannot be deleted" - -WARN_PLUGIN_BUSY - eng "Plugin is busy and will be uninstalled on shutdown" - -ER_VARIABLE_IS_READONLY - eng "%s variable '%s' is read-only. Use SET %s to assign the value" - -ER_WARN_ENGINE_TRANSACTION_ROLLBACK - eng "Storage engine %s does not support rollback for this statement. Transaction rolled back and must be restarted" - -ER_SLAVE_HEARTBEAT_FAILURE - eng "Unexpected master's heartbeat data: %s" -ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE - eng "The requested value for the heartbeat period %s %s" - -ER_NDB_REPLICATION_SCHEMA_ERROR - eng "Bad schema for mysql.ndb_replication table. Message: %-.64s" -ER_CONFLICT_FN_PARSE_ERROR - eng "Error in parsing conflict function. Message: %-.64s" -ER_EXCEPTIONS_WRITE_ERROR - eng "Write to exceptions table failed. Message: %-.128s"" - -ER_TOO_LONG_TABLE_COMMENT - eng "Comment for table '%-.64s' is too long (max = %lu)" - por "Comentrio para a tabela '%-.64s' longo demais (max = %lu)" - -ER_TOO_LONG_FIELD_COMMENT - eng "Comment for field '%-.64s' is too long (max = %lu)" - por "Comentrio para o campo '%-.64s' longo demais (max = %lu)" - -ER_FUNC_INEXISTENT_NAME_COLLISION 42000 - eng "FUNCTION %s does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual" - -# When updating these, please update EXPLAIN_FILENAME_MAX_EXTRA_LENGTH in -# mysql_priv.h with the new maximal additional length for explain_filename. -ER_DATABASE_NAME - eng "Database" - swe "Databas" -ER_TABLE_NAME - eng "Table" - swe "Tabell" -ER_PARTITION_NAME - eng "Partition" - swe "Partition" -ER_SUBPARTITION_NAME - eng "Subpartition" - swe "Subpartition" -ER_TEMPORARY_NAME - eng "Temporary" - swe "Temporr" -ER_RENAMED_NAME - eng "Renamed" - swe "Namnndrad" -ER_TOO_MANY_CONCURRENT_TRXS - eng "Too many active concurrent transactions" - -WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED - eng "Non-ASCII separator arguments are not fully supported" - -ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE - eng "Cannot execute statement: binlogging impossible since both row-incapable engines and statement-incapable engines are involved." -ER_BINLOG_ROW_MODE_AND_STMT_ENGINE - eng "Cannot execute statement: binlogging impossible since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-logging." -ER_BINLOG_UNSAFE_AND_STMT_ENGINE - eng "Cannot execute statement: binlogging of unsafe statement is impossible when storage engine is limited to statement-logging and BINLOG_FORMAT = MIXED. Reason for unsafeness: %s" -ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE - eng "Cannot execute row injection: binlogging impossible since at least one table uses a storage engine limited to statement-logging." -ER_BINLOG_STMT_MODE_AND_ROW_ENGINE - eng "Cannot execute statement: binlogging impossible since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-logging.%s" -ER_BINLOG_ROW_INJECTION_AND_STMT_MODE - eng "Cannot execute row injection: binlogging impossible since BINLOG_FORMAT = STATEMENT." -ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE - eng "Cannot execute statement: binlogging impossible since more than one engine is involved and at least one engine is self-logging." -ER_BINLOG_UNSAFE_LIMIT - eng "Statement uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted." -ER_BINLOG_UNSAFE_INSERT_DELAYED - eng "Statement uses INSERT DELAYED. This is unsafe because the time when rows are inserted cannot be predicted." -ER_BINLOG_UNSAFE_SYSTEM_TABLE - eng "Statement uses the general_log, slow_log or performance_schema table(s). This is unsafe because system tables may differ on slave." -ER_BINLOG_UNSAFE_TWO_AUTOINC_COLUMNS - eng "Statement updates two AUTO_INCREMENT columns. This is unsafe because the generated value cannot be predicted by slave." -ER_BINLOG_UNSAFE_UDF - eng "Statement uses a UDF. It cannot be determined if the UDF will return the same value on slave." -ER_BINLOG_UNSAFE_SYSTEM_VARIABLE - eng "Statement uses a system variable whose value may differ on slave." -ER_BINLOG_UNSAFE_SYSTEM_FUNCTION - eng "Statement uses a system function whose value may differ on slave." -ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS - eng "Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction." - -ER_MESSAGE_AND_STATEMENT - eng "%s Statement: %s" - -ER_DEBUG_SYNC_TIMEOUT - eng "debug sync point wait timed out" - ger "Debug Sync Point Wartezeit berschritten" -ER_DEBUG_SYNC_HIT_LIMIT - eng "debug sync point hit limit reached" - ger "Debug Sync Point Hit Limit erreicht" - -ER_DUP_SIGNAL_SET 42000 - eng "Duplicate condition information item '%s'" - -# Note that the SQLSTATE is not 01000, it is provided by SIGNAL/RESIGNAL -ER_SIGNAL_WARN 01000 - eng "Unhandled user-defined warning condition" - -# Note that the SQLSTATE is not 02000, it is provided by SIGNAL/RESIGNAL -ER_SIGNAL_NOT_FOUND 02000 - eng "Unhandled user-defined not found condition" - -# Note that the SQLSTATE is not HY000, it is provided by SIGNAL/RESIGNAL -ER_SIGNAL_EXCEPTION HY000 - eng "Unhandled user-defined exception condition" - -ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER 0K000 - eng "RESIGNAL when handler not active" - -ER_SIGNAL_BAD_CONDITION_TYPE - eng "SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE" - -WARN_COND_ITEM_TRUNCATED - eng "Data truncated for condition item '%s'" - -ER_COND_ITEM_TOO_LONG - eng "Data too long for condition item '%s'" - -ER_UNKNOWN_LOCALE - eng "Unknown locale: '%-.64s'" - -ER_SLAVE_IGNORE_SERVER_IDS - eng "The requested server id %d clashes with the slave startup option --replicate-same-server-id" -ER_QUERY_CACHE_DISABLED - eng "Query cache is disabled; restart the server with query_cache_type=1 to enable it" -ER_SAME_NAME_PARTITION_FIELD - eng "Duplicate partition field name '%-.192s'" -ER_PARTITION_COLUMN_LIST_ERROR - eng "Inconsistency in usage of column lists for partitioning" -ER_WRONG_TYPE_COLUMN_VALUE_ERROR - eng "Partition column values of incorrect type" -ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR - eng "Too many fields in '%-.192s'" -ER_MAXVALUE_IN_VALUES_IN - eng "Cannot use MAXVALUE as value in VALUES IN" -ER_TOO_MANY_VALUES_ERROR - eng "Cannot have more than one value for this type of %-.64s partitioning" -ER_ROW_SINGLE_PARTITION_FIELD_ERROR - eng "Row expressions in VALUES IN only allowed for multi-field column partitioning" -ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD - eng "Field '%-.192s' is of a not allowed type for this type of partitioning" -ER_PARTITION_FIELDS_TOO_LONG - eng "The total length of the partitioning fields is too large" -ER_SLAVE_CONVERSION_FAILED - eng "Column %d of table '%-.192s.%-.192s' cannot be converted from type '%-.32s' to type '%-.32s'" -ER_SLAVE_CANT_CREATE_CONVERSION - eng "Can't create conversion table for table '%-.192s.%-.192s'" -ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT - eng "Cannot modify @@session.binlog_format inside a transaction" -ER_PATH_LENGTH - eng "The path specified for %.64s is too long." -ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT - eng "The syntax '%s' is deprecated and will be removed in MySQL %s." - ger "Die Syntax '%s' ist veraltet und wird in MySQL %s entfernt." - -ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT - eng "Cannot modify @@session.binlog_direct_non_transactional_updates inside a transaction" -ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT - eng "Cannot change the binlog direct flag inside a stored function or trigger" From 7e0d0dd04037a626c0d984553473a1fed4b9fb56 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Fri, 5 Feb 2010 18:31:06 +0300 Subject: [PATCH 132/132] Cherry-pick merge from mysql-5.1-bugteam. Original revision: ------------------------------------------------------------ revision-id: kent.boortz@sun.com-20100204182709-dw1dwpglkd5qrehb committer: Kent Boortz branch nick: mysql-5.1-bugteam timestamp: Thu 2010-02-04 19:27:09 +0100 message: LT_INIT and LT_PREREQ was added in libtool 2.2 2008, a bit too recent, switched back to the older AC_PROG_LIBTOOL ------------------------------------------------------------ --- configure.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 6d385c63bb6..53c5724e434 100644 --- a/configure.in +++ b/configure.in @@ -14,8 +14,7 @@ AC_CANONICAL_SYSTEM # TAR files, the path name is split into two parts, a 155 chacater # first part and a 100 character second part. AM_INIT_AUTOMAKE([1.9 tar-ustar]) -LT_INIT -LT_PREREQ([1.5.6]) +AC_PROG_LIBTOOL AM_CONFIG_HEADER([include/config.h])