Skip to content

Commit 91b6d5a

Browse files
author
Arun Kuruvila
committed
Merge branch 'mysql-5.6' into mysql-trunk
2 parents 0f0b4f7 + 6b02da5 commit 91b6d5a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

sql/sql_table.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7220,6 +7220,10 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
72207220
if (create_info->storage_media == HA_SM_DEFAULT)
72217221
create_info->storage_media= table->s->default_storage_media;
72227222

7223+
/* Creation of federated table with LIKE clause needs connection string */
7224+
if (!(used_fields & HA_CREATE_USED_CONNECTION))
7225+
create_info->connect_string= table->s->connect_string;
7226+
72237227
restore_record(table, s->default_values); // Empty record for DEFAULT
72247228
Create_field *def;
72257229

storage/federated/ha_federated.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2913,7 +2913,7 @@ int ha_federated::info(uint flag)
29132913

29142914
}
29152915

2916-
if (flag & HA_STATUS_AUTO)
2916+
if ((flag & HA_STATUS_AUTO) && mysql)
29172917
stats.auto_increment_value= mysql->insert_id;
29182918

29192919
mysql_free_result(result);

0 commit comments

Comments
 (0)