Merge mysql.com:/home/svoj/devel/mysql/BUG22708/mysql-5.1-engines
into mysql.com:/home/svoj/devel/mysql/merge/mysql-5.1-engines sql/table.cc: Auto merged
This commit is contained in:
commit
c7ee0f3e2c
41
sql/table.cc
41
sql/table.cc
@ -892,26 +892,31 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
|||||||
ha_legacy_type(share->db_type())));
|
ha_legacy_type(share->db_type())));
|
||||||
}
|
}
|
||||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||||
else
|
else if (str_db_type_length == 9 &&
|
||||||
|
!strncmp((char *) next_chunk + 2, "partition", 9))
|
||||||
{
|
{
|
||||||
LEX_STRING pname= { C_STRING_WITH_LEN( "partition" ) };
|
/*
|
||||||
if (str_db_type_length == pname.length &&
|
Use partition handler
|
||||||
!strncmp((char *) next_chunk + 2, pname.str, pname.length))
|
tmp_plugin is locked with a local lock.
|
||||||
{
|
we unlock the old value of share->db_plugin before
|
||||||
/*
|
replacing it with a globally locked version of tmp_plugin
|
||||||
Use partition handler
|
*/
|
||||||
tmp_plugin is locked with a local lock.
|
plugin_unlock(NULL, share->db_plugin);
|
||||||
we unlock the old value of share->db_plugin before
|
share->db_plugin= ha_lock_engine(NULL, partition_hton);
|
||||||
replacing it with a globally locked version of tmp_plugin
|
DBUG_PRINT("info", ("setting dbtype to '%.*s' (%d)",
|
||||||
*/
|
str_db_type_length, next_chunk + 2,
|
||||||
plugin_unlock(NULL, share->db_plugin);
|
ha_legacy_type(share->db_type())));
|
||||||
share->db_plugin= ha_lock_engine(NULL, partition_hton);
|
|
||||||
DBUG_PRINT("info", ("setting dbtype to '%.*s' (%d)",
|
|
||||||
str_db_type_length, next_chunk + 2,
|
|
||||||
ha_legacy_type(share->db_type())));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
else if (!tmp_plugin)
|
||||||
|
{
|
||||||
|
/* purecov: begin inspected */
|
||||||
|
error= 8;
|
||||||
|
my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), name.str);
|
||||||
|
my_free(buff, MYF(0));
|
||||||
|
goto err;
|
||||||
|
/* purecov: end */
|
||||||
|
}
|
||||||
next_chunk+= str_db_type_length + 2;
|
next_chunk+= str_db_type_length + 2;
|
||||||
}
|
}
|
||||||
if (next_chunk + 5 < buff_end)
|
if (next_chunk + 5 < buff_end)
|
||||||
@ -2194,6 +2199,8 @@ void open_table_error(TABLE_SHARE *share, int error, int db_errno, int errarg)
|
|||||||
"of MySQL and cannot be read",
|
"of MySQL and cannot be read",
|
||||||
MYF(0), buff);
|
MYF(0), buff);
|
||||||
break;
|
break;
|
||||||
|
case 8:
|
||||||
|
break;
|
||||||
default: /* Better wrong error than none */
|
default: /* Better wrong error than none */
|
||||||
case 4:
|
case 4:
|
||||||
strxmov(buff, share->normalized_path.str, reg_ext, NullS);
|
strxmov(buff, share->normalized_path.str, reg_ext, NullS);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user