1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Bug#59354 : Bug #12659252 : ASSERT !OTHER_LOCK AT LOCK_REC_ADD_TO_QUEUE DURING A DELETE OPERATION

The converted implicit lock should wait for the prior conflicting lock if found.

rb://1437 approved by Marko
This commit is contained in:
Yasufumi Kinoshita
2012-11-28 17:07:02 +09:00
9 changed files with 234 additions and 18 deletions

View File

@ -0,0 +1,61 @@
SET @start_global_value = @@global.innodb_trx_purge_view_update_only_debug;
SELECT @start_global_value;
@start_global_value
0
select @@global.innodb_trx_purge_view_update_only_debug in (0, 1);
@@global.innodb_trx_purge_view_update_only_debug in (0, 1)
1
select @@global.innodb_trx_purge_view_update_only_debug;
@@global.innodb_trx_purge_view_update_only_debug
0
select @@session.innodb_trx_purge_view_update_only_debug;
ERROR HY000: Variable 'innodb_trx_purge_view_update_only_debug' is a GLOBAL variable
show global variables like 'innodb_trx_purge_view_update_only_debug';
Variable_name Value
innodb_trx_purge_view_update_only_debug OFF
show session variables like 'innodb_trx_purge_view_update_only_debug';
Variable_name Value
innodb_trx_purge_view_update_only_debug OFF
select * from information_schema.global_variables where variable_name='innodb_trx_purge_view_update_only_debug';
VARIABLE_NAME VARIABLE_VALUE
INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG OFF
select * from information_schema.session_variables where variable_name='innodb_trx_purge_view_update_only_debug';
VARIABLE_NAME VARIABLE_VALUE
INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG OFF
set global innodb_trx_purge_view_update_only_debug=1;
select @@global.innodb_trx_purge_view_update_only_debug;
@@global.innodb_trx_purge_view_update_only_debug
1
select * from information_schema.global_variables where variable_name='innodb_trx_purge_view_update_only_debug';
VARIABLE_NAME VARIABLE_VALUE
INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG ON
select * from information_schema.session_variables where variable_name='innodb_trx_purge_view_update_only_debug';
VARIABLE_NAME VARIABLE_VALUE
INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG ON
set @@global.innodb_trx_purge_view_update_only_debug=0;
select @@global.innodb_trx_purge_view_update_only_debug;
@@global.innodb_trx_purge_view_update_only_debug
0
select * from information_schema.global_variables where variable_name='innodb_trx_purge_view_update_only_debug';
VARIABLE_NAME VARIABLE_VALUE
INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG OFF
select * from information_schema.session_variables where variable_name='innodb_trx_purge_view_update_only_debug';
VARIABLE_NAME VARIABLE_VALUE
INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG OFF
set session innodb_trx_purge_view_update_only_debug='some';
ERROR HY000: Variable 'innodb_trx_purge_view_update_only_debug' is a GLOBAL variable and should be set with SET GLOBAL
set @@session.innodb_trx_purge_view_update_only_debug='some';
ERROR HY000: Variable 'innodb_trx_purge_view_update_only_debug' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_trx_purge_view_update_only_debug=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_trx_purge_view_update_only_debug'
set global innodb_trx_purge_view_update_only_debug='foo';
ERROR 42000: Variable 'innodb_trx_purge_view_update_only_debug' can't be set to the value of 'foo'
set global innodb_trx_purge_view_update_only_debug=-2;
set global innodb_trx_purge_view_update_only_debug=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_trx_purge_view_update_only_debug'
set global innodb_trx_purge_view_update_only_debug=2;
ERROR 42000: Variable 'innodb_trx_purge_view_update_only_debug' can't be set to the value of '2'
SET @@global.innodb_trx_purge_view_update_only_debug = @start_global_value;
SELECT @@global.innodb_trx_purge_view_update_only_debug;
@@global.innodb_trx_purge_view_update_only_debug
0

View File

@ -0,0 +1,53 @@
--source include/have_innodb.inc
--source include/have_debug.inc
SET @start_global_value = @@global.innodb_trx_purge_view_update_only_debug;
SELECT @start_global_value;
#
# exists as global only
#
select @@global.innodb_trx_purge_view_update_only_debug in (0, 1);
select @@global.innodb_trx_purge_view_update_only_debug;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_trx_purge_view_update_only_debug;
show global variables like 'innodb_trx_purge_view_update_only_debug';
show session variables like 'innodb_trx_purge_view_update_only_debug';
select * from information_schema.global_variables where variable_name='innodb_trx_purge_view_update_only_debug';
select * from information_schema.session_variables where variable_name='innodb_trx_purge_view_update_only_debug';
#
# show that it's writable
#
set global innodb_trx_purge_view_update_only_debug=1;
select @@global.innodb_trx_purge_view_update_only_debug;
select * from information_schema.global_variables where variable_name='innodb_trx_purge_view_update_only_debug';
select * from information_schema.session_variables where variable_name='innodb_trx_purge_view_update_only_debug';
set @@global.innodb_trx_purge_view_update_only_debug=0;
select @@global.innodb_trx_purge_view_update_only_debug;
select * from information_schema.global_variables where variable_name='innodb_trx_purge_view_update_only_debug';
select * from information_schema.session_variables where variable_name='innodb_trx_purge_view_update_only_debug';
--error ER_GLOBAL_VARIABLE
set session innodb_trx_purge_view_update_only_debug='some';
--error ER_GLOBAL_VARIABLE
set @@session.innodb_trx_purge_view_update_only_debug='some';
#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_trx_purge_view_update_only_debug=1.1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_trx_purge_view_update_only_debug='foo';
set global innodb_trx_purge_view_update_only_debug=-2;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_trx_purge_view_update_only_debug=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_trx_purge_view_update_only_debug=2;
#
# Cleanup
#
SET @@global.innodb_trx_purge_view_update_only_debug = @start_global_value;
SELECT @@global.innodb_trx_purge_view_update_only_debug;