From 25bfbf684c0fefe658f6244e1f2cf23dd0246eae Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Wed, 23 Jun 2010 19:25:31 +0300 Subject: Bug #53814: NUMERIC_PRECISION for unsigned bigint field is 19, should be 20 Fixed the numeric precision of the unsigned BIGINT column to be 20 instead of 19. --- mysql-test/r/information_schema.result | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'mysql-test/r/information_schema.result') diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index b7b65598c6d..0da9ed40b9a 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1757,4 +1757,21 @@ WHERE INFORMATION_SCHEMA.COLUMNS.TABLE_NAME = 'variables'; COLUMN_DEFAULT TABLE_NAME NULL variables DROP TABLE variables; +# +# Bug #53814: NUMERIC_PRECISION for unsigned bigint field is 19, +# should be 20 +# +CREATE TABLE ubig (a BIGINT, b BIGINT UNSIGNED); +SELECT TABLE_NAME, COLUMN_NAME, NUMERIC_PRECISION +FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='ubig'; +TABLE_NAME COLUMN_NAME NUMERIC_PRECISION +ubig a 19 +ubig b 20 +INSERT INTO ubig VALUES (0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +SELECT length(CAST(b AS CHAR)) FROM ubig; +length(CAST(b AS CHAR)) +20 +DROP TABLE ubig; End of 5.1 tests. -- cgit v1.2.1