diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2017-10-26 18:14:54 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2017-11-13 19:11:03 +0300 |
commit | 1d9d3513462b4faec68a7fe28638632dbcab8178 (patch) | |
tree | 50fc70000cc7092817e04dad976aaf08e397c8dd | |
parent | 73f655d57654e9ef8cd40154a0482170c10ad14c (diff) | |
download | mariadb-git-1d9d3513462b4faec68a7fe28638632dbcab8178.tar.gz |
SQL, Test: main suite [fixes #300]
-rw-r--r-- | mysql-test/r/mysqld--help.result | 19 | ||||
-rw-r--r-- | mysql-test/r/partition.result | 2 | ||||
-rw-r--r-- | mysql-test/r/partition_error.result | 14 | ||||
-rw-r--r-- | mysql-test/t/mysqld--help.test | 1 | ||||
-rw-r--r-- | sql/item_timefunc.cc | 3 | ||||
-rw-r--r-- | sql/sql_partition.cc | 3 |
6 files changed, 31 insertions, 11 deletions
diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result index b5d68d6bee2..682199f60b8 100644 --- a/mysql-test/r/mysqld--help.result +++ b/mysql-test/r/mysqld--help.result @@ -1272,6 +1272,25 @@ The following options may be given as the first argument: -v, --verbose Used with --help option for detailed help. -V, --version[=name] Output version information and exit. + --versioning-alter-history=name + Versioning ALTER TABLE mode. KEEP: leave historical + system rows as is on ALTER TABLE; SURVIVE: use DDL + survival feature; DROP: delete historical system rows on + ALTER TABLE + --versioning-asof-timestamp=name + Default AS OF value for versioned queries + --versioning-force Force system versioning for all created tables + --versioning-hide=name + Hide system versioning from being displayed in table + info. AUTO: hide implicit system fields only in + non-versioned and AS OF queries; IMPLICIT: hide implicit + system fields in all queries; FULL: hide any system + fields in all queries and hide versioning info in SHOW + commands; NEVER: don't hide system fields + --versioning-innodb-algorithm-simple + Use simple algorithm of timestamp handling in InnoDB + instead of TRX_SEES + (Defaults to on; use --skip-versioning-innodb-algorithm-simple to disable.) --wait-timeout=# The number of seconds the server waits for activity on a connection before closing it diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index c7d2fba95e4..f398ef07d56 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1459,7 +1459,7 @@ ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setti create table t1 (a int) partition by hash (a) (partition p0 (subpartition sp0)); -ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning +ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning create table t1 (a int) partition by range (a) (partition p0 values less than (1)); diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result index 94d1e384d62..349e9771367 100644 --- a/mysql-test/r/partition_error.result +++ b/mysql-test/r/partition_error.result @@ -1023,7 +1023,7 @@ c int not null, primary key (a,b)) partition by key (a) subpartition by key (b); -ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning +ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLD_DATADIR/test/t1.par'); load_file('$MYSQLD_DATADIR/test/t1.par') NULL @@ -1034,7 +1034,7 @@ c int not null, primary key (a,b)) partition by key (a) subpartition by key (a, b); -ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning +ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLD_DATADIR/test/t1.par'); load_file('$MYSQLD_DATADIR/test/t1.par') NULL @@ -1045,7 +1045,7 @@ c int not null, primary key (a,b)) partition by key (a) subpartition by hash (a+b); -ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning +ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLD_DATADIR/test/t1.par'); load_file('$MYSQLD_DATADIR/test/t1.par') NULL @@ -1056,7 +1056,7 @@ c int not null, primary key (a,b)) partition by key (a) subpartition by key (b); -ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning +ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLD_DATADIR/test/t1.par'); load_file('$MYSQLD_DATADIR/test/t1.par') NULL @@ -1067,7 +1067,7 @@ c int not null, primary key (a,b)) partition by key (a) subpartition by key (a, b); -ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning +ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLD_DATADIR/test/t1.par'); load_file('$MYSQLD_DATADIR/test/t1.par') NULL @@ -1078,7 +1078,7 @@ c int not null, primary key (a,b)) partition by key (a) subpartition by hash (a+b); -ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning +ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLD_DATADIR/test/t1.par'); load_file('$MYSQLD_DATADIR/test/t1.par') NULL @@ -1135,7 +1135,7 @@ c int not null, primary key (a,b)) partition by key (a) subpartition by hash (3+4); -ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning +ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning CREATE TABLE t1 ( a int not null, b int not null, diff --git a/mysql-test/t/mysqld--help.test b/mysql-test/t/mysqld--help.test index f186e2f4559..1613f8e7a4f 100644 --- a/mysql-test/t/mysqld--help.test +++ b/mysql-test/t/mysqld--help.test @@ -5,7 +5,6 @@ --source include/have_perfschema.inc --source include/have_profiling.inc --source include/platform.inc ---source include/have_xtradb.inc # # force lower-case-table-names=1 (linux/macosx have different defaults) diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 9399ec9d359..6e4426ab1b9 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -1692,7 +1692,8 @@ Item_func_now::Item_func_now(THD *thd, uint dec) : Item_datetimefunc(thd, new (thd->mem_root) Item_decimal(thd, dec, TRUE)), last_query_id(0) { - decimals = dec; + decimals= dec; + maybe_null= true; } diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 1ff2266f033..98b41f38fc6 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -5104,7 +5104,8 @@ that are reorganised. if (is_name_in_list(part_elem->partition_name, alter_info->partition_names)) { - if (part_elem->type() == partition_element::AS_OF_NOW) + if (tab_part_info->part_type == VERSIONING_PARTITION && + part_elem->type() == partition_element::AS_OF_NOW) { DBUG_ASSERT(table && table->s && table->s->table_name.str); my_error(ER_VERS_WRONG_PARTS, MYF(0), table->s->table_name.str); |