Drizzledump not handling FLOAT UNSIGNED when migrating from MySQL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
High
|
Andrew Hutchings | ||
7.0 |
Fix Released
|
High
|
Andrew Hutchings |
Bug Description
This MySQL table:
CREATE TABLE float_table(
col_float_unsigned float unsigned,
col_float0 float(0),
col_float1 float(1),
col_float float,
col_float_5_2 float(5,2),
col_float_23 float(23,1),
col_float_not_null float NOT NULL,
col_float_
col_float_default float(5,2) DEFAULT 999.99
) ENGINE=MyISAM;
Produces this Drizzledump output:
CREATE TABLE `float_table` (
`description` TEXT COLLATE utf8_general_ci DEFAULT NULL,
`col_
`col_float0` DOUBLE DEFAULT NULL,
`col_float1` DOUBLE DEFAULT NULL,
`col_float` DOUBLE DEFAULT NULL,
`col_float_5_2` DOUBLE(5,2) DEFAULT NULL,
`col_float_23` DOUBLE(23,1) DEFAULT NULL,
`col_
`col_
`col_
) ENGINE='InnoDB' COLLATE=
Drizzle doesn't like the FLOAT UNSIGNED one bit : )
Related branches
- Lee Bieber (community): Needs Fixing
-
Diff: 138 lines (+20/-21)5 files modifiedclient/drizzledump.cc (+5/-6)
client/drizzledump_data.cc (+5/-0)
client/drizzledump_data.h (+1/-0)
client/drizzledump_drizzle.cc (+2/-2)
client/drizzledump_mysql.cc (+7/-13)
Changed in drizzle: | |
status: | New → Confirmed |
assignee: | nobody → Andrew Hutchings (linuxjedi) |
summary: |
- Drizzledump not handling FLOAT UNSIGNED + Drizzledump not handling FLOAT UNSIGNED when migrating from MySQL |
That is because FLOAT is an alias for DOUBLE in Drizzle and we have no UNSIGNED. So:
drizzle> create table t4 (a float(5,2));
Query OK, 0 rows affected (0.09 sec)
drizzle> show create table t4\G ******* ******* ****** 1. row ******* ******* ******* ******
*******
Table: t4
Create Table: CREATE TABLE `t4` (
`a` DOUBLE(5,2) DEFAULT NULL
) ENGINE=InnoDB COLLATE = utf8_general_ci
1 row in set (0 sec)
drizzle> create table t5 (a float(5,2) unsigned);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 'unsigned)' at line 1