mariadb/mysql-test/suite/federated/federated_bug_585688.test
Michael Widenius f2ca9c8784 Applied patch for lp:585688 "maridb crashes in federatedx code" from lp:~atcurtis/maria/federatedx:
- Fixed Partition engine to store CONNECTION string for partitions.
  Removed HA_NO_PARTITION flag from FederatedX.
  Added test 'federated_partition' to suite.
- lp:#585688 - maridb crashes in federatedx code
  FederatedX handler instances, created on one thread and used on
  another thread (via table cache) when "show table status" is executed
  crashed because txn member was not initialized for current thread.
  Added test 'federated_bug_585688' to suite.

Author for the patch is Antony Curtis

mysql-test/suite/federated/federated_bug_585688.result:
  Test for lp:585688
mysql-test/suite/federated/federated_bug_585688.test:
  Test for lp:585688
mysql-test/suite/federated/federated_partition-slave.opt:
  Test for partition support in federatedx
mysql-test/suite/federated/federated_partition.result:
  Test for partition support in federatedx
mysql-test/suite/federated/federated_partition.test:
  Test for partition support in federatedx
mysql-test/t/partition_federated.test:
  Updated error message
sql/ha_partition.cc:
  Added support for connection strings to partitions for federatedx
sql/ha_partition.h:
  Added support for connection strings to partitions for federatedx
sql/partition_element.h:
  Added support for connection strings to partitions for federatedx
sql/sql_yacc.yy:
  Added support for connection strings to partitions for federatedx
storage/federatedx/ha_federatedx.cc:
  Added support for partitions.
  FederatedX handler instances, created on one thread and used on another thread (via table cache) when "show table status"
  is executed crashed because txn member was not initialized for current thread.
2011-02-10 22:40:59 +02:00

53 lines
1.1 KiB
Text

source federated.inc;
--echo #
--echo # Bug #585688: maridb crashes in federatedx code
--echo #
connection slave;
CREATE TABLE federated.t1(a TEXT);
INSERT INTO federated.t1 VALUES('abc'), ('gh'), ('f'), ('ijk'), ('de');
connect (conn_1,127.0.0.1,root,,,$MASTER_MYPORT);
connection master;
flush tables;
connection conn_1;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1(a TEXT) ENGINE=FEDERATED
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
disconnect conn_1;
connection master;
flush tables;
connect (conn_2,127.0.0.1,root,,,$MASTER_MYPORT);
connect (conn_3,127.0.0.1,root,,,$MASTER_MYPORT);
connection conn_2;
describe federated.t1;
connection conn_3;
--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
show table status from federated;
disconnect conn_2;
connect (conn_4,127.0.0.1,root,,,$MASTER_MYPORT);
connection conn_4;
--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
show table status from federated;
disconnect conn_3;
disconnect conn_4;
connection master;
DROP TABLE federated.t1;
connection slave;
DROP TABLE federated.t1;
connection default;
source federated_cleanup.inc;