can CREATE TABLE with ENUM column with > 2^16 values
Bug #589031 reported by
Stewart Smith
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Medium
|
Stewart Smith | ||
Dexter |
Fix Released
|
Medium
|
Stewart Smith |
Bug Description
If you CREATE TABLE with an ENUM column with 70,000 elements you get:
drizzle> source /tmp/a
Query OK, 0 rows affected (4 min 20 sec)
drizzle> show tables;
+------
| Tables_in_test |
+------
| too_many_
+------
1 row in set (0 sec)
drizzle> insert into too_many_
Query OK, 1 row affected (0.21 sec)
drizzle> select * from too_many_
+-------------+
| many_values |
+-------------+
| a4463 |
+-------------+
1 row in set (0 sec)
Which is very wrong.
a) ENUM cannot have more than 2**16
b) incorrect data
c) over 4 minutes to run CREATE TABLE sets a new record.
Related branches
lp:~stewart/drizzle/bug579310-enum-type-cleanup
- Jay Pipes: Pending requested
- Brian Aker: Pending requested
- Drizzle Developers: Pending requested
-
Diff: 498 lines (+178/-70)17 files modifiedclient/drizzletest.cc (+1/-1)
drizzled/field/enum.cc (+20/-56)
drizzled/field/enum.h (+4/-6)
drizzled/sql_table.cc (+36/-2)
drizzled/table_share.cc (+14/-0)
plugin/embedded_innodb/embedded_innodb_engine.cc (+2/-1)
plugin/tableprototester/tableprototester.cc (+46/-1)
plugin/tableprototester/tests/r/basic.result (+1/-0)
plugin/tableprototester/tests/r/missing_engine.result (+2/-2)
plugin/tableprototester/tests/r/too_many_enum_values.result (+4/-0)
plugin/tableprototester/tests/t/missing_engine.test (+1/-1)
plugin/tableprototester/tests/t/too_many_enum_values-master.opt (+1/-0)
plugin/tableprototester/tests/t/too_many_enum_values.test (+5/-0)
tests/r/type_enum_max_elements.result (+17/-0)
tests/r/type_enum_too_many_elements.result (+1/-0)
tests/t/type_enum_max_elements.test (+17/-0)
tests/t/type_enum_too_many_elements.test (+6/-0)
Changed in drizzle: | |
status: | Confirmed → Fix Committed |
Changed in drizzle: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The MySQL bug is completely different, largely due to limits in the FRM file format: bugs.mysql. com/bug. php?id= 54194
http://
i.e. the limit of the FRM file is 64kb-ish