diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-09-13 21:02:44 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-12-28 02:13:25 +0100 |
commit | 7e4c185c774cabaa1912760e143d9385ce959eea (patch) | |
tree | 193971bf8756078ed6557ede944eb2e0212d5155 /storage/federated | |
parent | d1c2cd30b76cc5e79da990507877b689887009f6 (diff) | |
download | mariadb-git-7e4c185c774cabaa1912760e143d9385ce959eea.tar.gz |
MDEV-14272 Mariadb crashes with signal 11 when using federatedx engine and galera
cherry-pick e6ce97a5928
Diffstat (limited to 'storage/federated')
-rw-r--r-- | storage/federated/ha_federated.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index 85e41554efc..0e84546764d 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -2982,6 +2982,9 @@ int ha_federated::reset(void) } reset_dynamic(&results); + if (mysql) + mysql->net.thd= NULL; + return 0; } @@ -3202,12 +3205,14 @@ int ha_federated::real_query(const char *query, size_t length) int rc= 0; DBUG_ENTER("ha_federated::real_query"); - if (!mysql && (rc= real_connect())) + if (!query || !length) goto end; - if (!query || !length) + if (!mysql && (rc= real_connect())) goto end; + mysql->net.thd= table->in_use; + rc= mysql_real_query(mysql, query, (uint) length); end: |