diff options
| author | Sergei Golubchik <serg@mariadb.org> | 2016-09-19 09:47:08 +0200 |
|---|---|---|
| committer | Sergei Golubchik <serg@mariadb.org> | 2016-09-19 09:47:08 +0200 |
| commit | f9bdc7c01af52c04a05b5d0e890f86c77323d3b0 (patch) | |
| tree | 09779236c1d7061fb1706524c2e3b357369eae8e /mysql-test/include | |
| parent | f7be8cf2854fc0c2871c1537e60b1d7cb1931a61 (diff) | |
| parent | f566a4f83c8c255e0192afa525fdeb0897927167 (diff) | |
| download | mariadb-git-f9bdc7c01af52c04a05b5d0e890f86c77323d3b0.tar.gz | |
Merge branch '10.2' into bb-10.2-jan
Diffstat (limited to 'mysql-test/include')
| -rw-r--r-- | mysql-test/include/ctype_pad.inc | 79 | ||||
| -rw-r--r-- | mysql-test/include/ctype_pad_all_engines.inc | 7 | ||||
| -rw-r--r-- | mysql-test/include/default_mysqld.cnf | 2 | ||||
| -rw-r--r-- | mysql-test/include/report-features.test | 12 | ||||
| -rw-r--r-- | mysql-test/include/wait_until_connected_again.inc | 2 | ||||
| -rw-r--r-- | mysql-test/include/wait_until_disconnected.inc | 2 |
6 files changed, 90 insertions, 14 deletions
diff --git a/mysql-test/include/ctype_pad.inc b/mysql-test/include/ctype_pad.inc new file mode 100644 index 00000000000..4cefc575cdd --- /dev/null +++ b/mysql-test/include/ctype_pad.inc @@ -0,0 +1,79 @@ +--echo # +--echo # Start of ctype_pad.inc +--echo # + +--echo # +--echo # Unique indexes +--echo # + +eval CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE $coll; +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a '); +SELECT HEX(a), a FROM t1 ORDER BY a; +SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a; +SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC; + +--echo # +--echo # UNION +--echo # + +eval CREATE TABLE t2 (a VARCHAR(10)) COLLATE $coll; +INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a '); +SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td; +DROP TABLE t1; +DROP TABLE t2; + +--echo # +--echo # DISTINCT, COUNT, MAX +--echo # + +eval CREATE TABLE t1 (a VARCHAR(10)) COLLATE $coll; +INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a '); +SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td; +SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a; +SELECT HEX(MAX(a)), MAX(a) FROM t1; + +--echo # +--echo # GROUP BY +--echo # + +eval CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE $coll; +INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er '); +SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td; +DROP TABLE t2; + +--echo # +--echo # Weights +--echo # + +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +DROP TABLE t1; + +--echo # +--echo # IF, CASE, LEAST +--echo # + +eval SELECT IF('abc' COLLATE $coll = 'abc ', 'pad', 'nopad'); +eval SELECT CASE 'abc' COLLATE $coll WHEN 'abc ' THEN 'pad' ELSE 'nopad' END; +eval SELECT CASE WHEN 'abc' COLLATE $coll = 'abc ' THEN 'pad' ELSE 'nopad' END; +eval SELECT HEX(LEAST('abc ' COLLATE $coll, 'abc ')); +eval SELECT HEX(GREATEST('abc ' COLLATE $coll, 'abc ')); + +--echo # +--echo # Collation mix +--echo # + +eval CREATE TABLE t1 (a VARCHAR(10)) COLLATE $coll_pad; +INSERT INTO t1 VALUES ('a'),('a '); +SELECT COUNT(*) FROM t1 WHERE a='a'; +eval SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE $coll_pad; +eval SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE $coll; +eval ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE $coll; +SELECT COUNT(*) FROM t1 WHERE a='a'; +eval SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE $coll_pad; +eval SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE $coll; +DROP TABLE t1; + +--echo # +--echo # End of ctype_pad.inc +--echo # diff --git a/mysql-test/include/ctype_pad_all_engines.inc b/mysql-test/include/ctype_pad_all_engines.inc new file mode 100644 index 00000000000..29371676a19 --- /dev/null +++ b/mysql-test/include/ctype_pad_all_engines.inc @@ -0,0 +1,7 @@ +SET STORAGE_ENGINE=MyISAM; +--source include/ctype_pad.inc + +SET STORAGE_ENGINE=HEAP; +--source include/ctype_pad.inc + +SET STORAGE_ENGINE=Default; diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf index 17b2fd5b2bc..b5b16461781 100644 --- a/mysql-test/include/default_mysqld.cnf +++ b/mysql-test/include/default_mysqld.cnf @@ -45,6 +45,8 @@ loose-feedback-debug-startup-interval=20 loose-feedback-debug-first-interval=60 loose-feedback-debug-interval=60 +loose-pam-debug + loose-innodb_data_file_path= ibdata1:12M:autoextend loose-innodb_buffer_pool_size= 8M loose-innodb_lru_scan_depth= 100 diff --git a/mysql-test/include/report-features.test b/mysql-test/include/report-features.test deleted file mode 100644 index 75879f67165..00000000000 --- a/mysql-test/include/report-features.test +++ /dev/null @@ -1,12 +0,0 @@ -# -# show server variables -# - ---disable_query_log ---echo ===== ENGINES ===== -show engines; ---echo ===== VARIABLES ===== -show variables; ---echo ===== STOP ===== ---enable_query_log -exit; diff --git a/mysql-test/include/wait_until_connected_again.inc b/mysql-test/include/wait_until_connected_again.inc index 96240e36db7..6f64ef45440 100644 --- a/mysql-test/include/wait_until_connected_again.inc +++ b/mysql-test/include/wait_until_connected_again.inc @@ -14,7 +14,7 @@ while ($mysql_errno) # Strangely enough, the server might return "Too many connections" # while being shutdown, thus 1040 is an "allowed" error # See BUG#36228 - --error 0,1040,1053,2002,2003,2005,2006,2013 + --error 0,1040,1053,2002,2003,2005,2006,2013,1927 show status; dec $counter; diff --git a/mysql-test/include/wait_until_disconnected.inc b/mysql-test/include/wait_until_disconnected.inc index 71361682442..658bf0be739 100644 --- a/mysql-test/include/wait_until_disconnected.inc +++ b/mysql-test/include/wait_until_disconnected.inc @@ -12,7 +12,7 @@ while (!$mysql_errno) # Strangely enough, the server might return "Too many connections" # while being shutdown, thus 1040 is an "allowed" error. # See BUG#36228. - --error 0,1040,1053,2002,2003,2005,2006,2013 + --error 0,1040,1053,2002,2003,2005,2006,2013,1927 show status; dec $counter; |
