diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-01-24 14:16:20 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-01-24 14:16:20 +0100 |
commit | ceda5f724fd1ca1bcb6fb113af55179849c057d0 (patch) | |
tree | b6d8305dd4fbfae5d8e05b2e6c67cfd65214dd7b /mysql-test/main | |
parent | ade89fc8980a0b2763734815df7634a129c6d5dc (diff) | |
parent | f2ccfcaca191513d12f50672ae4545f9738670f0 (diff) | |
download | mariadb-git-ceda5f724fd1ca1bcb6fb113af55179849c057d0.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'mysql-test/main')
-rw-r--r-- | mysql-test/main/default_session.result | 28 | ||||
-rw-r--r-- | mysql-test/main/default_session.test | 24 | ||||
-rw-r--r-- | mysql-test/main/func_regexp_pcre.result | 18 | ||||
-rw-r--r-- | mysql-test/main/func_regexp_pcre.test | 8 | ||||
-rw-r--r-- | mysql-test/main/ssl_system_ca,bad.result | 1 | ||||
-rw-r--r-- | mysql-test/main/ssl_system_ca.combinations | 11 | ||||
-rw-r--r-- | mysql-test/main/ssl_system_ca.result | 2 | ||||
-rw-r--r-- | mysql-test/main/ssl_system_ca.test | 22 |
8 files changed, 101 insertions, 13 deletions
diff --git a/mysql-test/main/default_session.result b/mysql-test/main/default_session.result index 6c0bcad0cb3..1b0c5f3f67a 100644 --- a/mysql-test/main/default_session.result +++ b/mysql-test/main/default_session.result @@ -92,3 +92,31 @@ a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI drop table t1; +set time_zone='+00:00'; +create table t1 (a int, b datetime default from_unixtime(a), c datetime); +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +set time_zone='+01:00'; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +flush tables; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +select * from t1; +a b c +1569495327 2019-09-26 10:55:27 2019-09-26 10:55:27 +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +drop table t1; +set time_zone = "+00:00"; +create table t1 (a int, b timestamp as (from_unixtime(a)) virtual); +insert into t1 (a) value (1569495327); +select a, b, from_unixtime(a) from t1; +a b from_unixtime(a) +1569495327 2019-09-26 10:55:27 2019-09-26 10:55:27 +set time_zone = "+01:00"; +select a, b, from_unixtime(a) from t1; +a b from_unixtime(a) +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +flush tables; +select a, b, from_unixtime(a) from t1; +a b from_unixtime(a) +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +drop table t1; diff --git a/mysql-test/main/default_session.test b/mysql-test/main/default_session.test index 7796354ffd4..5e582bd5ca1 100644 --- a/mysql-test/main/default_session.test +++ b/mysql-test/main/default_session.test @@ -80,3 +80,27 @@ insert t1 () values (); set sql_mode=default; select * from t1; drop table t1; + +# +# MDEV-21249 MariaDB 10.3.10 When referring to bigint to generate timestamp data in the virtual generated column, the value of the generated column does not change when the time zone changes +# +set time_zone='+00:00'; +create table t1 (a int, b datetime default from_unixtime(a), c datetime); +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +set time_zone='+01:00'; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +flush tables; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +select * from t1; +drop table t1; + +# same with vcols +set time_zone = "+00:00"; +create table t1 (a int, b timestamp as (from_unixtime(a)) virtual); +insert into t1 (a) value (1569495327); +select a, b, from_unixtime(a) from t1; +set time_zone = "+01:00"; +select a, b, from_unixtime(a) from t1; +flush tables; +select a, b, from_unixtime(a) from t1; +drop table t1; diff --git a/mysql-test/main/func_regexp_pcre.result b/mysql-test/main/func_regexp_pcre.result index e030df99756..494fe917dc6 100644 --- a/mysql-test/main/func_regexp_pcre.result +++ b/mysql-test/main/func_regexp_pcre.result @@ -888,33 +888,33 @@ Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' 1 -SELECT CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; -CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' +SELECT CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; +CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') 1 -SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); -REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') +SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); +REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) 243 -SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); -LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) +SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); +LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) 0 -SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); -LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) -803 +SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); +LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) +1603 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT REGEXP_INSTR('a_kollision', 'oll'); diff --git a/mysql-test/main/func_regexp_pcre.test b/mysql-test/main/func_regexp_pcre.test index 21600390bb2..de0fe94b7c1 100644 --- a/mysql-test/main/func_regexp_pcre.test +++ b/mysql-test/main/func_regexp_pcre.test @@ -438,19 +438,19 @@ SELECT 1 FROM dual WHERE ('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral, # SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; --replace_regex /[0-9]+ exceeded/NUM exceeded/ -SELECT CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; +SELECT CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); --replace_regex /[0-9]+ exceeded/NUM exceeded/ -SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); +SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); --replace_regex /[0-9]+ exceeded/NUM exceeded/ -SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); +SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); --replace_regex /[0-9]+ exceeded/NUM exceeded/ -SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); +SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); # # MDEV-12942 REGEXP_INSTR returns 1 when using brackets diff --git a/mysql-test/main/ssl_system_ca,bad.result b/mysql-test/main/ssl_system_ca,bad.result new file mode 100644 index 00000000000..b9c6d3e29d8 --- /dev/null +++ b/mysql-test/main/ssl_system_ca,bad.result @@ -0,0 +1 @@ +ERROR 2026 (HY000): SSL connection error: Validation of SSL server certificate failed diff --git a/mysql-test/main/ssl_system_ca.combinations b/mysql-test/main/ssl_system_ca.combinations new file mode 100644 index 00000000000..6e3576ada15 --- /dev/null +++ b/mysql-test/main/ssl_system_ca.combinations @@ -0,0 +1,11 @@ +[good] +# +# hostname on the certificate is localhost +# + +[bad] +# +# hostname on the certificate is server8k +# +loose-ssl-key=$MYSQL_TEST_DIR/std_data/server8k-key.pem +loose-ssl-cert=$MYSQL_TEST_DIR/std_data/server8k-cert.pem diff --git a/mysql-test/main/ssl_system_ca.result b/mysql-test/main/ssl_system_ca.result new file mode 100644 index 00000000000..78f8bf805dd --- /dev/null +++ b/mysql-test/main/ssl_system_ca.result @@ -0,0 +1,2 @@ +*************************** 1. row *************************** +have_ssl: 1 diff --git a/mysql-test/main/ssl_system_ca.test b/mysql-test/main/ssl_system_ca.test new file mode 100644 index 00000000000..920e391090f --- /dev/null +++ b/mysql-test/main/ssl_system_ca.test @@ -0,0 +1,22 @@ +# +# Tests here don't use --ssl-ca but expect the certificate to be +# signed by a CA in a system CA store +# +# They only work for openssl, because the following line works only there: +let SSL_CERT_DIR=$MYSQL_TMP_DIR; + +source include/not_embedded.inc; + +if (`select @@version_ssl_library not like 'OpenSSL%'`) { + skip Needs OpenSSL; +} + +# See `openssl x509 -in cacert.pem -noout -issuer_hash` +copy_file $MYSQL_TEST_DIR/std_data/cacert.pem $MYSQL_TMP_DIR/ed1f42db.0; + +# +# test --ssl-verify-server-cert +# + +disable_abort_on_error; +exec $MYSQL --ssl-verify-server-cert -Ee "select (variable_value <> '') as have_ssl from information_schema.session_status where variable_name='ssl_cipher'" 2>&1; |