summaryrefslogtreecommitdiff
path: root/include/my_base.h
diff options
context:
space:
mode:
authorunknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru>2007-10-26 15:37:38 +0500
committerunknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru>2007-10-26 15:37:38 +0500
commitd7d93cf548064aef95f18ac45a9d8c03220abfad (patch)
treebee3dd52db241dee91e3a66776658a52e07176bd /include/my_base.h
parentc63f2e3fb6bf3a5eb6da2995c47965843e9b212d (diff)
downloadmariadb-git-d7d93cf548064aef95f18ac45a9d8c03220abfad.tar.gz
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb. Problem: if a partial unique key followed by a non-partial one we declare the second one as a primary key. Fix: sort non-partial unique keys before partial ones. include/my_base.h: Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, file .\ha_innodb. - sort unique keys that don't contain partial segments before other keys: set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(), use it in the sort_keys(); mysql-test/r/innodb_mysql.result: Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, file .\ha_innodb. - test result. mysql-test/r/key.result: Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, file .\ha_innodb. - test result. mysql-test/t/innodb_mysql.test: Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, file .\ha_innodb. - test case. mysql-test/t/key.test: Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, file .\ha_innodb. - test case. sql/sql_table.cc: Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, file .\ha_innodb. - sort unique keys that don't contain partial segments before other keys: set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(), use it in the sort_keys(); sql/structs.h: Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, file .\ha_innodb. - sort unique keys that don't contain partial segments before other keys: set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(), use it in the sort_keys();
Diffstat (limited to 'include/my_base.h')
-rw-r--r--include/my_base.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/my_base.h b/include/my_base.h
index ef5ac364fed..9240b01a9f1 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -224,7 +224,7 @@ enum ha_base_keytype {
#define HA_SPATIAL 1024 /* For spatial search */
#define HA_NULL_ARE_EQUAL 2048 /* NULL in key are cmp as equal */
#define HA_GENERATED_KEY 8192 /* Automaticly generated key */
-
+#define HA_KEY_HAS_PART_KEY_SEG 65536 /* Key contains partial segments */
/* Automatic bits in key-flag */
#define HA_SPACE_PACK_USED 4 /* Test for if SPACE_PACK used */