Below is the list of changes that have just been committed into a local
5.1 repository of elkin. When elkin does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-09-27 23:47:25+03:00, aelkin@stripped
+2 -0
bug#22027: CREATE TABLE IF NOT EXISTS SELECT logged improperly with row-based binlog
and #22762: create talbe if not exists like a-temp-table binlogged w/o "if not exists"
These are rbr bugs.
store_create_info, which generates the create statement e.g for binlogging,
did not account a lex option HA_LEX_CREATE_IF_NOT_EXISTS.
The fix makes the generated query to include the parent's statement option if that was
supplied.
mysql-test/extra/binlog_tests/binlog.test@stripped, 2006-09-27 23:46:24+03:00,
aelkin@stripped +13 -0
adding two blocks for bugs 22027,22762
sql/sql_show.cc@stripped, 2006-09-27 23:46:24+03:00,
aelkin@stripped +3 -0
inserting "if not exists" into binlogging buffer.
This modification affects only handling of CREATE TABLE ... SELECT and
CREATE TABLE LIKE "a-temp-table"
only "if not exists" supplied.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: aelkin
# Host: dsl-hkigw8-feb9fb00-191.dhcp.inet.fi
# Root: /home/elkin/MySQL/TEAM/FIXES/5.1/bug22027_create_select_exists
--- 1.362/sql/sql_show.cc 2006-09-27 23:47:33 +03:00
+++ 1.363/sql/sql_show.cc 2006-09-27 23:47:33 +03:00
@@ -1042,6 +1042,9 @@ int store_create_info(THD *thd, TABLE_LI
packet->append(STRING_WITH_LEN("CREATE TEMPORARY TABLE "));
else
packet->append(STRING_WITH_LEN("CREATE TABLE "));
+ if (create_info_arg &&
+ (create_info_arg->options & HA_LEX_CREATE_IF_NOT_EXISTS))
+ packet->append(STRING_WITH_LEN("IF NOT EXISTS "));
if (table_list->schema_table)
alias= table_list->schema_table->table_name;
else
--- 1.13/mysql-test/extra/binlog_tests/binlog.test 2006-09-27 23:47:33 +03:00
+++ 1.14/mysql-test/extra/binlog_tests/binlog.test 2006-09-27 23:47:33 +03:00
@@ -59,4 +59,17 @@ insert into t1 values(null);
select * from t1;
drop table t1;
+# bug#22027
+create table t1 (a int);
+create table if not exists t2 select * from t1;
+
+# bug#22762
+create temporary table tt1 (a int);
+create table if not exists t3 like tt1;
+
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events;
+drop table t1,t2,t3,tt1;
+
-- source extra/binlog_tests/binlog_insert_delayed.test
| Thread |
|---|
| • bk commit into 5.1 tree (aelkin:1.2348) BUG#22027 | Andrei Elkin | 27 Sep |