Commit 978cf70b authored by unknown's avatar unknown

BUG #15559

Fixed logic in handler to make handler now show up as enabled.


sql/ha_federated.cc:
  BUG# 15559
  
  Fixed logic in federated_db_init. Also, the query length was being chopped 
  too much breaking the initial select query.
parent 20445b49
...@@ -432,7 +432,7 @@ bool federated_db_init() ...@@ -432,7 +432,7 @@ bool federated_db_init()
DBUG_ENTER("federated_db_init"); DBUG_ENTER("federated_db_init");
if (pthread_mutex_init(&federated_mutex, MY_MUTEX_INIT_FAST)) if (pthread_mutex_init(&federated_mutex, MY_MUTEX_INIT_FAST))
goto error; goto error;
if (hash_init(&federated_open_tables, system_charset_info, 32, 0, 0, if (!hash_init(&federated_open_tables, system_charset_info, 32, 0, 0,
(hash_get_key) federated_get_key, 0, 0)) (hash_get_key) federated_get_key, 0, 0))
{ {
federated_init= TRUE; federated_init= TRUE;
...@@ -1343,7 +1343,7 @@ static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table) ...@@ -1343,7 +1343,7 @@ static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table)
query.append(FEDERATED_BTICK); query.append(FEDERATED_BTICK);
query.append(FEDERATED_COMMA); query.append(FEDERATED_COMMA);
} }
query.length(query.length()- FEDERATED_COMMA_LEN); query.length(query.length()- (FEDERATED_COMMA_LEN - 1));
query.append(FEDERATED_FROM); query.append(FEDERATED_FROM);
query.append(FEDERATED_BTICK); query.append(FEDERATED_BTICK);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment