Commit 5ffa6904 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA...

MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA instead of ER_TABLE_MUST_HAVE_COLUMNS
parent f3c63615
...@@ -2607,3 +2607,5 @@ a b ...@@ -2607,3 +2607,5 @@ a b
1 1 1 1
unlock tables; unlock tables;
drop table t1,t2; drop table t1,t2;
create table t1;
ERROR 42000: A table must have at least 1 column
...@@ -2019,3 +2019,10 @@ connection default; ...@@ -2019,3 +2019,10 @@ connection default;
select * from t1; select * from t1;
unlock tables; unlock tables;
drop table t1,t2; drop table t1,t2;
#
# MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA instead of ER_TABLE_MUST_HAVE_COLUMNS
#
--error ER_TABLE_MUST_HAVE_COLUMNS
create table t1;
...@@ -4579,7 +4579,7 @@ bool create_table_impl(THD *thd, ...@@ -4579,7 +4579,7 @@ bool create_table_impl(THD *thd,
if (!hton->discover_table_structure) if (!hton->discover_table_structure)
{ {
my_error(ER_ILLEGAL_HA, MYF(0), hton_name(hton)->str, db, table_name); my_error(ER_TABLE_MUST_HAVE_COLUMNS, MYF(0));
goto err; goto err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment