Bug #17265 Assertion failure in rpl_row_view01 test with ps-protocol+row-based binlog
Submitted: 9 Feb 2006 8:04 Modified: 28 Feb 2006 0:42
Reporter: Kristian Nielsen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.1.7 (latest bitkeeper) OS:Linux (Linux x86)
Assigned to: Andrei Elkin CPU Architecture:Any

[9 Feb 2006 8:04] Kristian Nielsen
Description:
After this push to mysql-5.1-new:

    https://intranet.mysql.com/~knielsen/pb/mysql-5.1-new/418.html

ChangeSet
  1.2090.1.1 06/02/08 22:00:11 jmiller@mysql.com +7 -0
  Missed a check in of new results for rpl_relay_space_myisam

the server dies on an assertion in the rpl_row_view01 test:

mysqld: item.cc:5066: virtual bool Item_direct_view_ref::eq(const Item*, bool) const: Assertion `(*ref)->type() == FIELD_ITEM && (item_ref_ref->type() == FIELD_ITEM)' failed.

This failure happens only when testing with both --ps-protocol and --mysqld=--binlog-format=row.

The problem was introduced with the above push, but that push only contains additions to the test suite, so the problem must have existed before, undetected.

How to repeat:
Run the testsuite like this:

    MTR_BUILD_THREAD=4 ./mysql-test-run.pl --ps-protocol --mysqld=--binlog-format=row --skip-ndb rpl_row_view01
[9 Feb 2006 11:03] Jonathan Miller
Unable to reproduce on:
Linux ndb08 2.6.12-1.1447_FC4smp #1 SMP Fri Aug 26 20:57:13 EDT 2005 i686 athlon i386 GNU/Linux

Test passes using  MTR_BUILD_THREAD=4 ./mysql-test-run.pl --ps-protocol --mysqld=--binlog-format=row --skip-ndb rpl_row_view01

ndbdev@ndb08:~/jmiller/clones/mysql-5.1-new/mysql-test> MTR_BUILD_THREAD=4 ./mysql-test-run.pl --ps-protocol --mysqld=--binlog-format=row --skip-ndb rpl_row_view01
Skipping ndbcluster
Setting mysqld to support SSL connections
Using MTR_BUILD_THREAD = 4
Using MASTER_MYPORT    = 8280
Using MASTER_MYPORT1   = 8281
Using SLAVE_MYPORT     = 8296
Using NDBCLUSTER_PORT  = 8304
Using NDBCLUSTER_PORT_SLAVE = 8312
Using IM_MYSQLD1_PORT  = 8292
Using IM_MYSQLD2_PORT  = 8294
Killing Possible Leftover Processes
Removing Stale Files
Installing Master Databases
Installing Master Databases
Installing Slave Databases
Installing Slave Databases
Installing Slave Databases
Creating IM password file (/home/ndbdev/jmiller/clones/mysql-5.1-new/mysql-test/var/im.passwd)
Installing Im_mysqld_1 Databases
Installing Im_mysqld_2 Databases
=======================================================
Finding  Tests in the 'main' suite
Starting Tests in the 'main' suite

TEST                           RESULT
-------------------------------------------------------

rpl_row_view01                 [ pass ]
-------------------------------------------------------
Ending Tests
Shutting-down MySQL daemon

Master(s) shutdown finished
Slave(s) shutdown finished
All 1 tests were successful.
[15 Feb 2006 15:21] Andrei Elkin
Reproduced it without --binlog-format=bin. To run
cat <<. >t/ordered_select_from_2nd_level_view.test
--disable_warnings
create database if not exists mysqltest1;
DROP VIEW IF EXISTS mysqltest1.v3;
DROP VIEW IF EXISTS mysqltest1.v4;
DROP TABLE IF EXISTS mysqltest1.t1;
--enable_warnings

CREATE TABLE mysqltest1.t1 (a INT, c CHAR(6),PRIMARY KEY(a));
INSERT INTO mysqltest1.t1 VALUES (1,'Thank'),(2,'it'),(3,'Friday');
CREATE VIEW mysqltest1.v3 AS SELECT * FROM mysqltest1.t1;
CREATE VIEW mysqltest1.v4 AS SELECT * FROM mysqltest1.v3;

#ok
SELECT * FROM mysqltest1.v4;
# failure
SELECT * FROM mysqltest1.v4 ORDER BY a;

# lets cleanup
DROP VIEW IF EXISTS mysqltest1.v3;
DROP VIEW IF EXISTS mysqltest1.v4;
DROP TABLE IF EXISTS mysqltest1.t1;
.

mysql-test-run ---ps-protocol -record ordered_select_from_2nd_level_view.test

According to symptoms relateness to replication can be excluded.
[18 Feb 2006 16:43] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/2853
[18 Feb 2006 20:20] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/2862
[18 Feb 2006 22:39] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/2863
[22 Feb 2006 10:02] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/3020
[22 Feb 2006 15:08] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/3025
[23 Feb 2006 3:38] Paul DuBois
Unreleased versions only. No changelog entry needed.
[28 Feb 2006 0:42] Paul DuBois
Still no changelog entry needed.