Commit 7b2238d4 authored by andrey@lmy004's avatar andrey@lmy004

Merge

parents 8238f355 72549b13
...@@ -586,6 +586,11 @@ DESC t2; ...@@ -586,6 +586,11 @@ DESC t2;
Field Type Null Key Default Extra Field Type Null Key Default Extra
f2 varchar(86) YES NULL f2 varchar(86) YES NULL
DROP TABLE t1,t2; DROP TABLE t1,t2;
CREATE TABLE t12913 (f1 ENUM ('a','b')) AS SELECT 'a' AS f1;
SELECT * FROM t12913;
f1
a
DROP TABLE t12913;
create database mysqltest; create database mysqltest;
use mysqltest; use mysqltest;
drop database mysqltest; drop database mysqltest;
......
...@@ -494,6 +494,13 @@ AS f2 FROM t1; ...@@ -494,6 +494,13 @@ AS f2 FROM t1;
DESC t2; DESC t2;
DROP TABLE t1,t2; DROP TABLE t1,t2;
#
# Bug#12913 Simple SQL can crash server or connection
#
CREATE TABLE t12913 (f1 ENUM ('a','b')) AS SELECT 'a' AS f1;
SELECT * FROM t12913;
DROP TABLE t12913;
# #
# Bug#11028: Crash on create table like # Bug#11028: Crash on create table like
# #
......
...@@ -678,6 +678,7 @@ int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info, ...@@ -678,6 +678,7 @@ int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
if (!(sql_field->flags & NOT_NULL_FLAG)) if (!(sql_field->flags & NOT_NULL_FLAG))
null_fields--; null_fields--;
sql_field->flags= dup_field->flags; sql_field->flags= dup_field->flags;
sql_field->interval= dup_field->interval;
it2.remove(); // Remove first (create) definition it2.remove(); // Remove first (create) definition
select_field_pos--; select_field_pos--;
break; break;
......
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