Bug #87646 MySQL Workbench JSON Editor Transform Big Numbers To Negative Numbers
Submitted: 3 Sep 2017 12:39 Modified: 3 May 2018 18:09
Reporter: Shay Cohen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S1 (Critical)
Version:5.3.9 OS:Windows (Windows 10)
Assigned to: CPU Architecture:Any

[3 Sep 2017 12:39] Shay Cohen
Description:
When opening a json column value by "Open Value in Editor" and going to the JSON tab, large numbers becoming negative. When applying the editor changes you can see in the command output it truly changes.

How to repeat:
Run the following script from MYSQL Workbench query tab (After connecting to a mysql):
CREATE SCHEMA `example` DEFAULT CHARACTER SET utf8 ;

CREATE TABLE `example`.`example_table` (
  `id` INT NOT NULL,
  `value` JSON NOT NULL,
  PRIMARY KEY (`id`));
  
  
INSERT INTO `example`.`example_table` (`id`,`value`) VALUES(1, "{\"number\":2147483648}");

SELECT * FROM `example`.`example_table`;

Right click on the value result of the query.
Choose "Open Value in Editor".
Go to the "JSON" tab.
You will see:
{
	"number" : -2147483648
}

Also applying from the editor will result with the following command:
UPDATE `example`.`example_table` SET `value`='{\n	\"number\" : -2147483648\n}' WHERE `id`='1';
[3 Sep 2017 13:03] MySQL Verification Team
Thank you for the bug report.
[3 May 2018 18:09] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 8.0.12 release, and here's the changelog entry:

The JSON tab of the Edit Data for Value dialog box displayed large column
values as negative numbers when the numbers were positive.

Thank you for the bug report.