1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge of compatibility fixes

Fixed failing tests in sys_vars as we have now stricter checking of setting of variables.

mysql-test/suite/sys_vars/r/innodb_adaptive_flushing_basic.result:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_basic.result:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/r/innodb_random_read_ahead_basic.result:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/r/innodb_stats_on_metadata_basic.result:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/r/innodb_strict_mode_basic.result:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/r/innodb_support_xa_basic.result:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/r/innodb_table_locks_basic.result:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/t/innodb_adaptive_flushing_basic.test:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_basic.test:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/t/innodb_random_read_ahead_basic.test:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/t/innodb_stats_on_metadata_basic.test:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/t/innodb_strict_mode_basic.test:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test:
  One can now only assign 0 or 1 to boolean variables
mysql-test/suite/sys_vars/t/innodb_table_locks_basic.test:
  One can now only assign 0 or 1 to boolean variables
mysys/my_getsystime.c:
  Merge + fixed bug that __NR_clock_gettime didn't work in 5.5
This commit is contained in:
Michael Widenius
2012-04-02 13:33:16 +03:00
40 changed files with 164 additions and 58 deletions

View File

@ -9,7 +9,9 @@ INSERT INTO bug_61209 VALUES (), ();
# Connection con1
SET SESSION auto_increment_increment=3;
SET SESSION auto_increment_offset=2;
SELECT GET_LOCK('a', 10);
SELECT GET_LOCK('a', 9);
GET_LOCK('a', 9)
1
# Connection con2
SET SESSION auto_increment_increment=3;
@ -17,14 +19,10 @@ SET SESSION auto_increment_offset=2;
INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL + GET_LOCK('a', 10));
# Connection con1 reap
GET_LOCK('a', 10)
1
INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL);
SELECT RELEASE_LOCK('a');
# Connection con2 reap
# Connection con1 reap
RELEASE_LOCK('a')
1
# Connection con2 reap
DROP TABLE bug_61209;

View File

@ -29,7 +29,7 @@ INSERT INTO bug_61209 VALUES (), ();
--connection con1
SET SESSION auto_increment_increment=3;
SET SESSION auto_increment_offset=2;
send SELECT GET_LOCK('a', 10);
SELECT GET_LOCK('a', 9);
--echo
--echo # Connection con2
@ -41,20 +41,14 @@ send INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL + GET_LOCK('a', 10))
--echo
--echo # Connection con1 reap
--connection con1
reap;
INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL);
send SELECT RELEASE_LOCK('a');
SELECT RELEASE_LOCK('a');
--echo
--echo # Connection con2 reap
--connection con2
reap;
--echo
--echo # Connection con1 reap
--connection con1
reap;
#
# Clean up
#

View File

@ -4,17 +4,59 @@ create database mysqltest;
use mysqltest;
create table t1(a int) engine=aria;
insert into t1 values(1);
flush table t1;
create table t2 (a int) engine=aria;
INSERT INTO t2 VALUES (1),(2);
create table t3 (a int) engine=aria;
INSERT INTO t3 VALUES (1),(2);
create table t4 (a int) engine=aria;
INSERT INTO t4 VALUES (1),(2);
create table t5 (a int) engine=aria;
INSERT INTO t5 VALUES (1),(2);
flush tables;
create_rename_lsn has non-magic value
* shut down mysqld, removed logs, restarted it
select * from t1;
a
1
Warnings:
Error 1194 t1' is marked as crashed and should be repaired
Note 1194 Zerofilling moved table ./mysqltest/t1
flush table t1;
Status: changed,sorted index pages,zerofilled
insert into t1 values(2);
flush table t1;
create_rename_lsn has non-magic value
check table t2;
Table Op Msg_type Msg_text
mysqltest.t2 check error Table is from another system and must be zerofilled or repaired to be usable on this system
mysqltest.t2 check error Corrupt
check table t2;
Table Op Msg_type Msg_text
mysqltest.t2 check error Table is from another system and must be zerofilled or repaired to be usable on this system
mysqltest.t2 check error Corrupt
repair table t2;
Table Op Msg_type Msg_text
mysqltest.t2 repair status OK
check table t2;
Table Op Msg_type Msg_text
mysqltest.t2 check status OK
optimize table t3;
Table Op Msg_type Msg_text
mysqltest.t3 optimize Note Zerofilling moved table ./mysqltest/t3
mysqltest.t3 optimize status OK
analyze table t4;
Table Op Msg_type Msg_text
mysqltest.t4 analyze Note Zerofilling moved table ./mysqltest/t4
mysqltest.t4 analyze status OK
repair table t5;
Table Op Msg_type Msg_text
mysqltest.t5 repair status OK
check table t5;
Table Op Msg_type Msg_text
mysqltest.t5 check status OK
repair table t5;
Table Op Msg_type Msg_text
mysqltest.t5 repair status OK
check table t5;
Table Op Msg_type Msg_text
mysqltest.t5 check status OK
drop database mysqltest;

View File

@ -22,9 +22,19 @@ connection default;
use mysqltest;
--enable_reconnect
# Create some tables for future tests
create table t1(a int) engine=aria;
insert into t1 values(1);
flush table t1;
create table t2 (a int) engine=aria;
INSERT INTO t2 VALUES (1),(2);
create table t3 (a int) engine=aria;
INSERT INTO t3 VALUES (1),(2);
create table t4 (a int) engine=aria;
INSERT INTO t4 VALUES (1),(2);
create table t5 (a int) engine=aria;
INSERT INTO t5 VALUES (1),(2);
flush tables;
# Check that table is not zerofilled, not movable
let $MYSQLD_DATADIR= `select @@datadir`;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@ -46,6 +56,7 @@ EOF
disable_ps_protocol; # see aria-recover.test
replace_regex /Table.*t1/t1/ ;
replace_result \\ /;
select * from t1;
enable_ps_protocol;
flush table t1;
@ -80,4 +91,21 @@ perl;
close FILE;
EOF
#
# BUG#44422 "mysql_upgrade destroys Maria tables?"
# Check repair and optimize of moved table
#
check table t2;
check table t2;
repair table t2;
check table t2;
replace_result \\ /;
optimize table t3;
replace_result \\ /;
analyze table t4;
repair table t5;
check table t5;
repair table t5;
check table t5;
drop database mysqltest;

View File

@ -73,8 +73,8 @@ set global innodb_adaptive_flushing=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_flushing'
set global innodb_adaptive_flushing=2;
ERROR 42000: Variable 'innodb_adaptive_flushing' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_adaptive_flushing=-3;
ERROR 42000: Variable 'innodb_adaptive_flushing' can't be set to the value of '-3'
select @@global.innodb_adaptive_flushing;
@@global.innodb_adaptive_flushing
1

View File

@ -73,8 +73,8 @@ set global innodb_adaptive_hash_index=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_hash_index'
set global innodb_adaptive_hash_index=2;
ERROR 42000: Variable 'innodb_adaptive_hash_index' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_adaptive_hash_index=-3;
ERROR 42000: Variable 'innodb_adaptive_hash_index' can't be set to the value of '-3'
select @@global.innodb_adaptive_hash_index;
@@global.innodb_adaptive_hash_index
1

View File

@ -73,8 +73,8 @@ set global innodb_large_prefix=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_large_prefix'
set global innodb_large_prefix=2;
ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_large_prefix=-3;
ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of '-3'
select @@global.innodb_large_prefix;
@@global.innodb_large_prefix
1

View File

@ -73,17 +73,17 @@ set global innodb_random_read_ahead=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_random_read_ahead'
set global innodb_random_read_ahead=2;
ERROR 42000: Variable 'innodb_random_read_ahead' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_random_read_ahead=-3;
ERROR 42000: Variable 'innodb_random_read_ahead' can't be set to the value of '-3'
select @@global.innodb_random_read_ahead;
@@global.innodb_random_read_ahead
1
0
select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
VARIABLE_NAME VARIABLE_VALUE
INNODB_RANDOM_READ_AHEAD ON
INNODB_RANDOM_READ_AHEAD OFF
select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
VARIABLE_NAME VARIABLE_VALUE
INNODB_RANDOM_READ_AHEAD ON
INNODB_RANDOM_READ_AHEAD OFF
set global innodb_random_read_ahead='AUTO';
ERROR 42000: Variable 'innodb_random_read_ahead' can't be set to the value of 'AUTO'
SET @@global.innodb_random_read_ahead = @start_global_value;

View File

@ -73,8 +73,8 @@ set global innodb_stats_on_metadata=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_stats_on_metadata'
set global innodb_stats_on_metadata=2;
ERROR 42000: Variable 'innodb_stats_on_metadata' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_stats_on_metadata=-3;
ERROR 42000: Variable 'innodb_stats_on_metadata' can't be set to the value of '-3'
select @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata
1

View File

@ -99,9 +99,10 @@ set global innodb_strict_mode='AUTO';
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of 'AUTO'
set session innodb_strict_mode='AUTO';
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of 'AUTO'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_strict_mode=-3;
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of '-3'
set session innodb_strict_mode=-7;
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of '-7'
select @@global.innodb_strict_mode;
@@global.innodb_strict_mode
1

View File

@ -73,6 +73,7 @@ SELECT @@session.innodb_support_xa;
SET @@session.innodb_support_xa = <20>FF;
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of '<27>FF'
SET @@global.innodb_support_xa = -1;
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of '-1'
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1

View File

@ -55,6 +55,7 @@ SELECT @@global.innodb_table_locks;
1
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@session.innodb_table_locks = -6;
ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of '-6'
SET @@session.innodb_table_locks = 1.6;
ERROR 42000: Incorrect argument type to variable 'innodb_table_locks'
SET @@session.innodb_table_locks = "T";
@ -72,6 +73,7 @@ SELECT @@session.innodb_table_locks;
SET @@session.innodb_table_locks = <20>FF;
ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of '<27>FF'
SET @@global.innodb_table_locks = -1;
ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of '-1'
SET @@global.innodb_table_locks = 2;
ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of '2'
SET @@global.innodb_table_locks = "T";

View File

@ -45,7 +45,7 @@ set session rpl_semi_sync_master_enabled=1;
ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable and should be set with SET GLOBAL
select @@global.rpl_semi_sync_master_enabled;
@@global.rpl_semi_sync_master_enabled
-1
1
select @@session.rpl_semi_sync_master_enabled;
ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable
show global variables like 'rpl_semi_sync_master_enabled';

View File

@ -45,7 +45,7 @@ set session rpl_semi_sync_slave_enabled=1;
ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable and should be set with SET GLOBAL
select @@global.rpl_semi_sync_slave_enabled;
@@global.rpl_semi_sync_slave_enabled
-1
1
select @@session.rpl_semi_sync_slave_enabled;
ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable
show global variables like 'rpl_semi_sync_slave_enabled';

View File

@ -54,7 +54,7 @@ set global innodb_adaptive_flushing=1.1;
set global innodb_adaptive_flushing=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_adaptive_flushing=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_adaptive_flushing=-3;
select @@global.innodb_adaptive_flushing;
select * from information_schema.global_variables where variable_name='innodb_adaptive_flushing';

View File

@ -54,7 +54,7 @@ set global innodb_adaptive_hash_index=1.1;
set global innodb_adaptive_hash_index=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_adaptive_hash_index=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_adaptive_hash_index=-3;
select @@global.innodb_adaptive_hash_index;
select * from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';

View File

@ -54,7 +54,7 @@ set global innodb_large_prefix=1.1;
set global innodb_large_prefix=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_large_prefix=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_large_prefix=-3;
select @@global.innodb_large_prefix;
select * from information_schema.global_variables where variable_name='innodb_large_prefix';

View File

@ -54,7 +54,7 @@ set global innodb_random_read_ahead=1.1;
set global innodb_random_read_ahead=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_random_read_ahead=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_random_read_ahead=-3;
select @@global.innodb_random_read_ahead;
select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';

View File

@ -54,7 +54,7 @@ set global innodb_stats_on_metadata=1.1;
set global innodb_stats_on_metadata=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_stats_on_metadata=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_stats_on_metadata=-3;
select @@global.innodb_stats_on_metadata;
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';

View File

@ -68,8 +68,9 @@ set session innodb_strict_mode=2;
set global innodb_strict_mode='AUTO';
--error ER_WRONG_VALUE_FOR_VAR
set session innodb_strict_mode='AUTO';
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_strict_mode=-3;
--error ER_WRONG_VALUE_FOR_VAR
set session innodb_strict_mode=-7;
select @@global.innodb_strict_mode;
select @@session.innodb_strict_mode;

View File

@ -127,6 +127,7 @@ SET @@session.innodb_support_xa =
# for global
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_support_xa = -1;
SELECT @@global.innodb_support_xa;

View File

@ -106,6 +106,7 @@ SELECT @@global.innodb_table_locks;
# for session
--error ER_WRONG_VALUE_FOR_VAR
SET @@session.innodb_table_locks = -6;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.innodb_table_locks = 1.6;
@ -127,6 +128,7 @@ SET @@session.innodb_table_locks =
# for global
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_table_locks = -1;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_table_locks = 2;