summaryrefslogtreecommitdiff
path: root/sql/sql_partition.h
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@oracle.com>2013-02-14 17:03:49 +0100
committerMattias Jonsson <mattias.jonsson@oracle.com>2013-02-14 17:03:49 +0100
commit89681f6dc65a9fe186e29493f73a97ecb34f6414 (patch)
treea15708b55ecdb842e6b0718e81f7ef56b4dbd8f0 /sql/sql_partition.h
parentc0333739cc2cfc17f22efa13015bcfba2abae509 (diff)
downloadmariadb-git-89681f6dc65a9fe186e29493f73a97ecb34f6414.tar.gz
Bug#16274455: CAN NOT ACESS PARTITIONED TABLES WHEN
DOWNGRADED FROM 5.6.11 TO 5.6.10 Problem was new syntax not accepted by previous version. Fixed by adding version comment of /*!50531 around the new syntax. Like this in the .frm file: 'PARTITION BY KEY /*!50611 ALGORITHM = 2 */ () PARTITIONS 3' and also changing the output from SHOW CREATE TABLE to: CREATE TABLE t1 (a INT) /*!50100 PARTITION BY KEY */ /*!50611 ALGORITHM = 1 */ /*!50100 () PARTITIONS 3 */ It will always add the ALGORITHM into the .frm for KEY [sub]partitioned tables, but for SHOW CREATE TABLE it will only add it in case it is the non default ALGORITHM = 1. Also notice that for 5.5, it will say /*!50531 instead of /*!50611, which will make upgrade from 5.5 > 5.5.31 to 5.6 < 5.6.11 fail! If one downgrades an fixed version to the same major version (5.5 or 5.6) the bug 14521864 will be visible again, but unless the .frm is updated, it will work again when upgrading again. Also fixed so that the .frm does not get updated version if a single partition check passes.
Diffstat (limited to 'sql/sql_partition.h')
-rw-r--r--sql/sql_partition.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_partition.h b/sql/sql_partition.h
index 998e4b25f0b..f232eaa0629 100644
--- a/sql/sql_partition.h
+++ b/sql/sql_partition.h
@@ -1,7 +1,7 @@
#ifndef SQL_PARTITION_INCLUDED
#define SQL_PARTITION_INCLUDED
-/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -268,7 +268,8 @@ char *generate_partition_syntax(partition_info *part_info,
uint *buf_length, bool use_sql_alloc,
bool show_partition_options,
HA_CREATE_INFO *create_info,
- Alter_info *alter_info);
+ Alter_info *alter_info,
+ const char *current_comment_start);
#endif
void create_partition_name(char *out, const char *in1,