Description:
When creating a partition table and mysql-test-run.pl is run with the --ps-protocol flag, the creation will fail with the error message: "1064: Constant/Random expression in (sub)partitioning function is not allowed near ')
partitions 3..."
Using --ps-protocol means that the query will pass through Prepared_statement::prepare and my gues is some uninted var that makes the difference.
How to repeat:
./mysql-test-run.pl --do-test=partition --ps-protocol
Has ndbcluster support
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/msvensson/mysql/mysql-5.1/mysql-test/var/im.passwd)
Installing Im_mysqld_1 Databases
Installing Im_mysqld_2 Databases
Install ndbcluster
Starting ndbd
Starting ndbd
Waiting for started...
NDBT_ProgramExit: 0 - OK
Connected to Management Server at: localhost:9350
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=1 @127.0.0.1 (Version: 5.1.2, Nodegroup: 0, Master)
id=2 @127.0.0.1 (Version: 5.1.2, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=3 @127.0.0.1 (Version: 5.1.2)
[mysqld(API)] 4 node(s)
id=4 (not connected, accepting connect from any host)
id=5 (not connected, accepting connect from any host)
id=6 (not connected, accepting connect from any host)
id=7 (not connected, accepting connect from any host)
=======================================================
Finding Tests in the 'main' suite
Starting Tests in the 'main' suite
TEST RESULT
-------------------------------------------------------
partition [ fail ]
Errors are (from /home/msvensson/mysql/mysql-5.1/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 95: query 'CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(a,b))
partition by list (a)
partitions 3
(partition x1 values in (1,2,9,4) tablespace ts1,
partition x2 values in (3, 11, 5, 7) tablespace ts2,
partition x3 values in (16, 8, 5+19, 70-43) tablespace ts3)' failed: 1064: Constant/Random expression in (sub)partitioning function is not allowed near ')
partitions 3
(partition x1 values in (1,2,9,4) tablespace ts1,
partition x2 va' at line 6
(the last lines may be the most important ones)
Aborting: partition failed in ps-protocol mode. To continue, re-run with '--force'.
Ending Tests
Shutting-down MySQL daemon
Master(s) shutdown finished
Slave(s) shutdown finished