diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-09-25 22:05:56 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-09-25 22:05:56 +0300 |
commit | 4a32e2395e1ff6cf7274d0567282b1747031108b (patch) | |
tree | f20565057eebcd25fda9292e66695bbf8a409f41 /mysql-test/t | |
parent | b773270c397a97425abc506e7d7fbc5fedb99d9c (diff) | |
parent | 86c3ba65aa39e1e81c52f3455a1bcf187906dffc (diff) | |
download | mariadb-git-4a32e2395e1ff6cf7274d0567282b1747031108b.tar.gz |
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/create_or_replace2.test | 2 | ||||
-rw-r--r-- | mysql-test/t/insert.test | 10 | ||||
-rw-r--r-- | mysql-test/t/locale.test | 28 | ||||
-rw-r--r-- | mysql-test/t/myisam.test | 13 | ||||
-rw-r--r-- | mysql-test/t/old-mode.test | 36 | ||||
-rw-r--r-- | mysql-test/t/stat_tables_repl.test | 2 |
6 files changed, 89 insertions, 2 deletions
diff --git a/mysql-test/t/create_or_replace2.test b/mysql-test/t/create_or_replace2.test index 6cee7fac2e9..199e5523811 100644 --- a/mysql-test/t/create_or_replace2.test +++ b/mysql-test/t/create_or_replace2.test @@ -3,9 +3,9 @@ # --source include/have_debug.inc ---source include/master-slave.inc --source include/have_binlog_format_row.inc --source include/have_innodb.inc +--source include/master-slave.inc --disable_warnings drop table if exists t1; diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test index 80caefa5a0f..d57e9051e3f 100644 --- a/mysql-test/t/insert.test +++ b/mysql-test/t/insert.test @@ -602,3 +602,13 @@ remove_file $MYSQLD_DATADIR/test/t1.txt; drop view v1; drop table t1; SET @@sql_mode= @save_mode; + +# +# MDEV-13861 Assertion `0' failed in Protocol::end_statement +# +CREATE TABLE t1 (f INT); +CREATE VIEW v1 AS SELECT * FROM t1 WHERE f <=> 'foo' WITH CHECK OPTION; +--error ER_TRUNCATED_WRONG_VALUE +REPLACE INTO v1 SET f = NULL; +DROP VIEW v1; +DROP TABLE t1; diff --git a/mysql-test/t/locale.test b/mysql-test/t/locale.test index 4570b968ecf..a9a507bc387 100644 --- a/mysql-test/t/locale.test +++ b/mysql-test/t/locale.test @@ -144,6 +144,8 @@ SET lc_time_names=@old_50915_lc_time_names; # Item::print create view v1 as select + date_format('2001-10-02', '%c %b %M') as a, + date_format('2001-10-02', '%c %b %M', 'ru_RU') as a1, format(123456789,2) as b, format(123456789,2,'rm_CH') as b1; select * from v1; @@ -153,3 +155,29 @@ drop view v1; --echo # --echo # End of 10.2 tests --echo # + +# +# MDEV-11553 Can't restore a PERSISTENT column that uses DATE_FORMAT() +# +# 3-argument syntax for DATE_FORMAT() +select date_format('2001-01-01', '%w %a %W', 'ro_RO'); +select date_format('2001-01-03', '%w %a %W', 'ro_RO'); +select date_format('2001-01-05', '%w %a %W', 'ro_RO'); +select date_format('2001-01-07', '%w %a %W', 'ro_RO'); +select date_format('2001-01-01', '%w %a %W', 'de_AT'); +select date_format('2001-02-01', '%w %a %W', 'de_AT'); +select date_format('2001-03-01', '%w %a %W', 'de_AT'); +select date_format('2001-01-01', '%w %a %W', 'en_US'); +select date_format('2001-03-01', '%c %b %M', 'en_US'); +select date_format('2001-01-01', '%w %a %W', 'rm_CH'); +select date_format('2001-01-03', '%w %a %W', 'rm_CH'); +select date_format('2001-01-05', '%w %a %W', 'rm_CH'); +select date_format('2001-01-07', '%w %a %W', 'rm_CH'); +select date_format('2001-02-01', '%c %b %M', 'rm_CH'); +select date_format('2001-04-01', '%c %b %M', 'rm_CH'); +select date_format('2001-06-01', '%c %b %M', 'rm_CH'); +select date_format('2001-08-01', '%c %b %M', 'rm_CH'); +select date_format('2001-10-01', '%c %b %M', 'rm_CH'); +select date_format('2001-12-01', '%c %b %M', 'rm_CH'); +select date_format('2001-01-06', '%w %a %W', 'de_CH'); +select date_format('2001-09-01', '%c %b %M', 'de_CH'); diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 572fa55e70f..0da542e499e 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1770,6 +1770,19 @@ OPTIMIZE TABLE t1; DROP TABLE t1; # +# Check FLUSH FOR EXPORT +# + +CREATE TABLE t1(a INT, b CHAR(10), KEY(a), KEY(b)) engine=myisam; +INSERT INTO t1 VALUES(1,'0'),(2,'0'),(3,'0'),(4,'0'),(5,'0'), + (6,'0'),(7,'0'); +flush tables test.t1 for export; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +insert into t1 values (8,'0'); +unlock tables; +drop table t1; + +# # Check some variables # show variables like 'myisam_block_size'; diff --git a/mysql-test/t/old-mode.test b/mysql-test/t/old-mode.test index b9012a96713..d7e8ce8ee55 100644 --- a/mysql-test/t/old-mode.test +++ b/mysql-test/t/old-mode.test @@ -83,3 +83,39 @@ SELECT TO_DAYS(a), TO_DAYS(b) FROM t1; DROP TABLE t1; SET @@global.mysql56_temporal_format=DEFAULT; +# +# MDEV-12672 Replicated TIMESTAMP fields given wrong value near DST change +# + +# Copy_field +set time_zone='Europe/Moscow'; +set global mysql56_temporal_format=false; +create table t1 (a timestamp); +set timestamp=1288477526; +insert t1 values (null); +insert t1 values (); +set timestamp=1288481126; +insert t1 values (null); +insert t1 values (); +select a, unix_timestamp(a) from t1; +set global mysql56_temporal_format=true; +select a, unix_timestamp(a) from t1; +alter table t1 modify a timestamp; +select a, unix_timestamp(a) from t1; +drop table t1; + +# field_conv_incompatible() +set global mysql56_temporal_format=false; +create table t1 (a timestamp); +set timestamp=1288477526; +insert t1 values (null); +set timestamp=1288481126; +insert t1 values (null); +select a, unix_timestamp(a) from t1; +set global mysql56_temporal_format=true; +select a, unix_timestamp(a) from t1; +create table t2 (a timestamp); +insert t2 select a from t1; +select a, unix_timestamp(a) from t2; +drop table t1, t2; +set time_zone=DEFAULT; diff --git a/mysql-test/t/stat_tables_repl.test b/mysql-test/t/stat_tables_repl.test index 999c49d37cf..ac24c9dcbd7 100644 --- a/mysql-test/t/stat_tables_repl.test +++ b/mysql-test/t/stat_tables_repl.test @@ -1,6 +1,6 @@ --source include/have_stat_tables.inc ---source include/master-slave.inc --source include/have_binlog_format_row.inc +--source include/master-slave.inc --echo # --echo # Bug mdev-485: unexpected failure with replication of DROP/ALTER table |