Skip to content

Commit

Permalink
SQL, Test: main suite [fixes #300]
Browse files Browse the repository at this point in the history
  • Loading branch information
midenok committed Nov 13, 2017
1 parent 73f655d commit 1d9d351
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 11 deletions.
19 changes: 19 additions & 0 deletions mysql-test/r/mysqld--help.result
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/r/partition.result
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
14 changes: 7 additions & 7 deletions mysql-test/r/partition_error.result
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion mysql-test/t/mysqld--help.test
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion sql/item_timefunc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down
3 changes: 2 additions & 1 deletion sql/sql_partition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1d9d351

Please sign in to comment.