summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-11-05 16:15:20 +0100
committerMarko Mäkelä <marko.makela@mariadb.com>2019-11-07 08:52:30 +0100
commit3ad37ed0eb343cd173b103974aded5783958a88e (patch)
treef4ff854553d26a9e7d57791e7d671d4349a58d2d /sql/table.cc
parent46f2f24ec43e9c1fa2d994afd615f58736c00d65 (diff)
parent0339cbe2f628f8a122ba7ea3a75fc99fa1dc4c96 (diff)
downloadmariadb-git-3ad37ed0eb343cd173b103974aded5783958a88e.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 8dc4cc5e9a0..b745ce22946 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -695,7 +695,11 @@ enum open_frm_error open_table_def(THD *thd, TABLE_SHARE *share, uint flags)
frmlen= read_length + sizeof(head);
share->init_from_binary_frm_image(thd, false, buf, frmlen);
- error_given= true; // init_from_binary_frm_image has already called my_error()
+ /*
+ Don't give any additional errors. If there would be a problem,
+ init_from_binary_frm_image would call my_error() itself.
+ */
+ error_given= true;
my_free(buf);
goto err_not_open;
@@ -704,6 +708,9 @@ err:
mysql_file_close(file, MYF(MY_WME));
err_not_open:
+ /* Mark that table was created earlier and thus should have been logged */
+ share->table_creation_was_logged= 1;
+
if (unlikely(share->error && !error_given))
{
share->open_errno= my_errno;
@@ -3324,6 +3331,8 @@ ret:
sql_copy);
DBUG_RETURN(HA_ERR_GENERIC);
}
+ /* Treat the table as normal table from binary logging point of view */
+ table_creation_was_logged= 1;
DBUG_RETURN(0);
}