Commit d9b55b6e authored by unknown's avatar unknown

sql_table.cc:

  Fix for a bug #2557 which caused that MySQL 4.1.2 does not replicate CREATE TABLE ... LIKE ..


sql/sql_table.cc:
  Fix for a bug #2557 which caused that MySQL 4.1.2 does not replicate CREATE TABLE ... LIKE ..
parent 557bb526
...@@ -1845,6 +1845,20 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table, ...@@ -1845,6 +1845,20 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
table_name); /* purecov: inspected */ table_name); /* purecov: inspected */
DBUG_RETURN(-1); /* purecov: inspected */ DBUG_RETURN(-1); /* purecov: inspected */
} }
else
{
// Must be written before unlock
mysql_update_log.write(thd,thd->query, thd->query_length);
if (mysql_bin_log.is_open())
{
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
test(create_info->options &
HA_LEX_CREATE_TMP_TABLE));
mysql_bin_log.write(&qinfo);
}
}
DBUG_RETURN(0); DBUG_RETURN(0);
table_exists: table_exists:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment