diff options
author | knielsen@mysql.com <> | 2005-11-25 10:33:38 +0100 |
---|---|---|
committer | knielsen@mysql.com <> | 2005-11-25 10:33:38 +0100 |
commit | 47199237819345073ee47636e6df6d5d595450cf (patch) | |
tree | 20ba556635e8e85f9f22001160d5019efaca0684 | |
parent | a2bb99397d678e23b0b91373a5893e1fba78a64a (diff) | |
download | mariadb-git-47199237819345073ee47636e6df6d5d595450cf.tar.gz |
Mikaels fix for compiling without partition storage engine
-rw-r--r-- | sql/table.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sql/table.cc b/sql/table.cc index 9fc840f7a3d..aeccab78211 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -539,17 +539,28 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, } if (next_chunk + 4 < buff_end) { - if ((share->partition_info_len= uint4korr(next_chunk))) + uint32 partition_info_len = uint4korr(next_chunk); +#ifdef WITH_PARTITION_STORAGE_ENGINE + if ((share->partition_info_len= partition_info_len)) { if (!(share->partition_info= (uchar*) memdup_root(&share->mem_root, next_chunk + 4, - share->partition_info_len + 1))) + partition_info_len + 1))) { my_free(buff, MYF(0)); goto err; } - next_chunk+= share->partition_info_len + 5; + next_chunk++; + } +#else + if (partition_info_len) + { + DBUG_PRINT("info", ("WITH_PARTITION_STORAGE_ENGINE is not defined")); + my_free(buff, MYF(0)); + goto err; } +#endif + next_chunk+= 4 + partition_info_len; } keyinfo= share->key_info; for (i= 0; i < keys; i++, keyinfo++) |