TablePlus-Windows
TablePlus-Windows copied to clipboard
Beautifying messes up bit values
-
Which driver are you using and version of it (Ex: PostgreSQL 10.0): MySQL 8.0.11
-
Which TablePlus build number are you using (the number on the welcome screen, Ex: build 81): 4.1.2 (170)
-
The steps to reproduce this issue:
- Table with a
bit
column - Set the bit column to a bit.
- Menu>Edit>Preview...
- Copy the preview SQL, paste into SQL Query.
- Note valid MySQL formatting for the bit (Query 1)
- Click "Beautify". Note improper MySQL formatting (Query 2)
- Click Run Current.
- Returns
Query 1: syntax error at position 63 near '0'
- Table with a
Noted: If the bug is related to data, please attach an example SQL data.
Query 1:
UPDATE `test_data`.`test_table` SET `bit_data` = b'0' WHERE `id` = 1 AND `bit_data` = b'';
Query 2:
UPDATE
`test_data`.`test_table`
SET
`bit_data` = b '0'
WHERE
`id` = 1
AND `bit_data` = b '';
Table settings:
First row is default value of serial
(unrelated to this issue, but the SQL generated for this does not work CREATE TABLE `test_data`.`test_table` (`id` serial,`bit_data` BIT);
, and attempting to commit the table addition will result in syntax error at position 46 near 'serial'
After creation: