mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1-new
into c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/wl2826
This commit is contained in:
commit
09e95da616
35
sql/table.cc
35
sql/table.cc
@@ -667,36 +667,17 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
||||
#endif
|
||||
next_chunk+= 5 + partition_info_len;
|
||||
}
|
||||
if (share->mysql_version > 50105 && next_chunk + 5 < buff_end)
|
||||
#if MYSQL_VERSION_ID < 50200
|
||||
if (share->mysql_version >= 50106 && share->mysql_version <= 50109)
|
||||
{
|
||||
/*
|
||||
Partition state was introduced to support partition management in version 5.1.5
|
||||
Partition state array was here in version 5.1.6 to 5.1.9, this code
|
||||
makes it possible to load a 5.1.6 table in later versions. Can most
|
||||
likely be removed at some point in time. Will only be used for
|
||||
upgrades within 5.1 series of versions. Upgrade to 5.2 can only be
|
||||
done from newer 5.1 versions.
|
||||
*/
|
||||
uint32 part_state_len= uint4korr(next_chunk);
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
if ((share->part_state_len= part_state_len))
|
||||
if (!(share->part_state=
|
||||
(uchar*) memdup_root(&share->mem_root, next_chunk + 4,
|
||||
part_state_len)))
|
||||
{
|
||||
my_free(buff, MYF(0));
|
||||
goto err;
|
||||
}
|
||||
#else
|
||||
if (part_state_len)
|
||||
{
|
||||
DBUG_PRINT("info", ("WITH_PARTITION_STORAGE_ENGINE is not defined"));
|
||||
my_free(buff, MYF(0));
|
||||
goto err;
|
||||
}
|
||||
#endif
|
||||
next_chunk+= 4 + part_state_len;
|
||||
}
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
else
|
||||
{
|
||||
share->part_state_len= 0;
|
||||
share->part_state= NULL;
|
||||
next_chunk+= 4;
|
||||
}
|
||||
#endif
|
||||
keyinfo= share->key_info;
|
||||
|
||||
Reference in New Issue
Block a user