Commit f23a0093 authored by Sergei Petrunia's avatar Sergei Petrunia

MariaRocks port: fix a few test result differences

- MariaDB has different wording for a few error messages
- MySQL changed Extra='' to Extra=NULL for EXPLAIN outputs, MariaDB didnt
- The testsuite in storage/rocksdb/mysql-test needs paths to include
  files adjusted
- In SHOW COLUMNS output, Extra column is "NULL" in MariaDB vs '' in MySQL
parent e9ee999e
connect con2,localhost,root,,;
connection default;
create table t1 (
pk int not null primary key,
col1 int not null,
......@@ -24,9 +26,12 @@ pk col1 col2
8 8 8
9 9 9
# Connect with another connection and make a conflicting change
connection con2;
begin;
update t1 set col2=123456 where pk=0;
commit;
connection default;
update t1 set col2=col2+1 where col1 < 10 limit 5;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
disconnect con2;
drop table t1, ten, one_k;
......@@ -83,7 +83,7 @@ partition by list (b*a) (partition x1 values in (1) tablespace ts1,
partition x2 values in (3,11,5,7) tablespace ts2,
partition x3 values in (16,8,5+19,70-43) tablespace ts3);
create table t2(b binary(2));
set session optimizer_switch=5;
set session optimizer_switch='materialization=off';
insert into t1(a,b) values(1,7);
select a from t1 where a in (select a from t1 where a in (select b from t2));
a
......
......@@ -21,7 +21,7 @@ insert into t2 select A.a, FLOOR(A.a/10), A.a from t1 A;
explain
select * from t2 force index (a) where a=0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref a a 4 const # NULL
1 SIMPLE t2 ref a a 4 const #
select * from t2 force index (a) where a=0;
pk a b
0 0 0
......@@ -38,7 +38,7 @@ pk a b
explain
select * from t2 force index (a) where a=2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref a a 4 const # NULL
1 SIMPLE t2 ref a a 4 const #
select * from t2 force index (a) where a=2;
pk a b
20 2 20
......@@ -54,7 +54,7 @@ pk a b
explain
select * from t2 force index (a) where a=3 and pk=33;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const a a 8 const,const # NULL
1 SIMPLE t2 const a a 8 const,const #
select * from t2 force index (a) where a=3 and pk=33;
pk a b
33 3 33
......
......@@ -29,5 +29,5 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb;
INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c');
HANDLER t1 OPEN AS h1;
ERROR HY000: Table storage engine for 'h1' doesn't have this option
ERROR HY000: Storage engine ROCKSDB of the table `test`.`t1` doesn't have this option
DROP TABLE t1;
......@@ -53,5 +53,5 @@ LENGTH(b) LENGTH(b0) LENGTH(b1) LENGTH(b300) LENGTH(bm) LENGTH(b70k) LENGTH(b17m
65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576
65535 65535 255 65535 65535 1048576 2097152 255 1048576 2097152
ALTER TABLE t1 ADD COLUMN bbb BLOB(4294967296);
ERROR 42000: Display width out of range for column 'bbb' (max = 4294967295)
ERROR 42000: Display width out of range for 'bbb' (max = 4294967295)
DROP TABLE t1;
......@@ -67,7 +67,7 @@ b1 b2
127 -128
2 3
ALTER TABLE t1 ADD COLUMN b3 BOOLEAN UNSIGNED ;
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 near 'UNSIGNED' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNSIGNED' at line 1
ALTER TABLE ADD COLUMN b3 BOOL ZEROFILL ;
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 near 'ADD COLUMN b3 BOOL ZEROFILL' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ADD COLUMN b3 BOOL ZEROFILL' at line 1
DROP TABLE t1;
......@@ -13,7 +13,7 @@ c char(1) YES NULL
c0 char(0) YES NULL
c1 char(1) YES NULL
c20 char(20) YES NULL
c255 char(255) NO PRI
c255 char(255) NO PRI NULL
INSERT INTO t1 (c,c0,c1,c20,c255) VALUES ('','','','','');
INSERT INTO t1 (c,c0,c1,c20,c255) VALUES ('a','','b','abcdefghi klmnopqrst', 'Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn\'t already exist which would work.');
SELECT c,c0,c1,c20,c255 FROM t1;
......@@ -66,7 +66,7 @@ c1
DROP TABLE t1;
CREATE TABLE t1(a char(10) character set utf8 collate utf8_bin primary key);
INSERT INTO t1 VALUES ('one'),('two'),('three'),('four'),('five');
SELECT * FROM t1 LIMIT 1 UNION SELECT * FROM t1;
(SELECT * FROM t1 LIMIT 1) UNION (SELECT * FROM t1);
a
five
four
......
......@@ -123,9 +123,9 @@ d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
ALTER TABLE t1 ADD COLUMN n66 NUMERIC(66) ;
ERROR 42000: Too big precision 66 specified for column 'n66'. Maximum is 65.
ERROR 42000: Too big precision 66 specified for 'n66'. Maximum is 65
ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(66,6) ;
ERROR 42000: Too big precision 66 specified for column 'n66_6'. Maximum is 65.
ERROR 42000: Too big precision 66 specified for 'n66_6'. Maximum is 65
ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(66,66) ;
ERROR 42000: Too big scale 66 specified for column 'n66_66'. Maximum is 30.
ERROR 42000: Too big scale 66 specified for 'n66_66'. Maximum is 38
DROP TABLE t1;
......@@ -208,5 +208,5 @@ i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20
2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807
2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807
ALTER TABLE t1 ADD COLUMN i257 INT(257) ;
ERROR 42000: Display width out of range for column 'i257' (max = 255)
ERROR 42000: Display width out of range for 'i257' (max = 255)
DROP TABLE t1;
......@@ -53,5 +53,5 @@ LENGTH(t) LENGTH(t0) LENGTH(t1) LENGTH(t300) LENGTH(tm) LENGTH(t70k) LENGTH(t17m
65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576
65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576
ALTER TABLE t1 ADD COLUMN ttt TEXT(4294967296) ;
ERROR 42000: Display width out of range for column 'ttt' (max = 4294967295)
ERROR 42000: Display width out of range for 'ttt' (max = 4294967295)
DROP TABLE t1;
......@@ -10,12 +10,12 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
v0 varbinary(0) YES NULL
v1 varbinary(1) YES NULL
v64 varbinary(64) NO PRI
v64 varbinary(64) NO PRI NULL
v65000 varbinary(65000) YES NULL
CREATE TABLE t2 (v VARBINARY(65532) , PRIMARY KEY(v(255))) ENGINE=rocksdb;
SHOW COLUMNS IN t2;
Field Type Null Key Default Extra
v varbinary(65532) NO PRI
v varbinary(65532) NO PRI NULL
INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','','','');
INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','y','Once there, double check that an article doesn\'t already exist','Here is a list of recommended books on MariaDB and MySQL. We\'ve provided links to Amazon.com here for convenience, but they can be found at many other bookstores, both online and off.
......@@ -87,7 +87,7 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
v0 varbinary(0) YES NULL
v1 varbinary(1) YES NULL
v64 varbinary(64) NO PRI
v64 varbinary(64) NO PRI NULL
v65000 varbinary(65000) YES NULL
v65536 mediumblob YES NULL
DROP TABLE t1, t2;
--source include/have_rocksdb.inc
--source include/have_partition.inc
#
# Create tables with partitions and try to update/select from them.
......
......@@ -3,7 +3,7 @@
let $cf_name=cf1;
--source suite/rocksdb/t/rocksdb_icp.inc
--source include/rocksdb_icp.inc
--echo #
--echo # Issue #67: Inefficient index condition pushdown
......
......@@ -3,5 +3,5 @@
let $cf_name=rev:cf1;
--source suite/rocksdb/t/rocksdb_icp.inc
--source include/rocksdb_icp.inc
......@@ -88,7 +88,7 @@ create TABLE t1(a int,b int,c int,primary key(a,b))
partition x2 values in (3,11,5,7) tablespace ts2,
partition x3 values in (16,8,5+19,70-43) tablespace ts3);
create table t2(b binary(2));
set session optimizer_switch=5;
set session optimizer_switch='materialization=off';
insert into t1(a,b) values(1,7);
select a from t1 where a in (select a from t1 where a in (select b from t2));
......
......@@ -15,5 +15,5 @@ DROP TABLE t1;
# Issue #259
CREATE TABLE t1(a char(10) character set utf8 collate utf8_bin primary key);
INSERT INTO t1 VALUES ('one'),('two'),('three'),('four'),('five');
SELECT * FROM t1 LIMIT 1 UNION SELECT * FROM t1;
(SELECT * FROM t1 LIMIT 1) UNION (SELECT * FROM t1);
DROP TABLE t1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment