diff options
author | Michael Widenius <monty@askmonty.org> | 2011-02-10 22:40:59 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-02-10 22:40:59 +0200 |
commit | f2ca9c87845655083f186fb0d102699d78c6b22a (patch) | |
tree | 9abb7085be76863902f80b4697fc59865628bbe7 /storage/federatedx | |
parent | 6db663d6141a6e0d3425f0e7e184c8b7922ba7c3 (diff) | |
download | mariadb-git-f2ca9c87845655083f186fb0d102699d78c6b22a.tar.gz |
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.
Diffstat (limited to 'storage/federatedx')
-rw-r--r-- | storage/federatedx/ha_federatedx.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc index c3105de7a94..6a52b0a5e85 100644 --- a/storage/federatedx/ha_federatedx.cc +++ b/storage/federatedx/ha_federatedx.cc @@ -400,7 +400,7 @@ int federatedx_db_init(void *p) federatedx_hton->commit= ha_federatedx::commit; federatedx_hton->rollback= ha_federatedx::rollback; federatedx_hton->create= federatedx_create_handler; - federatedx_hton->flags= HTON_ALTER_NOT_SUPPORTED | HTON_NO_PARTITION; + federatedx_hton->flags= HTON_ALTER_NOT_SUPPORTED; if (pthread_mutex_init(&federatedx_mutex, MY_MUTEX_INIT_FAST)) goto error; @@ -1583,6 +1583,7 @@ static FEDERATEDX_SHARE *get_share(const char *table_name, TABLE *table) tmp_share.table_name_length, ident_quote_char); if (!(share= (FEDERATEDX_SHARE *) memdup_root(&mem_root, (char*)&tmp_share, sizeof(*share))) || + !(share->share_key= (char*) memdup_root(&mem_root, tmp_share.share_key, tmp_share.share_key_length+1)) || !(share->select_query= (char*) strmake_root(&mem_root, query.ptr(), query.length() + 1))) goto error; @@ -1722,6 +1723,7 @@ int ha_federatedx::disconnect(handlerton *hton, MYSQL_THD thd) { federatedx_txn *txn= (federatedx_txn *) thd_get_ha_data(thd, hton); delete txn; + *((federatedx_txn **) thd_ha_data(thd, hton))= 0; return 0; } |