From 32ac1ef044428947f6396a47c275d06975133c8c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Apr 2002 18:21:53 +0500 Subject: [PATCH] Some fixes after merging changes from 4.0 include/hash.h: Monty forgot to add H in left part of macros mysys/hash.c: I wonder how it happened that my_bool disappeared sql/sql_acl.cc: Somebody forgot ) sql/sql_class.h: I wonder how it happened that this line disappeared sql/sql_table.cc: small typo sql/sql_yacc.yy: Having ; is more compatible --- include/hash.h | 2 +- mysys/hash.c | 2 +- sql/sql_acl.cc | 2 +- sql/sql_class.h | 1 + sql/sql_table.cc | 2 +- sql/sql_yacc.yy | 34 +++++++++++++++++----------------- 6 files changed, 22 insertions(+), 21 deletions(-) diff --git a/include/hash.h b/include/hash.h index a4afe03fb59..0635d2fd7fc 100644 --- a/include/hash.h +++ b/include/hash.h @@ -44,7 +44,7 @@ typedef struct st_hash { CHARSET_INFO *charset; } HASH; -#define hash_init(A,B,C,D,E,F,G) _hash_init(A,B,C,D,E,F,G, H CALLER_INFO) +#define hash_init(A,B,C,D,E,F,G,H) _hash_init(A,B,C,D,E,F,G, H CALLER_INFO) my_bool _hash_init(HASH *hash, CHARSET_INFO *charset, uint default_array_elements, uint key_offset, uint key_length, hash_get_key get_key, diff --git a/mysys/hash.c b/mysys/hash.c index 656732598c1..a0c5c6e45f0 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -35,7 +35,7 @@ static uint calc_hashnr(CHARSET_INFO *cs,const byte *key,uint length); static uint calc_hashnr_caseup(CHARSET_INFO *cs, const byte *key,uint length); static int hashcmp(HASH *hash,HASH_LINK *pos,const byte *key,uint length); - +my_bool _hash_init(HASH *hash,CHARSET_INFO *charset, uint size,uint key_offset,uint key_length, hash_get_key get_key, diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 403d08ad0ab..1398b2ce84f 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -941,7 +941,7 @@ bool change_password(THD *thd, const char *host, const char *user, if (!thd->slave_thread && (strcmp(thd->user,user) || - my_strcasecmp(system_charset_info, host,thd->host_or_ip)) + my_strcasecmp(system_charset_info, host,thd->host_or_ip))) { if (check_access(thd, UPDATE_ACL, "mysql",0,1)) DBUG_RETURN(1); diff --git a/sql/sql_class.h b/sql/sql_class.h index d111ff3df8e..1b1340c07a2 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -222,6 +222,7 @@ public: const char *Name; Key(enum Keytype type_par,const char *name_arg,List &cols) + :type(type_par), columns(cols),Name(name_arg) {} Key(enum Keytype type_par, enum ha_key_alg alg_par, const char *name_arg, List &cols) :type(type_par), algorithm(alg_par), columns(cols), Name(name_arg) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index b88db94c767..19fcf5970c2 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -454,7 +454,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, key_info->flags = HA_NOSAME; } - key_info->key_alg = key->alg; + key_info->key_alg = key->algorithm; key_info->key_parts=(uint8) key->columns.elements; key_info->key_part=key_part_info; key_info->usable_key_parts= key_number; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 18b8e5bb824..77a70093036 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1154,7 +1154,7 @@ opt_unique_or_fulltext: key_alg: /* empty */ { $$= HA_KEY_ALG_BTREE; } - | USING opt_btree_or_rtree { $$= $2 } + | USING opt_btree_or_rtree { $$= $2; } opt_btree_or_rtree: BTREE_SYM { $$= HA_KEY_ALG_BTREE; } @@ -1784,9 +1784,9 @@ simple_expr: | FIELD_FUNC '(' expr ',' expr_list ')' { $$= new Item_func_field($3, *$5); } | GEOMFROMTEXT '(' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | GEOMFROMTEXT '(' expr ',' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | GEOMETRYCOLLECTION '(' expr_list ')' { $$= new Item_func_spatial_collection(* $3, Geometry::wkbGeometryCollection, @@ -1823,17 +1823,17 @@ simple_expr: | LOCATE '(' expr ',' expr ',' expr ')' { $$= new Item_func_locate($5,$3,$7); } | GEOMCOLLFROMTEXT '(' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | GEOMCOLLFROMTEXT '(' expr ',' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | GREATEST_SYM '(' expr ',' expr_list ')' { $5->push_front($3); $$= new Item_func_max(*$5); } | LEAST_SYM '(' expr ',' expr_list ')' { $5->push_front($3); $$= new Item_func_min(*$5); } | LINEFROMTEXT '(' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | LINEFROMTEXT '(' expr ',' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | MINUTE_SYM '(' expr ')' { $$= new Item_func_minute($3); } | MONTH_SYM '(' expr ')' @@ -1842,17 +1842,17 @@ simple_expr: { $$= new Item_func_spatial_collection(* $3, Geometry::wkbMultiLineString, Geometry::wkbLineString); } | MLINEFROMTEXT '(' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | MLINEFROMTEXT '(' expr ',' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | MPOINTFROMTEXT '(' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | MPOINTFROMTEXT '(' expr ',' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | MPOLYFROMTEXT '(' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | MPOLYFROMTEXT '(' expr ',' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | MULTIPOINT '(' expr_list ')' { $$= new Item_func_spatial_collection(* $3, Geometry::wkbMultiPoint, Geometry::wkbPoint); } @@ -1868,13 +1868,13 @@ simple_expr: $$= new Item_func_password($3); } | POINTFROMTEXT '(' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | POINTFROMTEXT '(' expr ',' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | POLYFROMTEXT '(' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | POLYFROMTEXT '(' expr ',' expr ')' - { $$= new Item_func_geometry_from_text($3) } + { $$= new Item_func_geometry_from_text($3); } | POLYGON '(' expr_list ')' { $$= new Item_func_spatial_collection(* $3, Geometry::wkbPolygon, Geometry::wkbLineString); }