Commit 7d3c4c29 authored by Kristofer.Pettersson@naruto's avatar Kristofer.Pettersson@naruto

Merge naruto.:C:/cpp/bug26121/my51-bug26121

into  naruto.:C:/cpp/mysql-5.1-runtime
parents e782e5d5 19027868
......@@ -829,11 +829,15 @@ static int get_options(int *argc, char ***argv)
(hash_get_key) get_table_key,
(hash_free_key) free_table_ent, 0))
return(EX_EOM);
/* Don't copy cluster internal log tables */
/* Don't copy internal log tables */
if (my_hash_insert(&ignore_table,
(byte*) my_strdup("mysql.apply_status", MYF(MY_WME))) ||
my_hash_insert(&ignore_table,
(byte*) my_strdup("mysql.schema", MYF(MY_WME))))
(byte*) my_strdup("mysql.schema", MYF(MY_WME))) ||
my_hash_insert(&ignore_table,
(byte*) my_strdup("mysql.general_log", MYF(MY_WME))) ||
my_hash_insert(&ignore_table,
(byte*) my_strdup("mysql.slow_log", MYF(MY_WME))))
return(EX_EOM);
if ((ho_error= handle_options(argc, argv, my_long_options, get_one_option)))
......@@ -3353,8 +3357,12 @@ static int dump_all_tables_in_db(char *database)
init_dynamic_string_checked(&query, "LOCK TABLES ", 256, 1024);
for (numrows= 0 ; (table= getTableName(1)) ; numrows++)
{
dynstr_append_checked(&query, quote_name(table, table_buff, 1));
dynstr_append_checked(&query, " READ /*!32311 LOCAL */,");
char *end= strmov(afterdot, table);
if (include_table(hash_key,end - hash_key))
{
dynstr_append_checked(&query, quote_name(table, table_buff, 1));
dynstr_append_checked(&query, " READ /*!32311 LOCAL */,");
}
}
if (numrows && mysql_real_query(mysql, query.str, query.length-1))
DB_error(mysql, "when using LOCK TABLES");
......
......@@ -1612,6 +1612,13 @@ drop view v1;
drop table t1;
drop database mysqldump_test_db;
#
# BUG#26121 mysqldump includes LOCK TABLES general_log WRITE
#
--exec $MYSQL_DUMP --all-databases > $MYSQLTEST_VARDIR/tmp/bug26121.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug26121.sql
--remove_file $MYSQLTEST_VARDIR/tmp/bug26121.sql
--echo #
--echo # End of 5.1 tests
--echo #
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