diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-11-19 17:23:39 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-11-19 17:23:39 +0100 |
commit | 3495801e2e94df5a10cae6e056f65defa038a6b6 (patch) | |
tree | de524b4bf45dbc19a95262843f2b72d0f5adb7bc /mysql-test/t | |
parent | df7b27f1fe308fd4011fa020bebd7c69bcd43383 (diff) | |
parent | 496fda66fdc34b447ef4dec26d1250b034a321e3 (diff) | |
download | mariadb-git-3495801e2e94df5a10cae6e056f65defa038a6b6.tar.gz |
5.5 merge
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/create.test | 33 | ||||
-rw-r--r-- | mysql-test/t/ctype_utf16.test | 6 | ||||
-rw-r--r-- | mysql-test/t/failed_auth_unixsocket.test | 10 | ||||
-rw-r--r-- | mysql-test/t/func_compress.test | 9 | ||||
-rw-r--r-- | mysql-test/t/gis.test | 5 | ||||
-rw-r--r-- | mysql-test/t/openssl-poodle_6975.combinations | 6 | ||||
-rw-r--r-- | mysql-test/t/openssl-poodle_6975.test | 38 | ||||
-rw-r--r-- | mysql-test/t/openssl_1.test | 15 | ||||
-rw-r--r-- | mysql-test/t/partition_error.test | 11 | ||||
-rw-r--r-- | mysql-test/t/ssl.test | 2 | ||||
-rw-r--r-- | mysql-test/t/ssl_8k_key-master.opt | 4 | ||||
-rw-r--r-- | mysql-test/t/ssl_compress.test | 2 | ||||
-rw-r--r-- | mysql-test/t/union.test | 20 |
13 files changed, 152 insertions, 9 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 8bb7339ce83..4d57a5a110a 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -2022,9 +2022,40 @@ select * from t1; unlock tables; drop table t1,t2; +--echo # +--echo # MDEV-6179: dynamic columns functions/cast()/convert() doesn't +--echo # play nice with CREATE/ALTER TABLE +--echo # +create table t1 ( + color char(32) as (COLUMN_GET(dynamic_cols, 1 as char)) persistent, + cl char(32) as (COLUMN_GET(COLUMN_ADD(COLUMN_CREATE(1 , 'blue' as char), 2, 'ttt'), i as char)) persistent, + item_name varchar(32) primary key, -- A common attribute for all items + i int, + dynamic_cols blob -- Dynamic columns will be stored here +); +INSERT INTO t1(item_name, dynamic_cols, i) VALUES + ('MariaDB T-shirt', COLUMN_CREATE(1, 'blue', 2, 'XL'), 1); +INSERT INTO t1(item_name, dynamic_cols, i) VALUES + ('Thinkpad Laptop', COLUMN_CREATE(1, 'black', 3, 500), 2); + +select item_name, color, cl from t1; +show create table t1; + +drop table t1; + +create table t1 ( + n int, + c char(32) as (convert(cast(n as char), char)) persistent +); +insert into t1(n) values (1),(2),(3); + +select * from t1; +show create table t1; + +drop table t1; + # # MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA instead of ER_TABLE_MUST_HAVE_COLUMNS # --error ER_TABLE_MUST_HAVE_COLUMNS create table t1; - diff --git a/mysql-test/t/ctype_utf16.test b/mysql-test/t/ctype_utf16.test index c92889da2dc..04c77db2f3c 100644 --- a/mysql-test/t/ctype_utf16.test +++ b/mysql-test/t/ctype_utf16.test @@ -788,6 +788,12 @@ SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1; # --echo # +--echo # MDEV-6865 Merge Bug#18935421 RPAD DIES WITH CERTAIN PADSTR INTPUTS.. +--echo # +DO RPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999); +DO LPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999); + +--echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/failed_auth_unixsocket.test b/mysql-test/t/failed_auth_unixsocket.test index ba31cf6a59f..f7345f44698 100644 --- a/mysql-test/t/failed_auth_unixsocket.test +++ b/mysql-test/t/failed_auth_unixsocket.test @@ -16,11 +16,17 @@ change_user $USER; eval install plugin unix_socket soname '$AUTH_SOCKET_SO'; ---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT $USER USER +# Make sure that the replace works, even if $USER is 'user' or something else +# that matches other parts of the error message. +--echo connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET); +--let $replace=Access denied for user '$USER' +--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT $replace "Access denied for user 'USER'" +--disable_query_log --error ER_ACCESS_DENIED_NO_PASSWORD_ERROR connect (fail,localhost,$USER); +--enable_query_log ---replace_result $USER USER +--replace_result $replace "Access denied for user 'USER'" --error ER_ACCESS_DENIED_NO_PASSWORD_ERROR change_user $USER; diff --git a/mysql-test/t/func_compress.test b/mysql-test/t/func_compress.test index eaed0c88fe1..fc3d2697426 100644 --- a/mysql-test/t/func_compress.test +++ b/mysql-test/t/func_compress.test @@ -136,3 +136,12 @@ DROP TABLE t1; --echo # --echo # End of 5.3 tests --echo # + +# +# MDEV-4513 Valgrind warnings (Conditional jump or move depends on uninitialised value) in inflate on UNCOMPRESS +# +SELECT UNCOMPRESS(CAST(0 AS BINARY(5))); + +--echo # +--echo # End of 5.5 tests +--echo # diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index d20e4c1711e..2625ec5d3c9 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -1413,6 +1413,11 @@ insert into t1 values(geomfromtext("POINT(0 9.2233720368548e18)")); select equals(`a`,convert(`a` using utf8)) from `t1`; drop table t1; +--echo # +--echo # MDEV-6883 ST_WITHIN crashes server if (0,0) is matched to POLYGON((0 0)) +--echo # +select st_within(GeomFromText('Polygon((0 0))'), Point(0,0)); + --echo End of 5.3 tests --echo # diff --git a/mysql-test/t/openssl-poodle_6975.combinations b/mysql-test/t/openssl-poodle_6975.combinations new file mode 100644 index 00000000000..3147de1cb63 --- /dev/null +++ b/mysql-test/t/openssl-poodle_6975.combinations @@ -0,0 +1,6 @@ +[tlsv12] +loose-ssl-cipher=TLSv1.2 + +[sslv3] +loose-ssl-cipher=SSLv3 + diff --git a/mysql-test/t/openssl-poodle_6975.test b/mysql-test/t/openssl-poodle_6975.test new file mode 100644 index 00000000000..bc6397c5c28 --- /dev/null +++ b/mysql-test/t/openssl-poodle_6975.test @@ -0,0 +1,38 @@ +# +# MDEV-6975 Implement TLS protocol +# +# test SSLv3 and TLSv1.2 ciphers when OpenSSL is restricted to SSLv3 or TLSv1.2 +# +source include/have_ssl_communication.inc; + +# this is OpenSSL test. + +grant select on test.* to ssl_sslv3@localhost require cipher "RC4-SHA"; +grant select on test.* to ssl_tls12@localhost require cipher "AES128-SHA256"; + +let $mysql=$MYSQL --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SHOW STATUS LIKE 'ssl_Cipher'" 2>&1; + +disable_abort_on_error; +echo TLS1.2 ciphers: user is ok with any cipher; +exec $mysql --ssl-cipher=AES128-SHA256; +exec $mysql --ssl-cipher=TLSv1.2; +echo TLS1.2 ciphers: user requires SSLv3 cipher RC4-SHA; +exec $mysql --user ssl_sslv3 --ssl-cipher=AES128-SHA256; +exec $mysql --user ssl_sslv3 --ssl-cipher=TLSv1.2; +echo TLS1.2 ciphers: user requires TLSv1.2 cipher AES128-SHA256; +exec $mysql --user ssl_tls12 --ssl-cipher=AES128-SHA256; +exec $mysql --user ssl_tls12 --ssl-cipher=TLSv1.2; + +echo SSLv3 ciphers: user is ok with any cipher; +exec $mysql --ssl-cipher=RC4-SHA; +exec $mysql --ssl-cipher=SSLv3; +echo SSLv3 ciphers: user requires SSLv3 cipher RC4-SHA; +exec $mysql --user ssl_sslv3 --ssl-cipher=RC4-SHA; +exec $mysql --user ssl_sslv3 --ssl-cipher=SSLv3; +echo SSLv3 ciphers: user requires TLSv1.2 cipher AES128-SHA256; +exec $mysql --user ssl_tls12 --ssl-cipher=RC4-SHA; +exec $mysql --user ssl_tls12 --ssl-cipher=SSLv3; + +drop user ssl_sslv3@localhost; +drop user ssl_tls12@localhost; + diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test index 0c8f81e4712..bee0e2cc720 100644 --- a/mysql-test/t/openssl_1.test +++ b/mysql-test/t/openssl_1.test @@ -20,13 +20,16 @@ grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx"; flush privileges; -connect (con1,localhost,ssl_user1,,,,,SSL); -connect (con2,localhost,ssl_user2,,,,,SSL); -connect (con3,localhost,ssl_user3,,,,,SSL); -connect (con4,localhost,ssl_user4,,,,,SSL); +connect (con1,localhost,ssl_user1,,,,,SSL-CIPHER=DHE-RSA-AES256-SHA); --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT --error ER_ACCESS_DENIED_ERROR -connect (con5,localhost,ssl_user5,,,,,SSL); +connect (con2,localhost,ssl_user2,,,,,SSL-CIPHER=RC4-SHA); +connect (con2,localhost,ssl_user2,,,,,SSL-CIPHER=DHE-RSA-AES256-SHA); +connect (con3,localhost,ssl_user3,,,,,SSL-CIPHER=DHE-RSA-AES256-SHA); +connect (con4,localhost,ssl_user4,,,,,SSL-CIPHER=DHE-RSA-AES256-SHA); +--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT +--error ER_ACCESS_DENIED_ERROR +connect (con5,localhost,ssl_user5,,,,,SSL-CIPHER=DHE-RSA-AES256-SHA); connection con1; # Check ssl turned on @@ -129,6 +132,7 @@ drop table t1; # verification of servers certificate by setting both ca certificate # and ca path to NULL # +--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA --exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SHOW STATUS LIKE 'ssl_Cipher'" 2>&1 --echo End of 5.0 tests @@ -255,6 +259,7 @@ select 'is still running; no cipher request crashed the server' as result from d GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509; FLUSH PRIVILEGES; connect(con1,localhost,bug42158,,,,,SSL); +--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA SHOW STATUS LIKE 'Ssl_cipher'; disconnect con1; connection default; diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test index c5b37615a92..5396b9e3543 100644 --- a/mysql-test/t/partition_error.test +++ b/mysql-test/t/partition_error.test @@ -2017,6 +2017,17 @@ DROP TABLE t1; --echo End of 5.1 tests +# +# MDEV-7113 difference between check_vcol_func_processor and check_partition_func_processor +# +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (a int) partition by list (values(a) div 1) (partition p0 values in (0), partition p1 values in (1)); + +--error ER_PARSE_ERROR +create table t1 (a int) partition by list (uuid_short()) (partition p0 values in (0), partition p1 values in (1)); + +--echo End of 5.5 tests + CREATE TABLE t1 (a INT) PARTITION BY LIST (a) SUBPARTITION BY HASH (a) SUBPARTITIONS 2 diff --git a/mysql-test/t/ssl.test b/mysql-test/t/ssl.test index eb4da99588c..988a9d6c056 100644 --- a/mysql-test/t/ssl.test +++ b/mysql-test/t/ssl.test @@ -11,6 +11,7 @@ connect (ssl_con,localhost,root,,,,,SSL); # Check ssl turned on +--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA SHOW STATUS LIKE 'Ssl_cipher'; # Check ssl expiration @@ -21,6 +22,7 @@ SHOW STATUS LIKE 'Ssl_server_not_after'; -- source include/common-tests.inc # Check ssl turned on +--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA SHOW STATUS LIKE 'Ssl_cipher'; connection default; diff --git a/mysql-test/t/ssl_8k_key-master.opt b/mysql-test/t/ssl_8k_key-master.opt index 8d103df3a95..531c0abc9f1 100644 --- a/mysql-test/t/ssl_8k_key-master.opt +++ b/mysql-test/t/ssl_8k_key-master.opt @@ -1 +1,3 @@ ---ssl-key=$MYSQL_TEST_DIR/std_data/server8k-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/server8k-cert.pem +--loose-ssl-key=$MYSQL_TEST_DIR/std_data/server8k-key.pem +--loose-ssl-cert=$MYSQL_TEST_DIR/std_data/server8k-cert.pem +--loose-ssl-cipher=DHE-RSA-AES256-SHA diff --git a/mysql-test/t/ssl_compress.test b/mysql-test/t/ssl_compress.test index 8e0dea53fe7..5e45e3824a2 100644 --- a/mysql-test/t/ssl_compress.test +++ b/mysql-test/t/ssl_compress.test @@ -11,6 +11,7 @@ connect (ssl_compress_con,localhost,root,,,,,SSL COMPRESS); # Check ssl turned on +--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA SHOW STATUS LIKE 'Ssl_cipher'; # Check compression turned on @@ -20,6 +21,7 @@ SHOW STATUS LIKE 'Compression'; -- source include/common-tests.inc # Check ssl turned on +--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA SHOW STATUS LIKE 'Ssl_cipher'; # Check compression turned on diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index a5d7dae606f..9204ddd22e5 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -1330,3 +1330,23 @@ create table t1 (a int); insert t1 values (1),(2),(3),(1); explain select 1 from dual where exists (select max(a) from t1 group by a union select a+2 from t1); drop table t1; + +--echo # +--echo # MDEV-6868:MariaDB server crash ( select with union and order by +--echo # with subquery ) +--echo # + +CREATE TABLE t1 ( id INTEGER, sample_name1 VARCHAR(100), sample_name2 VARCHAR(100), PRIMARY KEY(id) ); + +INSERT INTO t1 ( id, sample_name1, sample_name2 ) VALUES ( 1, 'aaaa', 'bbbb' ), ( 2, 'cccc', 'dddd' ); + +( + SELECT sample_name1 AS testname FROM t1 +) +UNION +( + SELECT sample_name2 AS testname FROM t1 C ORDER BY (SELECT T.sample_name1 FROM t1 T WHERE T.id = C.id) +) +; + +drop table t1; |