Bug #25585 Make test fails for 5.0.33
Submitted: 12 Jan 2007 13:09 Modified: 12 Jan 2007 14:44
Reporter: Sebastian Nohn Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Views Severity:S3 (Non-critical)
Version:5.0.33 OS:Linux (Linux 2.6.15 (Ubuntu 6.06))
Assigned to: CPU Architecture:Any

[12 Jan 2007 13:09] Sebastian Nohn
Description:
Logging: ./mysql-test-run --force
MySQL Version 5.0.33
Skipping ndbcluster, mysqld not compiled with ndbcluster
Skipping SSL, mysqld not compiled with SSL
Using MTR_BUILD_THREAD      = 0
Using MASTER_MYPORT         = 9306
[...]
varbinary                      [ pass ]             56
variables                      [ pass ]            573
view                           [ fail ]

Errors are (from /home/sebastian/Work/MySQL/mysql-5.0.33/mysql-test/var/log/mysqltest-time) :
mysqltest: Result content mismatch
(the last lines may be the most important ones)
Below are the diffs between actual and expected results:
-------------------------------------------------------
*** r/view.result       2007-01-09 16:09:33.000000000 +0300
--- r/view.reject       2007-01-12 16:04:03.000000000 +0300
***************
*** 2686,2697 ****
  v1    CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(now()) - year(`t1`.`DOB`)) AS `Age`
 from `t1` having (`Age` < 75)
  SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
  Age
! 42
! 38
  SELECT * FROM v1;
  Age
! 42
! 38
  DROP VIEW v1;
  DROP TABLE t1;
  CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, a char(6) DEFAULT 'xxx');
--- 2686,2697 ----
  v1    CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(now()) - year(`t1`.`DOB`)) AS `Age`
 from `t1` having (`Age` < 75)
  SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
  Age
! 43
! 39
  SELECT * FROM v1;
  Age
! 43
! 39
  DROP VIEW v1;
  DROP TABLE t1;
  CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, a char(6) DEFAULT 'xxx');
-------------------------------------------------------
Please follow the instructions outlined at
http://www.mysql.com/doc/en/Reporting_mysqltest_bugs.html
to find the reason to this problem and how to report this.

Result from queries before failure can be found in r/view.log

Stopping All Servers
Shutting-down Instance Manager
Restoring snapshot of databases
Resuming Tests

view_grant                     [ pass ]            395
view_query_cache               [ pass ]             43
wait_timeout                   [ pass ]           2227
warnings                       [ pass ]            116
windows                        [ skipped ]   Test requires: 'true'
xa                             [ pass ]             33
-------------------------------------------------------
Stopping All Servers
Shutting-down Instance Manager
Failed 1/397 tests, 99.75% were successful.

The log files in var/log may give you some hint
of what went wrong.
If you want to report this error, please read first the documentation at
http://www.mysql.com/doc/en/MySQL_test_suite.html
The servers were restarted 101 times
Spent 537.31 seconds actually executing testcases

mysql-test-run in default mode: *** Failing the test(s): view

How to repeat:
$ BUIlD/compile-pentium
$ cd mysql -test
$ ./mysql-test-run --force
[12 Jan 2007 13:13] Valeriy Kravchuk
Test does not fail with 5.0.34-BK:

openxs@suse:~/dbs/5.0/mysql-test> ./mysql-test-run --force varbinary variables
view
Logging: ./mysql-test-run --force varbinary variables view
MySQL Version 5.0.34
Using ndbcluster when necessary, mysqld supports it
Skipping SSL, mysqld not compiled with SSL
Binaries are debug compiled
mysql-test-run: WARNING: Could not find all required ndb binaries, all ndb tests
 will fail, use --skip-ndbcluster to skip testing it.
Using MTR_BUILD_THREAD      = 0
Using MASTER_MYPORT         = 9306
Using MASTER_MYPORT1        = 9307
Using SLAVE_MYPORT          = 9308
Using SLAVE_MYPORT1         = 9309
Using SLAVE_MYPORT2         = 9310
Using NDBCLUSTER_PORT       = 9310
Using IM_PORT               = 9312
Using IM_MYSQLD1_PORT       = 9313
Using IM_MYSQLD2_PORT       = 9314
Killing Possible Leftover Processes
Removing Stale Files
Creating Directories
Installing Master Database
Installing Master Database
Saving snapshot of installed databases
=======================================================
Starting Tests in the 'main' suite

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

varbinary                      [ pass ]            138
variables                      [ pass ]            790
view                           [ pass ]           5261
-------------------------------------------------------
Stopping All Servers
All 3 tests were successful.
The servers were restarted 3 times
Spent 6.189 seconds actually executing testcases

Please, specify gcc, glibc versions used. Is it 64-bit platform?
[12 Jan 2007 13:18] Sebastian Nohn
$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --with-tune=pentium4 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)

libc6 2.3.6-0ubuntu20

It is 64 bit (Opteron) but running on 32 bit OS.
[12 Jan 2007 14:20] Hakan Küçükyılmaz
Duplicate of BUG##25359.

Regards, Hakan
[12 Jan 2007 14:21] Hakan Küçükyılmaz
Sorry for typo. Duplicate of BUG#25359.
[12 Jan 2007 14:44] Sebastian Nohn
I can verify the fix with latest BK on my machine:

$ ./mysql-test-run --force varbinary variables view
Logging: ./mysql-test-run --force varbinary variables view
MySQL Version 5.0.34
Skipping ndbcluster, mysqld not compiled with ndbcluster
Skipping SSL, mysqld not compiled with SSL
Using MTR_BUILD_THREAD      = 0
Using MASTER_MYPORT         = 9306
Using MASTER_MYPORT1        = 9307
Using SLAVE_MYPORT          = 9308
Using SLAVE_MYPORT1         = 9309
Using SLAVE_MYPORT2         = 9310
Using IM_PORT               = 9312
Using IM_MYSQLD1_PORT       = 9313
Using IM_MYSQLD2_PORT       = 9314
Killing Possible Leftover Processes
Removing Stale Files
Creating Directories
Installing Master Database
Installing Master Database
Saving snapshot of installed databases
=======================================================
Starting Tests in the 'main' suite

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

varbinary                      [ pass ]             86
variables                      [ pass ]            568
view                           [ pass ]           2259
-------------------------------------------------------
Stopping All Servers
All 3 tests were successful.
The servers were restarted 1 times
Spent 2.913 seconds actually executing testcases