summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2009-08-12 11:46:08 +0200
committerMattias Jonsson <mattias.jonsson@sun.com>2009-08-12 11:46:08 +0200
commitf09fc5000413a4daaa401997968fc8f13def2f2c (patch)
tree2fdde1428cc6146ffa20d94e13dc8f6d44f87c05 /sql
parent7b8d509b2d189cc1574d07291d02941ef7e24a59 (diff)
parent48e0325c5e22aef8faca34672c30873c361412e1 (diff)
downloadmariadb-git-f09fc5000413a4daaa401997968fc8f13def2f2c.tar.gz
merge
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_yacc.yy4
-rw-r--r--sql/table.cc9
2 files changed, 11 insertions, 2 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 320b43c8e5c..cf791890311 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -3757,8 +3757,8 @@ partitioning:
LEX_STRING partition_name={C_STRING_WITH_LEN("partition")};
if (!plugin_is_ready(&partition_name, MYSQL_STORAGE_ENGINE_PLUGIN))
{
- my_error(ER_FEATURE_DISABLED, MYF(0),
- "partitioning", "--with-partition");
+ my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0),
+ "--skip-partition");
MYSQL_YYABORT;
}
lex->part_info= new partition_info();
diff --git a/sql/table.cc b/sql/table.cc
index c1d79bdcdd3..4f647618979 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -913,6 +913,15 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
we unlock the old value of share->db_plugin before
replacing it with a globally locked version of tmp_plugin
*/
+ /* Check if the partitioning engine is ready */
+ if (!plugin_is_ready(&name, MYSQL_STORAGE_ENGINE_PLUGIN))
+ {
+ error= 8;
+ my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0),
+ "--skip-partition");
+ my_free(buff, MYF(0));
+ goto err;
+ }
plugin_unlock(NULL, share->db_plugin);
share->db_plugin= ha_lock_engine(NULL, partition_hton);
DBUG_PRINT("info", ("setting dbtype to '%.*s' (%d)",