mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Added timeout for wait_for_master_pos
Fixed comparision of log-binary name to handle comparison when file name extension wraps from .999 to .1000 Don't replicate CREATE/DROP DATABASE if wild_xxx_table=database.% is used. mysql-test/r/rpl000009.result: Fixed replication test after fixing replication of DROP/CREATE DATABASE mysql-test/t/rpl000009.test: Fixed replication test after fixing replication of DROP/CREATE DATABASE sql/item_create.cc: Added timeout for wait_for_master_pos sql/item_create.h: Added timeout for wait_for_master_pos sql/item_func.cc: Added timeout for wait_for_master_pos sql/item_func.h: Added timeout for wait_for_master_pos sql/lex.h: Added timeout for wait_for_master_pos sql/slave.h: Added timeout for wait_for_master_pos Don't replicate CREATE/DROP DATABASE if wild_xxx_table=database.% is used. sql/sql_parse.cc: Don't replicate CREATE/DROP DATABASE if wild_xxx_table=database.% is used. sql/sql_repl.cc: Fixed comparision of log-binary name to handle comparison when file name extension wraps from .999 to .1000
This commit is contained in:
@ -2253,6 +2253,18 @@ mysql_execute_command(void)
|
||||
}
|
||||
if (lower_case_table_names)
|
||||
casedn_str(lex->name);
|
||||
/*
|
||||
If in a slave thread :
|
||||
CREATE DATABASE DB was certainly not preceded by USE DB.
|
||||
For that reason, db_ok() in sql/slave.cc did not check the
|
||||
do_db/ignore_db. And as this query involves no tables, tables_ok()
|
||||
above was not called. So we have to check rules again here.
|
||||
*/
|
||||
if (thd->slave_thread &&
|
||||
(!db_ok(lex->name, replicate_do_db, replicate_ignore_db) ||
|
||||
!db_ok_with_wild_table(lex->name)))
|
||||
break;
|
||||
|
||||
if (check_access(thd,CREATE_ACL,lex->name,0,1))
|
||||
break;
|
||||
res=mysql_create_db(thd,lex->name,lex->create_info.options,0);
|
||||
@ -2267,6 +2279,17 @@ mysql_execute_command(void)
|
||||
}
|
||||
if (lower_case_table_names)
|
||||
casedn_str(lex->name);
|
||||
/*
|
||||
If in a slave thread :
|
||||
DROP DATABASE DB may not be preceded by USE DB.
|
||||
For that reason, maybe db_ok() in sql/slave.cc did not check the
|
||||
do_db/ignore_db. And as this query involves no tables, tables_ok()
|
||||
above was not called. So we have to check rules again here.
|
||||
*/
|
||||
if (thd->slave_thread &&
|
||||
(!db_ok(lex->name, replicate_do_db, replicate_ignore_db) ||
|
||||
!db_ok_with_wild_table(lex->name)))
|
||||
break;
|
||||
if (check_access(thd,DROP_ACL,lex->name,0,1))
|
||||
break;
|
||||
if (thd->locked_tables || thd->active_transaction())
|
||||
|
Reference in New Issue
Block a user