Commit c7419deb authored by unknown's avatar unknown

Post-merge fix. Update some test results, and add an InnoDB-only

compatibility hook, thd_mark_transaction_to_rollback().


mysql-test/r/ps.result:
  Post-merge fix.   Changes for WL 3984 (Revise locking
  of mysql.general_log and mysql.slow_log) cause some test
  result differences.
mysql-test/r/show_check.result:
  Post-merge fix.   Changes for WL 3984 (Revise locking
  of mysql.general_log and mysql.slow_log) cause some test
  result differences.
sql/sql_class.cc:
  Post-merge fix, add InnoDB compatibility hook (defined for
  InnoDB only), thd_mark_transaction_to_rollback().
storage/innobase/handler/ha_innodb.cc:
  Post-merge fix, add InnoDB compatibility hook (defined for
  InnoDB only), thd_mark_transaction_to_rollback().
storage/innobase/handler/ha_innodb.h:
  Post-merge fix, add InnoDB compatibility hook (defined for
  InnoDB only), thd_mark_transaction_to_rollback().
parent 48eb7f8c
......@@ -1857,10 +1857,9 @@ select Host, Db from mysql.host limit 0;
Host Db
show open tables from mysql;
Database Table In_use Name_locked
mysql user 0 0
mysql general_log 0 0
mysql slow_log 0 0
mysql host 0 0
mysql user 0 0
call proc_1();
show open tables from mysql;
Database Table In_use Name_locked
......@@ -1871,10 +1870,9 @@ select Host, Db from mysql.host limit 0;
Host Db
show open tables from mysql;
Database Table In_use Name_locked
mysql user 0 0
mysql general_log 0 0
mysql slow_log 0 0
mysql host 0 0
mysql user 0 0
call proc_1();
show open tables from mysql;
Database Table In_use Name_locked
......@@ -1885,10 +1883,9 @@ select Host, Db from mysql.host limit 0;
Host Db
show open tables from mysql;
Database Table In_use Name_locked
mysql user 0 0
mysql general_log 0 0
mysql slow_log 0 0
mysql host 0 0
mysql user 0 0
call proc_1();
show open tables from mysql;
Database Table In_use Name_locked
......@@ -1899,10 +1896,9 @@ select Host, Db from mysql.host limit 0;
Host Db
show open tables from mysql;
Database Table In_use Name_locked
mysql user 0 0
mysql general_log 0 0
mysql slow_log 0 0
mysql host 0 0
mysql user 0 0
flush tables;
create function func_1() returns int begin flush tables; return 1; end|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
......@@ -1932,10 +1928,9 @@ select Host, Db from mysql.host limit 0;
Host Db
show open tables from mysql;
Database Table In_use Name_locked
mysql user 0 0
mysql general_log 0 0
mysql slow_log 0 0
mysql host 0 0
mysql user 0 0
execute abc;
show open tables from mysql;
Database Table In_use Name_locked
......@@ -1946,10 +1941,9 @@ select Host, Db from mysql.host limit 0;
Host Db
show open tables from mysql;
Database Table In_use Name_locked
mysql user 0 0
mysql general_log 0 0
mysql slow_log 0 0
mysql host 0 0
mysql user 0 0
execute abc;
show open tables from mysql;
Database Table In_use Name_locked
......@@ -1960,10 +1954,9 @@ select Host, Db from mysql.host limit 0;
Host Db
show open tables from mysql;
Database Table In_use Name_locked
mysql user 0 0
mysql general_log 0 0
mysql slow_log 0 0
mysql host 0 0
mysql user 0 0
flush tables;
deallocate prepare abc;
create procedure proc_1() flush logs;
......
......@@ -256,9 +256,8 @@ create table t1(n int);
insert into t1 values (1);
show open tables;
Database Table In_use Name_locked
mysql general_log 0 0
mysql slow_log 0 0
test t1 0 0
mysql general_log 0 0
drop table t1;
create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed;
show create table t1;
......@@ -685,9 +684,8 @@ Database Table In_use Name_locked
mysql db 0 0
mysql time_zone 0 0
mysql general_log 0 0
mysql slow_log 0 0
mysql user 0 0
mysql proc 0 0
mysql user 0 0
mysql time_zone_name 0 0
SHOW OPEN TABLES FROM mysql LIKE 'u%';
Database Table In_use Name_locked
......@@ -702,7 +700,6 @@ SHOW OPEN TABLES LIKE '%o%';
Database Table In_use Name_locked
mysql time_zone 0 0
mysql general_log 0 0
mysql slow_log 0 0
mysql proc 0 0
mysql time_zone_name 0 0
FLUSH TABLES;
......
......@@ -2583,6 +2583,11 @@ extern "C" int thd_binlog_format(const MYSQL_THD thd)
{
return (int) thd->variables.binlog_format;
}
extern "C" void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all)
{
mark_transaction_to_rollback(thd, all);
}
#endif // INNODB_COMPATIBILITY_HOOKS */
/****************************************************************************
......
......@@ -601,7 +601,7 @@ convert_error_code_to_mysql(
tell it also to MySQL so that MySQL knows to empty the
cached binlog for this transaction */
mark_transaction_to_rollback(thd, TRUE);
thd_mark_transaction_to_rollback(thd, TRUE);
return(HA_ERR_LOCK_DEADLOCK);
......@@ -611,7 +611,7 @@ convert_error_code_to_mysql(
latest SQL statement in a lock wait timeout. Previously, we
rolled back the whole transaction. */
mark_transaction_to_rollback(thd,
thd_mark_transaction_to_rollback(thd,
(bool)row_rollback_on_timeout);
return(HA_ERR_LOCK_WAIT_TIMEOUT);
......@@ -664,7 +664,7 @@ convert_error_code_to_mysql(
tell it also to MySQL so that MySQL knows to empty the
cached binlog for this transaction */
mark_transaction_to_rollback(thd, TRUE);
thd_mark_transaction_to_rollback(thd, TRUE);
return(HA_ERR_LOCK_TABLE_FULL);
} else if (error == DB_TOO_MANY_CONCURRENT_TRXS) {
......
......@@ -234,6 +234,13 @@ int thd_non_transactional_update(const MYSQL_THD thd);
@return Value to be used as index into the binlog_format_names array
*/
int thd_binlog_format(const MYSQL_THD thd);
/**
Mark transaction to rollback and mark error as fatal to a sub-statement.
@param thd Thread handle
@param all TRUE <=> rollback main transaction.
*/
void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all);
}
/*
......
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