summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-05-22 18:51:21 +0300
committerunknown <monty@hundin.mysql.fi>2002-05-22 18:51:21 +0300
commita8652e9957e014c19b47635e09147a7bc17a3b8c (patch)
treee6741f4cc08ecfcebdfc62b6fab6d6b0e1a7e453 /sql/sql_table.cc
parentc811538f89925b7111e4ee0e3b940726f32a64d9 (diff)
downloadmariadb-git-a8652e9957e014c19b47635e09147a7bc17a3b8c.tar.gz
Fixed problem in fulltest testcase
include/my_base.h: Fix to ensure that old tables works in 4.1 myisam/mi_open.c: cleanup mysys/my_handler.c: Fixed problem in fulltest testcase sql/spatial.cc: cleanup sql/sql_table.cc: cleanup
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 36c4f4cba48..bdcb325774b 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -476,20 +476,22 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
checking for proper key parts number:
*/
- if(key_info->flags == HA_SPATIAL){
- if(key_info->key_parts!=1){
+ if (key_info->flags == HA_SPATIAL)
+ {
+ if (key_info->key_parts != 1)
+ {
my_printf_error(ER_WRONG_ARGUMENTS,
ER(ER_WRONG_ARGUMENTS),MYF(0),"SPATIAL INDEX");
DBUG_RETURN(-1);
}
- }else
+ }
+ else if (key_info->algorithm == HA_KEY_ALG_RTREE)
{
- if(key_info->algorithm == HA_KEY_ALG_RTREE){
- if((key_info->key_parts&1)==1){
- my_printf_error(ER_WRONG_ARGUMENTS,
- ER(ER_WRONG_ARGUMENTS),MYF(0),"RTREE INDEX");
- DBUG_RETURN(-1);
- }
+ if ((key_info->key_parts & 1) == 1)
+ {
+ my_printf_error(ER_WRONG_ARGUMENTS,
+ ER(ER_WRONG_ARGUMENTS),MYF(0),"RTREE INDEX");
+ DBUG_RETURN(-1);
}
}