mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed bug in federatedx patch that caused partition tests to fail.
Fixed that connection string is returned for partitioned federated tables. mysql-test/r/partition_federated.result: Fixed error message mysql-test/suite/federated/federated_partition.result: Added test to show that connection string is returned in 'show create'. sql/ha_partition.cc: Fixed a set of bugs introduced by the last federated patch: - We can't allocate m_ordered_rec_buffer in memroot as it has to survive call to clear_handler_file() sql/partition_element.h: Ensure that connect_string is properly initialized. (This caused crashed in partition tests) sql/sql_partition.cc: Print CONNECTION option for federated partitioned tables
This commit is contained in:
@ -2,5 +2,5 @@ drop table if exists t1;
|
||||
create table t1 (s1 int) engine=federated
|
||||
connection='mysql://root@localhost/federated/t1' partition by list (s1)
|
||||
(partition p1 values in (1), partition p2 values in (2));
|
||||
ERROR HY000: Engine cannot be used in partitioned tables
|
||||
ERROR HY000: Unable to connect to foreign data source: CONNECTION not valid for partition
|
||||
End of 5.1 tests
|
||||
|
@ -9,6 +9,15 @@ partition by list (s1)
|
||||
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_1',
|
||||
partition p2 values in (2,4)
|
||||
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_2');
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`s1` int(11) NOT NULL,
|
||||
PRIMARY KEY (`s1`)
|
||||
) ENGINE=FEDERATED DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY LIST (s1)
|
||||
(PARTITION p1 VALUES IN (1,3) CONNECTION = 'mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_1' ENGINE = FEDERATED,
|
||||
PARTITION p2 VALUES IN (2,4) CONNECTION = 'mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_2' ENGINE = FEDERATED) */
|
||||
insert into t1 values (1), (2), (3), (4);
|
||||
select * from t1;
|
||||
s1
|
||||
|
@ -30,6 +30,9 @@ eval create table t1 (s1 int primary key) engine=federated
|
||||
partition p2 values in (2,4)
|
||||
connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1_2');
|
||||
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
show create table t1;
|
||||
|
||||
insert into t1 values (1), (2), (3), (4);
|
||||
select * from t1;
|
||||
|
||||
|
Reference in New Issue
Block a user