mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge from 5.1
This commit is contained in:
@ -100,6 +100,7 @@ TEST_DIRS = t r include std_data std_data/parts collections \
|
||||
suite/rpl_ndb suite/rpl_ndb/t suite/rpl_ndb/r \
|
||||
suite/parts suite/parts/t suite/parts/r suite/parts/inc \
|
||||
suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include \
|
||||
suite/innodb_plugin suite/innodb_plugin/t suite/innodb_plugin/r suite/innodb_plugin/include \
|
||||
suite/engines suite/engines/funcs suite/engines/iuds suite/engines/rr_trx \
|
||||
suite/engines/funcs/r suite/engines/funcs/t suite/engines/iuds/r \
|
||||
suite/engines/iuds/t suite/engines/rr_trx/include suite/engines/rr_trx/r \
|
||||
|
@ -42,3 +42,5 @@ parts.partition_mgm_lc1_ndb # joro : NDB tests marked as experiment
|
||||
parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
main.mysqlhotcopy_myisam # horst: due to bug#54129
|
||||
main.mysqlhotcopy_archive # horst: due to bug#54129
|
||||
|
121
mysql-test/include/mysqlhotcopy.inc
Normal file
121
mysql-test/include/mysqlhotcopy.inc
Normal file
@ -0,0 +1,121 @@
|
||||
# Test of mysqlhotcopy (perl script)
|
||||
# Author: Horst Hunger
|
||||
# Created: 2010-05-10
|
||||
|
||||
--source include/not_windows.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
if ($MYSQLHOTCOPY)
|
||||
{
|
||||
die due to missing mysqlhotcopy tool;
|
||||
}
|
||||
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS hotcopy_test;
|
||||
--enable_warnings
|
||||
CREATE DATABASE hotcopy_test;
|
||||
USE hotcopy_test;
|
||||
eval CREATE TABLE t1 (c1 int, c2 varchar(20)) ENGINE=$engine;
|
||||
eval CREATE TABLE t2 (c1 int, c2 varchar(20)) ENGINE=$engine;
|
||||
eval CREATE TABLE t3 (c1 int, c2 varchar(20)) ENGINE=$engine;
|
||||
|
||||
INSERT INTO t1 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||
INSERT INTO t2 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||
INSERT INTO t3 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_test
|
||||
|
||||
# backup into another database in the same directory
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||
|
||||
USE hotcopy_save;
|
||||
SELECT * FROM t1;
|
||||
SELECT * FROM t2;
|
||||
SELECT * FROM t3;
|
||||
|
||||
# restore data into the original database with mysqlhotcopy
|
||||
if(`SELECT engine= 'MyISAM' FROM information_schema.tables WHERE table_name='t1'`)
|
||||
{
|
||||
USE hotcopy_test;
|
||||
DELETE FROM t1;
|
||||
SELECT * FROM t1;
|
||||
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet --addtodest -S $MASTER_MYSOCK -u root hotcopy_save hotcopy_test
|
||||
|
||||
USE hotcopy_save;
|
||||
SELECT * FROM t1;
|
||||
SELECT * FROM t2;
|
||||
SELECT * FROM t3;
|
||||
}
|
||||
|
||||
USE hotcopy_test;
|
||||
DROP TABLE t2;
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_test
|
||||
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet --addtodest -S $MASTER_MYSOCK -u root hotcopy_save hotcopy_test
|
||||
|
||||
FLUSH TABLES;
|
||||
SELECT * FROM t1;
|
||||
SELECT * FROM t2;
|
||||
SELECT * FROM t3;
|
||||
|
||||
# backup of db into a directory
|
||||
USE hotcopy_test;
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test $MYSQLTEST_VARDIR/tmp
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--list_files $MYSQLTEST_VARDIR/tmp/hotcopy_test
|
||||
#--exec rm -rf $MYSQLTEST_VARDIR/tmp/hotcopy_test
|
||||
--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/hotcopy_test *
|
||||
--rmdir $MYSQLTEST_VARDIR/tmp/hotcopy_test
|
||||
|
||||
# backup without full index files
|
||||
# reproduction of bug#53556, "--list_files" shows MYI files, which is wrong.
|
||||
DROP DATABASE hotcopy_save;
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet --noindices -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||
|
||||
# test of option "allowold"
|
||||
DROP DATABASE hotcopy_save;
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--error 9,2304
|
||||
--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet --allowold -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||
|
||||
# test of option "keepold"
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet --keepold -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_save_old
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||
|
||||
# test of option "suffix"
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet --suffix=_cpy -S $MASTER_MYSOCK -u root hotcopy_test
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_test_cpy
|
||||
DROP DATABASE hotcopy_test_cpy;
|
||||
|
||||
DROP DATABASE hotcopy_test;
|
||||
DROP DATABASE hotcopy_save;
|
||||
DROP DATABASE hotcopy_save_old;
|
||||
|
@ -768,11 +768,13 @@ sub collect_one_test_case {
|
||||
# Check for disabled tests
|
||||
# ----------------------------------------------------------------------
|
||||
my $marked_as_disabled= 0;
|
||||
if ( $disabled->{$tname} )
|
||||
if ( $disabled->{$tname} or $disabled->{"$suitename.$tname"} )
|
||||
{
|
||||
# Test was marked as disabled in suites disabled.def file
|
||||
$marked_as_disabled= 1;
|
||||
$tinfo->{'comment'}= $disabled->{$tname};
|
||||
# Test name may have been disabled with or without suite name part
|
||||
$tinfo->{'comment'}= $disabled->{$tname} ||
|
||||
$disabled->{"$suitename.$tname"};
|
||||
}
|
||||
|
||||
my $disabled_file= "$testdir/$tname.disabled";
|
||||
|
@ -147,6 +147,28 @@ sub mtr_exe_maybe_exists (@) {
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# NOTE! More specific paths should be given before less specific.
|
||||
#
|
||||
sub mtr_pl_maybe_exists (@) {
|
||||
my @path= @_;
|
||||
|
||||
map {$_.= ".pl"} @path if IS_WINDOWS;
|
||||
foreach my $path ( @path )
|
||||
{
|
||||
if(IS_WINDOWS)
|
||||
{
|
||||
return $path if -f $path;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $path if -x $path;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# NOTE! More specific paths should be given before less specific.
|
||||
# For example /client/debug should be listed before /client
|
||||
|
@ -264,8 +264,9 @@ sub spawn_parent_impl {
|
||||
if ( $timer_name eq "suite" )
|
||||
{
|
||||
# We give up here
|
||||
# FIXME we should only give up the suite, not all of the run?
|
||||
print STDERR "\n";
|
||||
kill(9, $pid); # Kill mysqltest
|
||||
mtr_kill_leftovers(); # Kill servers the hard way
|
||||
mtr_error("Test suite timeout");
|
||||
}
|
||||
elsif ( $timer_name eq "testcase" )
|
||||
|
@ -129,7 +129,7 @@ my $path_config_file; # The generated config file, var/my.cnf
|
||||
# executables will be used by the test suite.
|
||||
our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
|
||||
|
||||
my $DEFAULT_SUITES= "main,binlog,federated,rpl,rpl_ndb,ndb,innodb";
|
||||
my $DEFAULT_SUITES= "main,binlog,federated,rpl,rpl_ndb,ndb,innodb,innodb_plugin";
|
||||
my $opt_suites;
|
||||
|
||||
our $opt_verbose= 0; # Verbose output, enable with --verbose
|
||||
@ -2066,6 +2066,15 @@ sub environment_setup {
|
||||
"$basedir/storage/myisam/myisampack",
|
||||
"$basedir/myisam/myisampack"));
|
||||
|
||||
# ----------------------------------------------------
|
||||
# mysqlhotcopy
|
||||
# ----------------------------------------------------
|
||||
my $mysqlhotcopy=
|
||||
mtr_pl_maybe_exists("$basedir/scripts/mysqlhotcopy");
|
||||
# Since mysqltest interprets the real path as "false" in an if,
|
||||
# use 1 ("true") to indicate "not exists" so it can be tested for
|
||||
$ENV{'MYSQLHOTCOPY'}= $mysqlhotcopy || 1;
|
||||
|
||||
# ----------------------------------------------------
|
||||
# perror
|
||||
# ----------------------------------------------------
|
||||
|
@ -39,5 +39,49 @@ a
|
||||
2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#42064: low memory crash when importing hex strings, in Item_hex_string::Item_hex_string
|
||||
#
|
||||
CREATE TABLE t1(a BLOB);
|
||||
SET SESSION debug="+d,bug42064_simulate_oom";
|
||||
INSERT INTO t1 VALUES("");
|
||||
Got one of the listed errors
|
||||
SET SESSION debug=DEFAULT;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#41660: Sort-index_merge for non-first join table may require
|
||||
# O(#scans) memory
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
|
||||
CREATE TABLE t2 (a INT, b INT, filler CHAR(100), KEY(a), KEY(b));
|
||||
INSERT INTO t2 SELECT 1000, 1000, 'filler' FROM t1 A, t1 B, t1 C;
|
||||
INSERT INTO t2 VALUES (1, 1, 'data');
|
||||
# the example query uses LEFT JOIN only for the sake of being able to
|
||||
# demonstrate the issue with a very small dataset. (left outer join
|
||||
# disables the use of join buffering, so we get the second table
|
||||
# re-scanned for every record in the outer table. if we used inner join,
|
||||
# we would need to have thousands of records and/or more columns in both
|
||||
# tables so that the join buffer is filled and re-scans are triggered).
|
||||
SET SESSION debug = '+d,only_one_Unique_may_be_created';
|
||||
EXPLAIN
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
x x x x x x x x x
|
||||
x x x x x x x x x Using sort_union(a,b); Using where
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
|
||||
a a b filler
|
||||
0 1 1 data
|
||||
1 1 1 data
|
||||
2 1 1 data
|
||||
3 1 1 data
|
||||
4 1 1 data
|
||||
5 1 1 data
|
||||
6 1 1 data
|
||||
7 1 1 data
|
||||
8 1 1 data
|
||||
9 1 1 data
|
||||
SET SESSION debug = DEFAULT;
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
@ -238,4 +238,17 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug #48573: difference of index selection between rpm binary and
|
||||
# .tar.gz, windows vs linux..
|
||||
#
|
||||
CREATE TABLE t1(c1 INT, c2 INT, c4 INT, c5 INT, KEY(c2, c5), KEY(c2, c4, c5));
|
||||
INSERT INTO t1 VALUES(4, 1, 1, 1);
|
||||
INSERT INTO t1 VALUES(3, 1, 1, 1);
|
||||
INSERT INTO t1 VALUES(2, 1, 1, 1);
|
||||
INSERT INTO t1 VALUES(1, 1, 1, 1);
|
||||
EXPLAIN SELECT c1 FROM t1 WHERE c2 = 1 AND c4 = 1 AND c5 = 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref c2,c2_2 c2 10 const,const 3 Using where
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests.
|
||||
|
@ -750,4 +750,24 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#54477: Crash on IN / CASE with NULL arguments
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
SELECT 1 IN (NULL, a) FROM t1;
|
||||
1 IN (NULL, a)
|
||||
1
|
||||
NULL
|
||||
SELECT a IN (a, a) FROM t1 GROUP BY a WITH ROLLUP;
|
||||
a IN (a, a)
|
||||
1
|
||||
1
|
||||
NULL
|
||||
SELECT CASE a WHEN a THEN a END FROM t1 GROUP BY a WITH ROLLUP;
|
||||
CASE a WHEN a THEN a END
|
||||
1
|
||||
2
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
#
|
||||
End of 5.1 tests
|
||||
|
@ -5,3 +5,17 @@ flush tables;
|
||||
select * from t1 where isnull(to_days(mydate));
|
||||
id mydate
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#53933 crash when using uncacheable subquery in the having clause of outer query
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT);
|
||||
INSERT INTO t1 VALUES (0),(0);
|
||||
SELECT ISNULL((SELECT GET_LOCK('Bug#53933', 0) FROM t1 GROUP BY f1)) AS f2
|
||||
FROM t1 GROUP BY f1 HAVING f2 = f2;
|
||||
f2
|
||||
0
|
||||
SELECT RELEASE_LOCK('Bug#53933');
|
||||
RELEASE_LOCK('Bug#53933')
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
|
@ -169,3 +169,17 @@ select 'andre%' like 'andre
|
||||
select _cp1251'andre%' like convert('andre<72>%' using cp1251) escape '<27>';
|
||||
_cp1251'andre%' like convert('andre<72>%' using cp1251) escape '<27>'
|
||||
1
|
||||
End of 4.1 tests
|
||||
#
|
||||
# Bug #54575: crash when joining tables with unique set column
|
||||
#
|
||||
CREATE TABLE t1(a SET('a') NOT NULL, UNIQUE KEY(a));
|
||||
CREATE TABLE t2(b INT PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES ();
|
||||
Warnings:
|
||||
Warning 1364 Field 'a' doesn't have a default value
|
||||
INSERT INTO t2 VALUES (1), (2), (3);
|
||||
SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a;
|
||||
1
|
||||
DROP TABLE t1, t2;
|
||||
End of 5.1 tests
|
||||
|
@ -2767,4 +2767,17 @@ SELECT MIN( a ) FROM t1 WHERE a IS NULL;
|
||||
MIN( a )
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#53859: Valgrind: opt_sum_query(TABLE_LIST*, List<Item>&, Item*) at
|
||||
# opt_sum.cc:305
|
||||
#
|
||||
CREATE TABLE t1 ( a INT, KEY (a) );
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
SELECT MIN( a ) AS min_a
|
||||
FROM t1
|
||||
WHERE a > 1 AND a IS NULL
|
||||
ORDER BY min_a;
|
||||
min_a
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -769,4 +769,97 @@ a
|
||||
1
|
||||
HANDLER t1 CLOSE;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #54007: assert in ha_myisam::index_next , HANDLER
|
||||
#
|
||||
CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a), KEY b(b), KEY ab(a, b));
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ FIRST;
|
||||
a b
|
||||
HANDLER t1 READ `PRIMARY` NEXT;
|
||||
a b
|
||||
HANDLER t1 READ ab NEXT;
|
||||
a b
|
||||
HANDLER t1 READ b NEXT;
|
||||
a b
|
||||
HANDLER t1 READ NEXT;
|
||||
a b
|
||||
HANDLER t1 CLOSE;
|
||||
INSERT INTO t1 VALUES (2, 20), (1, 10), (4, 40), (3, 30);
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ FIRST;
|
||||
a b
|
||||
2 20
|
||||
HANDLER t1 READ NEXT;
|
||||
a b
|
||||
1 10
|
||||
HANDLER t1 READ `PRIMARY` NEXT;
|
||||
a b
|
||||
1 10
|
||||
HANDLER t1 READ `PRIMARY` NEXT;
|
||||
a b
|
||||
2 20
|
||||
HANDLER t1 READ ab NEXT;
|
||||
a b
|
||||
1 10
|
||||
HANDLER t1 READ ab NEXT;
|
||||
a b
|
||||
2 20
|
||||
HANDLER t1 READ b NEXT;
|
||||
a b
|
||||
1 10
|
||||
HANDLER t1 READ b NEXT;
|
||||
a b
|
||||
2 20
|
||||
HANDLER t1 READ b NEXT;
|
||||
a b
|
||||
3 30
|
||||
HANDLER t1 READ b NEXT;
|
||||
a b
|
||||
4 40
|
||||
HANDLER t1 READ b NEXT;
|
||||
a b
|
||||
HANDLER t1 READ NEXT;
|
||||
a b
|
||||
4 40
|
||||
HANDLER t1 READ NEXT;
|
||||
a b
|
||||
3 30
|
||||
HANDLER t1 READ NEXT;
|
||||
a b
|
||||
HANDLER t1 CLOSE;
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ FIRST;
|
||||
a b
|
||||
2 20
|
||||
HANDLER t1 READ `PRIMARY` PREV;
|
||||
a b
|
||||
4 40
|
||||
HANDLER t1 READ `PRIMARY` PREV;
|
||||
a b
|
||||
3 30
|
||||
HANDLER t1 READ b PREV;
|
||||
a b
|
||||
4 40
|
||||
HANDLER t1 READ b PREV;
|
||||
a b
|
||||
3 30
|
||||
HANDLER t1 CLOSE;
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ FIRST;
|
||||
a b
|
||||
2 20
|
||||
HANDLER t1 READ `PRIMARY` PREV LIMIT 3;
|
||||
a b
|
||||
4 40
|
||||
3 30
|
||||
2 20
|
||||
HANDLER t1 READ b NEXT LIMIT 5;
|
||||
a b
|
||||
1 10
|
||||
2 20
|
||||
3 30
|
||||
4 40
|
||||
HANDLER t1 CLOSE;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -1747,4 +1747,14 @@ COUNT(*)
|
||||
DROP USER nonpriv;
|
||||
DROP TABLE db1.t1;
|
||||
DROP DATABASE db1;
|
||||
|
||||
Bug#54422 query with = 'variables'
|
||||
|
||||
CREATE TABLE variables(f1 INT);
|
||||
SELECT COLUMN_DEFAULT, TABLE_NAME
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE INFORMATION_SCHEMA.COLUMNS.TABLE_NAME = 'variables';
|
||||
COLUMN_DEFAULT TABLE_NAME
|
||||
NULL variables
|
||||
DROP TABLE variables;
|
||||
End of 5.1 tests.
|
||||
|
@ -496,4 +496,11 @@ SELECT * FROM t1;
|
||||
col0
|
||||
test
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #52512 : Assertion `! is_set()' in
|
||||
# Diagnostics_area::set_ok_status on LOAD DATA
|
||||
#
|
||||
CREATE TABLE t1 (id INT NOT NULL);
|
||||
LOAD DATA LOCAL INFILE 'tb.txt' INTO TABLE t1;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
118
mysql-test/r/mysqlhotcopy_archive.result
Normal file
118
mysql-test/r/mysqlhotcopy_archive.result
Normal file
@ -0,0 +1,118 @@
|
||||
DROP DATABASE IF EXISTS hotcopy_test;
|
||||
CREATE DATABASE hotcopy_test;
|
||||
USE hotcopy_test;
|
||||
CREATE TABLE t1 (c1 int, c2 varchar(20)) ENGINE=archive;
|
||||
CREATE TABLE t2 (c1 int, c2 varchar(20)) ENGINE=archive;
|
||||
CREATE TABLE t3 (c1 int, c2 varchar(20)) ENGINE=archive;
|
||||
INSERT INTO t1 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c2' at row 2
|
||||
INSERT INTO t2 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c2' at row 2
|
||||
INSERT INTO t3 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c2' at row 2
|
||||
db.opt
|
||||
t1.ARZ
|
||||
t1.frm
|
||||
t2.ARZ
|
||||
t2.frm
|
||||
t3.ARZ
|
||||
t3.frm
|
||||
db.opt
|
||||
t1.ARZ
|
||||
t1.frm
|
||||
t2.ARZ
|
||||
t2.frm
|
||||
t3.ARZ
|
||||
t3.frm
|
||||
USE hotcopy_save;
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
SELECT * FROM t3;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
USE hotcopy_test;
|
||||
DROP TABLE t2;
|
||||
db.opt
|
||||
t1.ARZ
|
||||
t1.frm
|
||||
t3.ARZ
|
||||
t3.frm
|
||||
FLUSH TABLES;
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
SELECT * FROM t3;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
USE hotcopy_test;
|
||||
db.opt
|
||||
t1.ARZ
|
||||
t1.frm
|
||||
t2.ARZ
|
||||
t2.frm
|
||||
t3.ARZ
|
||||
t3.frm
|
||||
DROP DATABASE hotcopy_save;
|
||||
db.opt
|
||||
t1.ARZ
|
||||
t1.frm
|
||||
t2.ARZ
|
||||
t2.frm
|
||||
t3.ARZ
|
||||
t3.frm
|
||||
DROP DATABASE hotcopy_save;
|
||||
db.opt
|
||||
t1.ARZ
|
||||
t1.frm
|
||||
t2.ARZ
|
||||
t2.frm
|
||||
t3.ARZ
|
||||
t3.frm
|
||||
db.opt
|
||||
t1.ARZ
|
||||
t1.frm
|
||||
t2.ARZ
|
||||
t2.frm
|
||||
t3.ARZ
|
||||
t3.frm
|
||||
db.opt
|
||||
t1.ARZ
|
||||
t1.frm
|
||||
t2.ARZ
|
||||
t2.frm
|
||||
t3.ARZ
|
||||
t3.frm
|
||||
db.opt
|
||||
t1.ARZ
|
||||
t1.frm
|
||||
t2.ARZ
|
||||
t2.frm
|
||||
t3.ARZ
|
||||
t3.frm
|
||||
db.opt
|
||||
t1.ARZ
|
||||
t1.frm
|
||||
t2.ARZ
|
||||
t2.frm
|
||||
t3.ARZ
|
||||
t3.frm
|
||||
DROP DATABASE hotcopy_test_cpy;
|
||||
DROP DATABASE hotcopy_test;
|
||||
DROP DATABASE hotcopy_save;
|
||||
DROP DATABASE hotcopy_save_old;
|
164
mysql-test/r/mysqlhotcopy_myisam.result
Normal file
164
mysql-test/r/mysqlhotcopy_myisam.result
Normal file
@ -0,0 +1,164 @@
|
||||
DROP DATABASE IF EXISTS hotcopy_test;
|
||||
CREATE DATABASE hotcopy_test;
|
||||
USE hotcopy_test;
|
||||
CREATE TABLE t1 (c1 int, c2 varchar(20)) ENGINE=MyISAM;
|
||||
CREATE TABLE t2 (c1 int, c2 varchar(20)) ENGINE=MyISAM;
|
||||
CREATE TABLE t3 (c1 int, c2 varchar(20)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c2' at row 2
|
||||
INSERT INTO t2 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c2' at row 2
|
||||
INSERT INTO t3 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c2' at row 2
|
||||
db.opt
|
||||
t1.MYD
|
||||
t1.MYI
|
||||
t1.frm
|
||||
t2.MYD
|
||||
t2.MYI
|
||||
t2.frm
|
||||
t3.MYD
|
||||
t3.MYI
|
||||
t3.frm
|
||||
db.opt
|
||||
t1.MYD
|
||||
t1.MYI
|
||||
t1.frm
|
||||
t2.MYD
|
||||
t2.MYI
|
||||
t2.frm
|
||||
t3.MYD
|
||||
t3.MYI
|
||||
t3.frm
|
||||
USE hotcopy_save;
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
SELECT * FROM t3;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
USE hotcopy_test;
|
||||
DELETE FROM t1;
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
USE hotcopy_save;
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
SELECT * FROM t3;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
USE hotcopy_test;
|
||||
DROP TABLE t2;
|
||||
db.opt
|
||||
t1.MYD
|
||||
t1.MYI
|
||||
t1.frm
|
||||
t3.MYD
|
||||
t3.MYI
|
||||
t3.frm
|
||||
FLUSH TABLES;
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
SELECT * FROM t3;
|
||||
c1 c2
|
||||
1 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
USE hotcopy_test;
|
||||
db.opt
|
||||
t1.MYD
|
||||
t1.MYI
|
||||
t1.frm
|
||||
t2.MYD
|
||||
t2.MYI
|
||||
t2.frm
|
||||
t3.MYD
|
||||
t3.MYI
|
||||
t3.frm
|
||||
DROP DATABASE hotcopy_save;
|
||||
db.opt
|
||||
t1.MYD
|
||||
t1.MYI
|
||||
t1.frm
|
||||
t2.MYD
|
||||
t2.MYI
|
||||
t2.frm
|
||||
t3.MYD
|
||||
t3.MYI
|
||||
t3.frm
|
||||
DROP DATABASE hotcopy_save;
|
||||
db.opt
|
||||
t1.MYD
|
||||
t1.MYI
|
||||
t1.frm
|
||||
t2.MYD
|
||||
t2.MYI
|
||||
t2.frm
|
||||
t3.MYD
|
||||
t3.MYI
|
||||
t3.frm
|
||||
db.opt
|
||||
t1.MYD
|
||||
t1.MYI
|
||||
t1.frm
|
||||
t2.MYD
|
||||
t2.MYI
|
||||
t2.frm
|
||||
t3.MYD
|
||||
t3.MYI
|
||||
t3.frm
|
||||
db.opt
|
||||
t1.MYD
|
||||
t1.MYI
|
||||
t1.frm
|
||||
t2.MYD
|
||||
t2.MYI
|
||||
t2.frm
|
||||
t3.MYD
|
||||
t3.MYI
|
||||
t3.frm
|
||||
db.opt
|
||||
t1.MYD
|
||||
t1.MYI
|
||||
t1.frm
|
||||
t2.MYD
|
||||
t2.MYI
|
||||
t2.frm
|
||||
t3.MYD
|
||||
t3.MYI
|
||||
t3.frm
|
||||
db.opt
|
||||
t1.MYD
|
||||
t1.MYI
|
||||
t1.frm
|
||||
t2.MYD
|
||||
t2.MYI
|
||||
t2.frm
|
||||
t3.MYD
|
||||
t3.MYI
|
||||
t3.frm
|
||||
DROP DATABASE hotcopy_test_cpy;
|
||||
DROP DATABASE hotcopy_test;
|
||||
DROP DATABASE hotcopy_save;
|
||||
DROP DATABASE hotcopy_save_old;
|
@ -11,3 +11,22 @@ mtr
|
||||
mysql
|
||||
test
|
||||
drop schema foo;
|
||||
#
|
||||
# Bug#54360 Deadlock DROP/ALTER/CREATE DATABASE with open HANDLER
|
||||
#
|
||||
CREATE DATABASE db1;
|
||||
CREATE TABLE db1.t1 (a INT);
|
||||
INSERT INTO db1.t1 VALUES (1), (2);
|
||||
# Connection con1
|
||||
HANDLER db1.t1 OPEN;
|
||||
# Connection default
|
||||
# Sending:
|
||||
DROP DATABASE db1;
|
||||
# Connection con2
|
||||
# Waiting for 'DROP DATABASE db1' to sync in.
|
||||
# Connection con1
|
||||
CREATE DATABASE db2;
|
||||
ALTER DATABASE db2 DEFAULT CHARACTER SET utf8;
|
||||
DROP DATABASE db2;
|
||||
# Connection default
|
||||
# Reaping: DROP DATABASE db1
|
||||
|
@ -4782,4 +4782,19 @@ a b c
|
||||
SELECT * FROM t1 WHERE 102 < c;
|
||||
a b c
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #54459: Assertion failed: param.sort_length,
|
||||
# file .\filesort.cc, line 149 (part II)
|
||||
#
|
||||
CREATE TABLE t1(a ENUM('') NOT NULL);
|
||||
INSERT INTO t1 VALUES (), (), ();
|
||||
EXPLAIN SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -4717,3 +4717,20 @@ t1_id total_amount
|
||||
DROP TABLE t3;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #52711: Segfault when doing EXPLAIN SELECT with
|
||||
# union...order by (select... where...)
|
||||
#
|
||||
CREATE TABLE t1 (a VARCHAR(10), FULLTEXT KEY a (a));
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
CREATE TABLE t2 (b INT);
|
||||
INSERT INTO t2 VALUES (1),(2);
|
||||
# Should not crash
|
||||
EXPLAIN
|
||||
SELECT * FROM t2 UNION SELECT * FROM t2
|
||||
ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
|
||||
# Should not crash
|
||||
SELECT * FROM t2 UNION SELECT * FROM t2
|
||||
ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
|
||||
DROP TABLE t1,t2;
|
||||
End of 5.1 tests
|
||||
|
@ -1026,6 +1026,13 @@ hostname #
|
||||
# Test 'myisam_mmap_size' option is not dynamic
|
||||
SET @@myisam_mmap_size= 500M;
|
||||
ERROR HY000: Variable 'myisam_mmap_size' is a read only variable
|
||||
#
|
||||
# Bug #52315: utc_date() crashes when system time > year 2037
|
||||
#
|
||||
SET TIMESTAMP=2*1024*1024*1024;
|
||||
#Should not crash
|
||||
SELECT UTC_DATE();
|
||||
SET TIMESTAMP=DEFAULT;
|
||||
End of 5.0 tests
|
||||
set join_buffer_size=1;
|
||||
Warnings:
|
||||
|
441
mysql-test/std_data/intersect-bug50389.tsv
Normal file
441
mysql-test/std_data/intersect-bug50389.tsv
Normal file
@ -0,0 +1,441 @@
|
||||
3304605 1221256 0 0 abcdefghijklmnopwrst
|
||||
3304606 1221259 0 0 abcdefghijklmnopwrst
|
||||
3304607 1221260 0 0 asdfghjklzxcvbnm
|
||||
3304629 1221273 0 0 asdfghjklzxcvbnm
|
||||
3304630 1221273 0 0 asdfghjklzxcvbnm
|
||||
3304634 1221259 0 0 asdfghjklzxcvbnm
|
||||
3304644 1221278 0 0 abcdefghijklmnopwrst
|
||||
3304648 1221278 0 0 abcdefghijklmnopwrst
|
||||
3304649 1221278 0 1 asdfghjklzxcvbnm
|
||||
3304650 1221278 0 0 asdfghjklzxcvbnm
|
||||
3304651 1221282 0 0 abcdefghijklmnopwrst
|
||||
3304660 1221287 0 0 asdfghjklzxcvbnm
|
||||
3304662 1221288 0 0 abcdefghijklmnopwrst
|
||||
3304663 1221288 0 0 abcdefghijklmnopwrst
|
||||
3304664 1221290 0 0 abcdefghijklmnopwrst
|
||||
3304670 1221290 0 0 asdfghjklzxcvbnm
|
||||
3304671 1221292 0 0 abcdefghijklmnopwrst
|
||||
3304672 1221287 0 0 asdfghjklzxcvbnm
|
||||
3304673 1221294 0 0 asdfghjklzxcvbnm
|
||||
3304674 1221287 0 0 asdfghjklzxcvbnm
|
||||
3304676 1221296 0 0 abcdefghijklmnopwrst
|
||||
3304677 1221287 0 0 abcdefghijklmnopwrst
|
||||
3304678 1221287 0 0 abcdefghijklmnopwrst
|
||||
3304679 1221297 0 0 asdfghjklzxcvbnm
|
||||
3304680 1221290 0 0 abcdefghijklmnopwrst
|
||||
3304681 1221290 0 0 abcdefghijklmnopwrst
|
||||
3304685 1221300 0 0 asdfghjklzxcvbnm
|
||||
3304687 1221302 0 0 abcdefghijklmnopwrst
|
||||
3304688 1221296 1221298 0 abcdefghijklmnopwrst
|
||||
3304692 1221309 0 0 asdfghjklzxcvbnm
|
||||
3304694 1221309 0 0 asdfghjklzxcvbnm
|
||||
3304695 1221290 0 0 abcdefghijklmnopwrst
|
||||
3304696 1221313 0 0 asdfghjklzxcvbnm
|
||||
3304701 1221314 0 0 asdfghjklzxcvbnm
|
||||
3304703 1221313 0 0 abcdefghijklmnopwrst
|
||||
3304707 1221313 0 0 asdfghjklzxcvbnm
|
||||
3304709 1221313 0 0 abcdefghijklmnopwrst
|
||||
3304713 1221314 0 0 abcdefghijklmnopwrst
|
||||
3304715 1221317 0 0 abcdefghijklmnopwrst
|
||||
3304717 1221319 0 0 asdfghjklzxcvbnm
|
||||
3304718 1221320 0 0 abcdefghijklmnopwrst
|
||||
3304723 1221314 0 0 abcdefghijklmnopwrst
|
||||
3304724 1221314 0 0 asdfghjklzxcvbnm
|
||||
3304725 1221300 0 0 asdfghjklzxcvbnm
|
||||
3304726 1221314 0 0 asdfghjklzxcvbnm
|
||||
3304730 1221326 0 0 asdfghjklzxcvbnm
|
||||
3304732 1221328 0 0 asdfghjklzxcvbnm
|
||||
3304733 1221329 0 0 asdfghjklzxcvbnm
|
||||
3304745 1221331 0 0 abcdefghijklmnopwrst
|
||||
3304747 1221300 0 0 abcdefghijklmnopwrst
|
||||
3304752 1221332 0 0 asdfghjklzxcvbnm
|
||||
3304756 1221333 0 0 asdfghjklzxcvbnm
|
||||
3304765 1221336 0 0 asdfghjklzxcvbnm
|
||||
3304767 1221338 0 0 abcdefghijklmnopwrst
|
||||
3304769 1221340 0 0 asdfghjklzxcvbnm
|
||||
3304770 1221328 0 0 asdfghjklzxcvbnm
|
||||
3304771 1221328 0 0 abcdefghijklmnopwrst
|
||||
3304773 1221340 0 0 asdfghjklzxcvbnm
|
||||
3304774 1221340 0 0 abcdefghijklmnopwrst
|
||||
3304775 1221338 1221342 1 asdfghjklzxcvbnm
|
||||
3304778 1221345 0 0 asdfghjklzxcvbnm
|
||||
3304786 1221332 0 0 asdfghjklzxcvbnm
|
||||
3304787 1221347 0 0 abcdefghijklmnopwrst
|
||||
3304789 1221347 0 0 asdfghjklzxcvbnm
|
||||
3304793 1221349 0 0 abcdefghijklmnopwrst
|
||||
3304794 1221350 0 0 asdfghjklzxcvbnm
|
||||
3304800 1221290 0 0 asdfghjklzxcvbnm
|
||||
3304802 1221290 0 0 asdfghjklzxcvbnm
|
||||
3304803 1221290 0 0 asdfghjklzxcvbnm
|
||||
3304810 1221356 0 0 asdfghjklzxcvbnm
|
||||
3304811 1221356 0 0 asdfghjklzxcvbnm
|
||||
3304821 1221364 0 0 asdfghjklzxcvbnm
|
||||
3304823 1221365 0 0 asdfghjklzxcvbnm
|
||||
3304824 1221366 0 0 abcdefghijklmnopwrst
|
||||
3304825 1221365 0 0 asdfghjklzxcvbnm
|
||||
3304826 1221367 0 0 asdfghjklzxcvbnm
|
||||
3304828 1221369 0 0 abcdefghijklmnopwrst
|
||||
3304829 1221366 1221368 0 asdfghjklzxcvbnm
|
||||
3304831 1221372 0 0 abcdefghijklmnopwrst
|
||||
3304832 1221364 1221373 0 abcdefghijklmnopwrst
|
||||
3304833 1221364 1221371 0 asdfghjklzxcvbnm
|
||||
3304834 1221364 0 0 abcdefghijklmnopwrst
|
||||
3304836 1221375 0 0 abcdefghijklmnopwrst
|
||||
3304837 1221364 0 0 abcdefghijklmnopwrst
|
||||
3304838 1221364 1221376 0 asdfghjklzxcvbnm
|
||||
3304840 1221372 0 0 asdfghjklzxcvbnm
|
||||
3304842 1221372 0 1 abcdefghijklmnopwrst
|
||||
3304844 1221372 0 0 asdfghjklzxcvbnm
|
||||
3304845 1221372 0 0 abcdefghijklmnopwrst
|
||||
3304847 1221382 0 0 abcdefghijklmnopwrst
|
||||
3304848 1221372 0 0 abcdefghijklmnopwrst
|
||||
3304849 1221372 0 0 asdfghjklzxcvbnm
|
||||
3304852 1221364 1221378 0 asdfghjklzxcvbnm
|
||||
3304853 1221383 0 0 abcdefghijklmnopwrst
|
||||
3304854 1221384 0 0 asdfghjklzxcvbnm
|
||||
3304855 1221347 0 0 asdfghjklzxcvbnm
|
||||
3304858 1221383 0 0 abcdefghijklmnopwrst
|
||||
3304862 1221386 0 0 abcdefghijklmnopwrst
|
||||
3304864 1221387 0 0 abcdefghijklmnopwrst
|
||||
3304867 1221389 0 0 abcdefghijklmnopwrst
|
||||
3304868 1221390 0 0 asdfghjklzxcvbnm
|
||||
3304869 1221391 0 0 asdfghjklzxcvbnm
|
||||
3304871 1221393 0 0 asdfghjklzxcvbnm
|
||||
3304874 1221395 0 0 abcdefghijklmnopwrst
|
||||
3304877 1221396 0 0 abcdefghijklmnopwrst
|
||||
3304879 1221396 0 0 asdfghjklzxcvbnm
|
||||
3304882 1221398 0 0 abcdefghijklmnopwrst
|
||||
3304883 1221399 0 0 abcdefghijklmnopwrst
|
||||
3304884 1221400 0 0 abcdefghijklmnopwrst
|
||||
3304889 1221405 0 0 abcdefghijklmnopwrst
|
||||
3304895 1221409 0 0 asdfghjklzxcvbnm
|
||||
3304899 1221395 0 0 asdfghjklzxcvbnm
|
||||
3304900 1221395 0 0 asdfghjklzxcvbnm
|
||||
3304902 1221395 0 0 abcdefghijklmnopwrst
|
||||
3304903 1221395 0 0 asdfghjklzxcvbnm
|
||||
3304924 1221414 0 0 abcdefghijklmnopwrst
|
||||
3304925 1221415 0 0 asdfghjklzxcvbnm
|
||||
3304935 1221416 0 0 asdfghjklzxcvbnm
|
||||
3304936 1221418 0 0 asdfghjklzxcvbnm
|
||||
3304944 1221419 0 0 abcdefghijklmnopwrst
|
||||
3304959 1221427 0 0 asdfghjklzxcvbnm
|
||||
3304963 1221415 0 0 asdfghjklzxcvbnm
|
||||
3304964 1221428 0 0 asdfghjklzxcvbnm
|
||||
3304965 1221429 0 0 abcdefghijklmnopwrst
|
||||
3304978 1221433 0 0 abcdefghijklmnopwrst
|
||||
3304986 1221437 0 0 asdfghjklzxcvbnm
|
||||
3304988 1221439 0 0 asdfghjklzxcvbnm
|
||||
3304994 1221441 0 0 asdfghjklzxcvbnm
|
||||
3304996 1221442 0 0 asdfghjklzxcvbnm
|
||||
3304998 1221443 0 0 asdfghjklzxcvbnm
|
||||
3305003 1221446 0 0 abcdefghijklmnopwrst
|
||||
3305008 1221433 0 0 abcdefghijklmnopwrst
|
||||
3305009 1221447 0 0 asdfghjklzxcvbnm
|
||||
3305012 1221447 0 0 asdfghjklzxcvbnm
|
||||
3305013 1221449 0 0 abcdefghijklmnopwrst
|
||||
3305015 1221451 0 0 asdfghjklzxcvbnm
|
||||
3305019 1221453 0 0 asdfghjklzxcvbnm
|
||||
3305023 1221449 0 0 asdfghjklzxcvbnm
|
||||
3305026 1221456 0 0 abcdefghijklmnopwrst
|
||||
3305028 1221457 0 0 asdfghjklzxcvbnm
|
||||
3305032 1221449 0 0 asdfghjklzxcvbnm
|
||||
3305037 1221453 0 0 asdfghjklzxcvbnm
|
||||
3305040 1221451 0 0 asdfghjklzxcvbnm
|
||||
3305061 1221446 0 0 abcdefghijklmnopwrst
|
||||
3305175 1221457 0 0 abcdefghijklmnopwrst
|
||||
3305304 1221453 0 0 abcdefghijklmnopwrst
|
||||
3305308 1221453 0 1 abcdefghijklmnopwrst
|
||||
3305333 1221457 1221577 0 asdfghjklzxcvbnm
|
||||
3305335 1221453 0 0 asdfghjklzxcvbnm
|
||||
3305354 1221457 0 1 asdfghjklzxcvbnm
|
||||
3306089 1221442 0 0 abcdefghijklmnopwrst
|
||||
3306090 1221442 0 0 abcdefghijklmnopwrst
|
||||
3306092 1221442 0 0 asdfghjklzxcvbnm
|
||||
3306345 1221366 0 0 asdfghjklzxcvbnm
|
||||
3306349 1221366 0 0 asdfghjklzxcvbnm
|
||||
3306419 1221364 1221371 0 asdfghjklzxcvbnm
|
||||
3307390 1221453 0 0 abcdefghijklmnopwrst
|
||||
3308002 1221416 1221417 0 abcdefghijklmnopwrst
|
||||
3308331 1221366 1222821 0 abcdefghijklmnopwrst
|
||||
3309991 1221347 0 0 asdfghjklzxcvbnm
|
||||
3311917 1221287 0 0 abcdefghijklmnopwrst
|
||||
3311937 1221287 0 0 abcdefghijklmnopwrst
|
||||
3311945 1221287 0 0 asdfghjklzxcvbnm
|
||||
3311955 1221287 0 0 abcdefghijklmnopwrst
|
||||
3311961 1221287 0 0 asdfghjklzxcvbnm
|
||||
3311963 1221287 0 1 asdfghjklzxcvbnm
|
||||
3311968 1221287 0 0 asdfghjklzxcvbnm
|
||||
3311974 1221287 0 1 abcdefghijklmnopwrst
|
||||
3311976 1221287 0 1 abcdefghijklmnopwrst
|
||||
3311981 1221287 0 1 abcdefghijklmnopwrst
|
||||
3311985 1221287 0 1 asdfghjklzxcvbnm
|
||||
3312014 1221287 0 0 abcdefghijklmnopwrst
|
||||
3312018 1221287 0 1 abcdefghijklmnopwrst
|
||||
3312025 1221287 0 0 abcdefghijklmnopwrst
|
||||
3312027 1221287 0 0 abcdefghijklmnopwrst
|
||||
3312030 1221287 0 0 abcdefghijklmnopwrst
|
||||
3313755 1221288 0 0 abcdefghijklmnopwrst
|
||||
3313767 1221288 0 0 asdfghjklzxcvbnm
|
||||
3314668 1221290 0 0 asdfghjklzxcvbnm
|
||||
3314670 1221290 0 0 abcdefghijklmnopwrst
|
||||
3323440 1221338 0 0 abcdefghijklmnopwrst
|
||||
3323736 1221338 0 0 asdfghjklzxcvbnm
|
||||
3323739 1221338 0 0 asdfghjklzxcvbnm
|
||||
3324077 1221290 0 0 asdfghjklzxcvbnm
|
||||
3324081 1221290 0 0 abcdefghijklmnopwrst
|
||||
3324082 1221290 0 0 abcdefghijklmnopwrst
|
||||
3324639 1221457 1221563 1 asdfghjklzxcvbnm
|
||||
3326180 1221287 0 0 abcdefghijklmnopwrst
|
||||
3326204 1221287 0 0 asdfghjklzxcvbnm
|
||||
3326945 1221457 1221563 1 asdfghjklzxcvbnm
|
||||
3328393 1221364 1221373 0 asdfghjklzxcvbnm
|
||||
3328966 1221287 0 0 abcdefghijklmnopwrst
|
||||
3329875 1221457 1382427 0 abcdefghijklmnopwrst
|
||||
3333449 1221278 1231113 0 abcdefghijklmnopwrst
|
||||
3336022 1221457 0 0 abcdefghijklmnopwrst
|
||||
3340069 1221364 1221373 0 abcdefghijklmnopwrst
|
||||
3340073 1221364 1221373 0 abcdefghijklmnopwrst
|
||||
3340563 1221290 0 0 asdfghjklzxcvbnm
|
||||
3341553 1221453 0 0 abcdefghijklmnopwrst
|
||||
3345868 1221287 0 0 asdfghjklzxcvbnm
|
||||
3345873 1221287 0 0 abcdefghijklmnopwrst
|
||||
3345879 1221287 0 0 asdfghjklzxcvbnm
|
||||
3346860 1221457 0 0 abcdefghijklmnopwrst
|
||||
3347053 1221287 0 0 asdfghjklzxcvbnm
|
||||
3347109 1221287 0 1 abcdefghijklmnopwrst
|
||||
3350589 1221372 1236415 0 abcdefghijklmnopwrst
|
||||
3350594 1221372 1236415 1 asdfghjklzxcvbnm
|
||||
3353871 1221457 0 0 asdfghjklzxcvbnm
|
||||
3354727 1221364 1221373 0 abcdefghijklmnopwrst
|
||||
3355270 1221393 0 1 abcdefghijklmnopwrst
|
||||
3357638 1221287 0 0 asdfghjklzxcvbnm
|
||||
3357644 1221287 0 0 abcdefghijklmnopwrst
|
||||
3357648 1221287 0 0 abcdefghijklmnopwrst
|
||||
3357651 1221287 0 0 asdfghjklzxcvbnm
|
||||
3357661 1221287 0 0 abcdefghijklmnopwrst
|
||||
3357678 1221287 0 0 abcdefghijklmnopwrst
|
||||
3357697 1221287 0 0 asdfghjklzxcvbnm
|
||||
3357737 1221287 0 0 asdfghjklzxcvbnm
|
||||
3357744 1221287 0 0 abcdefghijklmnopwrst
|
||||
3357754 1221287 0 1 asdfghjklzxcvbnm
|
||||
3357760 1221287 0 1 abcdefghijklmnopwrst
|
||||
3357774 1221287 0 1 abcdefghijklmnopwrst
|
||||
3357779 1221287 0 0 abcdefghijklmnopwrst
|
||||
3357796 1221287 0 0 asdfghjklzxcvbnm
|
||||
3357814 1221287 0 0 asdfghjklzxcvbnm
|
||||
3357833 1221287 0 1 asdfghjklzxcvbnm
|
||||
3357835 1221287 0 0 abcdefghijklmnopwrst
|
||||
3357840 1221287 0 1 asdfghjklzxcvbnm
|
||||
3357842 1221287 0 0 abcdefghijklmnopwrst
|
||||
3357845 1221287 0 1 abcdefghijklmnopwrst
|
||||
3357849 1221287 0 1 abcdefghijklmnopwrst
|
||||
3357852 1221287 0 0 abcdefghijklmnopwrst
|
||||
3358935 1221443 0 1 abcdefghijklmnopwrst
|
||||
3358967 1221443 0 1 abcdefghijklmnopwrst
|
||||
3359181 1221256 0 0 abcdefghijklmnopwrst
|
||||
3360512 1221319 0 0 asdfghjklzxcvbnm
|
||||
3362004 1221287 0 0 abcdefghijklmnopwrst
|
||||
3362009 1221287 0 1 abcdefghijklmnopwrst
|
||||
3362358 1221287 0 0 asdfghjklzxcvbnm
|
||||
3363214 1221287 0 0 abcdefghijklmnopwrst
|
||||
3363238 1221287 0 1 asdfghjklzxcvbnm
|
||||
3363616 1221287 0 1 asdfghjklzxcvbnm
|
||||
3363631 1221287 0 0 asdfghjklzxcvbnm
|
||||
3364281 1221287 0 0 abcdefghijklmnopwrst
|
||||
3365900 1221347 0 0 asdfghjklzxcvbnm
|
||||
3365901 1221347 0 0 asdfghjklzxcvbnm
|
||||
3365906 1221347 0 0 asdfghjklzxcvbnm
|
||||
3365907 1221347 0 0 asdfghjklzxcvbnm
|
||||
3365910 1221347 0 0 abcdefghijklmnopwrst
|
||||
3365936 1221347 0 0 abcdefghijklmnopwrst
|
||||
3367846 1221287 0 0 abcdefghijklmnopwrst
|
||||
3368011 1221428 0 0 abcdefghijklmnopwrst
|
||||
3369882 1221300 0 0 asdfghjklzxcvbnm
|
||||
3370856 1221443 0 0 asdfghjklzxcvbnm
|
||||
3370861 1221443 1221445 0 abcdefghijklmnopwrst
|
||||
3375327 1221443 0 0 abcdefghijklmnopwrst
|
||||
3375333 1221443 1221445 0 abcdefghijklmnopwrst
|
||||
3376219 1221453 0 1 abcdefghijklmnopwrst
|
||||
3376228 1221453 0 0 abcdefghijklmnopwrst
|
||||
3376238 1221453 0 0 asdfghjklzxcvbnm
|
||||
3376243 1221453 0 0 abcdefghijklmnopwrst
|
||||
3376248 1221453 0 1 abcdefghijklmnopwrst
|
||||
3376254 1221453 0 0 abcdefghijklmnopwrst
|
||||
3376263 1221453 0 0 abcdefghijklmnopwrst
|
||||
3376272 1221453 0 1 asdfghjklzxcvbnm
|
||||
3376281 1221453 0 0 asdfghjklzxcvbnm
|
||||
3376290 1221453 0 0 abcdefghijklmnopwrst
|
||||
3376296 1221453 0 1 abcdefghijklmnopwrst
|
||||
3376301 1221453 0 0 asdfghjklzxcvbnm
|
||||
3376350 1221453 0 0 asdfghjklzxcvbnm
|
||||
3379002 1221453 0 0 abcdefghijklmnopwrst
|
||||
3379015 1221453 0 0 asdfghjklzxcvbnm
|
||||
3379025 1221453 0 0 abcdefghijklmnopwrst
|
||||
3379032 1221453 0 0 asdfghjklzxcvbnm
|
||||
3380181 1221372 1245650 0 asdfghjklzxcvbnm
|
||||
3380186 1221372 1245650 0 abcdefghijklmnopwrst
|
||||
3380190 1221372 1245650 0 asdfghjklzxcvbnm
|
||||
3380195 1221372 1245650 0 abcdefghijklmnopwrst
|
||||
3380202 1221372 1245650 0 asdfghjklzxcvbnm
|
||||
3380683 1221287 0 0 asdfghjklzxcvbnm
|
||||
3382317 1221453 0 0 abcdefghijklmnopwrst
|
||||
3382417 1221287 0 0 asdfghjklzxcvbnm
|
||||
3383523 1221338 0 1 abcdefghijklmnopwrst
|
||||
3387213 1221287 0 0 abcdefghijklmnopwrst
|
||||
3388139 1221453 0 0 asdfghjklzxcvbnm
|
||||
3398039 1221443 1251164 0 abcdefghijklmnopwrst
|
||||
3401835 1221453 0 0 asdfghjklzxcvbnm
|
||||
3412582 1221443 1255886 0 asdfghjklzxcvbnm
|
||||
3412583 1221443 1255886 0 asdfghjklzxcvbnm
|
||||
3413795 1221443 1255886 0 asdfghjklzxcvbnm
|
||||
3413813 1221443 1256258 0 asdfghjklzxcvbnm
|
||||
3420306 1221453 0 0 asdfghjklzxcvbnm
|
||||
3420354 1221453 0 0 asdfghjklzxcvbnm
|
||||
3425653 1221443 0 0 abcdefghijklmnopwrst
|
||||
3425658 1221443 0 0 asdfghjklzxcvbnm
|
||||
3431409 1221453 0 0 asdfghjklzxcvbnm
|
||||
3432510 1221443 1262320 0 asdfghjklzxcvbnm
|
||||
3432513 1221443 1262320 0 asdfghjklzxcvbnm
|
||||
3444444 1221443 1262320 0 abcdefghijklmnopwrst
|
||||
3445447 1221287 0 1 asdfghjklzxcvbnm
|
||||
3448662 1221338 0 0 asdfghjklzxcvbnm
|
||||
3450032 1221347 0 0 abcdefghijklmnopwrst
|
||||
3450259 1221453 0 0 abcdefghijklmnopwrst
|
||||
3452176 1221453 0 0 asdfghjklzxcvbnm
|
||||
3459239 1221347 0 0 asdfghjklzxcvbnm
|
||||
3463196 1221347 0 0 abcdefghijklmnopwrst
|
||||
3468759 1221453 0 0 abcdefghijklmnopwrst
|
||||
3470988 1221457 0 0 asdfghjklzxcvbnm
|
||||
3477116 1221287 0 0 asdfghjklzxcvbnm
|
||||
3477639 1221372 1277136 0 abcdefghijklmnopwrst
|
||||
3477656 1221372 1277136 0 asdfghjklzxcvbnm
|
||||
3488071 1221256 1238964 0 abcdefghijklmnopwrst
|
||||
3488079 1221256 0 0 asdfghjklzxcvbnm
|
||||
3488108 1221256 0 1 asdfghjklzxcvbnm
|
||||
3507126 1221287 0 1 asdfghjklzxcvbnm
|
||||
3511898 1221347 0 0 asdfghjklzxcvbnm
|
||||
3521780 1221453 0 0 abcdefghijklmnopwrst
|
||||
3536908 1221287 0 0 abcdefghijklmnopwrst
|
||||
3544231 1221329 0 1 asdfghjklzxcvbnm
|
||||
3545379 1221329 1298955 0 abcdefghijklmnopwrst
|
||||
3545384 1221329 1298955 0 abcdefghijklmnopwrst
|
||||
3545387 1221329 1298955 0 abcdefghijklmnopwrst
|
||||
3545389 1221329 1298955 1 abcdefghijklmnopwrst
|
||||
3545398 1221329 1298955 1 abcdefghijklmnopwrst
|
||||
3555715 1221287 0 0 asdfghjklzxcvbnm
|
||||
3563557 1221329 1298955 0 abcdefghijklmnopwrst
|
||||
3564322 1221338 0 0 asdfghjklzxcvbnm
|
||||
3565475 1221453 0 0 abcdefghijklmnopwrst
|
||||
3577588 1221287 0 0 asdfghjklzxcvbnm
|
||||
3600047 1221453 0 0 abcdefghijklmnopwrst
|
||||
3600062 1221453 0 0 asdfghjklzxcvbnm
|
||||
3600071 1221453 0 0 abcdefghijklmnopwrst
|
||||
3600080 1221453 0 1 abcdefghijklmnopwrst
|
||||
3600086 1221453 0 0 asdfghjklzxcvbnm
|
||||
3600091 1221453 0 1 abcdefghijklmnopwrst
|
||||
3600097 1221453 0 0 asdfghjklzxcvbnm
|
||||
3600103 1221453 0 0 asdfghjklzxcvbnm
|
||||
3600106 1221453 0 0 abcdefghijklmnopwrst
|
||||
3600113 1221453 0 0 abcdefghijklmnopwrst
|
||||
3600119 1221453 0 0 asdfghjklzxcvbnm
|
||||
3600124 1221453 0 0 abcdefghijklmnopwrst
|
||||
3600144 1221453 0 0 asdfghjklzxcvbnm
|
||||
3600152 1221453 0 0 asdfghjklzxcvbnm
|
||||
3600165 1221453 0 0 asdfghjklzxcvbnm
|
||||
3610561 1221287 0 0 abcdefghijklmnopwrst
|
||||
3617030 1221329 0 0 asdfghjklzxcvbnm
|
||||
3628347 1221443 1327098 0 abcdefghijklmnopwrst
|
||||
3628348 1221443 1327098 0 abcdefghijklmnopwrst
|
||||
3628646 1221443 0 0 asdfghjklzxcvbnm
|
||||
3633673 1221372 1328838 0 abcdefghijklmnopwrst
|
||||
3648489 1221443 0 0 asdfghjklzxcvbnm
|
||||
3648490 1221443 0 0 asdfghjklzxcvbnm
|
||||
3648534 1221443 1333827 0 asdfghjklzxcvbnm
|
||||
3653046 1221329 1298955 0 asdfghjklzxcvbnm
|
||||
3662680 1221287 0 0 asdfghjklzxcvbnm
|
||||
3699529 1221288 0 0 asdfghjklzxcvbnm
|
||||
3706659 1221453 0 0 asdfghjklzxcvbnm
|
||||
3723399 1221287 0 1 asdfghjklzxcvbnm
|
||||
3749934 1221278 0 0 abcdefghijklmnopwrst
|
||||
3761370 1221443 1371176 0 asdfghjklzxcvbnm
|
||||
3765884 1221443 1333827 0 abcdefghijklmnopwrst
|
||||
3772880 1221457 0 0 abcdefghijklmnopwrst
|
||||
3779574 1221457 1372998 1 abcdefghijklmnopwrst
|
||||
3784656 1221457 1372998 1 abcdefghijklmnopwrst
|
||||
3784700 1221457 1372998 1 abcdefghijklmnopwrst
|
||||
3784744 1221457 1382427 0 abcdefghijklmnopwrst
|
||||
3796187 1221457 1382427 1 abcdefghijklmnopwrst
|
||||
3796193 1221457 0 0 abcdefghijklmnopwrst
|
||||
3817277 1221457 1382427 0 asdfghjklzxcvbnm
|
||||
3828282 1221457 0 0 abcdefghijklmnopwrst
|
||||
3828297 1221457 0 0 abcdefghijklmnopwrst
|
||||
3828300 1221457 0 0 abcdefghijklmnopwrst
|
||||
3833022 1221287 0 0 asdfghjklzxcvbnm
|
||||
3856380 1221457 1395359 0 asdfghjklzxcvbnm
|
||||
3856391 1221457 0 0 asdfghjklzxcvbnm
|
||||
3861413 1221256 0 0 abcdefghijklmnopwrst
|
||||
3864734 1221393 0 1 abcdefghijklmnopwrst
|
||||
3868051 1221329 0 0 abcdefghijklmnopwrst
|
||||
3868059 1221329 0 0 abcdefghijklmnopwrst
|
||||
3869088 1221329 0 0 abcdefghijklmnopwrst
|
||||
3878669 1221329 1298955 0 asdfghjklzxcvbnm
|
||||
3878684 1221329 1298955 0 asdfghjklzxcvbnm
|
||||
3881785 1221287 0 0 abcdefghijklmnopwrst
|
||||
3882333 1221287 0 0 asdfghjklzxcvbnm
|
||||
3882389 1221287 0 0 abcdefghijklmnopwrst
|
||||
3908680 1221372 1245650 0 asdfghjklzxcvbnm
|
||||
3908690 1221372 1245650 0 asdfghjklzxcvbnm
|
||||
3908697 1221372 1245650 0 abcdefghijklmnopwrst
|
||||
3911434 1221453 0 0 abcdefghijklmnopwrst
|
||||
3911446 1221453 0 0 asdfghjklzxcvbnm
|
||||
3911448 1221453 0 0 abcdefghijklmnopwrst
|
||||
3911489 1221453 0 0 abcdefghijklmnopwrst
|
||||
3917384 1221453 0 0 abcdefghijklmnopwrst
|
||||
3939602 1221457 0 1 asdfghjklzxcvbnm
|
||||
3962210 1221453 0 0 asdfghjklzxcvbnm
|
||||
3963734 1221457 0 0 asdfghjklzxcvbnm
|
||||
3977364 1221287 0 0 asdfghjklzxcvbnm
|
||||
3981725 1221453 0 0 abcdefghijklmnopwrst
|
||||
4042952 1221453 0 0 abcdefghijklmnopwrst
|
||||
4042953 1221453 0 0 abcdefghijklmnopwrst
|
||||
4042958 1221453 0 0 abcdefghijklmnopwrst
|
||||
4042960 1221453 0 1 abcdefghijklmnopwrst
|
||||
4042965 1221453 0 0 asdfghjklzxcvbnm
|
||||
4066893 1221453 0 1 abcdefghijklmnopwrst
|
||||
4066896 1221453 0 0 abcdefghijklmnopwrst
|
||||
4066900 1221453 0 0 abcdefghijklmnopwrst
|
||||
4066908 1221453 0 0 abcdefghijklmnopwrst
|
||||
4066912 1221453 0 0 asdfghjklzxcvbnm
|
||||
4066915 1221453 0 0 asdfghjklzxcvbnm
|
||||
4066919 1221453 0 0 abcdefghijklmnopwrst
|
||||
4066924 1221453 0 0 asdfghjklzxcvbnm
|
||||
4066929 1221453 0 0 abcdefghijklmnopwrst
|
||||
4066934 1221453 0 0 asdfghjklzxcvbnm
|
||||
4066941 1221453 0 0 abcdefghijklmnopwrst
|
||||
4066946 1221453 0 0 asdfghjklzxcvbnm
|
||||
4066955 1221453 0 0 abcdefghijklmnopwrst
|
||||
4116291 1221433 1487238 0 asdfghjklzxcvbnm
|
||||
4116295 1221433 1487238 0 abcdefghijklmnopwrst
|
||||
4116450 1221433 1487238 0 abcdefghijklmnopwrst
|
||||
4121149 1221287 0 0 asdfghjklzxcvbnm
|
||||
4137325 1221453 0 0 abcdefghijklmnopwrst
|
||||
4149051 1221287 0 0 abcdefghijklmnopwrst
|
||||
4162347 1221287 0 0 abcdefghijklmnopwrst
|
||||
4164485 1221457 0 1 asdfghjklzxcvbnm
|
||||
4174706 1221457 0 0 abcdefghijklmnopwrst
|
||||
4178645 1221457 0 0 abcdefghijklmnopwrst
|
||||
4180122 1221457 1382427 0 asdfghjklzxcvbnm
|
||||
4180925 1221457 1382427 0 asdfghjklzxcvbnm
|
||||
4186417 1221457 0 0 abcdefghijklmnopwrst
|
||||
4189624 1221457 0 1 asdfghjklzxcvbnm
|
||||
4203132 1221453 0 0 asdfghjklzxcvbnm
|
||||
4228206 1221457 0 0 abcdefghijklmnopwrst
|
||||
4278829 1221453 0 0 abcdefghijklmnopwrst
|
||||
4326422 1221453 0 0 abcdefghijklmnopwrst
|
||||
4337061 1221287 0 0 abcdefghijklmnopwrst
|
||||
4379354 1221287 0 0 abcdefghijklmnopwrst
|
||||
4404901 1221457 0 0 abcdefghijklmnopwrst
|
||||
4494153 1221457 0 0 abcdefghijklmnopwrst
|
||||
4535721 1221287 0 0 asdfghjklzxcvbnm
|
||||
4559596 1221457 0 0 abcdefghijklmnopwrst
|
||||
4617751 1221393 0 0 abcdefghijklmnopwrst
|
|
@ -91,3 +91,14 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4AQAAAAMAMTIzAQAAAA==
|
||||
';
|
||||
ERROR HY000: master may suffer from http://bugs.mysql.com/bug.php?id=37426 so slave stops; check error log on slave for more info
|
||||
drop table t1, char63_utf8, char128_utf8;
|
||||
#
|
||||
# Bug #54393: crash and/or valgrind errors in
|
||||
# mysql_client_binlog_statement
|
||||
#
|
||||
BINLOG '';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
|
||||
BINLOG '123';
|
||||
BINLOG '-2079193929';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
|
||||
BINLOG 'xç↓%~∙D╒ƒ╡';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
|
||||
|
@ -364,6 +364,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (10,10)
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t2 values (100,100)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t2 values (101,101)
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1,t2
|
||||
reset master;
|
||||
create table t1 (a int) engine=innodb;
|
||||
|
@ -150,3 +150,16 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4AQAAAAMAMTIzAQAAAA==
|
||||
';
|
||||
|
||||
drop table t1, char63_utf8, char128_utf8;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #54393: crash and/or valgrind errors in
|
||||
--echo # mysql_client_binlog_statement
|
||||
--echo #
|
||||
--error ER_SYNTAX_ERROR
|
||||
BINLOG '';
|
||||
BINLOG '123';
|
||||
--error ER_SYNTAX_ERROR
|
||||
BINLOG '-2079193929';
|
||||
--error ER_SYNTAX_ERROR
|
||||
BINLOG 'xç↓%~∙D╒ƒ╡';
|
||||
|
11
mysql-test/suite/innodb/r/innodb_bug53674.result
Normal file
11
mysql-test/suite/innodb/r/innodb_bug53674.result
Normal file
@ -0,0 +1,11 @@
|
||||
create table bug53674(a int)engine=innodb;
|
||||
insert into bug53674 values (1),(2);
|
||||
start transaction;
|
||||
select * from bug53674 for update;
|
||||
a
|
||||
1
|
||||
2
|
||||
select * from bug53674 where a=(select a from bug53674 where a > 1);
|
||||
a
|
||||
2
|
||||
drop table bug53674;
|
3
mysql-test/suite/innodb/r/innodb_bug54044.result
Normal file
3
mysql-test/suite/innodb/r/innodb_bug54044.result
Normal file
@ -0,0 +1,3 @@
|
||||
CREATE TEMPORARY TABLE table_54044 ENGINE = INNODB
|
||||
AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
|
||||
ERROR HY000: Can't create table 'test.table_54044' (errno: -1)
|
2502
mysql-test/suite/innodb/r/innodb_mysql.result
Normal file
2502
mysql-test/suite/innodb/r/innodb_mysql.result
Normal file
File diff suppressed because it is too large
Load Diff
@ -9,4 +9,3 @@
|
||||
# Do not use any TAB characters for whitespace.
|
||||
#
|
||||
##############################################################################
|
||||
innodb_multi_update: Bug #38999 2010-05-05 mmakela Valgrind warnings
|
||||
|
1
mysql-test/suite/innodb/t/innodb_bug53674-master.opt
Normal file
1
mysql-test/suite/innodb/t/innodb_bug53674-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--log-bin --innodb-locks-unsafe-for-binlog --binlog-format=mixed
|
8
mysql-test/suite/innodb/t/innodb_bug53674.test
Normal file
8
mysql-test/suite/innodb/t/innodb_bug53674.test
Normal file
@ -0,0 +1,8 @@
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
create table bug53674(a int)engine=innodb;
|
||||
insert into bug53674 values (1),(2);
|
||||
start transaction;
|
||||
select * from bug53674 for update;
|
||||
select * from bug53674 where a=(select a from bug53674 where a > 1);
|
||||
drop table bug53674;
|
11
mysql-test/suite/innodb/t/innodb_bug54044.test
Normal file
11
mysql-test/suite/innodb/t/innodb_bug54044.test
Normal file
@ -0,0 +1,11 @@
|
||||
# This is the test for bug #54044. Special handle MYSQL_TYPE_NULL type
|
||||
# during create table, so it will not trigger assertion failure.
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# This 'create table' operation should fail because of
|
||||
# using NULL datatype
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TEMPORARY TABLE table_54044 ENGINE = INNODB
|
||||
AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
|
||||
|
736
mysql-test/suite/innodb/t/innodb_mysql.test
Normal file
736
mysql-test/suite/innodb/t/innodb_mysql.test
Normal file
@ -0,0 +1,736 @@
|
||||
# t/innodb_mysql.test
|
||||
#
|
||||
# Last update:
|
||||
# 2006-07-26 ML test refactored (MySQL 5.1)
|
||||
# main testing code t/innodb_mysql.test -> include/mix1.inc
|
||||
#
|
||||
|
||||
-- source include/have_innodb.inc
|
||||
let $engine_type= InnoDB;
|
||||
let $other_engine_type= MEMORY;
|
||||
# InnoDB does support FOREIGN KEYFOREIGN KEYs
|
||||
let $test_foreign_keys= 1;
|
||||
set global innodb_support_xa=default;
|
||||
set session innodb_support_xa=default;
|
||||
--source include/mix1.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1, t2, t3;
|
||||
--enable_warnings
|
||||
#
|
||||
# BUG#35850: Performance regression in 5.1.23/5.1.24
|
||||
#
|
||||
create table t1(a int);
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t2 (a int, b int, pk int, key(a,b), primary key(pk)) engine=innodb;
|
||||
insert into t2 select @a:=A.a+10*(B.a + 10*C.a),@a, @a from t1 A, t1 B, t1 C;
|
||||
--echo this must use key 'a', not PRIMARY:
|
||||
--replace_column 9 #
|
||||
explain select a from t2 where a=b;
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# Bug #40360: Binlog related errors with binlog off
|
||||
#
|
||||
# This bug is triggered when the binlog format is STATEMENT and the
|
||||
# binary log is turned off. In this case, no error should be shown for
|
||||
# the statement since there are no replication issues.
|
||||
|
||||
SET SESSION BINLOG_FORMAT=STATEMENT;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
query_vertical select @@session.sql_log_bin, @@session.binlog_format, @@session.tx_isolation;
|
||||
CREATE TABLE t1 ( a INT ) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#37284 Crash in Field_string::type()
|
||||
#
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (a char(50)) ENGINE=InnoDB;
|
||||
CREATE INDEX i1 on t1 (a(3));
|
||||
SELECT * FROM t1 WHERE a = 'abcde';
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #37742: HA_EXTRA_KEYREAD flag is set when key contains only prefix of
|
||||
# requested column
|
||||
#
|
||||
|
||||
CREATE TABLE foo (a int, b int, c char(10),
|
||||
PRIMARY KEY (c(3)),
|
||||
KEY b (b)
|
||||
) engine=innodb;
|
||||
|
||||
CREATE TABLE foo2 (a int, b int, c char(10),
|
||||
PRIMARY KEY (c),
|
||||
KEY b (b)
|
||||
) engine=innodb;
|
||||
|
||||
CREATE TABLE bar (a int, b int, c char(10),
|
||||
PRIMARY KEY (c(3)),
|
||||
KEY b (b)
|
||||
) engine=myisam;
|
||||
|
||||
INSERT INTO foo VALUES
|
||||
(1,2,'abcdefghij'), (2,3,''), (3,4,'klmnopqrst'),
|
||||
(4,5,'uvwxyz'), (5,6,'meotnsyglt'), (4,5,'asfdewe');
|
||||
|
||||
INSERT INTO bar SELECT * FROM foo;
|
||||
INSERT INTO foo2 SELECT * FROM foo;
|
||||
|
||||
--query_vertical EXPLAIN SELECT c FROM bar WHERE b>2;
|
||||
--query_vertical EXPLAIN SELECT c FROM foo WHERE b>2;
|
||||
--query_vertical EXPLAIN SELECT c FROM foo2 WHERE b>2;
|
||||
|
||||
--query_vertical EXPLAIN SELECT c FROM bar WHERE c>2;
|
||||
--query_vertical EXPLAIN SELECT c FROM foo WHERE c>2;
|
||||
--query_vertical EXPLAIN SELECT c FROM foo2 WHERE c>2;
|
||||
|
||||
DROP TABLE foo, bar, foo2;
|
||||
|
||||
|
||||
#
|
||||
# Bug#41348: INSERT INTO tbl SELECT * FROM temp_tbl overwrites locking type of temp table
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1,t3,t2;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
--enable_warnings
|
||||
|
||||
DELIMITER |;
|
||||
CREATE FUNCTION f1() RETURNS VARCHAR(250)
|
||||
BEGIN
|
||||
return 'hhhhhhh' ;
|
||||
END|
|
||||
DELIMITER ;|
|
||||
|
||||
CREATE TABLE t1 (a VARCHAR(20), b VARCHAR(20), c VARCHAR(20)) ENGINE=INNODB;
|
||||
|
||||
BEGIN WORK;
|
||||
|
||||
CREATE TEMPORARY TABLE t2 (a VARCHAR(20), b VARCHAR(20), c varchar(20)) ENGINE=INNODB;
|
||||
CREATE TEMPORARY TABLE t3 LIKE t2;
|
||||
|
||||
INSERT INTO t1 VALUES ('a','b',NULL),('c','d',NULL),('e','f',NULL);
|
||||
|
||||
SET @stmt := CONCAT('INSERT INTO t2 SELECT tbl.a, tbl.b, f1()',' FROM t1 tbl');
|
||||
PREPARE stmt1 FROM @stmt;
|
||||
|
||||
SET @stmt := CONCAT('INSERT INTO t3', ' SELECT * FROM t2');
|
||||
PREPARE stmt3 FROM @stmt;
|
||||
|
||||
EXECUTE stmt1;
|
||||
|
||||
COMMIT;
|
||||
|
||||
DEALLOCATE PREPARE stmt1;
|
||||
DEALLOCATE PREPARE stmt3;
|
||||
|
||||
DROP TABLE t1,t3,t2;
|
||||
DROP FUNCTION f1;
|
||||
|
||||
#
|
||||
# Bug#37016: TRUNCATE TABLE removes some rows but not all
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
|
||||
CREATE TABLE t2 (id INT PRIMARY KEY,
|
||||
t1_id INT, INDEX par_ind (t1_id),
|
||||
FOREIGN KEY (t1_id) REFERENCES t1(id)) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
INSERT INTO t2 VALUES (3,2);
|
||||
|
||||
SET AUTOCOMMIT = 0;
|
||||
|
||||
START TRANSACTION;
|
||||
--error ER_ROW_IS_REFERENCED_2
|
||||
TRUNCATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
COMMIT;
|
||||
SELECT * FROM t1;
|
||||
|
||||
START TRANSACTION;
|
||||
--error ER_ROW_IS_REFERENCED_2
|
||||
TRUNCATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
ROLLBACK;
|
||||
SELECT * FROM t1;
|
||||
|
||||
SET AUTOCOMMIT = 1;
|
||||
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1;
|
||||
COMMIT;
|
||||
|
||||
--error ER_ROW_IS_REFERENCED_2
|
||||
TRUNCATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
DELETE FROM t2 WHERE id = 3;
|
||||
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1;
|
||||
TRUNCATE TABLE t1;
|
||||
ROLLBACK;
|
||||
SELECT * FROM t1;
|
||||
TRUNCATE TABLE t2;
|
||||
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#40127 Multiple table DELETE IGNORE hangs on foreign key constraint violation on 5.0
|
||||
--echo #
|
||||
CREATE TABLE t1 (
|
||||
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
aid INT UNSIGNED NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
FOREIGN KEY (aid) REFERENCES t1 (id)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE t3 (
|
||||
bid INT UNSIGNED NOT NULL,
|
||||
FOREIGN KEY (bid) REFERENCES t2 (id)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE t4 (
|
||||
a INT
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE t5 (
|
||||
a INT
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 (id) VALUES (1);
|
||||
INSERT INTO t2 (id, aid) VALUES (1, 1),(2,1),(3,1),(4,1);
|
||||
INSERT INTO t3 (bid) VALUES (1);
|
||||
|
||||
INSERT INTO t4 VALUES (1),(2),(3),(4),(5);
|
||||
INSERT INTO t5 VALUES (1);
|
||||
|
||||
DELETE t5 FROM t4 LEFT JOIN t5 ON t4.a= t5.a;
|
||||
|
||||
--error ER_ROW_IS_REFERENCED_2
|
||||
DELETE t2, t1 FROM t2 INNER JOIN t1 ON (t2.aid = t1.id) WHERE t2.id = 1;
|
||||
--error ER_ROW_IS_REFERENCED_2
|
||||
DELETE t2, t1 FROM t2 INNER JOIN t1 ON (t2.aid = t1.id) WHERE t2.id = 1;
|
||||
|
||||
DELETE IGNORE t2, t1 FROM t2 INNER JOIN t1 ON (t2.aid = t1.id) WHERE t2.id = 1;
|
||||
|
||||
DROP TABLE t3;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
DROP TABLES t4,t5;
|
||||
|
||||
--echo # Bug#40127 Multiple table DELETE IGNORE hangs on foreign key constraint violation on 5.0
|
||||
--echo # Testing for any side effects of IGNORE on AFTER DELETE triggers used with
|
||||
--echo # transactional tables.
|
||||
--echo #
|
||||
CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a VARCHAR(100)) ENGINE=InnoDB;
|
||||
CREATE TABLE t3 (i INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE TABLE t4 (i INT NOT NULL PRIMARY KEY, t1i INT,
|
||||
FOREIGN KEY (t1i) REFERENCES t1(i))
|
||||
ENGINE=InnoDB;
|
||||
delimiter ||;
|
||||
CREATE TRIGGER trg AFTER DELETE ON t1 FOR EACH ROW
|
||||
BEGIN
|
||||
SET @b:='EXECUTED TRIGGER';
|
||||
INSERT INTO t2 VALUES (@b);
|
||||
SET @a:= error_happens_here;
|
||||
END||
|
||||
delimiter ;||
|
||||
|
||||
SET @b:="";
|
||||
SET @a:="";
|
||||
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
||||
INSERT INTO t3 SELECT * FROM t1;
|
||||
--echo ** An error in a trigger causes rollback of the statement.
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
DELETE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
|
||||
SELECT @a,@b;
|
||||
SELECT * FROM t2;
|
||||
SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
|
||||
|
||||
--echo ** Same happens with the IGNORE option
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
DELETE IGNORE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
|
||||
SELECT * FROM t2;
|
||||
SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
|
||||
|
||||
--echo **
|
||||
--echo ** The following is an attempt to demonstrate
|
||||
--echo ** error handling inside a row iteration.
|
||||
--echo **
|
||||
DROP TRIGGER trg;
|
||||
TRUNCATE TABLE t1;
|
||||
TRUNCATE TABLE t2;
|
||||
TRUNCATE TABLE t3;
|
||||
|
||||
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
||||
INSERT INTO t3 VALUES (1),(2),(3),(4);
|
||||
INSERT INTO t4 VALUES (3,3),(4,4);
|
||||
|
||||
delimiter ||;
|
||||
CREATE TRIGGER trg AFTER DELETE ON t1 FOR EACH ROW
|
||||
BEGIN
|
||||
SET @b:= CONCAT('EXECUTED TRIGGER FOR ROW ',CAST(OLD.i AS CHAR));
|
||||
INSERT INTO t2 VALUES (@b);
|
||||
END||
|
||||
delimiter ;||
|
||||
|
||||
--echo ** DELETE is prevented by foreign key constrains but errors are silenced.
|
||||
--echo ** The AFTER trigger isn't fired.
|
||||
DELETE IGNORE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
|
||||
--echo ** Tables are modified by best effort:
|
||||
SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
|
||||
--echo ** The AFTER trigger was only executed on successful rows:
|
||||
SELECT * FROM t2;
|
||||
|
||||
DROP TRIGGER trg;
|
||||
|
||||
--echo **
|
||||
--echo ** Induce an error midway through an AFTER-trigger
|
||||
--echo **
|
||||
TRUNCATE TABLE t4;
|
||||
TRUNCATE TABLE t1;
|
||||
TRUNCATE TABLE t3;
|
||||
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
||||
INSERT INTO t3 VALUES (1),(2),(3),(4);
|
||||
delimiter ||;
|
||||
CREATE TRIGGER trg AFTER DELETE ON t1 FOR EACH ROW
|
||||
BEGIN
|
||||
SET @a:= @a+1;
|
||||
IF @a > 2 THEN
|
||||
INSERT INTO t4 VALUES (5,5);
|
||||
END IF;
|
||||
END||
|
||||
delimiter ;||
|
||||
|
||||
SET @a:=0;
|
||||
--echo ** Errors in the trigger causes the statement to abort.
|
||||
--error ER_NO_REFERENCED_ROW_2
|
||||
DELETE IGNORE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
|
||||
SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
|
||||
SELECT * FROM t4;
|
||||
|
||||
DROP TRIGGER trg;
|
||||
DROP TABLE t4;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
|
||||
#
|
||||
# Bug#43580: Issue with Innodb on multi-table update
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT, KEY (a)) ENGINE = INNODB;
|
||||
CREATE TABLE t2 (a INT KEY, b INT, KEY (b)) ENGINE = INNODB;
|
||||
|
||||
CREATE TABLE t3 (a INT, b INT KEY, KEY (a)) ENGINE = INNODB;
|
||||
CREATE TABLE t4 (a INT KEY, b INT, KEY (b)) ENGINE = INNODB;
|
||||
|
||||
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6);
|
||||
INSERT INTO t2 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
|
||||
|
||||
INSERT INTO t3 VALUES (1, 101), (2, 102), (3, 103), (4, 104), (5, 105), (6, 106);
|
||||
INSERT INTO t4 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
|
||||
|
||||
UPDATE t1, t2 SET t1.a = t1.a + 100, t2.b = t1.a + 10
|
||||
WHERE t1.a BETWEEN 2 AND 4 AND t2.a = t1.b;
|
||||
--sorted_result
|
||||
SELECT * FROM t2;
|
||||
|
||||
UPDATE t3, t4 SET t3.a = t3.a + 100, t4.b = t3.a + 10
|
||||
WHERE t3.a BETWEEN 2 AND 4 AND t4.a = t3.b - 100;
|
||||
--sorted_result
|
||||
SELECT * FROM t4;
|
||||
|
||||
DROP TABLE t1, t2, t3, t4;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#44886: SIGSEGV in test_if_skip_sort_order() -
|
||||
--echo # uninitialized variable used as subscript
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT, b INT, c INT, d INT, PRIMARY KEY (b), KEY (a,c))
|
||||
ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1,1,1,0);
|
||||
|
||||
CREATE TABLE t2 (a INT, b INT, e INT, KEY (e)) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (1,1,2);
|
||||
|
||||
CREATE TABLE t3 (a INT, b INT) ENGINE=MyISAM;
|
||||
INSERT INTO t3 VALUES (1, 1);
|
||||
|
||||
SELECT * FROM t1, t2, t3
|
||||
WHERE t1.a = t3.a AND (t1.b = t3.b OR t1.d) AND t2.b = t1.b AND t2.e = 2
|
||||
GROUP BY t1.b;
|
||||
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #45828: Optimizer won't use partial primary key if another
|
||||
--echo # index can prevent filesort
|
||||
--echo #
|
||||
|
||||
# Create the table
|
||||
CREATE TABLE `t1` (
|
||||
c1 int NOT NULL,
|
||||
c2 int NOT NULL,
|
||||
c3 int NOT NULL,
|
||||
PRIMARY KEY (c1,c2),
|
||||
KEY (c3)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
# populate with data
|
||||
INSERT INTO t1 VALUES (5,2,1246276747);
|
||||
INSERT INTO t1 VALUES (2,1,1246281721);
|
||||
INSERT INTO t1 VALUES (7,3,1246281756);
|
||||
INSERT INTO t1 VALUES (4,2,1246282139);
|
||||
INSERT INTO t1 VALUES (3,1,1246282230);
|
||||
INSERT INTO t1 VALUES (1,0,1246282712);
|
||||
INSERT INTO t1 VALUES (8,3,1246282765);
|
||||
INSERT INTO t1 SELECT c1+10,c2+10,c3+10 FROM t1;
|
||||
INSERT INTO t1 SELECT c1+100,c2+100,c3+100 from t1;
|
||||
INSERT INTO t1 SELECT c1+1000,c2+1000,c3+1000 from t1;
|
||||
INSERT INTO t1 SELECT c1+10000,c2+10000,c3+10000 from t1;
|
||||
INSERT INTO t1 SELECT c1+100000,c2+100000,c3+100000 from t1;
|
||||
INSERT INTO t1 SELECT c1+1000000,c2+1000000,c3+1000000 from t1;
|
||||
|
||||
# query and no rows will match the c1 condition, whereas all will match c3
|
||||
SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
|
||||
|
||||
# SHOULD use the pk.
|
||||
# index on c3 will be used instead of primary key
|
||||
EXPLAIN SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
|
||||
|
||||
# if we force the primary key, we can see the estimate is 1
|
||||
EXPLAIN SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
|
||||
|
||||
|
||||
CREATE TABLE t2 (
|
||||
c1 int NOT NULL,
|
||||
c2 int NOT NULL,
|
||||
c3 int NOT NULL,
|
||||
KEY (c1,c2),
|
||||
KEY (c3)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
# SHOULD use the pk.
|
||||
# if we switch it from a primary key to a regular index, it works correctly as well
|
||||
explain SELECT * FROM t2 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # 36259: Optimizing with ORDER BY
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a INT NOT NULL AUTO_INCREMENT,
|
||||
b INT NOT NULL,
|
||||
c INT NOT NULL,
|
||||
d VARCHAR(5),
|
||||
e INT NOT NULL,
|
||||
PRIMARY KEY (a), KEY i2 (b,c,d)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 (b,c,d,e) VALUES (1,1,'a',1), (2,2,'b',2);
|
||||
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||
EXPLAIN SELECT * FROM t1 WHERE b=1 AND c=1 ORDER BY a;
|
||||
EXPLAIN SELECT * FROM t1 FORCE INDEX(i2) WHERE b=1 and c=1 ORDER BY a;
|
||||
EXPLAIN SELECT * FROM t1 FORCE INDEX(PRIMARY) WHERE b=1 AND c=1 ORDER BY a;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #47963: Wrong results when index is used
|
||||
--echo #
|
||||
CREATE TABLE t1(
|
||||
a VARCHAR(5) NOT NULL,
|
||||
b VARCHAR(5) NOT NULL,
|
||||
c DATETIME NOT NULL,
|
||||
KEY (c)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES('TEST', 'TEST', '2009-10-09 00:00:00');
|
||||
SELECT * FROM t1 WHERE a = 'TEST' AND
|
||||
c >= '2009-10-09 00:00:00' AND c <= '2009-10-09 00:00:00';
|
||||
SELECT * FROM t1 WHERE a = 'TEST' AND
|
||||
c >= '2009-10-09 00:00:00.0' AND c <= '2009-10-09 00:00:00.0';
|
||||
SELECT * FROM t1 WHERE a = 'TEST' AND
|
||||
c >= '2009-10-09 00:00:00.0' AND c <= '2009-10-09 00:00:00';
|
||||
SELECT * FROM t1 WHERE a = 'TEST' AND
|
||||
c >= '2009-10-09 00:00:00' AND c <= '2009-10-09 00:00:00.0';
|
||||
SELECT * FROM t1 WHERE a = 'TEST' AND
|
||||
c >= '2009-10-09 00:00:00.000' AND c <= '2009-10-09 00:00:00.000';
|
||||
SELECT * FROM t1 WHERE a = 'TEST' AND
|
||||
c >= '2009-10-09 00:00:00.00' AND c <= '2009-10-09 00:00:00.001';
|
||||
SELECT * FROM t1 WHERE a = 'TEST' AND
|
||||
c >= '2009-10-09 00:00:00.001' AND c <= '2009-10-09 00:00:00.00';
|
||||
EXPLAIN SELECT * FROM t1 WHERE a = 'TEST' AND
|
||||
c >= '2009-10-09 00:00:00.001' AND c <= '2009-10-09 00:00:00.00';
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #46175: NULL read_view and consistent read assertion
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a CHAR(13),KEY(a)) ENGINE=innodb;
|
||||
CREATE TABLE t2(b DATETIME,KEY(b)) ENGINE=innodb;
|
||||
INSERT INTO t1 VALUES (),();
|
||||
INSERT INTO t2 VALUES (),();
|
||||
CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
|
||||
WHERE b =(SELECT a FROM t1 LIMIT 1);
|
||||
|
||||
CONNECT (con1, localhost, root,,);
|
||||
CONNECTION default;
|
||||
|
||||
DELIMITER |;
|
||||
CREATE PROCEDURE p1(num INT)
|
||||
BEGIN
|
||||
DECLARE i INT DEFAULT 0;
|
||||
REPEAT
|
||||
SHOW CREATE VIEW v1;
|
||||
SET i:=i+1;
|
||||
UNTIL i>num END REPEAT;
|
||||
END|
|
||||
DELIMITER ;|
|
||||
|
||||
--echo # Should not crash
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
--send CALL p1(1000)
|
||||
CONNECTION con1;
|
||||
--echo # Should not crash
|
||||
CALL p1(1000);
|
||||
|
||||
CONNECTION default;
|
||||
--reap
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
|
||||
DISCONNECT con1;
|
||||
DROP PROCEDURE p1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #49324: more valgrind errors in test_if_skip_sort_order
|
||||
--echo #
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb ;
|
||||
--echo #should not cause valgrind warnings
|
||||
SELECT 1 FROM t1 JOIN t1 a USING(a) GROUP BY t1.a,t1.a;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#50843: Filesort used instead of clustered index led to
|
||||
--echo # performance degradation.
|
||||
--echo #
|
||||
create table t1(f1 int not null primary key, f2 int) engine=innodb;
|
||||
create table t2(f1 int not null, key (f1)) engine=innodb;
|
||||
insert into t1 values (1,1),(2,2),(3,3);
|
||||
insert into t2 values (1),(2),(3);
|
||||
explain select t1.* from t1 left join t2 using(f1) group by t1.f1;
|
||||
drop table t1,t2;
|
||||
--echo #
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #39653: find_shortest_key in sql_select.cc does not consider
|
||||
--echo # clustered primary keys
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT, d INT, e INT, f INT,
|
||||
KEY (b,c)) ENGINE=INNODB;
|
||||
|
||||
INSERT INTO t1 VALUES (1,1,1,1,1,1), (2,2,2,2,2,2), (3,3,3,3,3,3),
|
||||
(4,4,4,4,4,4), (5,5,5,5,5,5), (6,6,6,6,6,6),
|
||||
(7,7,7,7,7,7), (8,8,8,8,8,8), (9,9,9,9,9,9),
|
||||
(11,11,11,11,11,11);
|
||||
|
||||
--query_vertical EXPLAIN SELECT COUNT(*) FROM t1
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #49838: DROP INDEX and ADD UNIQUE INDEX for same index may
|
||||
--echo # corrupt definition at engine
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, KEY k (a,b))
|
||||
ENGINE=InnoDB;
|
||||
|
||||
ALTER TABLE t1 DROP INDEX k, ADD UNIQUE INDEX k (a,b);
|
||||
|
||||
--query_vertical SHOW INDEXES FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #47453: InnoDB incorrectly changes TIMESTAMP columns when
|
||||
--echo # JOINed during an UPDATE
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (d INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a INT, b INT,
|
||||
c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
ON UPDATE CURRENT_TIMESTAMP) ENGINE=InnoDB;
|
||||
|
||||
--echo set up our data elements
|
||||
INSERT INTO t1 (d) VALUES (1);
|
||||
INSERT INTO t2 (a,b) VALUES (1,1);
|
||||
SELECT SECOND(c) INTO @bug47453 FROM t2;
|
||||
|
||||
SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
|
||||
UPDATE t1 JOIN t2 ON d=a SET b=1 WHERE a=1;
|
||||
SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
|
||||
|
||||
SELECT SLEEP(1);
|
||||
|
||||
UPDATE t1 JOIN t2 ON d=a SET b=1 WHERE a=1;
|
||||
|
||||
--echo #should be 0
|
||||
SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#38999 valgrind warnings for update statement in function compare_record()
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 values (1),(2),(3),(4),(5);
|
||||
INSERT INTO t2 values (1);
|
||||
|
||||
SELECT * FROM t1 WHERE a = 2;
|
||||
UPDATE t1,t2 SET t1.a = t1.a + 100 WHERE t1.a = 1;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #53334: wrong result for outer join with impossible ON condition
|
||||
--echo # (see the same test case for MyISAM in join.test)
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (id INT PRIMARY KEY);
|
||||
CREATE TABLE t2 (id INT);
|
||||
|
||||
INSERT INTO t1 VALUES (75);
|
||||
INSERT INTO t1 VALUES (79);
|
||||
INSERT INTO t1 VALUES (78);
|
||||
INSERT INTO t1 VALUES (77);
|
||||
REPLACE INTO t1 VALUES (76);
|
||||
REPLACE INTO t1 VALUES (76);
|
||||
INSERT INTO t1 VALUES (104);
|
||||
INSERT INTO t1 VALUES (103);
|
||||
INSERT INTO t1 VALUES (102);
|
||||
INSERT INTO t1 VALUES (101);
|
||||
INSERT INTO t1 VALUES (105);
|
||||
INSERT INTO t1 VALUES (106);
|
||||
INSERT INTO t1 VALUES (107);
|
||||
|
||||
INSERT INTO t2 VALUES (107),(75),(1000);
|
||||
|
||||
SELECT t1.id,t2.id FROM t2 LEFT JOIN t1 ON t1.id>=74 AND t1.id<=0
|
||||
WHERE t2.id=75 AND t1.id IS NULL;
|
||||
EXPLAIN SELECT t1.id,t2.id FROM t2 LEFT JOIN t1 ON t1.id>=74 AND t1.id<=0
|
||||
WHERE t2.id=75 AND t1.id IS NULL;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #53830: !table || (!table->read_set || bitmap_is_set(table->read_set, field_index))
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT, b INT, c INT, d INT,
|
||||
PRIMARY KEY(a,b,c), KEY(b,d))
|
||||
ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (0, 77, 1, 3);
|
||||
|
||||
UPDATE t1 SET d = 0 WHERE b = 77 AND c = 25;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#50389 Using intersect does not return all rows
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
f1 INT(10) NOT NULL,
|
||||
f2 INT(10),
|
||||
f3 INT(10),
|
||||
f4 TINYINT(4),
|
||||
f5 VARCHAR(50),
|
||||
PRIMARY KEY (f1),
|
||||
KEY idx1 (f2,f5,f4),
|
||||
KEY idx2 (f2,f4)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
LOAD DATA INFILE '../../std_data/intersect-bug50389.tsv' INTO TABLE t1;
|
||||
|
||||
SELECT * FROM t1 WHERE f1 IN
|
||||
(3305028,3353871,3772880,3346860,4228206,3336022,
|
||||
3470988,3305175,3329875,3817277,3856380,3796193,
|
||||
3784744,4180925,4559596,3963734,3856391,4494153)
|
||||
AND f5 = 'abcdefghijklmnopwrst' AND f2 = 1221457 AND f4 = 0 ;
|
||||
|
||||
EXPLAIN SELECT * FROM t1 WHERE f1 IN
|
||||
(3305028,3353871,3772880,3346860,4228206,3336022,
|
||||
3470988,3305175,3329875,3817277,3856380,3796193,
|
||||
3784744,4180925,4559596,3963734,3856391,4494153)
|
||||
AND f5 = 'abcdefghijklmnopwrst' AND f2 = 1221457 AND f4 = 0 ;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#51431 Wrong sort order after import of dump file
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
f1 INT(11) NOT NULL,
|
||||
f2 int(11) NOT NULL,
|
||||
f3 int(11) NOT NULL,
|
||||
f4 tinyint(1) NOT NULL,
|
||||
PRIMARY KEY (f1),
|
||||
UNIQUE KEY (f2, f3),
|
||||
KEY (f4)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(1,1,991,1), (2,1,992,1), (3,1,993,1), (4,1,994,1), (5,1,995,1),
|
||||
(6,1,996,1), (7,1,997,1), (8,1,998,1), (10,1,999,1), (11,1,9910,1),
|
||||
(16,1,9911,1), (17,1,9912,1), (18,1,9913,1), (19,1,9914,1), (20,1,9915,1),
|
||||
(21,1,9916,1), (22,1,9917,1), (23,1,9918,1), (24,1,9919,1), (25,1,9920,1),
|
||||
(26,1,9921,1), (27,1,9922,1);
|
||||
|
||||
FLUSH TABLES;
|
||||
|
||||
SELECT * FROM t1 WHERE f2 = 1 AND f4 = TRUE
|
||||
ORDER BY f1 DESC LIMIT 5;
|
||||
EXPLAIN SELECT * FROM t1 WHERE f2 = 1 AND f4 = TRUE
|
||||
ORDER BY f1 DESC LIMIT 5;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
@ -0,0 +1,9 @@
|
||||
drop table if exists t1;
|
||||
create table t1(a int not null auto_increment primary key) engine=innodb;
|
||||
insert into t1 set a = -1;
|
||||
optimize table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
==== clean up ====
|
||||
DROP TABLE t1;
|
314
mysql-test/suite/innodb_plugin/r/innodb-ucs2.result
Normal file
314
mysql-test/suite/innodb_plugin/r/innodb-ucs2.result
Normal file
@ -0,0 +1,314 @@
|
||||
drop table if exists t1, t2;
|
||||
create table t1 (
|
||||
a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set utf8 engine = innodb;
|
||||
create table t2 (
|
||||
a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set ucs2 engine = innodb;
|
||||
insert into t1 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t1 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t1 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
|
||||
insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
|
||||
insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
|
||||
insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
|
||||
insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
|
||||
insert into t2 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t2 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t2 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
|
||||
insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
|
||||
insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
|
||||
insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
|
||||
insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
|
||||
insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
|
||||
insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
|
||||
insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
|
||||
insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
|
||||
update t1 set filler = 'boo' where a = 1;
|
||||
update t2 set filler ='email' where a = 4;
|
||||
select a,hex(b),hex(c),filler from t1 order by filler;
|
||||
a hex(b) hex(c) filler
|
||||
1 61626364656667 61626364656667 boo
|
||||
4 D0B1 D0B1 eight
|
||||
4 5B 5B five
|
||||
4 E880BD E880BD four
|
||||
4 E880BDD0B1E880BD E880BDD0B1E880BD seven
|
||||
4 E880BDE880BD E880BDE880BD six
|
||||
3 71727374757677 71727374757677 three
|
||||
2 696A6B696C6D6E 696A6B696C6D6E two
|
||||
select a,hex(b),hex(c),filler from t2 order by filler;
|
||||
a hex(b) hex(c) filler
|
||||
4 05630563 05630563 email
|
||||
4 0563 0563 email
|
||||
4 05612020 05612020 email
|
||||
4 01FC 01FC email
|
||||
4 0120 0120 email
|
||||
4 00640065 00640065 email
|
||||
4 00E400E50068 00E400E50068 email
|
||||
4 0000E400 0000E400 email
|
||||
4 0000563001FC0563 0000563001FC0563 email
|
||||
1 0061006200630064006500660067 0061006200630064006500660067 one
|
||||
3 0071007200730074007500760077 0071007200730074007500760077 three
|
||||
2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
create table t1 (
|
||||
a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set utf8 engine = innodb;
|
||||
create table t2 (
|
||||
a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set ucs2 engine = innodb;
|
||||
insert into t1 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t1 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t1 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
|
||||
insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
|
||||
insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
|
||||
insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
|
||||
insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
|
||||
insert into t2 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t2 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t2 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
|
||||
insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
|
||||
insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
|
||||
insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
|
||||
insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
|
||||
insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
|
||||
insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
|
||||
insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
|
||||
insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
|
||||
update t1 set filler = 'boo' where a = 1;
|
||||
update t2 set filler ='email' where a = 4;
|
||||
select a,hex(b),hex(c),filler from t1 order by filler;
|
||||
a hex(b) hex(c) filler
|
||||
1 61626364656667 61626364656667 boo
|
||||
4 D0B1 D0B1 eight
|
||||
4 5B 5B five
|
||||
4 E880BD E880BD four
|
||||
4 E880BDD0B1E880BD E880BDD0B1E880BD seven
|
||||
4 E880BDE880BD E880BDE880BD six
|
||||
3 71727374757677 71727374757677 three
|
||||
2 696A6B696C6D6E 696A6B696C6D6E two
|
||||
select a,hex(b),hex(c),filler from t2 order by filler;
|
||||
a hex(b) hex(c) filler
|
||||
4 05630563 05630563 email
|
||||
4 0563 0563 email
|
||||
4 05612020 05612020 email
|
||||
4 01FC 01FC email
|
||||
4 0120 0120 email
|
||||
4 00640065 00640065 email
|
||||
4 00E400E50068 00E400E50068 email
|
||||
4 0000E400 0000E400 email
|
||||
4 0000563001FC0563 0000563001FC0563 email
|
||||
1 0061006200630064006500660067 0061006200630064006500660067 one
|
||||
3 0071007200730074007500760077 0071007200730074007500760077 three
|
||||
2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
create table t1 (
|
||||
a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set utf8 engine = innodb;
|
||||
create table t2 (
|
||||
a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set ucs2 engine = innodb;
|
||||
insert into t1 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t1 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t1 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
|
||||
insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
|
||||
insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
|
||||
insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
|
||||
insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
|
||||
insert into t2 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t2 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t2 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
|
||||
insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
|
||||
insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
|
||||
insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
|
||||
insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
|
||||
insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
|
||||
insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
|
||||
insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
|
||||
insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
|
||||
update t1 set filler = 'boo' where a = 1;
|
||||
update t2 set filler ='email' where a = 4;
|
||||
select a,hex(b),hex(c),filler from t1 order by filler;
|
||||
a hex(b) hex(c) filler
|
||||
1 61626364656667 61626364656667 boo
|
||||
4 D0B1 D0B1 eight
|
||||
4 5B 5B five
|
||||
4 E880BD E880BD four
|
||||
4 E880BDD0B1E880BD E880BDD0B1E880BD seven
|
||||
4 E880BDE880BD E880BDE880BD six
|
||||
3 71727374757677 71727374757677 three
|
||||
2 696A6B696C6D6E 696A6B696C6D6E two
|
||||
select a,hex(b),hex(c),filler from t2 order by filler;
|
||||
a hex(b) hex(c) filler
|
||||
4 0120 0120 email
|
||||
4 01FC 01FC email
|
||||
4 0563 0563 email
|
||||
4 0000563001FC0563 0000563001FC0563 email
|
||||
4 0000E400 0000E400 email
|
||||
4 00640065 00640065 email
|
||||
4 00E400E50068 00E400E50068 email
|
||||
4 05612020 05612020 email
|
||||
4 05630563 05630563 email
|
||||
1 0061006200630064006500660067 0061006200630064006500660067 one
|
||||
3 0071007200730074007500760077 0071007200730074007500760077 three
|
||||
2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
create table t1 (
|
||||
a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set utf8 engine = innodb;
|
||||
create table t2 (
|
||||
a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set ucs2 engine = innodb;
|
||||
insert into t1 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t1 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t1 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
|
||||
insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
|
||||
insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
|
||||
insert into t2 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t2 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t2 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
|
||||
insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
|
||||
insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
|
||||
insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
|
||||
insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
|
||||
insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
|
||||
insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
|
||||
update t1 set filler = 'boo' where a = 1;
|
||||
update t2 set filler ='email' where a = 4;
|
||||
select a,hex(b),hex(c),filler from t1 order by filler;
|
||||
a hex(b) hex(c) filler
|
||||
1 61626364656667 61626364656667 boo
|
||||
4 D0B1 D0B1 eight
|
||||
4 5B 5B five
|
||||
4 E880BD E880BD four
|
||||
3 71727374757677 71727374757677 three
|
||||
2 696A6B696C6D6E 696A6B696C6D6E two
|
||||
select a,hex(b),hex(c),filler from t2 order by filler;
|
||||
a hex(b) hex(c) filler
|
||||
4 0000E400 0000E400 email
|
||||
4 00640065 00640065 email
|
||||
4 00E400E50068 00E400E50068 email
|
||||
4 0120 0120 email
|
||||
4 01FC 01FC email
|
||||
4 05612020 05612020 email
|
||||
4 0563 0563 email
|
||||
1 61626364656667 61626364656667 one
|
||||
3 71727374757677 71727374757677 three
|
||||
2 696A6B696C6D6E 696A6B696C6D6E two
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
commit;
|
||||
CREATE TABLE t1 (
|
||||
ind enum('0','1','2') NOT NULL default '0',
|
||||
string1 varchar(250) NOT NULL,
|
||||
PRIMARY KEY (ind)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE t2 (
|
||||
ind enum('0','1','2') NOT NULL default '0',
|
||||
string1 varchar(250) NOT NULL,
|
||||
PRIMARY KEY (ind)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
|
||||
INSERT INTO t1 VALUES ('1', ''),('2', '');
|
||||
INSERT INTO t2 VALUES ('1', ''),('2', '');
|
||||
SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
|
||||
hex(ind) hex(string1)
|
||||
31
|
||||
32
|
||||
SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
|
||||
hex(ind) hex(string1)
|
||||
0031
|
||||
0032
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (
|
||||
ind set('0','1','2') NOT NULL default '0',
|
||||
string1 varchar(250) NOT NULL,
|
||||
PRIMARY KEY (ind)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE t2 (
|
||||
ind set('0','1','2') NOT NULL default '0',
|
||||
string1 varchar(250) NOT NULL,
|
||||
PRIMARY KEY (ind)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
|
||||
INSERT INTO t1 VALUES ('1', ''),('2', '');
|
||||
INSERT INTO t2 VALUES ('1', ''),('2', '');
|
||||
SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
|
||||
hex(ind) hex(string1)
|
||||
31
|
||||
32
|
||||
SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
|
||||
hex(ind) hex(string1)
|
||||
0031
|
||||
0032
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (
|
||||
ind bit not null,
|
||||
string1 varchar(250) NOT NULL,
|
||||
PRIMARY KEY (ind)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE t2 (
|
||||
ind bit not null,
|
||||
string1 varchar(250) NOT NULL,
|
||||
PRIMARY KEY (ind)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
|
||||
insert into t1 values(0,''),(1,'');
|
||||
insert into t2 values(0,''),(1,'');
|
||||
select hex(ind),hex(string1) from t1 order by string1;
|
||||
hex(ind) hex(string1)
|
||||
0
|
||||
1
|
||||
select hex(ind),hex(string1) from t2 order by string1;
|
||||
hex(ind) hex(string1)
|
||||
0
|
||||
1
|
||||
drop table t1,t2;
|
||||
create table t2 (
|
||||
a int, b char(10), filler char(10), primary key(a, b(2))
|
||||
) character set utf8 engine = innodb;
|
||||
insert into t2 values (1,'abcdefg','one');
|
||||
insert into t2 values (2,'ijkilmn','two');
|
||||
insert into t2 values (3, 'qrstuvw','three');
|
||||
update t2 set a=5, filler='booo' where a=1;
|
||||
drop table t2;
|
||||
create table t2 (
|
||||
a int, b char(10), filler char(10), primary key(a, b(2))
|
||||
) character set ucs2 engine = innodb;
|
||||
insert into t2 values (1,'abcdefg','one');
|
||||
insert into t2 values (2,'ijkilmn','two');
|
||||
insert into t2 values (3, 'qrstuvw','three');
|
||||
update t2 set a=5, filler='booo' where a=1;
|
||||
drop table t2;
|
||||
create table t1(a int not null, b char(110),primary key(a,b(100))) engine=innodb default charset=utf8;
|
||||
insert into t1 values(1,'abcdefg'),(2,'defghijk');
|
||||
insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
|
||||
insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
|
||||
select a,hex(b) from t1 order by b;
|
||||
a hex(b)
|
||||
1 61626364656667
|
||||
2 6465666768696A6B
|
||||
6 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1
|
||||
7 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2
|
||||
update t1 set b = 'three' where a = 6;
|
||||
drop table t1;
|
||||
create table t1(a int not null, b text(110),primary key(a,b(100))) engine=innodb default charset=utf8;
|
||||
insert into t1 values(1,'abcdefg'),(2,'defghijk');
|
||||
insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
|
||||
insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
|
||||
select a,hex(b) from t1 order by b;
|
||||
a hex(b)
|
||||
1 61626364656667
|
||||
2 6465666768696A6B
|
||||
6 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1
|
||||
7 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2
|
||||
update t1 set b = 'three' where a = 6;
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
@ -0,0 +1,39 @@
|
||||
drop table if exists t1;
|
||||
CREATE TABLE t1 (
|
||||
id int(11) NOT NULL auto_increment,
|
||||
ggid varchar(32) binary DEFAULT '' NOT NULL,
|
||||
email varchar(64) DEFAULT '' NOT NULL,
|
||||
passwd varchar(32) binary DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE ggid (ggid)
|
||||
) ENGINE=innodb;
|
||||
insert into t1 (ggid,passwd) values ('test1','xxx');
|
||||
insert into t1 (ggid,passwd) values ('test2','yyy');
|
||||
insert into t1 (ggid,passwd) values ('test2','this will fail');
|
||||
ERROR 23000: Duplicate entry 'test2' for key 'ggid'
|
||||
insert into t1 (ggid,id) values ('this will fail',1);
|
||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||
select * from t1 where ggid='test1';
|
||||
id ggid email passwd
|
||||
1 test1 xxx
|
||||
select * from t1 where passwd='xxx';
|
||||
id ggid email passwd
|
||||
1 test1 xxx
|
||||
select * from t1 where id=2;
|
||||
id ggid email passwd
|
||||
2 test2 yyy
|
||||
replace into t1 (ggid,id) values ('this will work',1);
|
||||
replace into t1 (ggid,passwd) values ('test2','this will work');
|
||||
update t1 set id=100,ggid='test2' where id=1;
|
||||
ERROR 23000: Duplicate entry 'test2' for key 'ggid'
|
||||
select * from t1;
|
||||
id ggid email passwd
|
||||
1 this will work
|
||||
3 test2 this will work
|
||||
select * from t1 where id=1;
|
||||
id ggid email passwd
|
||||
1 this will work
|
||||
select * from t1 where id=999;
|
||||
id ggid email passwd
|
||||
drop table t1;
|
||||
End of tests
|
1043
mysql-test/suite/innodb_plugin/r/innodb_bug30919.result
Normal file
1043
mysql-test/suite/innodb_plugin/r/innodb_bug30919.result
Normal file
File diff suppressed because it is too large
Load Diff
17
mysql-test/suite/innodb_plugin/r/innodb_bug42419.result
Normal file
17
mysql-test/suite/innodb_plugin/r/innodb_bug42419.result
Normal file
@ -0,0 +1,17 @@
|
||||
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b INT) ENGINE = InnoDB;
|
||||
INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT = 0;
|
||||
CREATE TEMPORARY TABLE t1_tmp ( b INT );
|
||||
INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 3;
|
||||
INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 2;
|
||||
SET AUTOCOMMIT = 0;
|
||||
CREATE TEMPORARY TABLE t2_tmp ( a int, new_a int );
|
||||
INSERT INTO t2_tmp VALUES (1,51),(2,52),(3,53);
|
||||
UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 1;
|
||||
UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 2;
|
||||
INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
Reap the server message for connection user2 UPDATE t1 ...
|
||||
UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 3;
|
||||
DROP TABLE t1;
|
11
mysql-test/suite/innodb_plugin/r/innodb_bug53674.result
Normal file
11
mysql-test/suite/innodb_plugin/r/innodb_bug53674.result
Normal file
@ -0,0 +1,11 @@
|
||||
create table bug53674(a int)engine=innodb;
|
||||
insert into bug53674 values (1),(2);
|
||||
start transaction;
|
||||
select * from bug53674 for update;
|
||||
a
|
||||
1
|
||||
2
|
||||
select * from bug53674 where a=(select a from bug53674 where a > 1);
|
||||
a
|
||||
2
|
||||
drop table bug53674;
|
3
mysql-test/suite/innodb_plugin/r/innodb_bug54044.result
Normal file
3
mysql-test/suite/innodb_plugin/r/innodb_bug54044.result
Normal file
@ -0,0 +1,3 @@
|
||||
CREATE TEMPORARY TABLE table_54044 ENGINE = INNODB
|
||||
AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
|
||||
ERROR HY000: Can't create table 'test.table_54044' (errno: -1)
|
91
mysql-test/suite/innodb_plugin/r/innodb_bug54679.result
Normal file
91
mysql-test/suite/innodb_plugin/r/innodb_bug54679.result
Normal file
@ -0,0 +1,91 @@
|
||||
SET GLOBAL innodb_file_format='Barracuda';
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
SET innodb_strict_mode=ON;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compressed row_format=COMPRESSED
|
||||
ALTER TABLE bug54679 ADD COLUMN b INT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compressed row_format=COMPRESSED
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compact
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=1;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compressed KEY_BLOCK_SIZE=1
|
||||
ALTER TABLE bug54679 ROW_FORMAT=REDUNDANT;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Redundant row_format=REDUNDANT
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=2;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compressed row_format=REDUNDANT KEY_BLOCK_SIZE=2
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table 'test.bug54679' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table 'test.bug54679' (errno: 1478)
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table 'test.bug54679' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
|
||||
Error 1005 Can't create table 'test.bug54679' (errno: 1478)
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
DROP TABLE bug54679;
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
SET GLOBAL innodb_file_format_check=Antelope;
|
||||
SET GLOBAL innodb_file_per_table=0;
|
589
mysql-test/suite/innodb_plugin/r/innodb_gis.result
Normal file
589
mysql-test/suite/innodb_plugin/r/innodb_gis.result
Normal file
@ -0,0 +1,589 @@
|
||||
SET storage_engine=innodb;
|
||||
DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
|
||||
CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT);
|
||||
CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING);
|
||||
CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON);
|
||||
CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT);
|
||||
CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING);
|
||||
CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON);
|
||||
CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION);
|
||||
CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY);
|
||||
SHOW CREATE TABLE gis_point;
|
||||
Table Create Table
|
||||
gis_point CREATE TABLE `gis_point` (
|
||||
`fid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`g` point DEFAULT NULL,
|
||||
PRIMARY KEY (`fid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SHOW FIELDS FROM gis_point;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g point YES NULL
|
||||
SHOW FIELDS FROM gis_line;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g linestring YES NULL
|
||||
SHOW FIELDS FROM gis_polygon;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g polygon YES NULL
|
||||
SHOW FIELDS FROM gis_multi_point;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g multipoint YES NULL
|
||||
SHOW FIELDS FROM gis_multi_line;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g multilinestring YES NULL
|
||||
SHOW FIELDS FROM gis_multi_polygon;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g multipolygon YES NULL
|
||||
SHOW FIELDS FROM gis_geometrycollection;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g geometrycollection YES NULL
|
||||
SHOW FIELDS FROM gis_geometry;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g geometry YES NULL
|
||||
INSERT INTO gis_point VALUES
|
||||
(101, PointFromText('POINT(10 10)')),
|
||||
(102, PointFromText('POINT(20 10)')),
|
||||
(103, PointFromText('POINT(20 20)')),
|
||||
(104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)'))));
|
||||
INSERT INTO gis_line VALUES
|
||||
(105, LineFromText('LINESTRING(0 0,0 10,10 0)')),
|
||||
(106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')),
|
||||
(107, LineStringFromWKB(LineString(Point(10, 10), Point(40, 10))));
|
||||
INSERT INTO gis_polygon VALUES
|
||||
(108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')),
|
||||
(109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')),
|
||||
(110, PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0)))));
|
||||
INSERT INTO gis_multi_point VALUES
|
||||
(111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')),
|
||||
(112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')),
|
||||
(113, MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10))));
|
||||
INSERT INTO gis_multi_line VALUES
|
||||
(114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')),
|
||||
(115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')),
|
||||
(116, MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7)))));
|
||||
INSERT INTO gis_multi_polygon VALUES
|
||||
(117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
|
||||
(118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
|
||||
(119, MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3))))));
|
||||
INSERT INTO gis_geometrycollection VALUES
|
||||
(120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')),
|
||||
(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9)))));
|
||||
INSERT into gis_geometry SELECT * FROM gis_point;
|
||||
INSERT into gis_geometry SELECT * FROM gis_line;
|
||||
INSERT into gis_geometry SELECT * FROM gis_polygon;
|
||||
INSERT into gis_geometry SELECT * FROM gis_multi_point;
|
||||
INSERT into gis_geometry SELECT * FROM gis_multi_line;
|
||||
INSERT into gis_geometry SELECT * FROM gis_multi_polygon;
|
||||
INSERT into gis_geometry SELECT * FROM gis_geometrycollection;
|
||||
SELECT fid, AsText(g) FROM gis_point ORDER by fid;
|
||||
fid AsText(g)
|
||||
101 POINT(10 10)
|
||||
102 POINT(20 10)
|
||||
103 POINT(20 20)
|
||||
104 POINT(10 20)
|
||||
SELECT fid, AsText(g) FROM gis_line ORDER by fid;
|
||||
fid AsText(g)
|
||||
105 LINESTRING(0 0,0 10,10 0)
|
||||
106 LINESTRING(10 10,20 10,20 20,10 20,10 10)
|
||||
107 LINESTRING(10 10,40 10)
|
||||
SELECT fid, AsText(g) FROM gis_polygon ORDER by fid;
|
||||
fid AsText(g)
|
||||
108 POLYGON((10 10,20 10,20 20,10 20,10 10))
|
||||
109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10))
|
||||
110 POLYGON((0 0,30 0,30 30,0 0))
|
||||
SELECT fid, AsText(g) FROM gis_multi_point ORDER by fid;
|
||||
fid AsText(g)
|
||||
111 MULTIPOINT(0 0,10 10,10 20,20 20)
|
||||
112 MULTIPOINT(1 1,11 11,11 21,21 21)
|
||||
113 MULTIPOINT(3 6,4 10)
|
||||
SELECT fid, AsText(g) FROM gis_multi_line ORDER by fid;
|
||||
fid AsText(g)
|
||||
114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))
|
||||
115 MULTILINESTRING((10 48,10 21,10 0))
|
||||
116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7))
|
||||
SELECT fid, AsText(g) FROM gis_multi_polygon ORDER by fid;
|
||||
fid AsText(g)
|
||||
117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
|
||||
118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
|
||||
119 MULTIPOLYGON(((0 3,3 3,3 0,0 3)))
|
||||
SELECT fid, AsText(g) FROM gis_geometrycollection ORDER by fid;
|
||||
fid AsText(g)
|
||||
120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10))
|
||||
121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9))
|
||||
SELECT fid, AsText(g) FROM gis_geometry ORDER by fid;
|
||||
fid AsText(g)
|
||||
101 POINT(10 10)
|
||||
102 POINT(20 10)
|
||||
103 POINT(20 20)
|
||||
104 POINT(10 20)
|
||||
105 LINESTRING(0 0,0 10,10 0)
|
||||
106 LINESTRING(10 10,20 10,20 20,10 20,10 10)
|
||||
107 LINESTRING(10 10,40 10)
|
||||
108 POLYGON((10 10,20 10,20 20,10 20,10 10))
|
||||
109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10))
|
||||
110 POLYGON((0 0,30 0,30 30,0 0))
|
||||
111 MULTIPOINT(0 0,10 10,10 20,20 20)
|
||||
112 MULTIPOINT(1 1,11 11,11 21,21 21)
|
||||
113 MULTIPOINT(3 6,4 10)
|
||||
114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))
|
||||
115 MULTILINESTRING((10 48,10 21,10 0))
|
||||
116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7))
|
||||
117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
|
||||
118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
|
||||
119 MULTIPOLYGON(((0 3,3 3,3 0,0 3)))
|
||||
120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10))
|
||||
121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9))
|
||||
SELECT fid, Dimension(g) FROM gis_geometry ORDER by fid;
|
||||
fid Dimension(g)
|
||||
101 0
|
||||
102 0
|
||||
103 0
|
||||
104 0
|
||||
105 1
|
||||
106 1
|
||||
107 1
|
||||
108 2
|
||||
109 2
|
||||
110 2
|
||||
111 0
|
||||
112 0
|
||||
113 0
|
||||
114 1
|
||||
115 1
|
||||
116 1
|
||||
117 2
|
||||
118 2
|
||||
119 2
|
||||
120 1
|
||||
121 1
|
||||
SELECT fid, GeometryType(g) FROM gis_geometry ORDER by fid;
|
||||
fid GeometryType(g)
|
||||
101 POINT
|
||||
102 POINT
|
||||
103 POINT
|
||||
104 POINT
|
||||
105 LINESTRING
|
||||
106 LINESTRING
|
||||
107 LINESTRING
|
||||
108 POLYGON
|
||||
109 POLYGON
|
||||
110 POLYGON
|
||||
111 MULTIPOINT
|
||||
112 MULTIPOINT
|
||||
113 MULTIPOINT
|
||||
114 MULTILINESTRING
|
||||
115 MULTILINESTRING
|
||||
116 MULTILINESTRING
|
||||
117 MULTIPOLYGON
|
||||
118 MULTIPOLYGON
|
||||
119 MULTIPOLYGON
|
||||
120 GEOMETRYCOLLECTION
|
||||
121 GEOMETRYCOLLECTION
|
||||
SELECT fid, IsEmpty(g) FROM gis_geometry ORDER by fid;
|
||||
fid IsEmpty(g)
|
||||
101 0
|
||||
102 0
|
||||
103 0
|
||||
104 0
|
||||
105 0
|
||||
106 0
|
||||
107 0
|
||||
108 0
|
||||
109 0
|
||||
110 0
|
||||
111 0
|
||||
112 0
|
||||
113 0
|
||||
114 0
|
||||
115 0
|
||||
116 0
|
||||
117 0
|
||||
118 0
|
||||
119 0
|
||||
120 0
|
||||
121 0
|
||||
SELECT fid, AsText(Envelope(g)) FROM gis_geometry ORDER by fid;
|
||||
fid AsText(Envelope(g))
|
||||
101 POLYGON((10 10,10 10,10 10,10 10,10 10))
|
||||
102 POLYGON((20 10,20 10,20 10,20 10,20 10))
|
||||
103 POLYGON((20 20,20 20,20 20,20 20,20 20))
|
||||
104 POLYGON((10 20,10 20,10 20,10 20,10 20))
|
||||
105 POLYGON((0 0,10 0,10 10,0 10,0 0))
|
||||
106 POLYGON((10 10,20 10,20 20,10 20,10 10))
|
||||
107 POLYGON((10 10,40 10,40 10,10 10,10 10))
|
||||
108 POLYGON((10 10,20 10,20 20,10 20,10 10))
|
||||
109 POLYGON((0 0,50 0,50 50,0 50,0 0))
|
||||
110 POLYGON((0 0,30 0,30 30,0 30,0 0))
|
||||
111 POLYGON((0 0,20 0,20 20,0 20,0 0))
|
||||
112 POLYGON((1 1,21 1,21 21,1 21,1 1))
|
||||
113 POLYGON((3 6,4 6,4 10,3 10,3 6))
|
||||
114 POLYGON((10 0,16 0,16 48,10 48,10 0))
|
||||
115 POLYGON((10 0,10 0,10 48,10 48,10 0))
|
||||
116 POLYGON((1 2,21 2,21 8,1 8,1 2))
|
||||
117 POLYGON((28 0,84 0,84 42,28 42,28 0))
|
||||
118 POLYGON((28 0,84 0,84 42,28 42,28 0))
|
||||
119 POLYGON((0 0,3 0,3 3,0 3,0 0))
|
||||
120 POLYGON((0 0,10 0,10 10,0 10,0 0))
|
||||
121 POLYGON((3 6,44 6,44 9,3 9,3 6))
|
||||
explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00
|
||||
Warnings:
|
||||
Note 1003 select dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,astext(envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry`
|
||||
SELECT fid, X(g) FROM gis_point ORDER by fid;
|
||||
fid X(g)
|
||||
101 10
|
||||
102 20
|
||||
103 20
|
||||
104 10
|
||||
SELECT fid, Y(g) FROM gis_point ORDER by fid;
|
||||
fid Y(g)
|
||||
101 10
|
||||
102 10
|
||||
103 20
|
||||
104 20
|
||||
explain extended select X(g),Y(g) FROM gis_point;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00
|
||||
Warnings:
|
||||
Note 1003 select x(`test`.`gis_point`.`g`) AS `X(g)`,y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point`
|
||||
SELECT fid, AsText(StartPoint(g)) FROM gis_line ORDER by fid;
|
||||
fid AsText(StartPoint(g))
|
||||
105 POINT(0 0)
|
||||
106 POINT(10 10)
|
||||
107 POINT(10 10)
|
||||
SELECT fid, AsText(EndPoint(g)) FROM gis_line ORDER by fid;
|
||||
fid AsText(EndPoint(g))
|
||||
105 POINT(10 0)
|
||||
106 POINT(10 10)
|
||||
107 POINT(40 10)
|
||||
SELECT fid, GLength(g) FROM gis_line ORDER by fid;
|
||||
fid GLength(g)
|
||||
105 24.142135623731
|
||||
106 40
|
||||
107 30
|
||||
SELECT fid, NumPoints(g) FROM gis_line ORDER by fid;
|
||||
fid NumPoints(g)
|
||||
105 3
|
||||
106 5
|
||||
107 2
|
||||
SELECT fid, AsText(PointN(g, 2)) FROM gis_line ORDER by fid;
|
||||
fid AsText(PointN(g, 2))
|
||||
105 POINT(0 10)
|
||||
106 POINT(20 10)
|
||||
107 POINT(40 10)
|
||||
SELECT fid, IsClosed(g) FROM gis_line ORDER by fid;
|
||||
fid IsClosed(g)
|
||||
105 0
|
||||
106 1
|
||||
107 0
|
||||
explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,astext(endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,glength(`test`.`gis_line`.`g`) AS `GLength(g)`,numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,astext(pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line`
|
||||
SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid;
|
||||
fid AsText(Centroid(g))
|
||||
108 POINT(15 15)
|
||||
109 POINT(25.4166666666667 25.4166666666667)
|
||||
110 POINT(20 10)
|
||||
SELECT fid, Area(g) FROM gis_polygon ORDER by fid;
|
||||
fid Area(g)
|
||||
108 100
|
||||
109 2400
|
||||
110 450
|
||||
SELECT fid, AsText(ExteriorRing(g)) FROM gis_polygon ORDER by fid;
|
||||
fid AsText(ExteriorRing(g))
|
||||
108 LINESTRING(10 10,20 10,20 20,10 20,10 10)
|
||||
109 LINESTRING(0 0,50 0,50 50,0 50,0 0)
|
||||
110 LINESTRING(0 0,30 0,30 30,0 0)
|
||||
SELECT fid, NumInteriorRings(g) FROM gis_polygon ORDER by fid;
|
||||
fid NumInteriorRings(g)
|
||||
108 0
|
||||
109 1
|
||||
110 0
|
||||
SELECT fid, AsText(InteriorRingN(g, 1)) FROM gis_polygon ORDER by fid;
|
||||
fid AsText(InteriorRingN(g, 1))
|
||||
108 NULL
|
||||
109 LINESTRING(10 10,20 10,20 20,10 20,10 10)
|
||||
110 NULL
|
||||
explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select astext(centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,area(`test`.`gis_polygon`.`g`) AS `Area(g)`,astext(exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,astext(interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon`
|
||||
SELECT fid, IsClosed(g) FROM gis_multi_line ORDER by fid;
|
||||
fid IsClosed(g)
|
||||
114 0
|
||||
115 0
|
||||
116 0
|
||||
SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid;
|
||||
fid AsText(Centroid(g))
|
||||
117 POINT(55.5885277530424 17.426536064114)
|
||||
118 POINT(55.5885277530424 17.426536064114)
|
||||
119 POINT(2 2)
|
||||
SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid;
|
||||
fid Area(g)
|
||||
117 1684.5
|
||||
118 1684.5
|
||||
119 4.5
|
||||
SELECT fid, NumGeometries(g) from gis_multi_point ORDER by fid;
|
||||
fid NumGeometries(g)
|
||||
111 4
|
||||
112 4
|
||||
113 2
|
||||
SELECT fid, NumGeometries(g) from gis_multi_line ORDER by fid;
|
||||
fid NumGeometries(g)
|
||||
114 2
|
||||
115 1
|
||||
116 2
|
||||
SELECT fid, NumGeometries(g) from gis_multi_polygon ORDER by fid;
|
||||
fid NumGeometries(g)
|
||||
117 2
|
||||
118 2
|
||||
119 1
|
||||
SELECT fid, NumGeometries(g) from gis_geometrycollection ORDER by fid;
|
||||
fid NumGeometries(g)
|
||||
120 2
|
||||
121 2
|
||||
explain extended SELECT fid, NumGeometries(g) from gis_multi_point;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point`
|
||||
SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point ORDER by fid;
|
||||
fid AsText(GeometryN(g, 2))
|
||||
111 POINT(10 10)
|
||||
112 POINT(11 11)
|
||||
113 POINT(4 10)
|
||||
SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_line ORDER by fid;
|
||||
fid AsText(GeometryN(g, 2))
|
||||
114 LINESTRING(16 0,16 23,16 48)
|
||||
115 NULL
|
||||
116 LINESTRING(2 5,5 8,21 7)
|
||||
SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_polygon ORDER by fid;
|
||||
fid AsText(GeometryN(g, 2))
|
||||
117 POLYGON((59 18,67 18,67 13,59 13,59 18))
|
||||
118 POLYGON((59 18,67 18,67 13,59 13,59 18))
|
||||
119 NULL
|
||||
SELECT fid, AsText(GeometryN(g, 2)) from gis_geometrycollection ORDER by fid;
|
||||
fid AsText(GeometryN(g, 2))
|
||||
120 LINESTRING(0 0,10 10)
|
||||
121 LINESTRING(3 6,7 9)
|
||||
SELECT fid, AsText(GeometryN(g, 1)) from gis_geometrycollection ORDER by fid;
|
||||
fid AsText(GeometryN(g, 1))
|
||||
120 POINT(0 0)
|
||||
121 POINT(44 6)
|
||||
explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,astext(geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point`
|
||||
SELECT g1.fid as first, g2.fid as second,
|
||||
Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
|
||||
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
|
||||
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
|
||||
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
|
||||
first second w c o e d t i r
|
||||
120 120 1 1 0 1 0 0 1 0
|
||||
120 121 0 0 1 0 0 0 1 0
|
||||
121 120 0 0 1 0 0 0 1 0
|
||||
121 121 1 1 0 1 0 0 1 0
|
||||
explain extended SELECT g1.fid as first, g2.fid as second,
|
||||
Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
|
||||
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
|
||||
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
|
||||
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort
|
||||
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
|
||||
Warnings:
|
||||
Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid`
|
||||
DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
|
||||
CREATE TABLE t1 (
|
||||
a INTEGER PRIMARY KEY AUTO_INCREMENT,
|
||||
gp point,
|
||||
ln linestring,
|
||||
pg polygon,
|
||||
mp multipoint,
|
||||
mln multilinestring,
|
||||
mpg multipolygon,
|
||||
gc geometrycollection,
|
||||
gm geometry
|
||||
);
|
||||
SHOW FIELDS FROM t1;
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) NO PRI NULL auto_increment
|
||||
gp point YES NULL
|
||||
ln linestring YES NULL
|
||||
pg polygon YES NULL
|
||||
mp multipoint YES NULL
|
||||
mln multilinestring YES NULL
|
||||
mpg multipolygon YES NULL
|
||||
gc geometrycollection YES NULL
|
||||
gm geometry YES NULL
|
||||
ALTER TABLE t1 ADD fid INT;
|
||||
SHOW FIELDS FROM t1;
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) NO PRI NULL auto_increment
|
||||
gp point YES NULL
|
||||
ln linestring YES NULL
|
||||
pg polygon YES NULL
|
||||
mp multipoint YES NULL
|
||||
mln multilinestring YES NULL
|
||||
mpg multipolygon YES NULL
|
||||
gc geometrycollection YES NULL
|
||||
gm geometry YES NULL
|
||||
fid int(11) YES NULL
|
||||
DROP TABLE t1;
|
||||
create table t1 (pk integer primary key auto_increment, a geometry not null);
|
||||
insert into t1 (a) values (GeomFromText('Point(1 2)'));
|
||||
insert into t1 (a) values ('Garbage');
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
insert IGNORE into t1 (a) values ('Garbage');
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
drop table t1;
|
||||
create table t1 (pk integer primary key auto_increment, fl geometry not null);
|
||||
insert into t1 (fl) values (1);
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
insert into t1 (fl) values (1.11);
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
insert into t1 (fl) values ("qwerty");
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
insert into t1 (fl) values (pointfromtext('point(1,1)'));
|
||||
ERROR 23000: Column 'fl' cannot be null
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY);
|
||||
INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
|
||||
INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
|
||||
INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
|
||||
INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))'));
|
||||
INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))'));
|
||||
INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))'));
|
||||
INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))'));
|
||||
INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))'));
|
||||
INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))'));
|
||||
INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))'));
|
||||
INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))'));
|
||||
INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))'));
|
||||
INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))'));
|
||||
INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))'));
|
||||
INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))'));
|
||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||
mbrcontains
|
||||
center,small
|
||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||
mbrdisjoint
|
||||
down3,left3,right3,up3
|
||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||
mbrequal
|
||||
center
|
||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||
mbrintersect
|
||||
big,center,down,down2,left,left2,right,right2,small,up,up2
|
||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||
mbroverlaps
|
||||
down,left,right,up
|
||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||
mbrtouches
|
||||
down2,left2,right2,up2
|
||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||
mbrwithin
|
||||
big,center
|
||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||
contains
|
||||
center,small
|
||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||
disjoint
|
||||
down3,left3,right3,up3
|
||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||
equals
|
||||
center
|
||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||
intersect
|
||||
big,center,down,down2,left,left2,right,right2,small,up,up2
|
||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||
overlaps
|
||||
down,left,right,up
|
||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||
touches
|
||||
down2,left2,right2,up2
|
||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||
within
|
||||
big,center
|
||||
SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))');
|
||||
SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))');
|
||||
SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))');
|
||||
SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))');
|
||||
SET @point1 = GeomFromText('POLYGON ((0 0))');
|
||||
SET @point2 = GeomFromText('POLYGON ((-2 0))');
|
||||
SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name;
|
||||
overlaps
|
||||
SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name;
|
||||
overlaps
|
||||
SELECT Overlaps(@horiz1, @vert1) FROM DUAL;
|
||||
Overlaps(@horiz1, @vert1)
|
||||
0
|
||||
SELECT Overlaps(@horiz1, @horiz2) FROM DUAL;
|
||||
Overlaps(@horiz1, @horiz2)
|
||||
1
|
||||
SELECT Overlaps(@horiz1, @horiz3) FROM DUAL;
|
||||
Overlaps(@horiz1, @horiz3)
|
||||
0
|
||||
SELECT Overlaps(@horiz1, @point1) FROM DUAL;
|
||||
Overlaps(@horiz1, @point1)
|
||||
0
|
||||
SELECT Overlaps(@horiz1, @point2) FROM DUAL;
|
||||
Overlaps(@horiz1, @point2)
|
||||
0
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
CREATE TABLE t1 (p POINT);
|
||||
CREATE TABLE t2 (p POINT, INDEX(p));
|
||||
INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
|
||||
INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
|
||||
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
COUNT(*)
|
||||
1
|
||||
EXPLAIN
|
||||
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref p p 28 const 1 Using where
|
||||
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
COUNT(*)
|
||||
1
|
||||
INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
|
||||
INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
|
||||
EXPLAIN
|
||||
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
|
||||
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
COUNT(*)
|
||||
2
|
||||
EXPLAIN
|
||||
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref p p 28 const 1 Using where
|
||||
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
COUNT(*)
|
||||
2
|
||||
EXPLAIN
|
||||
SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
COUNT(*)
|
||||
2
|
||||
DROP TABLE t1, t2;
|
||||
End of 5.0 tests
|
||||
create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
|
||||
ERROR HY000: The used table type doesn't support SPATIAL indexes
|
@ -0,0 +1,375 @@
|
||||
#
|
||||
# Bug #40113: Embedded SELECT inside UPDATE or DELETE can timeout
|
||||
# without error
|
||||
#
|
||||
CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 (a,b) VALUES (1070109,99);
|
||||
CREATE TABLE t2 (b int, a int, PRIMARY KEY (b)) ENGINE=InnoDB;
|
||||
INSERT INTO t2 (b,a) VALUES (7,1070109);
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
1070109 99
|
||||
BEGIN;
|
||||
SELECT b FROM t2 WHERE b=7 FOR UPDATE;
|
||||
b
|
||||
7
|
||||
BEGIN;
|
||||
SELECT b FROM t2 WHERE b=7 FOR UPDATE;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
INSERT INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7));
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
UPDATE t1 SET a='7000000' WHERE a=(SELECT a FROM t2 WHERE b=7);
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
DELETE FROM t1 WHERE a=(SELECT a FROM t2 WHERE b=7);
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
1070109 99
|
||||
DROP TABLE t2, t1;
|
||||
# End of 5.0 tests
|
||||
#
|
||||
# Bug#46539 Various crashes on INSERT IGNORE SELECT + SELECT
|
||||
# FOR UPDATE
|
||||
#
|
||||
drop table if exists t1;
|
||||
create table t1 (a int primary key auto_increment,
|
||||
b int, index(b)) engine=innodb;
|
||||
insert into t1 (b) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
set autocommit=0;
|
||||
begin;
|
||||
select * from t1 where b=5 for update;
|
||||
a b
|
||||
5 5
|
||||
insert ignore into t1 (b) select a as b from t1;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
# Cleanup
|
||||
#
|
||||
commit;
|
||||
set autocommit=default;
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #37183 insert ignore into .. select ... hangs
|
||||
# after deadlock was encountered
|
||||
#
|
||||
create table t1(id int primary key,v int)engine=innodb;
|
||||
insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7);
|
||||
create table t2 like t1;
|
||||
begin;
|
||||
update t1 set v=id*2 where id=1;
|
||||
begin;
|
||||
update t1 set v=id*2 where id=2;
|
||||
update t1 set v=id*2 where id=2;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
insert ignore into t2 select * from t1 where id=1;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
rollback;
|
||||
rollback;
|
||||
drop table t1, t2;
|
||||
#
|
||||
# Bug#41756 Strange error messages about locks from InnoDB
|
||||
#
|
||||
drop table if exists t1;
|
||||
# In the default transaction isolation mode, and/or with
|
||||
# innodb_locks_unsafe_for_binlog=OFF, handler::unlock_row()
|
||||
# in InnoDB does nothing.
|
||||
# Thus in order to reproduce the condition that led to the
|
||||
# warning, one needs to relax isolation by either
|
||||
# setting a weaker tx_isolation value, or by turning on
|
||||
# the unsafe replication switch.
|
||||
# For testing purposes, choose to tweak the isolation level,
|
||||
# since it's settable at runtime, unlike
|
||||
# innodb_locks_unsafe_for_binlog, which is
|
||||
# only a command-line switch.
|
||||
#
|
||||
set @@session.tx_isolation="read-committed";
|
||||
# Prepare data. We need a table with a unique index,
|
||||
# for join_read_key to be used. The other column
|
||||
# allows to control what passes WHERE clause filter.
|
||||
create table t1 (a int primary key, b int) engine=innodb;
|
||||
# Let's make sure t1 has sufficient amount of rows
|
||||
# to exclude JT_ALL access method when reading it,
|
||||
# i.e. make sure that JT_EQ_REF(a) is always preferred.
|
||||
insert into t1 values (1,1), (2,null), (3,1), (4,1),
|
||||
(5,1), (6,1), (7,1), (8,1), (9,1), (10,1),
|
||||
(11,1), (12,1), (13,1), (14,1), (15,1),
|
||||
(16,1), (17,1), (18,1), (19,1), (20,1);
|
||||
#
|
||||
# Demonstrate that for the SELECT statement
|
||||
# used later in the test JT_EQ_REF access method is used.
|
||||
#
|
||||
explain
|
||||
select 1 from t1 natural join (select 2 as a, 1 as b union all
|
||||
select 2 as a, 2 as b) as t2 for update;
|
||||
id 1
|
||||
select_type PRIMARY
|
||||
table <derived2>
|
||||
type ALL
|
||||
possible_keys NULL
|
||||
key NULL
|
||||
key_len NULL
|
||||
ref NULL
|
||||
rows 2
|
||||
Extra
|
||||
id 1
|
||||
select_type PRIMARY
|
||||
table t1
|
||||
type eq_ref
|
||||
possible_keys PRIMARY
|
||||
key PRIMARY
|
||||
key_len 4
|
||||
ref t2.a
|
||||
rows 1
|
||||
Extra Using where
|
||||
id 2
|
||||
select_type DERIVED
|
||||
table NULL
|
||||
type NULL
|
||||
possible_keys NULL
|
||||
key NULL
|
||||
key_len NULL
|
||||
ref NULL
|
||||
rows NULL
|
||||
Extra No tables used
|
||||
id 3
|
||||
select_type UNION
|
||||
table NULL
|
||||
type NULL
|
||||
possible_keys NULL
|
||||
key NULL
|
||||
key_len NULL
|
||||
ref NULL
|
||||
rows NULL
|
||||
Extra No tables used
|
||||
id NULL
|
||||
select_type UNION RESULT
|
||||
table <union2,3>
|
||||
type ALL
|
||||
possible_keys NULL
|
||||
key NULL
|
||||
key_len NULL
|
||||
ref NULL
|
||||
rows NULL
|
||||
Extra
|
||||
#
|
||||
# Demonstrate that the reported SELECT statement
|
||||
# no longer produces warnings.
|
||||
#
|
||||
select 1 from t1 natural join (select 2 as a, 1 as b union all
|
||||
select 2 as a, 2 as b) as t2 for update;
|
||||
1
|
||||
commit;
|
||||
#
|
||||
# Demonstrate that due to lack of inter-sweep "reset" function,
|
||||
# we keep some non-matching records locked, even though we know
|
||||
# we could unlock them.
|
||||
# To do that, show that if there is only one distinct value
|
||||
# for a in t2 (a=2), we will keep record (2,null) in t1 locked.
|
||||
# But if we add another value for "a" to t2, say 6,
|
||||
# join_read_key cache will be pruned at least once,
|
||||
# and thus record (2, null) in t1 will get unlocked.
|
||||
#
|
||||
begin;
|
||||
select 1 from t1 natural join (select 2 as a, 1 as b union all
|
||||
select 2 as a, 2 as b) as t2 for update;
|
||||
1
|
||||
#
|
||||
# Switching to connection con1
|
||||
# We should be able to delete all records from t1 except (2, null),
|
||||
# since they were not locked.
|
||||
begin;
|
||||
# Delete in series of 3 records so that full scan
|
||||
# is not used and we're not blocked on record (2,null)
|
||||
delete from t1 where a in (1,3,4);
|
||||
delete from t1 where a in (5,6,7);
|
||||
delete from t1 where a in (8,9,10);
|
||||
delete from t1 where a in (11,12,13);
|
||||
delete from t1 where a in (14,15,16);
|
||||
delete from t1 where a in (17,18);
|
||||
delete from t1 where a in (19,20);
|
||||
#
|
||||
# Record (2, null) is locked. This is actually unnecessary,
|
||||
# because the previous select returned no rows.
|
||||
# Just demonstrate the effect.
|
||||
#
|
||||
delete from t1;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
rollback;
|
||||
#
|
||||
# Switching to connection default
|
||||
#
|
||||
# Show that the original contents of t1 is intact:
|
||||
select * from t1;
|
||||
a b
|
||||
1 1
|
||||
2 NULL
|
||||
3 1
|
||||
4 1
|
||||
5 1
|
||||
6 1
|
||||
7 1
|
||||
8 1
|
||||
9 1
|
||||
10 1
|
||||
11 1
|
||||
12 1
|
||||
13 1
|
||||
14 1
|
||||
15 1
|
||||
16 1
|
||||
17 1
|
||||
18 1
|
||||
19 1
|
||||
20 1
|
||||
commit;
|
||||
#
|
||||
# Have a one more record in t2 to show that
|
||||
# if join_read_key cache is purned, the current
|
||||
# row under the cursor is unlocked (provided, this row didn't
|
||||
# match the partial WHERE clause, of course).
|
||||
# Sic: the result of this test dependent on the order of retrieval
|
||||
# of records --echo # from the derived table, if !
|
||||
# We use DELETE to disable the JOIN CACHE. This DELETE modifies no
|
||||
# records. It also should leave no InnoDB row locks.
|
||||
#
|
||||
begin;
|
||||
delete t1.* from t1 natural join (select 2 as a, 2 as b union all
|
||||
select 0 as a, 0 as b) as t2;
|
||||
# Demonstrate that nothing was deleted form t1
|
||||
select * from t1;
|
||||
a b
|
||||
1 1
|
||||
2 NULL
|
||||
3 1
|
||||
4 1
|
||||
5 1
|
||||
6 1
|
||||
7 1
|
||||
8 1
|
||||
9 1
|
||||
10 1
|
||||
11 1
|
||||
12 1
|
||||
13 1
|
||||
14 1
|
||||
15 1
|
||||
16 1
|
||||
17 1
|
||||
18 1
|
||||
19 1
|
||||
20 1
|
||||
#
|
||||
# Switching to connection con1
|
||||
begin;
|
||||
# Since there is another distinct record in the derived table
|
||||
# the previous matching record in t1 -- (2,null) -- was unlocked.
|
||||
delete from t1;
|
||||
# We will need the contents of the table again.
|
||||
rollback;
|
||||
select * from t1;
|
||||
a b
|
||||
1 1
|
||||
2 NULL
|
||||
3 1
|
||||
4 1
|
||||
5 1
|
||||
6 1
|
||||
7 1
|
||||
8 1
|
||||
9 1
|
||||
10 1
|
||||
11 1
|
||||
12 1
|
||||
13 1
|
||||
14 1
|
||||
15 1
|
||||
16 1
|
||||
17 1
|
||||
18 1
|
||||
19 1
|
||||
20 1
|
||||
commit;
|
||||
#
|
||||
# Switching to connection default
|
||||
rollback;
|
||||
begin;
|
||||
#
|
||||
# Before this patch, we could wrongly unlock a record
|
||||
# that was cached and later used in a join. Demonstrate that
|
||||
# this is no longer the case.
|
||||
# Sic: this test is also order-dependent (i.e. the
|
||||
# the bug would show up only if the first record in the union
|
||||
# is retreived and processed first.
|
||||
#
|
||||
# Verify that JT_EQ_REF is used.
|
||||
explain
|
||||
select 1 from t1 natural join (select 3 as a, 2 as b union all
|
||||
select 3 as a, 1 as b) as t2 for update;
|
||||
id 1
|
||||
select_type PRIMARY
|
||||
table <derived2>
|
||||
type ALL
|
||||
possible_keys NULL
|
||||
key NULL
|
||||
key_len NULL
|
||||
ref NULL
|
||||
rows 2
|
||||
Extra
|
||||
id 1
|
||||
select_type PRIMARY
|
||||
table t1
|
||||
type eq_ref
|
||||
possible_keys PRIMARY
|
||||
key PRIMARY
|
||||
key_len 4
|
||||
ref t2.a
|
||||
rows 1
|
||||
Extra Using where
|
||||
id 2
|
||||
select_type DERIVED
|
||||
table NULL
|
||||
type NULL
|
||||
possible_keys NULL
|
||||
key NULL
|
||||
key_len NULL
|
||||
ref NULL
|
||||
rows NULL
|
||||
Extra No tables used
|
||||
id 3
|
||||
select_type UNION
|
||||
table NULL
|
||||
type NULL
|
||||
possible_keys NULL
|
||||
key NULL
|
||||
key_len NULL
|
||||
ref NULL
|
||||
rows NULL
|
||||
Extra No tables used
|
||||
id NULL
|
||||
select_type UNION RESULT
|
||||
table <union2,3>
|
||||
type ALL
|
||||
possible_keys NULL
|
||||
key NULL
|
||||
key_len NULL
|
||||
ref NULL
|
||||
rows NULL
|
||||
Extra
|
||||
# Lock the record.
|
||||
select 1 from t1 natural join (select 3 as a, 2 as b union all
|
||||
select 3 as a, 1 as b) as t2 for update;
|
||||
1
|
||||
1
|
||||
# Switching to connection con1
|
||||
#
|
||||
# We should not be able to delete record (3,1) from t1,
|
||||
# (previously it was possible).
|
||||
#
|
||||
delete from t1 where a=3;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
# Switching to connection default
|
||||
commit;
|
||||
set @@session.tx_isolation=default;
|
||||
drop table t1;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
@ -2379,42 +2379,15 @@ SECOND(c)-@bug47453
|
||||
0
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug #53334: wrong result for outer join with impossible ON condition
|
||||
# (see the same test case for MyISAM in join.test)
|
||||
# Bug#38999 valgrind warnings for update statement in function compare_record()
|
||||
#
|
||||
CREATE TABLE t1 (id INT PRIMARY KEY);
|
||||
CREATE TABLE t2 (id INT);
|
||||
INSERT INTO t1 VALUES (75);
|
||||
INSERT INTO t1 VALUES (79);
|
||||
INSERT INTO t1 VALUES (78);
|
||||
INSERT INTO t1 VALUES (77);
|
||||
REPLACE INTO t1 VALUES (76);
|
||||
REPLACE INTO t1 VALUES (76);
|
||||
INSERT INTO t1 VALUES (104);
|
||||
INSERT INTO t1 VALUES (103);
|
||||
INSERT INTO t1 VALUES (102);
|
||||
INSERT INTO t1 VALUES (101);
|
||||
INSERT INTO t1 VALUES (105);
|
||||
INSERT INTO t1 VALUES (106);
|
||||
INSERT INTO t1 VALUES (107);
|
||||
INSERT INTO t2 VALUES (107),(75),(1000);
|
||||
SELECT t1.id,t2.id FROM t2 LEFT JOIN t1 ON t1.id>=74 AND t1.id<=0
|
||||
WHERE t2.id=75 AND t1.id IS NULL;
|
||||
id id
|
||||
NULL 75
|
||||
EXPLAIN SELECT t1.id,t2.id FROM t2 LEFT JOIN t1 ON t1.id>=74 AND t1.id<=0
|
||||
WHERE t2.id=75 AND t1.id IS NULL;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const PRIMARY NULL NULL NULL 1 Impossible ON condition
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 values (1),(2),(3),(4),(5);
|
||||
INSERT INTO t2 values (1);
|
||||
SELECT * FROM t1 WHERE a = 2;
|
||||
a
|
||||
2
|
||||
UPDATE t1,t2 SET t1.a = t1.a + 100 WHERE t1.a = 1;
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# Bug #53830: !table || (!table->read_set || bitmap_is_set(table->read_set, field_index))
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT, c INT, d INT,
|
||||
PRIMARY KEY(a,b,c), KEY(b,d))
|
||||
ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (0, 77, 1, 3);
|
||||
UPDATE t1 SET d = 0 WHERE b = 77 AND c = 25;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
21
mysql-test/suite/innodb_plugin/r/innodb_mysql_rbk.result
Normal file
21
mysql-test/suite/innodb_plugin/r/innodb_mysql_rbk.result
Normal file
@ -0,0 +1,21 @@
|
||||
CREATE TABLE t1(a INT, b INT NOT NULL, PRIMARY KEY (a)) ENGINE=innodb
|
||||
DEFAULT CHARSET=latin1;
|
||||
INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7);
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE;
|
||||
a b
|
||||
3 3
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET b=b+12 WHERE a > 2 ORDER BY a;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
ROLLBACK;
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE;
|
||||
a b
|
||||
3 3
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET b=10 WHERE a > 1 ORDER BY a;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
SELECT * FROM t1 WHERE b = 10;
|
||||
a b
|
||||
DROP TABLE t1;
|
23
mysql-test/suite/innodb_plugin/r/innodb_notembedded.result
Normal file
23
mysql-test/suite/innodb_plugin/r/innodb_notembedded.result
Normal file
@ -0,0 +1,23 @@
|
||||
drop table if exists t1;
|
||||
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
|
||||
SET GLOBAL log_bin_trust_function_creators = 1;
|
||||
create table t1 (col1 integer primary key, col2 integer) engine=innodb;
|
||||
insert t1 values (1,100);
|
||||
create function f1 () returns integer begin
|
||||
declare var1 int;
|
||||
select col2 into var1 from t1 where col1=1 for update;
|
||||
return var1;
|
||||
end|
|
||||
start transaction;
|
||||
select f1();
|
||||
f1()
|
||||
100
|
||||
update t1 set col2=0 where col1=1;
|
||||
select * from t1;
|
||||
col1 col2
|
||||
1 100
|
||||
rollback;
|
||||
rollback;
|
||||
drop table t1;
|
||||
drop function f1;
|
||||
SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
|
@ -0,0 +1,36 @@
|
||||
drop table if exists t1;
|
||||
show variables like 'innodb_rollback_on_timeout';
|
||||
Variable_name Value
|
||||
innodb_rollback_on_timeout ON
|
||||
create table t1 (a int unsigned not null primary key) engine = innodb;
|
||||
insert into t1 values (1);
|
||||
commit;
|
||||
begin work;
|
||||
insert into t1 values (2);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
begin work;
|
||||
insert into t1 values (5);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
5
|
||||
insert into t1 values (2);
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
commit;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
commit;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
@ -9,4 +9,3 @@
|
||||
# Do not use any TAB characters for whitespace.
|
||||
#
|
||||
##############################################################################
|
||||
innodb_multi_update: Bug #38999 2010-05-05 mmakela Valgrind warnings
|
||||
|
@ -0,0 +1,19 @@
|
||||
-- source include/have_innodb_plugin.inc
|
||||
# embedded server ignores 'delayed', so skip this
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Bug 34286
|
||||
#
|
||||
create table t1(a int not null auto_increment primary key) engine=innodb;
|
||||
insert into t1 set a = -1;
|
||||
# NOTE: The database needs to be shutdown and restarted (here) for
|
||||
# the test to work. It's included for reference only.
|
||||
optimize table t1;
|
||||
|
||||
--echo ==== clean up ====
|
||||
DROP TABLE t1;
|
230
mysql-test/suite/innodb_plugin/t/innodb-ucs2.test
Normal file
230
mysql-test/suite/innodb_plugin/t/innodb-ucs2.test
Normal file
@ -0,0 +1,230 @@
|
||||
-- source include/have_innodb_plugin.inc
|
||||
-- source include/have_ucs2.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1, t2;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# BUG 14056 Column prefix index on UTF-8 primary key column causes: Can't find record..
|
||||
#
|
||||
|
||||
create table t1 (
|
||||
a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set utf8 engine = innodb;
|
||||
create table t2 (
|
||||
a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set ucs2 engine = innodb;
|
||||
insert into t1 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t1 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t1 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
|
||||
insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
|
||||
insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
|
||||
insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
|
||||
insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
|
||||
insert into t2 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t2 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t2 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
|
||||
insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
|
||||
insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
|
||||
insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
|
||||
insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
|
||||
insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
|
||||
insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
|
||||
insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
|
||||
insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
|
||||
update t1 set filler = 'boo' where a = 1;
|
||||
update t2 set filler ='email' where a = 4;
|
||||
select a,hex(b),hex(c),filler from t1 order by filler;
|
||||
select a,hex(b),hex(c),filler from t2 order by filler;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
|
||||
create table t1 (
|
||||
a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set utf8 engine = innodb;
|
||||
create table t2 (
|
||||
a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set ucs2 engine = innodb;
|
||||
insert into t1 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t1 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t1 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
|
||||
insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
|
||||
insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
|
||||
insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
|
||||
insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
|
||||
insert into t2 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t2 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t2 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
|
||||
insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
|
||||
insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
|
||||
insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
|
||||
insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
|
||||
insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
|
||||
insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
|
||||
insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
|
||||
insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
|
||||
update t1 set filler = 'boo' where a = 1;
|
||||
update t2 set filler ='email' where a = 4;
|
||||
select a,hex(b),hex(c),filler from t1 order by filler;
|
||||
select a,hex(b),hex(c),filler from t2 order by filler;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
|
||||
create table t1 (
|
||||
a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set utf8 engine = innodb;
|
||||
create table t2 (
|
||||
a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set ucs2 engine = innodb;
|
||||
insert into t1 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t1 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t1 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
|
||||
insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
|
||||
insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
|
||||
insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
|
||||
insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
|
||||
insert into t2 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t2 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t2 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
|
||||
insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
|
||||
insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
|
||||
insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
|
||||
insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
|
||||
insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
|
||||
insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
|
||||
insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
|
||||
insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
|
||||
update t1 set filler = 'boo' where a = 1;
|
||||
update t2 set filler ='email' where a = 4;
|
||||
select a,hex(b),hex(c),filler from t1 order by filler;
|
||||
select a,hex(b),hex(c),filler from t2 order by filler;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
|
||||
create table t1 (
|
||||
a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set utf8 engine = innodb;
|
||||
create table t2 (
|
||||
a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
|
||||
) character set ucs2 engine = innodb;
|
||||
insert into t1 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t1 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t1 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
|
||||
insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
|
||||
insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
|
||||
insert into t2 values (1,'abcdefg','abcdefg','one');
|
||||
insert into t2 values (2,'ijkilmn','ijkilmn','two');
|
||||
insert into t2 values (3,'qrstuvw','qrstuvw','three');
|
||||
insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
|
||||
insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
|
||||
insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
|
||||
insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
|
||||
insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
|
||||
insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
|
||||
insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
|
||||
update t1 set filler = 'boo' where a = 1;
|
||||
update t2 set filler ='email' where a = 4;
|
||||
select a,hex(b),hex(c),filler from t1 order by filler;
|
||||
select a,hex(b),hex(c),filler from t2 order by filler;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
commit;
|
||||
|
||||
#
|
||||
# Test cases for bug #15308 Problem of Order with Enum Column in Primary Key
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
ind enum('0','1','2') NOT NULL default '0',
|
||||
string1 varchar(250) NOT NULL,
|
||||
PRIMARY KEY (ind)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE t2 (
|
||||
ind enum('0','1','2') NOT NULL default '0',
|
||||
string1 varchar(250) NOT NULL,
|
||||
PRIMARY KEY (ind)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
|
||||
|
||||
INSERT INTO t1 VALUES ('1', ''),('2', '');
|
||||
INSERT INTO t2 VALUES ('1', ''),('2', '');
|
||||
SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
|
||||
SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
|
||||
drop table t1,t2;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
ind set('0','1','2') NOT NULL default '0',
|
||||
string1 varchar(250) NOT NULL,
|
||||
PRIMARY KEY (ind)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE t2 (
|
||||
ind set('0','1','2') NOT NULL default '0',
|
||||
string1 varchar(250) NOT NULL,
|
||||
PRIMARY KEY (ind)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
|
||||
|
||||
INSERT INTO t1 VALUES ('1', ''),('2', '');
|
||||
INSERT INTO t2 VALUES ('1', ''),('2', '');
|
||||
SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
|
||||
SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
|
||||
drop table t1,t2;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
ind bit not null,
|
||||
string1 varchar(250) NOT NULL,
|
||||
PRIMARY KEY (ind)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE t2 (
|
||||
ind bit not null,
|
||||
string1 varchar(250) NOT NULL,
|
||||
PRIMARY KEY (ind)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
|
||||
insert into t1 values(0,''),(1,'');
|
||||
insert into t2 values(0,''),(1,'');
|
||||
select hex(ind),hex(string1) from t1 order by string1;
|
||||
select hex(ind),hex(string1) from t2 order by string1;
|
||||
drop table t1,t2;
|
||||
|
||||
# tests for bug #14056 Column prefix index on UTF-8 primary key column causes 'Can't find record..'
|
||||
|
||||
create table t2 (
|
||||
a int, b char(10), filler char(10), primary key(a, b(2))
|
||||
) character set utf8 engine = innodb;
|
||||
|
||||
insert into t2 values (1,'abcdefg','one');
|
||||
insert into t2 values (2,'ijkilmn','two');
|
||||
insert into t2 values (3, 'qrstuvw','three');
|
||||
update t2 set a=5, filler='booo' where a=1;
|
||||
drop table t2;
|
||||
create table t2 (
|
||||
a int, b char(10), filler char(10), primary key(a, b(2))
|
||||
) character set ucs2 engine = innodb;
|
||||
|
||||
insert into t2 values (1,'abcdefg','one');
|
||||
insert into t2 values (2,'ijkilmn','two');
|
||||
insert into t2 values (3, 'qrstuvw','three');
|
||||
update t2 set a=5, filler='booo' where a=1;
|
||||
drop table t2;
|
||||
|
||||
create table t1(a int not null, b char(110),primary key(a,b(100))) engine=innodb default charset=utf8;
|
||||
insert into t1 values(1,'abcdefg'),(2,'defghijk');
|
||||
insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
|
||||
insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
|
||||
select a,hex(b) from t1 order by b;
|
||||
update t1 set b = 'three' where a = 6;
|
||||
drop table t1;
|
||||
create table t1(a int not null, b text(110),primary key(a,b(100))) engine=innodb default charset=utf8;
|
||||
insert into t1 values(1,'abcdefg'),(2,'defghijk');
|
||||
insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
|
||||
insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
|
||||
select a,hex(b) from t1 order by b;
|
||||
update t1 set b = 'three' where a = 6;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.0 tests
|
@ -0,0 +1 @@
|
||||
--innodb-autoinc-lock-mode=0
|
@ -0,0 +1,44 @@
|
||||
# This test runs with old-style locking, as:
|
||||
# --innodb-autoinc-lock-mode=0
|
||||
|
||||
-- source include/have_innodb_plugin.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
|
||||
#
|
||||
# Search on unique key
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (
|
||||
id int(11) NOT NULL auto_increment,
|
||||
ggid varchar(32) binary DEFAULT '' NOT NULL,
|
||||
email varchar(64) DEFAULT '' NOT NULL,
|
||||
passwd varchar(32) binary DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE ggid (ggid)
|
||||
) ENGINE=innodb;
|
||||
|
||||
insert into t1 (ggid,passwd) values ('test1','xxx');
|
||||
insert into t1 (ggid,passwd) values ('test2','yyy');
|
||||
-- error ER_DUP_ENTRY
|
||||
insert into t1 (ggid,passwd) values ('test2','this will fail');
|
||||
-- error ER_DUP_ENTRY
|
||||
insert into t1 (ggid,id) values ('this will fail',1);
|
||||
|
||||
select * from t1 where ggid='test1';
|
||||
select * from t1 where passwd='xxx';
|
||||
select * from t1 where id=2;
|
||||
|
||||
replace into t1 (ggid,id) values ('this will work',1);
|
||||
replace into t1 (ggid,passwd) values ('test2','this will work');
|
||||
-- error ER_DUP_ENTRY
|
||||
update t1 set id=100,ggid='test2' where id=1;
|
||||
select * from t1;
|
||||
select * from t1 where id=1;
|
||||
select * from t1 where id=999;
|
||||
drop table t1;
|
||||
|
||||
--echo End of tests
|
@ -0,0 +1 @@
|
||||
--innodb --innodb_autoinc_lock_mode=0
|
68
mysql-test/suite/innodb_plugin/t/innodb_bug30919.test
Normal file
68
mysql-test/suite/innodb_plugin/t/innodb_bug30919.test
Normal file
@ -0,0 +1,68 @@
|
||||
--source include/have_innodb_plugin.inc
|
||||
--source include/have_partition.inc
|
||||
--vertical_results
|
||||
let $engine_type= 'innodb';
|
||||
|
||||
######## Creat Table Section #########
|
||||
use test;
|
||||
|
||||
eval CREATE TABLE test.part_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||
fkid MEDIUMINT, filler VARCHAR(255),
|
||||
PRIMARY KEY(id)) ENGINE=$engine_type
|
||||
PARTITION BY RANGE(id)
|
||||
SUBPARTITION BY hash(id) subpartitions 2
|
||||
(PARTITION pa3 values less than (42),
|
||||
PARTITION pa6 values less than (60),
|
||||
PARTITION pa7 values less than (70),
|
||||
PARTITION pa8 values less than (80),
|
||||
PARTITION pa9 values less than (90),
|
||||
PARTITION pa10 values less than (100),
|
||||
PARTITION pa11 values less than MAXVALUE);
|
||||
|
||||
######## Create SPs, Functions, Views and Triggers Section ##############
|
||||
|
||||
delimiter |;
|
||||
|
||||
CREATE PROCEDURE test.proc_part()
|
||||
BEGIN
|
||||
DECLARE ins_count INT DEFAULT 1000;
|
||||
DECLARE del_count INT;
|
||||
DECLARE cur_user VARCHAR(255);
|
||||
DECLARE local_uuid VARCHAR(255);
|
||||
DECLARE local_time TIMESTAMP;
|
||||
|
||||
SET local_time= NOW();
|
||||
SET cur_user= CURRENT_USER();
|
||||
SET local_uuid= UUID();
|
||||
|
||||
WHILE ins_count > 0 DO
|
||||
INSERT INTO test.part_tbl VALUES (NULL, NOW(), USER() , UUID(),
|
||||
ins_count,'Going to test MBR for MySQL');
|
||||
SET ins_count = ins_count - 1;
|
||||
END WHILE;
|
||||
SELECT MAX(id) FROM test.part_tbl INTO del_count;
|
||||
WHILE del_count > 0 DO
|
||||
DELETE FROM test.part_tbl WHERE id = del_count;
|
||||
select count(*) as internal_count, del_count -- these two lines are for
|
||||
FROM test.part_tbl; -- debug to show the problem
|
||||
SET del_count = del_count - 2;
|
||||
END WHILE;
|
||||
END|
|
||||
|
||||
delimiter ;|
|
||||
|
||||
############ Finish Setup Section ###################
|
||||
|
||||
############ Test Section ###################
|
||||
--horizontal_results
|
||||
|
||||
CALL test.proc_part();
|
||||
|
||||
select count(*) as Part from test.part_tbl;
|
||||
|
||||
###### CLEAN UP SECTION ##############
|
||||
|
||||
DROP PROCEDURE test.proc_part;
|
||||
DROP TABLE test.part_tbl;
|
||||
|
78
mysql-test/suite/innodb_plugin/t/innodb_bug42419.test
Normal file
78
mysql-test/suite/innodb_plugin/t/innodb_bug42419.test
Normal file
@ -0,0 +1,78 @@
|
||||
#
|
||||
# Testcase for InnoDB
|
||||
# Bug#42419 Server crash with "Pure virtual method called" on two concurrent connections
|
||||
#
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_innodb_plugin.inc
|
||||
|
||||
let $innodb_lock_wait_timeout= query_get_value(SHOW VARIABLES LIKE 'innodb_lock_wait_timeout%', Value, 1);
|
||||
if (`SELECT $innodb_lock_wait_timeout < 10`)
|
||||
{
|
||||
--echo # innodb_lock_wait_timeout must be >= 10 seconds
|
||||
--echo # so that this test can work all time fine on an overloaded testing box
|
||||
SHOW VARIABLES LIKE 'innodb_lock_wait_timeout';
|
||||
exit;
|
||||
}
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
# First session
|
||||
connection default;
|
||||
|
||||
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b INT) ENGINE = InnoDB;
|
||||
|
||||
INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT = 0;
|
||||
|
||||
CREATE TEMPORARY TABLE t1_tmp ( b INT );
|
||||
|
||||
INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 3;
|
||||
INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 2;
|
||||
|
||||
# Second session
|
||||
connect (user2,localhost,root,,,$MASTER_MYPORT,$MASTER_MYSOCK);
|
||||
|
||||
SET AUTOCOMMIT = 0;
|
||||
|
||||
CREATE TEMPORARY TABLE t2_tmp ( a int, new_a int );
|
||||
INSERT INTO t2_tmp VALUES (1,51),(2,52),(3,53);
|
||||
|
||||
UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 1;
|
||||
send
|
||||
UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 2;
|
||||
|
||||
# The last update will wait for a lock held by the first session
|
||||
|
||||
# First session
|
||||
connection default;
|
||||
|
||||
# Poll till the UPDATE of the second session waits for lock
|
||||
let $show_statement= SHOW PROCESSLIST;
|
||||
let $field= State;
|
||||
let $condition= = 'Updating';
|
||||
--source include/wait_show_condition.inc
|
||||
|
||||
# If the testing box is overloadeded and innodb_lock_wait_timeout is too small
|
||||
# we might get here ER_LOCK_WAIT_TIMEOUT.
|
||||
--error ER_LOCK_DEADLOCK
|
||||
INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 1;
|
||||
|
||||
# Second session
|
||||
connection user2;
|
||||
--echo Reap the server message for connection user2 UPDATE t1 ...
|
||||
reap;
|
||||
|
||||
# The server crashed when executing this UPDATE or the succeeding SQL command.
|
||||
UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 3;
|
||||
|
||||
connection default;
|
||||
disconnect user2;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
@ -2,7 +2,7 @@
|
||||
# table after fast alter table added unique key". The fix is to make
|
||||
# sure index number lookup should go through "index translation table".
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_innodb_plugin.inc
|
||||
|
||||
# Use FIC for index creation
|
||||
set old_alter_table=0;
|
||||
|
@ -0,0 +1 @@
|
||||
--log-bin --innodb-locks-unsafe-for-binlog --binlog-format=mixed
|
8
mysql-test/suite/innodb_plugin/t/innodb_bug53674.test
Normal file
8
mysql-test/suite/innodb_plugin/t/innodb_bug53674.test
Normal file
@ -0,0 +1,8 @@
|
||||
-- source include/have_innodb_plugin.inc
|
||||
|
||||
create table bug53674(a int)engine=innodb;
|
||||
insert into bug53674 values (1),(2);
|
||||
start transaction;
|
||||
select * from bug53674 for update;
|
||||
select * from bug53674 where a=(select a from bug53674 where a > 1);
|
||||
drop table bug53674;
|
11
mysql-test/suite/innodb_plugin/t/innodb_bug54044.test
Normal file
11
mysql-test/suite/innodb_plugin/t/innodb_bug54044.test
Normal file
@ -0,0 +1,11 @@
|
||||
# This is the test for bug #54044. Special handle MYSQL_TYPE_NULL type
|
||||
# during create table, so it will not trigger assertion failure.
|
||||
|
||||
--source include/have_innodb_plugin.inc
|
||||
|
||||
# This 'create table' operation should fail because of
|
||||
# using NULL datatype
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TEMPORARY TABLE table_54044 ENGINE = INNODB
|
||||
AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
|
||||
|
97
mysql-test/suite/innodb_plugin/t/innodb_bug54679.test
Normal file
97
mysql-test/suite/innodb_plugin/t/innodb_bug54679.test
Normal file
@ -0,0 +1,97 @@
|
||||
# Test Bug #54679 alter table causes compressed row_format to revert to compact
|
||||
|
||||
--source include/have_innodb_plugin.inc
|
||||
|
||||
let $file_format=`select @@innodb_file_format`;
|
||||
let $file_format_check=`select @@innodb_file_format_check`;
|
||||
let $file_per_table=`select @@innodb_file_per_table`;
|
||||
SET GLOBAL innodb_file_format='Barracuda';
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
SET innodb_strict_mode=ON;
|
||||
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
# The ROW_FORMAT of the table should be preserved when it is not specified
|
||||
# in ALTER TABLE.
|
||||
ALTER TABLE bug54679 ADD COLUMN b INT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
DROP TABLE bug54679;
|
||||
|
||||
# Check that the ROW_FORMAT conversion to/from COMPRESSED works.
|
||||
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
# KEY_BLOCK_SIZE implies COMPRESSED.
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=1;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 ROW_FORMAT=REDUNDANT;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=2;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
# This prevents other than REDUNDANT or COMPACT ROW_FORMAT for new tables.
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE bug54679;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
# This will prevent ROW_FORMAT=COMPRESSED, because the system tablespace
|
||||
# cannot be compressed.
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE bug54679;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
DROP TABLE bug54679;
|
||||
|
||||
EVAL SET GLOBAL innodb_file_format=$file_format;
|
||||
EVAL SET GLOBAL innodb_file_format_check=$file_format_check;
|
||||
EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
|
10
mysql-test/suite/innodb_plugin/t/innodb_gis.test
Normal file
10
mysql-test/suite/innodb_plugin/t/innodb_gis.test
Normal file
@ -0,0 +1,10 @@
|
||||
--source include/have_innodb_plugin.inc
|
||||
SET storage_engine=innodb;
|
||||
--source include/gis_generic.inc
|
||||
--source include/gis_keys.inc
|
||||
|
||||
#
|
||||
# Bug #15680 (SPATIAL key in innodb)
|
||||
#
|
||||
--error ER_TABLE_CANT_HANDLE_SPKEYS
|
||||
create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
|
@ -0,0 +1 @@
|
||||
--innodb_lock_wait_timeout=1
|
264
mysql-test/suite/innodb_plugin/t/innodb_lock_wait_timeout_1.test
Normal file
264
mysql-test/suite/innodb_plugin/t/innodb_lock_wait_timeout_1.test
Normal file
@ -0,0 +1,264 @@
|
||||
--source include/have_innodb_plugin.inc
|
||||
|
||||
--echo #
|
||||
--echo # Bug #40113: Embedded SELECT inside UPDATE or DELETE can timeout
|
||||
--echo # without error
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b)) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 (a,b) VALUES (1070109,99);
|
||||
|
||||
CREATE TABLE t2 (b int, a int, PRIMARY KEY (b)) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t2 (b,a) VALUES (7,1070109);
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
BEGIN;
|
||||
|
||||
SELECT b FROM t2 WHERE b=7 FOR UPDATE;
|
||||
|
||||
CONNECT (addconroot, localhost, root,,);
|
||||
CONNECTION addconroot;
|
||||
|
||||
BEGIN;
|
||||
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
SELECT b FROM t2 WHERE b=7 FOR UPDATE;
|
||||
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
INSERT INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7));
|
||||
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
UPDATE t1 SET a='7000000' WHERE a=(SELECT a FROM t2 WHERE b=7);
|
||||
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
DELETE FROM t1 WHERE a=(SELECT a FROM t2 WHERE b=7);
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
CONNECTION default;
|
||||
DISCONNECT addconroot;
|
||||
|
||||
DROP TABLE t2, t1;
|
||||
|
||||
--echo # End of 5.0 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug#46539 Various crashes on INSERT IGNORE SELECT + SELECT
|
||||
--echo # FOR UPDATE
|
||||
--echo #
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
create table t1 (a int primary key auto_increment,
|
||||
b int, index(b)) engine=innodb;
|
||||
insert into t1 (b) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
set autocommit=0;
|
||||
begin;
|
||||
select * from t1 where b=5 for update;
|
||||
connect (con1, localhost, root,,);
|
||||
connection con1;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
insert ignore into t1 (b) select a as b from t1;
|
||||
connection default;
|
||||
--echo # Cleanup
|
||||
--echo #
|
||||
disconnect con1;
|
||||
commit;
|
||||
set autocommit=default;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #37183 insert ignore into .. select ... hangs
|
||||
--echo # after deadlock was encountered
|
||||
--echo #
|
||||
connect (con1,localhost,root,,);
|
||||
create table t1(id int primary key,v int)engine=innodb;
|
||||
insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7);
|
||||
create table t2 like t1;
|
||||
|
||||
--connection con1
|
||||
begin;
|
||||
update t1 set v=id*2 where id=1;
|
||||
|
||||
--connection default
|
||||
begin;
|
||||
update t1 set v=id*2 where id=2;
|
||||
|
||||
--connection con1
|
||||
--error 1205
|
||||
update t1 set v=id*2 where id=2;
|
||||
|
||||
--connection default
|
||||
--error 1205
|
||||
insert ignore into t2 select * from t1 where id=1;
|
||||
rollback;
|
||||
|
||||
--connection con1
|
||||
rollback;
|
||||
|
||||
--connection default
|
||||
disconnect con1;
|
||||
drop table t1, t2;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#41756 Strange error messages about locks from InnoDB
|
||||
--echo #
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
--echo # In the default transaction isolation mode, and/or with
|
||||
--echo # innodb_locks_unsafe_for_binlog=OFF, handler::unlock_row()
|
||||
--echo # in InnoDB does nothing.
|
||||
--echo # Thus in order to reproduce the condition that led to the
|
||||
--echo # warning, one needs to relax isolation by either
|
||||
--echo # setting a weaker tx_isolation value, or by turning on
|
||||
--echo # the unsafe replication switch.
|
||||
--echo # For testing purposes, choose to tweak the isolation level,
|
||||
--echo # since it's settable at runtime, unlike
|
||||
--echo # innodb_locks_unsafe_for_binlog, which is
|
||||
--echo # only a command-line switch.
|
||||
--echo #
|
||||
set @@session.tx_isolation="read-committed";
|
||||
|
||||
--echo # Prepare data. We need a table with a unique index,
|
||||
--echo # for join_read_key to be used. The other column
|
||||
--echo # allows to control what passes WHERE clause filter.
|
||||
create table t1 (a int primary key, b int) engine=innodb;
|
||||
--echo # Let's make sure t1 has sufficient amount of rows
|
||||
--echo # to exclude JT_ALL access method when reading it,
|
||||
--echo # i.e. make sure that JT_EQ_REF(a) is always preferred.
|
||||
insert into t1 values (1,1), (2,null), (3,1), (4,1),
|
||||
(5,1), (6,1), (7,1), (8,1), (9,1), (10,1),
|
||||
(11,1), (12,1), (13,1), (14,1), (15,1),
|
||||
(16,1), (17,1), (18,1), (19,1), (20,1);
|
||||
--echo #
|
||||
--echo # Demonstrate that for the SELECT statement
|
||||
--echo # used later in the test JT_EQ_REF access method is used.
|
||||
--echo #
|
||||
--vertical_results
|
||||
explain
|
||||
select 1 from t1 natural join (select 2 as a, 1 as b union all
|
||||
select 2 as a, 2 as b) as t2 for update;
|
||||
--horizontal_results
|
||||
--echo #
|
||||
--echo # Demonstrate that the reported SELECT statement
|
||||
--echo # no longer produces warnings.
|
||||
--echo #
|
||||
select 1 from t1 natural join (select 2 as a, 1 as b union all
|
||||
select 2 as a, 2 as b) as t2 for update;
|
||||
commit;
|
||||
--echo #
|
||||
--echo # Demonstrate that due to lack of inter-sweep "reset" function,
|
||||
--echo # we keep some non-matching records locked, even though we know
|
||||
--echo # we could unlock them.
|
||||
--echo # To do that, show that if there is only one distinct value
|
||||
--echo # for a in t2 (a=2), we will keep record (2,null) in t1 locked.
|
||||
--echo # But if we add another value for "a" to t2, say 6,
|
||||
--echo # join_read_key cache will be pruned at least once,
|
||||
--echo # and thus record (2, null) in t1 will get unlocked.
|
||||
--echo #
|
||||
begin;
|
||||
select 1 from t1 natural join (select 2 as a, 1 as b union all
|
||||
select 2 as a, 2 as b) as t2 for update;
|
||||
connect (con1,localhost,root,,);
|
||||
--echo #
|
||||
--echo # Switching to connection con1
|
||||
connection con1;
|
||||
--echo # We should be able to delete all records from t1 except (2, null),
|
||||
--echo # since they were not locked.
|
||||
begin;
|
||||
--echo # Delete in series of 3 records so that full scan
|
||||
--echo # is not used and we're not blocked on record (2,null)
|
||||
delete from t1 where a in (1,3,4);
|
||||
delete from t1 where a in (5,6,7);
|
||||
delete from t1 where a in (8,9,10);
|
||||
delete from t1 where a in (11,12,13);
|
||||
delete from t1 where a in (14,15,16);
|
||||
delete from t1 where a in (17,18);
|
||||
delete from t1 where a in (19,20);
|
||||
--echo #
|
||||
--echo # Record (2, null) is locked. This is actually unnecessary,
|
||||
--echo # because the previous select returned no rows.
|
||||
--echo # Just demonstrate the effect.
|
||||
--echo #
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
delete from t1;
|
||||
rollback;
|
||||
--echo #
|
||||
--echo # Switching to connection default
|
||||
connection default;
|
||||
--echo #
|
||||
--echo # Show that the original contents of t1 is intact:
|
||||
select * from t1;
|
||||
commit;
|
||||
--echo #
|
||||
--echo # Have a one more record in t2 to show that
|
||||
--echo # if join_read_key cache is purned, the current
|
||||
--echo # row under the cursor is unlocked (provided, this row didn't
|
||||
--echo # match the partial WHERE clause, of course).
|
||||
--echo # Sic: the result of this test dependent on the order of retrieval
|
||||
--echo # of records --echo # from the derived table, if !
|
||||
--echo # We use DELETE to disable the JOIN CACHE. This DELETE modifies no
|
||||
--echo # records. It also should leave no InnoDB row locks.
|
||||
--echo #
|
||||
begin;
|
||||
delete t1.* from t1 natural join (select 2 as a, 2 as b union all
|
||||
select 0 as a, 0 as b) as t2;
|
||||
--echo # Demonstrate that nothing was deleted form t1
|
||||
select * from t1;
|
||||
--echo #
|
||||
--echo # Switching to connection con1
|
||||
connection con1;
|
||||
begin;
|
||||
--echo # Since there is another distinct record in the derived table
|
||||
--echo # the previous matching record in t1 -- (2,null) -- was unlocked.
|
||||
delete from t1;
|
||||
--echo # We will need the contents of the table again.
|
||||
rollback;
|
||||
select * from t1;
|
||||
commit;
|
||||
--echo #
|
||||
--echo # Switching to connection default
|
||||
connection default;
|
||||
rollback;
|
||||
begin;
|
||||
--echo #
|
||||
--echo # Before this patch, we could wrongly unlock a record
|
||||
--echo # that was cached and later used in a join. Demonstrate that
|
||||
--echo # this is no longer the case.
|
||||
--echo # Sic: this test is also order-dependent (i.e. the
|
||||
--echo # the bug would show up only if the first record in the union
|
||||
--echo # is retreived and processed first.
|
||||
--echo #
|
||||
--echo # Verify that JT_EQ_REF is used.
|
||||
--vertical_results
|
||||
explain
|
||||
select 1 from t1 natural join (select 3 as a, 2 as b union all
|
||||
select 3 as a, 1 as b) as t2 for update;
|
||||
--horizontal_results
|
||||
--echo # Lock the record.
|
||||
select 1 from t1 natural join (select 3 as a, 2 as b union all
|
||||
select 3 as a, 1 as b) as t2 for update;
|
||||
--echo # Switching to connection con1
|
||||
connection con1;
|
||||
--echo #
|
||||
--echo # We should not be able to delete record (3,1) from t1,
|
||||
--echo # (previously it was possible).
|
||||
--echo #
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
delete from t1 where a=3;
|
||||
--echo # Switching to connection default
|
||||
connection default;
|
||||
commit;
|
||||
|
||||
disconnect con1;
|
||||
set @@session.tx_isolation=default;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.1 tests
|
||||
--echo #
|
@ -1,4 +1,4 @@
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_innodb_plugin.inc
|
||||
|
||||
#
|
||||
# Test multi update with different join methods
|
||||
|
1
mysql-test/suite/innodb_plugin/t/innodb_mysql-master.opt
Normal file
1
mysql-test/suite/innodb_plugin/t/innodb_mysql-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--innodb-lock-wait-timeout=2
|
@ -5,7 +5,7 @@
|
||||
# main testing code t/innodb_mysql.test -> include/mix1.inc
|
||||
#
|
||||
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_innodb_plugin.inc
|
||||
let $engine_type= InnoDB;
|
||||
let $other_engine_type= MEMORY;
|
||||
# InnoDB does support FOREIGN KEYFOREIGN KEYs
|
||||
@ -500,7 +500,11 @@ INSERT INTO t2 VALUES (),();
|
||||
CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
|
||||
WHERE b =(SELECT a FROM t1 LIMIT 1);
|
||||
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
CONNECT (con1, localhost, root,,);
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
CONNECTION default;
|
||||
|
||||
DELIMITER |;
|
||||
@ -615,48 +619,17 @@ SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #53334: wrong result for outer join with impossible ON condition
|
||||
--echo # (see the same test case for MyISAM in join.test)
|
||||
--echo # Bug#38999 valgrind warnings for update statement in function compare_record()
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (id INT PRIMARY KEY);
|
||||
CREATE TABLE t2 (id INT);
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 values (1),(2),(3),(4),(5);
|
||||
INSERT INTO t2 values (1);
|
||||
|
||||
INSERT INTO t1 VALUES (75);
|
||||
INSERT INTO t1 VALUES (79);
|
||||
INSERT INTO t1 VALUES (78);
|
||||
INSERT INTO t1 VALUES (77);
|
||||
REPLACE INTO t1 VALUES (76);
|
||||
REPLACE INTO t1 VALUES (76);
|
||||
INSERT INTO t1 VALUES (104);
|
||||
INSERT INTO t1 VALUES (103);
|
||||
INSERT INTO t1 VALUES (102);
|
||||
INSERT INTO t1 VALUES (101);
|
||||
INSERT INTO t1 VALUES (105);
|
||||
INSERT INTO t1 VALUES (106);
|
||||
INSERT INTO t1 VALUES (107);
|
||||
|
||||
INSERT INTO t2 VALUES (107),(75),(1000);
|
||||
|
||||
SELECT t1.id,t2.id FROM t2 LEFT JOIN t1 ON t1.id>=74 AND t1.id<=0
|
||||
WHERE t2.id=75 AND t1.id IS NULL;
|
||||
EXPLAIN SELECT t1.id,t2.id FROM t2 LEFT JOIN t1 ON t1.id>=74 AND t1.id<=0
|
||||
WHERE t2.id=75 AND t1.id IS NULL;
|
||||
SELECT * FROM t1 WHERE a = 2;
|
||||
UPDATE t1,t2 SET t1.a = t1.a + 100 WHERE t1.a = 1;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #53830: !table || (!table->read_set || bitmap_is_set(table->read_set, field_index))
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT, b INT, c INT, d INT,
|
||||
PRIMARY KEY(a,b,c), KEY(b,d))
|
||||
ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (0, 77, 1, 3);
|
||||
|
||||
UPDATE t1 SET d = 0 WHERE b = 77 AND c = 25;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
@ -0,0 +1 @@
|
||||
--innodb_lock_wait_timeout=1 --innodb_rollback_on_timeout=1
|
35
mysql-test/suite/innodb_plugin/t/innodb_mysql_rbk.test
Normal file
35
mysql-test/suite/innodb_plugin/t/innodb_mysql_rbk.test
Normal file
@ -0,0 +1,35 @@
|
||||
-- source include/have_innodb_plugin.inc
|
||||
|
||||
#
|
||||
# Bug #41453: Assertion `m_status == DA_ERROR' failed in
|
||||
# Diagnostics_area::sql_errno
|
||||
#
|
||||
|
||||
CREATE TABLE t1(a INT, b INT NOT NULL, PRIMARY KEY (a)) ENGINE=innodb
|
||||
DEFAULT CHARSET=latin1;
|
||||
INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7);
|
||||
CONNECT (con1,localhost,root,,);
|
||||
CONNECT (con2,localhost,root,,);
|
||||
|
||||
CONNECTION con1;
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE;
|
||||
CONNECTION con2;
|
||||
START TRANSACTION;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
UPDATE t1 SET b=b+12 WHERE a > 2 ORDER BY a;
|
||||
ROLLBACK;
|
||||
|
||||
CONNECTION con1;
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE;
|
||||
CONNECTION con2;
|
||||
START TRANSACTION;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
UPDATE t1 SET b=10 WHERE a > 1 ORDER BY a;
|
||||
SELECT * FROM t1 WHERE b = 10;
|
||||
|
||||
CONNECTION default;
|
||||
DISCONNECT con1;
|
||||
DISCONNECT con2;
|
||||
DROP TABLE t1;
|
50
mysql-test/suite/innodb_plugin/t/innodb_notembedded.test
Normal file
50
mysql-test/suite/innodb_plugin/t/innodb_notembedded.test
Normal file
@ -0,0 +1,50 @@
|
||||
-- source include/not_embedded.inc
|
||||
-- source include/have_innodb_plugin.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
|
||||
|
||||
connect (a,localhost,root,,);
|
||||
connect (b,localhost,root,,);
|
||||
|
||||
|
||||
#
|
||||
# BUG#11238 - in prelocking mode SELECT .. FOR UPDATE is changed to
|
||||
# non-blocking SELECT
|
||||
#
|
||||
SET GLOBAL log_bin_trust_function_creators = 1;
|
||||
create table t1 (col1 integer primary key, col2 integer) engine=innodb;
|
||||
insert t1 values (1,100);
|
||||
delimiter |;
|
||||
create function f1 () returns integer begin
|
||||
declare var1 int;
|
||||
select col2 into var1 from t1 where col1=1 for update;
|
||||
return var1;
|
||||
end|
|
||||
delimiter ;|
|
||||
start transaction;
|
||||
select f1();
|
||||
connection b;
|
||||
send update t1 set col2=0 where col1=1;
|
||||
connection default;
|
||||
select * from t1;
|
||||
connection a;
|
||||
rollback;
|
||||
connection b;
|
||||
reap;
|
||||
rollback;
|
||||
|
||||
# Cleanup
|
||||
connection a;
|
||||
disconnect a;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection b;
|
||||
disconnect b;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
drop table t1;
|
||||
drop function f1;
|
||||
SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
|
@ -0,0 +1 @@
|
||||
--innodb_lock_wait_timeout=2 --innodb_rollback_on_timeout
|
@ -0,0 +1,5 @@
|
||||
-- source include/have_innodb_plugin.inc
|
||||
|
||||
--source include/innodb_rollback_on_timeout.inc
|
||||
|
||||
--echo End of 5.0 tests
|
@ -24,3 +24,15 @@ INSERT INTO t VALUES (1,2,4);
|
||||
INSERT INTO t VALUES (4,3,4);
|
||||
DELETE FROM t;
|
||||
DROP TABLE t;
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL, c2 INT NOT NULL, c3 INT, UNIQUE KEY(c1,c3), KEY(c2));
|
||||
INSERT INTO t1(c1,c2) VALUES(1,1);
|
||||
INSERT INTO t1(c1,c2) VALUES(1,2);
|
||||
UPDATE t1 SET c1=1000 WHERE c2=2;
|
||||
Comparing tables master:test.t1 and slave:test.t1
|
||||
DROP TABLE t1;
|
@ -43,4 +43,61 @@ a b
|
||||
Checking that both slave threads are running.
|
||||
DROP TABLE t1;
|
||||
**** On Master ****
|
||||
SET SQL_LOG_BIN= 0;
|
||||
DROP TABLE t1;
|
||||
SET SQL_LOG_BIN= 1;
|
||||
SET SESSION BINLOG_FORMAT=MIXED;
|
||||
CREATE TABLE t_myisam (id INT, PRIMARY KEY (id)) engine= MyIsam;
|
||||
INSERT INTO t_myisam (id) VALUES(1);
|
||||
CREATE TABLE t_innodb (id INT) engine= Innodb;
|
||||
INSERT INTO t_innodb (id) VALUES(1);
|
||||
BEGIN;
|
||||
INSERT INTO t_innodb(id) VALUES(2);
|
||||
INSERT INTO t_myisam(id) VALUES(3);
|
||||
CREATE TEMPORARY TABLE x (id INT);
|
||||
INSERT INTO t_myisam(id) VALUES(4),(1);
|
||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||
INSERT INTO t_innodb(id) VALUES(5);
|
||||
COMMIT;
|
||||
SELECT * FROM t_innodb;
|
||||
id
|
||||
1
|
||||
2
|
||||
5
|
||||
SELECT * FROM t_myisam;
|
||||
id
|
||||
1
|
||||
3
|
||||
4
|
||||
SELECT * FROM t_innodb;
|
||||
id
|
||||
1
|
||||
2
|
||||
5
|
||||
SELECT * FROM t_myisam;
|
||||
id
|
||||
1
|
||||
3
|
||||
4
|
||||
BEGIN;
|
||||
CREATE TEMPORARY TABLE tmp2 SELECT * FROM t_innodb;
|
||||
INSERT INTO t_innodb(id) VALUES(1);
|
||||
INSERT INTO t_innodb(id) VALUES(1);
|
||||
ROLLBACK;
|
||||
Warnings:
|
||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb(id) VALUES(2)
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t_myisam(id) VALUES(3)
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE x (id INT)
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t_myisam(id) VALUES(4),(1)
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb(id) VALUES(5)
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp2 SELECT * FROM t_innodb
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb(id) VALUES(1)
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb(id) VALUES(1)
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
DROP TABLE t_myisam, t_innodb;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user