mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Follow-up to B-g#15776, test failures on 64-bit linux.
Make maximum blob size to be 2**32-1, regardless of word size. Fix failure of timestamp with size of 2**31-1. The method of rounding up to the nearest even number would overflow.
This commit is contained in:
@ -880,9 +880,13 @@ Warnings:
|
||||
Warning 1287 'TIMESTAMP(4294967294)' is deprecated; use 'TIMESTAMP' instead
|
||||
DROP TABLE b15776;
|
||||
CREATE TABLE b15776 (a timestamp(4294967295));
|
||||
ERROR 42000: Display width out of range for column 'a' (max = 255)
|
||||
Warnings:
|
||||
Warning 1287 'TIMESTAMP(4294967295)' is deprecated; use 'TIMESTAMP' instead
|
||||
DROP TABLE b15776;
|
||||
CREATE TABLE b15776 (a timestamp(4294967296));
|
||||
ERROR 42000: Display width out of range for column 'a' (max = 4294967295)
|
||||
CREATE TABLE b15776 (a timestamp(-1));
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1))' at line 1
|
||||
CREATE TABLE b15776 (a timestamp(-2));
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2))' at line 1
|
||||
CREATE TABLE b15776 (a int(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
|
||||
|
@ -528,11 +528,13 @@ CREATE TABLE b15776 (a year(-2));
|
||||
## For timestamp, we silently rewrite widths to 14 or 19.
|
||||
CREATE TABLE b15776 (a timestamp(4294967294));
|
||||
DROP TABLE b15776;
|
||||
--error ER_TOO_BIG_DISPLAYWIDTH
|
||||
CREATE TABLE b15776 (a timestamp(4294967295));
|
||||
DROP TABLE b15776;
|
||||
--error ER_TOO_BIG_DISPLAYWIDTH
|
||||
CREATE TABLE b15776 (a timestamp(4294967296));
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE TABLE b15776 (a timestamp(-1));
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE TABLE b15776 (a timestamp(-2));
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user