From 1a0b986e783cf490f9df99d576bee8c732fdcbd3 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 27 Dec 2017 15:16:17 +0100 Subject: [PATCH] MDEV-14764 Confusing error message: Table `t1` must have at least one temporal column compiler warning (mix of bool and enum in ?:) --- mysql-test/suite/versioning/r/alter.result | 2 +- mysql-test/suite/versioning/r/create.result | 2 +- sql/share/errmsg-utf8.txt | 2 +- sql/sql_base.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/versioning/r/alter.result b/mysql-test/suite/versioning/r/alter.result index 4f891cf4a8f..2cac5d2f21a 100644 --- a/mysql-test/suite/versioning/r/alter.result +++ b/mysql-test/suite/versioning/r/alter.result @@ -447,7 +447,7 @@ Warnings: Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID create or replace table t (a int) with system versioning; alter table t drop column a; -ERROR HY000: Table `t` must have at least one temporal column +ERROR HY000: Table `t` must have at least one versioned column alter table t drop column a, drop column a; ERROR 42000: Can't DROP COLUMN `a`; check that it exists drop database test; diff --git a/mysql-test/suite/versioning/r/create.result b/mysql-test/suite/versioning/r/create.result index 6179ed81bca..01dba9526b8 100644 --- a/mysql-test/suite/versioning/r/create.result +++ b/mysql-test/suite/versioning/r/create.result @@ -164,7 +164,7 @@ x21 int without system versioning create or replace table t1 ( x22 int without system versioning ) with system versioning; -ERROR HY000: Table `t1` must have at least one temporal column +ERROR HY000: Table `t1` must have at least one versioned column create or replace table t1 (a int) with system versioning; create table tt1 like t1; show create table tt1; diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index ebf149fd6e7..0cf913bfac8 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -7880,7 +7880,7 @@ ER_VERS_DIFFERENT_TABLES eng "Wrong parameters for %`s: system fields selected from different tables" ER_VERS_TABLE_MUST_HAVE_COLUMNS - eng "Table %`s must have at least one temporal column" + eng "Table %`s must have at least one versioned column" ER_VERS_NOT_VERSIONED eng "Table %`s is not system-versioned" diff --git a/sql/sql_base.cc b/sql/sql_base.cc index a1d09faae6a..b1b67843203 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -7649,7 +7649,7 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name, if ((field= field_iterator.field()) && (field->vers_sys_field() ? field->vers_sys_invisible(thd) : - field->invisible)) + field->invisible != VISIBLE)) { continue; }