| Bug #73492 | NULL gets 'NULL' after reimport recordset | ||
|---|---|---|---|
| Submitted: | 7 Aug 2014 7:29 | Modified: | 23 Jan 2017 17:21 |
| Reporter: | Thorsten Scheckenbach | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Workbench: SQL Editor | Severity: | S2 (Serious) |
| Version: | 6.1, 6.1.7 | OS: | MacOS (10.9.4) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | export, recordset | ||
[7 Aug 2014 7:29]
Thorsten Scheckenbach
[7 Aug 2014 8:24]
MySQL Verification Team
Hello Thorsten Scheckenbach, Thank you for the bug report. Verified as described. Thanks, Umesh
[7 Aug 2014 8:26]
MySQL Verification Team
// How to repeat ( Win7 + WB 6.1.7)
mysql>
mysql> show create table test.t100\G
*************************** 1. row ***************************
Table: t100
Create Table: CREATE TABLE `t100` (
`id` int(11) NOT NULL,
`t100col` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
mysql> INSERT INTO test.t100(id) values(1);
Query OK, 1 row affected (0.03 sec)
mysql> SELECT * FROM test.t100;
+----+---------+
| id | t100col |
+----+---------+
| 1 | NULL |
+----+---------+
1 row in set (0.00 sec)
mysql> SELECT * FROM test.t100 where t100col is null;
+----+---------+
| id | t100col |
+----+---------+
| 1 | NULL |
+----+---------+
1 row in set (0.00 sec)
// Export table rows from WB/SQL Editor
// Export to test.csv ( ensure you removed columns headers before importing file)
mysql> truncate test.t100;
Query OK, 0 rows affected (0.38 sec)
// Import from WB/SQL Editor
// Import the dump file and notice that "apply" dailog shows SQL as (INSERT INTO `test`.`t100` (`id`, `t100col`) VALUES ('1', 'NULL');
// Confirm whether the column is NULL or string 'NULL'
mysql> SELECT * FROM test.t100;
+----+---------+
| id | t100col |
+----+---------+
| 1 | NULL |
+----+---------+
1 row in set (0.00 sec)
mysql> SELECT * FROM test.t100 where t100col is null;
Empty set (0.00 sec)
[23 Jan 2017 17:21]
Christine Cole
Posted by developer: Bug was not reproduced. No changelog entry needed.
