Commit 83fb8a77 authored by Kristofer Pettersson's avatar Kristofer Pettersson

Automerge

parents 5b6ebdf0 d441947c
disable_query_log;
--require r/true.require
SELECT (plugin_library LIKE 'ha_innodb_plugin%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active';
enable_query_log;
...@@ -70,11 +70,20 @@ my $skip_test_reg; ...@@ -70,11 +70,20 @@ my $skip_test_reg;
# Related to adding InnoDB plugin combinations # Related to adding InnoDB plugin combinations
my $lib_innodb_plugin; my $lib_innodb_plugin;
my $do_innodb_plugin;
# If "Quick collect", set to 1 once a test to run has been found. # If "Quick collect", set to 1 once a test to run has been found.
my $some_test_found; my $some_test_found;
sub find_innodb_plugin {
$lib_innodb_plugin=
my_find_file($::basedir,
["storage/innodb_plugin", "storage/innodb_plugin/.libs",
"lib/mysql/plugin", "lib/plugin"],
["ha_innodb_plugin.dll", "ha_innodb_plugin.so",
"ha_innodb_plugin.sl"],
NOT_REQUIRED);
}
sub init_pattern { sub init_pattern {
my ($from, $what)= @_; my ($from, $what)= @_;
return undef unless defined $from; return undef unless defined $from;
...@@ -107,16 +116,7 @@ sub collect_test_cases ($$$) { ...@@ -107,16 +116,7 @@ sub collect_test_cases ($$$) {
$do_test_reg= init_pattern($do_test, "--do-test"); $do_test_reg= init_pattern($do_test, "--do-test");
$skip_test_reg= init_pattern($skip_test, "--skip-test"); $skip_test_reg= init_pattern($skip_test, "--skip-test");
$lib_innodb_plugin= &find_innodb_plugin;
my_find_file($::basedir,
["storage/innodb_plugin", "storage/innodb_plugin/.libs",
"lib/mysql/plugin", "lib/plugin"],
["ha_innodb_plugin.dll", "ha_innodb_plugin.so",
"ha_innodb_plugin.sl"],
NOT_REQUIRED);
$do_innodb_plugin= ($::mysql_version_id >= 50100 &&
!(IS_WINDOWS && $::opt_embedded_server) &&
$lib_innodb_plugin);
# If not reordering, we also shouldn't group by suites, unless # If not reordering, we also shouldn't group by suites, unless
# no test cases were named. # no test cases were named.
...@@ -504,73 +504,6 @@ sub collect_one_suite($) ...@@ -504,73 +504,6 @@ sub collect_one_suite($)
} }
} }
# ----------------------------------------------------------------------
# Testing InnoDB plugin.
# ----------------------------------------------------------------------
if ($do_innodb_plugin)
{
my @new_cases;
my $sep= (IS_WINDOWS) ? ';' : ':';
foreach my $test (@cases)
{
next if (!$test->{'innodb_test'});
# If skipped due to no builtin innodb, we can still run it with plugin
next if ($test->{'skip'} && $test->{comment} ne "No innodb support");
# Exceptions
next if ($test->{'name'} eq 'main.innodb'); # Failed with wrong errno (fk)
next if ($test->{'name'} eq 'main.index_merge_innodb'); # Explain diff
# innodb_file_per_table is rw with innodb_plugin
next if ($test->{'name'} eq 'sys_vars.innodb_file_per_table_basic');
# innodb_lock_wait_timeout is rw with innodb_plugin
next if ($test->{'name'} eq 'sys_vars.innodb_lock_wait_timeout_basic');
# Diff around innodb_thread_concurrency variable
next if ($test->{'name'} eq 'sys_vars.innodb_thread_concurrency_basic');
# Can't work with InnoPlug. Test framework needs to be re-designed.
next if ($test->{'name'} eq 'main.innodb_bug46000');
# Fails with innodb plugin
next if ($test->{'name'} eq 'main.innodb-autoinc');
# Fails with innodb plugin: r6185 Testcases changes not included
next if ($test->{'name'} eq 'main.innodb_bug44369');
# Fix for BUG47621 is not in InnoDB plugin
next if ($test->{'name'} eq 'main.innodb_bug21704');
next if ($test->{'name'} eq 'main.innodb_bug47621');
# Copy test options
my $new_test= My::Test->new();
while (my ($key, $value) = each(%$test))
{
if (ref $value eq "ARRAY")
{
push(@{$new_test->{$key}}, @$value);
}
else
{
$new_test->{$key}= $value unless ($key eq 'skip');
}
}
my $plugin_filename= basename($lib_innodb_plugin);
my $plugin_list= "innodb=$plugin_filename" . $sep . "innodb_locks=$plugin_filename";
push(@{$new_test->{master_opt}}, '--ignore-builtin-innodb');
push(@{$new_test->{master_opt}}, '--plugin-dir=' . dirname($lib_innodb_plugin));
push(@{$new_test->{master_opt}}, "--plugin_load=$plugin_list");
push(@{$new_test->{slave_opt}}, '--ignore-builtin-innodb');
push(@{$new_test->{slave_opt}}, '--plugin-dir=' . dirname($lib_innodb_plugin));
push(@{$new_test->{slave_opt}}, "--plugin_load=$plugin_list");
if ($new_test->{combination})
{
$new_test->{combination}.= '+innodb_plugin';
}
else
{
$new_test->{combination}= 'innodb_plugin';
}
push(@new_cases, $new_test);
}
push(@cases, @new_cases);
}
# ----------------------------------------------------------------------
# End of testing InnoDB plugin.
# ----------------------------------------------------------------------
optimize_cases(\@cases); optimize_cases(\@cases);
#print_testcases(@cases); #print_testcases(@cases);
...@@ -1005,11 +938,38 @@ sub collect_one_test_case { ...@@ -1005,11 +938,38 @@ sub collect_one_test_case {
{ {
# innodb is not supported, skip it # innodb is not supported, skip it
$tinfo->{'skip'}= 1; $tinfo->{'skip'}= 1;
# This comment is checked for running with innodb plugin (see above),
# please keep that in mind if changing the text.
$tinfo->{'comment'}= "No innodb support"; $tinfo->{'comment'}= "No innodb support";
# But continue processing if we may run it with innodb plugin return $tinfo;
return $tinfo unless $do_innodb_plugin; }
}
elsif ( $tinfo->{'innodb_plugin_test'} )
{
# This is a test that needs the innodb plugin
if (!&find_innodb_plugin)
{
# innodb plugin is not supported, skip it
$tinfo->{'skip'}= 1;
$tinfo->{'comment'}= "No innodb plugin support";
return $tinfo;
}
my $sep= (IS_WINDOWS) ? ';' : ':';
my $plugin_filename= basename($lib_innodb_plugin);
my $plugin_list=
"innodb=$plugin_filename$sep" .
"innodb_trx=$plugin_filename$sep" .
"innodb_locks=$plugin_filename$sep" .
"innodb_lock_waits=$plugin_filename$sep" .
"innodb_cmp=$plugin_filename$sep" .
"innodb_cmp_reset=$plugin_filename$sep" .
"innodb_cmpmem=$plugin_filename$sep" .
"innodb_cmpmem_reset=$plugin_filename";
foreach my $k ('master_opt', 'slave_opt')
{
push(@{$tinfo->{$k}}, '--ignore-builtin-innodb');
push(@{$tinfo->{$k}}, '--plugin-dir=' . dirname($lib_innodb_plugin));
push(@{$tinfo->{$k}}, "--plugin-load=$plugin_list");
} }
} }
else else
...@@ -1137,6 +1097,7 @@ my @tags= ...@@ -1137,6 +1097,7 @@ my @tags=
["include/have_log_bin.inc", "need_binlog", 1], ["include/have_log_bin.inc", "need_binlog", 1],
["include/have_innodb.inc", "innodb_test", 1], ["include/have_innodb.inc", "innodb_test", 1],
["include/have_innodb_plugin.inc", "innodb_plugin_test", 1],
["include/big_test.inc", "big_test", 1], ["include/big_test.inc", "big_test", 1],
["include/have_debug.inc", "need_debug", 1], ["include/have_debug.inc", "need_debug", 1],
["include/have_ndb.inc", "ndb_test", 1], ["include/have_ndb.inc", "ndb_test", 1],
......
...@@ -202,7 +202,7 @@ eval kill query $ID; ...@@ -202,7 +202,7 @@ eval kill query $ID;
rollback; rollback;
connection con2; connection con2;
--error 0,ER_QUERY_INTERRUPTED --error 0,ER_QUERY_INTERRUPTED,ER_LOCK_WAIT_TIMEOUT
reap; reap;
# todo 1,2 above # todo 1,2 above
rollback; rollback;
......
disable_query_log;
--require r/true.require
select (PLUGIN_LIBRARY LIKE 'ha_innodb_plugin%') as `TRUE` from information_schema.plugins where PLUGIN_NAME='InnoDB';
enable_query_log;
...@@ -13,18 +13,18 @@ d1 ...@@ -13,18 +13,18 @@ d1
1 1
2 2
INSERT INTO t1 VALUES(null); INSERT INTO t1 VALUES(null);
Got one of the listed errors
ALTER TABLE t1 AUTO_INCREMENT = 3; ALTER TABLE t1 AUTO_INCREMENT = 3;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`d1` int(11) NOT NULL AUTO_INCREMENT, `d1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`d1`) PRIMARY KEY (`d1`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES(null); INSERT INTO t1 VALUES(null);
SELECT * FROM t1; SELECT * FROM t1;
d1 d1
1 1
2 2
3 3
4
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE bug51920 (i INT) ENGINE=InnoDB;
INSERT INTO bug51920 VALUES (1);
BEGIN;
SELECT * FROM bug51920 FOR UPDATE;
i
1
UPDATE bug51920 SET i=2;
SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE INFO="UPDATE bug51920 SET i=2"
INTO @thread_id;
KILL @thread_id;
Got one of the listed errors
DROP TABLE bug51920;
set session transaction isolation level read committed;
create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key
(what, id)) engine=innodb;
insert into innodb_bug52663 values ('total', 0, 0);
begin;
set session transaction isolation level read committed;
begin;
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
select * from innodb_bug52663;
what id count
total 0 1
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from innodb_bug52663;
what id count
total 0 0
commit;
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
commit;
select * from innodb_bug52663;
what id count
total 0 2
select * from innodb_bug52663;
what id count
total 0 2
drop table innodb_bug52663;
call mtr.add_suppression("InnoDB: invalid innodb_file_format_check value");
select @@innodb_file_format;
@@innodb_file_format
Antelope
select @@innodb_file_format_check;
@@innodb_file_format_check
Antelope
set global innodb_file_format=antelope;
set global innodb_file_format=barracuda;
set global innodb_file_format=cheetah;
ERROR HY000: Incorrect arguments to SET
select @@innodb_file_format;
@@innodb_file_format
Barracuda
set global innodb_file_format=default;
select @@innodb_file_format;
@@innodb_file_format
Antelope
set global innodb_file_format=on;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format=off;
ERROR HY000: Incorrect arguments to SET
select @@innodb_file_format;
@@innodb_file_format
Antelope
set global innodb_file_format_check=antelope;
set global innodb_file_format_check=barracuda;
set global innodb_file_format_check=cheetah;
ERROR HY000: Incorrect arguments to SET
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format_check=default;
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format=on;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format=off;
ERROR HY000: Incorrect arguments to SET
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
This diff is collapsed.
innodb-index: InnoDB: Error: table `test`.`t1#1` already exists in InnoDB internal ##############################################################################
#
# List the test cases that are to be disabled temporarily.
#
# Separate the test case name and the comment with ':'.
#
# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
#
# Do not use any TAB characters for whitespace.
#
##############################################################################
innodb : Bug#53306 2010-04-30 VasilDimov valgrind warnings
#
# Test that mysqld does not crash when running ANALYZE TABLE with
# different values of the parameter innodb_stats_sample_pages.
#
-- source include/have_innodb.inc
-- source suite/innodb/include/have_innodb_plugin.inc
# we care only that the following SQL commands do not produce errors
# and do not crash the server
-- disable_query_log
-- disable_result_log
-- enable_warnings
SET GLOBAL innodb_stats_sample_pages=0;
# check that the value has been adjusted to 1
-- enable_result_log
SHOW VARIABLES LIKE 'innodb_stats_sample_pages';
-- disable_result_log
CREATE TABLE innodb_analyze (
a INT,
b INT,
KEY(a),
KEY(b,a)
) ENGINE=InnoDB;
# test with empty table
ANALYZE TABLE innodb_analyze;
SET GLOBAL innodb_stats_sample_pages=2;
ANALYZE TABLE innodb_analyze;
SET GLOBAL innodb_stats_sample_pages=4;
ANALYZE TABLE innodb_analyze;
SET GLOBAL innodb_stats_sample_pages=8;
ANALYZE TABLE innodb_analyze;
SET GLOBAL innodb_stats_sample_pages=16;
ANALYZE TABLE innodb_analyze;
INSERT INTO innodb_analyze VALUES
(1,1), (1,1), (1,2), (1,3), (1,4), (1,5),
(8,1), (8,8), (8,2), (7,1), (1,4), (3,5);
SET GLOBAL innodb_stats_sample_pages=1;
ANALYZE TABLE innodb_analyze;
SET GLOBAL innodb_stats_sample_pages=2;
ANALYZE TABLE innodb_analyze;
SET GLOBAL innodb_stats_sample_pages=4;
ANALYZE TABLE innodb_analyze;
SET GLOBAL innodb_stats_sample_pages=8;
ANALYZE TABLE innodb_analyze;
SET GLOBAL innodb_stats_sample_pages=16;
ANALYZE TABLE innodb_analyze;
DROP TABLE innodb_analyze;
SET GLOBAL innodb_stats_sample_pages=DEFAULT;
...@@ -25,7 +25,7 @@ SELECT * FROM t1; ...@@ -25,7 +25,7 @@ SELECT * FROM t1;
# longer results in the two data dictionaries being out of sync. If they # longer results in the two data dictionaries being out of sync. If they
# revert their changes then this check for ER_AUTOINC_READ_FAILED will need # revert their changes then this check for ER_AUTOINC_READ_FAILED will need
# to be enabled. Also, see http://bugs.mysql.com/bug.php?id=47621. # to be enabled. Also, see http://bugs.mysql.com/bug.php?id=47621.
-- error ER_AUTOINC_READ_FAILED,1467 #-- error ER_AUTOINC_READ_FAILED,1467
INSERT INTO t1 VALUES(null); INSERT INTO t1 VALUES(null);
ALTER TABLE t1 AUTO_INCREMENT = 3; ALTER TABLE t1 AUTO_INCREMENT = 3;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
......
-- source include/have_innodb.inc
-- source suite/innodb/include/have_innodb_plugin.inc
let $timeout=`select @@innodb_lock_wait_timeout`;
set global innodb_lock_wait_timeout=42;
connect (a,localhost,root,,);
connect (b,localhost,root,,);
connection a;
select @@innodb_lock_wait_timeout;
set innodb_lock_wait_timeout=1;
select @@innodb_lock_wait_timeout;
connection b;
select @@innodb_lock_wait_timeout;
set global innodb_lock_wait_timeout=347;
select @@innodb_lock_wait_timeout;
set innodb_lock_wait_timeout=1;
select @@innodb_lock_wait_timeout;
connect (c,localhost,root,,);
connection c;
select @@innodb_lock_wait_timeout;
connection default;
disconnect c;
connection a;
create table t1(a int primary key)engine=innodb;
begin;
insert into t1 values(1),(2),(3);
connection b;
--send
select * from t1 for update;
connection a;
commit;
connection b;
reap;
connection a;
begin;
insert into t1 values(4);
connection b;
--send
select * from t1 for update;
connection a;
sleep 2;
commit;
connection b;
--error ER_LOCK_WAIT_TIMEOUT
reap;
drop table t1;
connection default;
disconnect a;
disconnect b;
eval set global innodb_lock_wait_timeout=$timeout;
--loose-innodb-use-sys-malloc=true
--loose-innodb-use-sys-malloc=true
--source include/have_innodb.inc
-- source suite/innodb/include/have_innodb_plugin.inc
#display current value of innodb_use_sys_malloc
SELECT @@GLOBAL.innodb_use_sys_malloc;
--echo 1 Expected
#try changing it. Should fail.
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.innodb_use_sys_malloc=0;
--echo Expected error 'Read only variable'
SELECT @@GLOBAL.innodb_use_sys_malloc;
--echo 1 Expected
#do some stuff to see if it works.
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
select * from t1;
drop table t1;
--source include/have_innodb.inc
#display current value of innodb_use_sys_malloc
SELECT @@GLOBAL.innodb_use_sys_malloc;
--echo 1 Expected
#try changing it. Should fail.
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.innodb_use_sys_malloc=0;
--echo Expected error 'Read only variable'
SELECT @@GLOBAL.innodb_use_sys_malloc;
--echo 1 Expected
#do some stuff to see if it works.
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
select * from t1;
drop table t1;
This diff is collapsed.
#
# Test case for bug 36172
#
-- source include/not_embedded.inc
-- source include/have_innodb.inc
-- source suite/innodb/include/have_innodb_plugin.inc
SET storage_engine=InnoDB;
# we do not really care about what gets printed, we are only
# interested in getting success or failure according to our
# expectations
-- disable_query_log
-- disable_result_log
SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=on;
DROP TABLE IF EXISTS `table0`;
CREATE TABLE `table0` ( `col0` tinyint(1) DEFAULT NULL, `col1` tinyint(1) DEFAULT NULL, `col2` tinyint(4) DEFAULT NULL, `col3` date DEFAULT NULL, `col4` time DEFAULT NULL, `col5` set('test1','test2','test3') DEFAULT NULL, `col6` time DEFAULT NULL, `col7` text, `col8` decimal(10,0) DEFAULT NULL, `col9` set('test1','test2','test3') DEFAULT NULL, `col10` float DEFAULT NULL, `col11` double DEFAULT NULL, `col12` enum('test1','test2','test3') DEFAULT NULL, `col13` tinyblob, `col14` year(4) DEFAULT NULL, `col15` set('test1','test2','test3') DEFAULT NULL, `col16` decimal(10,0) DEFAULT NULL, `col17` decimal(10,0) DEFAULT NULL, `col18` blob, `col19` datetime DEFAULT NULL, `col20` double DEFAULT NULL, `col21` decimal(10,0) DEFAULT NULL, `col22` datetime DEFAULT NULL, `col23` decimal(10,0) DEFAULT NULL, `col24` decimal(10,0) DEFAULT NULL, `col25` longtext, `col26` tinyblob, `col27` time DEFAULT NULL, `col28` tinyblob, `col29` enum('test1','test2','test3') DEFAULT NULL, `col30` smallint(6) DEFAULT NULL, `col31` double DEFAULT NULL, `col32` float DEFAULT NULL, `col33` char(175) DEFAULT NULL, `col34` tinytext, `col35` tinytext, `col36` tinyblob, `col37` tinyblob, `col38` tinytext, `col39` mediumblob, `col40` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `col41` double DEFAULT NULL, `col42` smallint(6) DEFAULT NULL, `col43` longblob, `col44` varchar(80) DEFAULT NULL, `col45` mediumtext, `col46` decimal(10,0) DEFAULT NULL, `col47` bigint(20) DEFAULT NULL, `col48` date DEFAULT NULL, `col49` tinyblob, `col50` date DEFAULT NULL, `col51` tinyint(1) DEFAULT NULL, `col52` mediumint(9) DEFAULT NULL, `col53` float DEFAULT NULL, `col54` tinyblob, `col55` longtext, `col56` smallint(6) DEFAULT NULL, `col57` enum('test1','test2','test3') DEFAULT NULL, `col58` datetime DEFAULT NULL, `col59` mediumtext, `col60` varchar(232) DEFAULT NULL, `col61` decimal(10,0) DEFAULT NULL, `col62` year(4) DEFAULT NULL, `col63` smallint(6) DEFAULT NULL, `col64` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col65` blob, `col66` longblob, `col67` int(11) DEFAULT NULL, `col68` longtext, `col69` enum('test1','test2','test3') DEFAULT NULL, `col70` int(11) DEFAULT NULL, `col71` time DEFAULT NULL, `col72` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col73` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col74` varchar(170) DEFAULT NULL, `col75` set('test1','test2','test3') DEFAULT NULL, `col76` tinyblob, `col77` bigint(20) DEFAULT NULL, `col78` decimal(10,0) DEFAULT NULL, `col79` datetime DEFAULT NULL, `col80` year(4) DEFAULT NULL, `col81` decimal(10,0) DEFAULT NULL, `col82` longblob, `col83` text, `col84` char(83) DEFAULT NULL, `col85` decimal(10,0) DEFAULT NULL, `col86` float DEFAULT NULL, `col87` int(11) DEFAULT NULL, `col88` varchar(145) DEFAULT NULL, `col89` date DEFAULT NULL, `col90` decimal(10,0) DEFAULT NULL, `col91` decimal(10,0) DEFAULT NULL, `col92` mediumblob, `col93` time DEFAULT NULL, KEY `idx0` (`col69`,`col90`,`col8`), KEY `idx1` (`col60`), KEY `idx2` (`col60`,`col70`,`col74`), KEY `idx3` (`col22`,`col32`,`col72`,`col30`), KEY `idx4` (`col29`), KEY `idx5` (`col19`,`col45`(143)), KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)), KEY `idx7` (`col48`,`col61`), KEY `idx8` (`col93`), KEY `idx9` (`col31`), KEY `idx10` (`col30`,`col21`), KEY `idx11` (`col67`), KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)), KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)), KEY `idx14` (`col78`), KEY `idx15` (`col63`,`col67`,`col64`), KEY `idx16` (`col17`,`col86`), KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)), KEY `idx18` (`col62`), KEY `idx19` (`col31`,`col57`,`col56`,`col53`), KEY `idx20` (`col46`), KEY `idx21` (`col83`(54)), KEY `idx22` (`col51`,`col7`(120)), KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
insert ignore into `table0` set `col23` = 7887371.5084383683, `col24` = 4293854615.6906948000, `col25` = 'vitalist', `col26` = 'widespread', `col27` = '3570490', `col28` = 'habitual', `col30` = -5471, `col31` = 4286985783.6771750000, `col32` = 6354540.9826654866, `col33` = 'defoliation', `col34` = 'logarithms', `col35` = 'tegument\'s', `col36` = 'scouting\'s', `col37` = 'intermittency', `col38` = 'elongates', `col39` = 'prophecies', `col40` = '20560103035939', `col41` = 4292809130.0544143000, `col42` = 22057, `col43` = 'Hess\'s', `col44` = 'bandstand', `col45` = 'phenylketonuria', `col46` = 6338767.4018677324, `col47` = 5310247, `col48` = '12592418', `col49` = 'churchman\'s', `col50` = '32226125', `col51` = -58, `col52` = -6207968, `col53` = 1244839.3255104220, `col54` = 'robotized', `col55` = 'monotonous', `col56` = -26909, `col58` = '20720107023550', `col59` = 'suggestiveness\'s', `col60` = 'gemology', `col61` = 4287800670.2229986000, `col62` = '1944', `col63` = -16827, `col64` = '20700107212324', `col65` = 'Nicolais', `col66` = 'apteryx', `col67` = 6935317, `col68` = 'stroganoff', `col70` = 3316430, `col71` = '3277608', `col72` = '19300511045918', `col73` = '20421201003327', `col74` = 'attenuant', `col75` = '15173', `col76` = 'upstroke\'s', `col77` = 8118987, `col78` = 6791516.2735374002, `col79` = '20780701144624', `col80` = '2134', `col81` = 4290682351.3127537000, `col82` = 'unexplainably', `col83` = 'Storm', `col84` = 'Greyso\'s', `col85` = 4289119212.4306774000, `col86` = 7617575.8796655172, `col87` = -6325335, `col88` = 'fondue\'s', `col89` = '40608940', `col90` = 1659421.8093508712, `col91` = 8346904.6584368423, `col92` = 'reloads', `col93` = '5188366';
CHECK TABLE table0 EXTENDED;
INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.9055146948, `col21` = 4293243420.5621204000, `col22` = '20511211123705', `col23` = 4289899778.6573381000, `col24` = 4293449279.0540481000, `col25` = 'emphysemic', `col26` = 'dentally', `col27` = '2347406', `col28` = 'eruct', `col30` = 1222, `col31` = 4294372994.9941406000, `col32` = 4291385574.1173744000, `col33` = 'borrowing\'s', `col34` = 'septics', `col35` = 'ratter\'s', `col36` = 'Kaye', `col37` = 'Florentia', `col38` = 'allium', `col39` = 'barkeep', `col40` = '19510407003441', `col41` = 4293559200.4215522000, `col42` = 22482, `col43` = 'decussate', `col44` = 'Brom\'s', `col45` = 'violated', `col46` = 4925506.4635456400, `col47` = 930549, `col48` = '51296066', `col49` = 'voluminously', `col50` = '29306676', `col51` = -88, `col52` = -2153690, `col53` = 4290250202.1464887000, `col54` = 'expropriation', `col55` = 'Aberdeen\'s', `col56` = 20343, `col58` = '19640415171532', `col59` = 'extern', `col60` = 'Ubana', `col61` = 4290487961.8539081000, `col62` = '2147', `col63` = -24271, `col64` = '20750801194548', `col65` = 'Cunaxa\'s', `col66` = 'pasticcio', `col67` = 2795817, `col68` = 'Indore\'s', `col70` = 6864127, `col71` = '1817832', `col72` = '20540506114211', `col73` = '20040101012300', `col74` = 'rationalized', `col75` = '45522', `col76` = 'indene', `col77` = -6964559, `col78` = 4247535.5266884370, `col79` = '20720416124357', `col80` = '2143', `col81` = 4292060102.4466386000, `col82` = 'striving', `col83` = 'boneblack\'s', `col84` = 'redolent', `col85` = 6489697.9009369183, `col86` = 4287473465.9731131000, `col87` = 7726015, `col88` = 'perplexed', `col89` = '17153791', `col90` = 5478587.1108127078, `col91` = 4287091404.7004304000, `col92` = 'Boulez\'s', `col93` = '2931278';
CHECK TABLE table0 EXTENDED;
DROP TABLE table0;
SET GLOBAL innodb_file_per_table=DEFAULT;
SET GLOBAL innodb_file_format='Antelope';
SET GLOBAL innodb_file_format_check='Antelope';
#
# Make sure http://bugs.mysql.com/41904 remains fixed.
#
-- source include/not_embedded.inc
-- source include/have_innodb.inc
CREATE TABLE bug41904 (id INT PRIMARY KEY, uniquecol CHAR(15)) ENGINE=InnoDB;
INSERT INTO bug41904 VALUES (1,NULL), (2,NULL);
CREATE UNIQUE INDEX ui ON bug41904 (uniquecol);
DROP TABLE bug41904;
#
# Bug #51920: InnoDB connections in lock wait ignore KILL until timeout
#
-- source include/not_embedded.inc
-- source include/have_innodb.inc
CREATE TABLE bug51920 (i INT) ENGINE=InnoDB;
INSERT INTO bug51920 VALUES (1);
BEGIN;
SELECT * FROM bug51920 FOR UPDATE;
connect (con1,localhost,root,,);
connection con1;
--send
UPDATE bug51920 SET i=2;
connection default;
let $wait_condition =
SELECT COUNT(*)=1 FROM information_schema.processlist
WHERE INFO="UPDATE bug51920 SET i=2";
-- source include/wait_condition.inc
SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE INFO="UPDATE bug51920 SET i=2"
INTO @thread_id;
KILL @thread_id;
let $wait_condition =
SELECT COUNT(*)=0 FROM information_schema.processlist WHERE ID=@thread_id;
-- source include/wait_condition.inc
#
# Bug#19723: kill of active connection yields different error code
# depending on platform.
#
connection con1;
-- error 1317, 2006, 2013
reap;
connection default;
DROP TABLE bug51920;
-- disconnect con1
--source include/have_innodb.inc
set session transaction isolation level read committed;
create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key
(what, id)) engine=innodb;
insert into innodb_bug52663 values ('total', 0, 0);
begin;
connect (addconroot, localhost, root,,);
connection addconroot;
set session transaction isolation level read committed;
begin;
connection default;
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
select * from innodb_bug52663;
connection addconroot;
--error ER_LOCK_WAIT_TIMEOUT
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
select * from innodb_bug52663;
connection default;
commit;
connection addconroot;
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
commit;
select * from innodb_bug52663;
connection default;
select * from innodb_bug52663;
drop table innodb_bug52663;
-- source include/have_innodb.inc
-- source suite/innodb/include/have_innodb_plugin.inc
call mtr.add_suppression("InnoDB: invalid innodb_file_format_check value");
let $format=`select @@innodb_file_format`;
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
select @@innodb_file_format;
select @@innodb_file_format_check;
set global innodb_file_format=antelope;
set global innodb_file_format=barracuda;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format=cheetah;
select @@innodb_file_format;
set global innodb_file_format=default;
select @@innodb_file_format;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format=on;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format=off;
select @@innodb_file_format;
set global innodb_file_format_check=antelope;
set global innodb_file_format_check=barracuda;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format_check=cheetah;
select @@innodb_file_format_check;
set global innodb_file_format_check=default;
select @@innodb_file_format_check;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format=on;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format=off;
select @@innodb_file_format_check;
#
# restore environment to the state it was before this test execution
#
-- disable_query_log
eval set global innodb_file_format=$format;
eval set global innodb_file_format_check=$innodb_file_format_check_orig;
-- enable_query_log
This diff is collapsed.
drop table if exists t1;
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (null);
INSERT INTO t1 VALUES (null);
ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT;
SELECT * FROM t1;
d1
1
2
SELECT * FROM t1;
d1
1
2
INSERT INTO t1 VALUES(null);
ALTER TABLE t1 AUTO_INCREMENT = 3;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`d1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`d1`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
d1
1
2
3
4
DROP TABLE t1;
...@@ -692,6 +692,8 @@ select count(*) from t1 where sca_pic is null; ...@@ -692,6 +692,8 @@ select count(*) from t1 where sca_pic is null;
count(*) count(*)
2 2
alter table t1 drop index sca_pic, add index sca_pic (cat_code, sca_pic); alter table t1 drop index sca_pic, add index sca_pic (cat_code, sca_pic);
alter table t1 drop index sca_pic;
alter table t1 add index sca_pic (cat_code, sca_pic);
select count(*) from t1 where sca_code='PD' and sca_pic is null; select count(*) from t1 where sca_code='PD' and sca_pic is null;
count(*) count(*)
1 1
...@@ -699,6 +701,9 @@ select count(*) from t1 where cat_code='E'; ...@@ -699,6 +701,9 @@ select count(*) from t1 where cat_code='E';
count(*) count(*)
0 0
alter table t1 drop index sca_pic, add index (sca_pic, cat_code); alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
ERROR 42000: Incorrect index name 'sca_pic'
alter table t1 drop index sca_pic;
alter table t1 add index (sca_pic, cat_code);
select count(*) from t1 where sca_code='PD' and sca_pic is null; select count(*) from t1 where sca_code='PD' and sca_pic is null;
count(*) count(*)
1 1
...@@ -1747,7 +1752,7 @@ variable_value - @innodb_rows_deleted_orig ...@@ -1747,7 +1752,7 @@ variable_value - @innodb_rows_deleted_orig
71 71
SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted'; SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
variable_value - @innodb_rows_inserted_orig variable_value - @innodb_rows_inserted_orig
1084 1087
SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated'; SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
variable_value - @innodb_rows_updated_orig variable_value - @innodb_rows_updated_orig
885 885
...@@ -1833,6 +1838,7 @@ show variables like "innodb_thread_sleep_delay"; ...@@ -1833,6 +1838,7 @@ show variables like "innodb_thread_sleep_delay";
Variable_name Value Variable_name Value
innodb_thread_sleep_delay 10000 innodb_thread_sleep_delay 10000
set storage_engine=INNODB; set storage_engine=INNODB;
set session old_alter_table=1;
drop table if exists t1,t2,t3; drop table if exists t1,t2,t3;
--- Testing varchar --- --- Testing varchar ---
--- Testing varchar --- --- Testing varchar ---
...@@ -1970,7 +1976,7 @@ explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' ...@@ -1970,7 +1976,7 @@ explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a '
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 13 const # Using where; Using index 1 SIMPLE t1 ref v v 13 const # Using where; Using index
alter table t1 add unique(v); alter table t1 add unique(v);
ERROR 23000: Duplicate entry 'v' for key 'v_2' ERROR 23000: Duplicate entry '{ ' for key 'v_2'
alter table t1 add key(v); alter table t1 add key(v);
select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a'; select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a';
qq qq
...@@ -2406,6 +2412,7 @@ select * from t1 where a=20 and b is null; ...@@ -2406,6 +2412,7 @@ select * from t1 where a=20 and b is null;
a b a b
20 NULL 20 NULL
drop table t1; drop table t1;
set session old_alter_table=0;
create table t1 (v varchar(65530), key(v)); create table t1 (v varchar(65530), key(v));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes Warning 1071 Specified key was too long; max key length is 767 bytes
...@@ -3088,7 +3095,7 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction ...@@ -3088,7 +3095,7 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
commit; commit;
drop table t1, t2, t3, t5, t6, t8, t9; drop table t1, t2, t3, t5, t6, t8, t9;
CREATE TABLE t1 (DB_ROW_ID int) engine=innodb; CREATE TABLE t1 (DB_ROW_ID int) engine=innodb;
ERROR HY000: Can't create table 'test.t1' (errno: -1) ERROR 42000: Incorrect column name 'DB_ROW_ID'
CREATE TABLE t1 ( CREATE TABLE t1 (
a BIGINT(20) NOT NULL, a BIGINT(20) NOT NULL,
PRIMARY KEY (a) PRIMARY KEY (a)
......
...@@ -25,8 +25,8 @@ ALTER TABLE t1 CHANGE a c INT; ...@@ -25,8 +25,8 @@ ALTER TABLE t1 CHANGE a c INT;
ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150) ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150)
# Ensure that online column rename works. # Ensure that online column rename works.
ALTER TABLE t1 CHANGE b c INT; ALTER TABLE t1 CHANGE b c INT;
affected rows: 0 affected rows: 3
info: Records: 0 Duplicates: 0 Warnings: 0 info: Records: 3 Duplicates: 0 Warnings: 0
# Test renaming the column in the referencing table # Test renaming the column in the referencing table
...@@ -34,8 +34,8 @@ ALTER TABLE t2 CHANGE a c INT; ...@@ -34,8 +34,8 @@ ALTER TABLE t2 CHANGE a c INT;
ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150) ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150)
# Ensure that online column rename works. # Ensure that online column rename works.
ALTER TABLE t2 CHANGE b c INT; ALTER TABLE t2 CHANGE b c INT;
affected rows: 0 affected rows: 3
info: Records: 0 Duplicates: 0 Warnings: 0 info: Records: 3 Duplicates: 0 Warnings: 0
# Test with self-referential constraints # Test with self-referential constraints
...@@ -45,8 +45,8 @@ ALTER TABLE t3 CHANGE b d INT; ...@@ -45,8 +45,8 @@ ALTER TABLE t3 CHANGE b d INT;
ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150) ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150)
# Ensure that online column rename works. # Ensure that online column rename works.
ALTER TABLE t3 CHANGE c d INT; ALTER TABLE t3 CHANGE c d INT;
affected rows: 0 affected rows: 3
info: Records: 0 Duplicates: 0 Warnings: 0 info: Records: 3 Duplicates: 0 Warnings: 0
# Cleanup. # Cleanup.
......
SET storage_engine=InnoDB;
INSERT INTO bug38231 VALUES (1), (10), (300);
SET autocommit=0;
SELECT * FROM bug38231 FOR UPDATE;
a
1
10
300
TRUNCATE TABLE bug38231;
COMMIT;
DROP TABLE bug38231;
create table bug44369 (DB_ROW_ID int) engine=innodb;
ERROR 42000: Incorrect column name 'DB_ROW_ID'
create table bug44369 (db_row_id int) engine=innodb;
ERROR 42000: Incorrect column name 'db_row_id'
create table bug44369 (db_TRX_Id int) engine=innodb;
ERROR 42000: Incorrect column name 'db_TRX_Id'
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File mode changed from 100755 to 100644
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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