diff options
author | unknown <mikron@mikael-ronstr-ms-dator.local> | 2006-02-01 17:05:22 +0100 |
---|---|---|
committer | unknown <mikron@mikael-ronstr-ms-dator.local> | 2006-02-01 17:05:22 +0100 |
commit | c31c4eec46819d67fa9f1f78d9091c9e616ec5fb (patch) | |
tree | 9202dd8bc945bbb8b1a0fd4d27cacd19e8df0ab0 /sql | |
parent | 83d418a25f21931e1f1ac79c8c27b5e893a87d4e (diff) | |
download | mariadb-git-c31c4eec46819d67fa9f1f78d9091c9e616ec5fb.tar.gz |
WL 2826: Fourth step
Remove partition state from frm file
Ensure we can still load tables created in 5.1.6 for the time
being
sql/table.cc:
Remove partition state from frm file
Ensure we can still load tables created in 5.1.6 for the time
being
sql/unireg.cc:
Remove partition state from frm file
Ensure we can still load tables created in 5.1.6 for the time
being
Diffstat (limited to 'sql')
-rw-r--r-- | sql/table.cc | 35 | ||||
-rw-r--r-- | sql/unireg.cc | 7 |
2 files changed, 6 insertions, 36 deletions
diff --git a/sql/table.cc b/sql/table.cc index b912683d371..046ed6d1add 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -638,38 +638,15 @@ 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 (share->mysql_version == 50106) { /* - Partition state was introduced to support partition management in version 5.1.5 - */ - 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; + Partition state array was here in version 5.1.6, 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. + */ + next_chunk+= 4; } -#ifdef WITH_PARTITION_STORAGE_ENGINE - else - { - share->part_state_len= 0; - share->part_state= NULL; - } -#endif keyinfo= share->key_info; for (i= 0; i < keys; i++, keyinfo++) { diff --git a/sql/unireg.cc b/sql/unireg.cc index ab362b130b0..ce886253554 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -136,7 +136,6 @@ bool mysql_create_frm(THD *thd, const char *file_name, if (part_info) { create_info->extra_size+= part_info->part_info_len; - create_info->extra_size+= part_info->part_state_len; } #endif @@ -209,12 +208,6 @@ bool mysql_create_frm(THD *thd, const char *file_name, my_write(file, (const byte*)part_info->part_info_string, part_info->part_info_len + 1, MYF_RW)) goto err; - DBUG_PRINT("info", ("Part state len = %d", part_info->part_state_len)); - int4store(buff, part_info->part_state_len); - if (my_write(file, (const byte*)buff, 4, MYF_RW) || - my_write(file, (const byte*)part_info->part_state, - part_info->part_state_len, MYF_RW)) - goto err; } else #endif |