This problem occurs on Windows 32bit and Windows 64bit.
To reproduce this bug, create this simple table.
DROP TABLE `cma`; CREATE TABLE `cma` ( `a` binary(16) NOT NULL, `b` bigint(20) unsigned NOT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Execute the following statement twice
INSERT INTO cma (a, b) VALUES ('foobar',13836376518955650385) ON DUPLICATE KEY UPDATE b=GREATEST(b,VALUES(b));
A workaround may be to use CAST(GREATEST(...) AS UNSIGNED) .
This problem occurs on Windows 32bit and Windows 64bit.
To reproduce this bug, create this simple table.
DROP TABLE `cma`;
CREATE TABLE `cma` (
`a` binary(16) NOT NULL,
`b` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Execute the following statement twice
INSERT INTO cma ,13836376518955 650385) b,VALUES( b));
(a, b)
VALUES ('foobar'
ON DUPLICATE KEY UPDATE
b=GREATEST(
A workaround may be to use CAST(GREATEST(...) AS UNSIGNED) .