Bug #17214 Simple Stored Procedure produces failed: 1478:
Submitted: 8 Feb 2006 0:05 Modified: 23 Mar 2006 17:08
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S2 (Serious)
Version:5.1.7 OS:Linux (Linux 32 Bit OS)
Assigned to: Jonathan Miller CPU Architecture:Any

[8 Feb 2006 0:05] Jonathan Miller
Description:
The test case below that I am trying to track down a core with produces:

Errors are (from /home/ndbdev/jmiller/clones/mysql-5.1-new/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 26: query 'CALL test.p1()' failed: 1478: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
(the last lines may be the most important ones)

There is not subpartitioning being done in the test. The error happens on the second call to test.p1();

The results are repeatable:

How to repeat:
--disable_warnings
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
--enable_warnings
delimiter |;
CREATE PROCEDURE test.p1()
BEGIN
  CREATE TABLE IF NOT EXISTS test.t1(a INT,PRIMARY KEY(a));
  CREATE TABLE IF NOT EXISTS test.t2(a INT,PRIMARY KEY(a));
  INSERT INTO test.t1 VALUES (4),(2),(1),(3);
  UPDATE test.t1 SET a=a+4 WHERE a=4;
  INSERT INTO test.t2 (a) SELECT t1.a FROM test.t1;
AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n));
END|
CREATE PROCEDURE test.p2()
BEGIN
  DROP TABLE IF EXISTS test.t1;
  DROP TABLE IF EXISTS test.t2;
END|
delimiter ;|

CALL test.p1();
CALL test.p2();
CALL test.p1();

DROP TABLE t2;
DROP TABLE t3;
DROP TABLE t1;
[20 Mar 2006 23:03] Mikael Ronström
This bug should be fixed by patch that fixes bug #14350 and bug #17290.
Please reverify it.
[23 Mar 2006 17:08] Jonathan Miller
No longer happens with current build from 5.1.8