summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-05-29 17:34:49 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-05-29 17:34:49 +0300
commita3539bbb2ac51dfa2b363d3b4c11784c25d1f256 (patch)
tree6b49da1f15e5740adaf5da1c4179760a15b77dc4 /sql/sql_base.cc
parentc98e6d4b3d4d17ee429c696ac07e0bc4bbe1a81e (diff)
parent6f96ff7268dd20d6d3b61931c972e7a43c1efdff (diff)
downloadmariadb-git-a3539bbb2ac51dfa2b363d3b4c11784c25d1f256.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index f89fbc59b14..64427af6319 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1481,15 +1481,15 @@ open_table_get_mdl_lock(THD *thd, Open_table_context *ot_ctx,
return FALSE;
}
+#ifdef WITH_PARTITION_STORAGE_ENGINE
/* Set all [named] partitions as used. */
static int set_partitions_as_used(TABLE_LIST *tl, TABLE *t)
{
-#ifdef WITH_PARTITION_STORAGE_ENGINE
if (t->part_info)
return t->file->change_partitions_to_open(tl->partition_names);
-#endif
return 0;
}
+#endif
/**
@@ -1535,7 +1535,9 @@ bool open_table(THD *thd, TABLE_LIST *table_list, Open_table_context *ot_ctx)
MDL_ticket *mdl_ticket;
TABLE_SHARE *share;
uint gts_flags;
+#ifdef WITH_PARTITION_STORAGE_ENGINE
int part_names_error=0;
+#endif
DBUG_ENTER("open_table");
/*
@@ -1633,7 +1635,9 @@ bool open_table(THD *thd, TABLE_LIST *table_list, Open_table_context *ot_ctx)
table= best_table;
table->query_id= thd->query_id;
DBUG_PRINT("info",("Using locked table"));
+#ifdef WITH_PARTITION_STORAGE_ENGINE
part_names_error= set_partitions_as_used(table_list, table);
+#endif
goto reset;
}
/*
@@ -1918,7 +1922,9 @@ retry_share:
{
DBUG_ASSERT(table->file != NULL);
MYSQL_REBIND_TABLE(table->file);
+#ifdef WITH_PARTITION_STORAGE_ENGINE
part_names_error= set_partitions_as_used(table_list, table);
+#endif
}
else
{