Bug #7275 Test failure: 'strict' (out-of-range values accepted?)

Submitted: 14 Dec 2004 16:31 Modified: 17 Jan 2005 13:42
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.3-pre OS:Linux (Linux / Athlon)
Assigned to: Ramil Kalimullin CPU Architecture:Any

[14 Dec 2004 16:31] Joerg Bruehe
Description:
Test 'select' fails for me in current 5.0,  
in a default run and when I run the test suite with '--ps-protocol'.
See the end for the tiny difference between both runs.

This is a non-debug build: 'compile-pentium-max'.

Failure report:
=== cut ===
strict                         [ fail ]

Errors are (from /M50/push-5.0/mysql-test/var/log/mysqltest-time) :
/M50/push-5.0/client/.libs/mysqltest: At line 351: query 'INSERT INTO t1 (col1) VALUES(-2147483649.0)' succeeded - should have failed with errno 1264...
/M50/push-5.0/client/.libs/mysqltest: At line 412: query 'INSERT INTO t1 (col1) VALUES(-9223372036854785809.0)' succeeded - should have failed with errno 1264...
/M50/push-5.0/client/.libs/mysqltest: At line 414: query 'INSERT INTO t1 (col1) VALUES(9223372036854785808.0)' succeeded - should have failed with errno 1264...
/M50/push-5.0/client/.libs/mysqltest: At line 642: Result length mismatch
(the last lines may be the most important ones)
Below are the diffs between actual and expected results:
-------------------------------------------------------
*** r/strict.result     2004-12-09 16:27:37.000000000 +0300
--- r/strict.reject     2004-12-14 13:26:33.000000000 +0300
***************
*** 485,491 ****
  INSERT INTO t1 (col2) VALUES('4294967296');
  ERROR 22003: Out of range value adjusted for column 'col2' at row 1
  INSERT INTO t1 (col1) VALUES(-2147483649.0);
- ERROR 22003: Out of range value adjusted for column 'col1' at row 1
  INSERT INTO t1 (col1) VALUES(2147643648.0);
  ERROR 22003: Out of range value adjusted for column 'col1' at row 1
  INSERT INTO t1 (col2) VALUES(-1.0);
--- 485,490 ----
***************
*** 527,533 ****
  Warning       1264    Out of range value adjusted for column 'col2' at row 2
  INSERT IGNORE INTO t1 values (-2147483649.0, -1.0),(2147643648.0,4294967296.0);
  Warnings:
- Warning       1264    Out of range value adjusted for column 'col1' at row 1
  Warning       1264    Out of range value adjusted for column 'col2' at row 1
  Warning       1264    Out of range value adjusted for column 'col1' at row 2
  Warning       1264    Out of range value adjusted for column 'col2' at row 2
--- 526,531 ----
***************
*** 542,554 ****
  2147483647    4294967295
  -2147483648   0
  2147483647    4294967295
  2     NULL
  NULL  NULL
  -2147483648   0
  2147483647    4294967295
  -2147483648   0
  2147483647    4294967295
! -2147483648   0
  2147483647    4294967295
  DROP TABLE t1;
  CREATE TABLE t1 (col1 BIGINT, col2 BIGINT UNSIGNED);
--- 540,553 ----
  2147483647    4294967295
  -2147483648   0
  2147483647    4294967295
+ 2147483647    NULL
  2     NULL
  NULL  NULL
  -2147483648   0
  2147483647    4294967295
  -2147483648   0
  2147483647    4294967295
! 2147483647    0
  2147483647    4294967295
  DROP TABLE t1;
  CREATE TABLE t1 (col1 BIGINT, col2 BIGINT UNSIGNED);
***************
*** 569,577 ****
  INSERT INTO t1 (col2) VALUES('18446744073709551616');
  ERROR 22003: Out of range value adjusted for column 'col2' at row 1
  INSERT INTO t1 (col1) VALUES(-9223372036854785809.0);
- ERROR 22003: Out of range value adjusted for column 'col1' at row 1
  INSERT INTO t1 (col1) VALUES(9223372036854785808.0);
- ERROR 22003: Out of range value adjusted for column 'col1' at row 1
  INSERT INTO t1 (col2) VALUES(-1.0);
  ERROR 22003: Out of range value adjusted for column 'col2' at row 1
  INSERT INTO t1 (col2) VALUES(18446744073709551616.0);
--- 568,574 ----
***************
*** 604,612 ****
  Warning       1264    Out of range value adjusted for column 'col2' at row 2
  INSERT IGNORE INTO t1 VALUES(-9223372036854785809.0,-1.0),(9223372036854785808.0,18446744073709551616.0);
  Warnings:
- Warning       1264    Out of range value adjusted for column 'col1' at row 1
  Warning       1264    Out of range value adjusted for column 'col2' at row 1
- Warning       1264    Out of range value adjusted for column 'col1' at row 2
  Warning       1264    Out of range value adjusted for column 'col2' at row 2
  UPDATE IGNORE t1 SET col2=1/NULL where col1=0;
  SELECT * FROM t1;
--- 601,607 ----
***************
*** 616,626 ****
  9223372036854775807   18446744073709551615
  -9223372036854775808  0
  9223372036854775807   18446744073709551615
! -9223372036854773760  0
  9223372036854775807   1844674407370953984
  -9223372036854775808  NULL
  -9223372036854775808  NULL
  NULL  18446744073709551615
  2     NULL
  NULL  NULL
  -9223372036854775808  18446744073709551615
--- 611,623 ----
  9223372036854775807   18446744073709551615
  -9223372036854775808  0
  9223372036854775807   18446744073709551615
! -9223372036854775808  0
  9223372036854775807   1844674407370953984
  -9223372036854775808  NULL
  -9223372036854775808  NULL
  NULL  18446744073709551615
+ -9223372036854775808  NULL
+ 9223372036854775807   NULL
  2     NULL
  NULL  NULL
  -9223372036854775808  18446744073709551615
***************

If run with '--ps-protocol', there is another difference following:

***************
*** 809,815 ****
  0     NULL
  2     NULL
  NULL  NULL
! 1.79769313486232e+308 0
  DROP TABLE t1;
  CREATE TABLE t1 (col1 CHAR(5), col2 VARCHAR(6));
  INSERT INTO t1 VALUES ('hello', 'hello'),('he', 'he'),('hello   ', 'hello ');
--- 806,812 ----
  0     NULL
  2     NULL
  NULL  NULL
! 1.7976931348623e+308  0
  DROP TABLE t1;
  CREATE TABLE t1 (col1 CHAR(5), col2 VARCHAR(6));
  INSERT INTO t1 VALUES ('hello', 'hello'),('he', 'he'),('hello   ', 'hello ');
-------------------------------------------------------

Latest changeset on my PC:
ChangeSet@1.1738, 2004-12-14 13:41:32+03:00, gluh@gluh.mysql.r18.ru
  Fix for bug #7223: information_schema: error in "views"

The error is older, as I got it already yesterday but did not yet report.

How to repeat:
Run the test suite.
[14 Dec 2004 17:49] Trudy Pelzer
I'm running 5.0.3-alpha-debug on SuSE 9.1 and I can't repeat
the failure with the INTEGER column. But the failure with the
BIGINT column is a known bug: #5913.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.