diff options
author | unknown <bell@sanja.is.com.ua> | 2003-08-11 12:00:33 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-08-11 12:00:33 +0300 |
commit | c2b8eb33d2d2b7551b68981a5be1fa46e44df9d2 (patch) | |
tree | 7cc0252aca6baff5a2069b80dfc51558b03d271d /sql | |
parent | 9a3979e23455c203857f05482c9f51a5350cf441 (diff) | |
parent | 986be1aaba87365517a290a23a3b7d66109d2605 (diff) | |
download | mariadb-git-c2b8eb33d2d2b7551b68981a5be1fa46e44df9d2.tar.gz |
merge
sql/item_cmpfunc.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'sql')
69 files changed, 601 insertions, 405 deletions
diff --git a/sql/client_settings.h b/sql/client_settings.h index efae3f18a8b..b357e52ec9d 100644 --- a/sql/client_settings.h +++ b/sql/client_settings.h @@ -31,3 +31,4 @@ #define mysql_rpl_probe(mysql) 0 #undef HAVE_SMEM #undef _CUSTOMCONFIG_ + diff --git a/sql/field.h b/sql/field.h index 5df7d554c35..79c45a99a43 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1132,7 +1132,7 @@ bool test_if_int(const char *str, int length, const char *int_end, */ #define FIELDFLAG_DECIMAL 1 -#define FIELDFLAG_BINARY 1 // Shares same flag +#define FIELDFLAG_BINARY 1 // Shares same flag #define FIELDFLAG_NUMBER 2 #define FIELDFLAG_ZEROFILL 4 #define FIELDFLAG_PACK 120 // Bits used for packing @@ -1163,7 +1163,8 @@ bool test_if_int(const char *str, int length, const char *int_end, #define f_packtype(x) (((x) >> FIELDFLAG_PACK_SHIFT) & 15) #define f_decimals(x) ((uint8) (((x) >> FIELDFLAG_DEC_SHIFT) & FIELDFLAG_MAX_DEC)) #define f_is_alpha(x) (!f_is_num(x)) -#define f_is_enum(x) ((x) & FIELDFLAG_INTERVAL) +#define f_is_binary(x) ((x) & FIELDFLAG_BINARY) // 4.0- compatibility +#define f_is_enum(x) ((x) & FIELDFLAG_INTERVAL) #define f_is_bitfield(x) ((x) & FIELDFLAG_BITFIELD) #define f_is_blob(x) (((x) & (FIELDFLAG_BLOB | FIELDFLAG_NUMBER)) == FIELDFLAG_BLOB) #define f_is_geom(x) ((x) & FIELDFLAG_GEOM) diff --git a/sql/field_conv.cc b/sql/field_conv.cc index 144e6d7e74a..44e30afb880 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -172,7 +172,10 @@ set_field_to_null_with_conversions(Field *field, bool no_conversions) } field->reset(); if (field == field->table->next_number_field) + { + field->table->auto_increment_field_not_null= false; return 0; // field is set in handler.cc + } if (current_thd->count_cuted_fields) { field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,ER_WARN_NULL_TO_NOTNULL); diff --git a/sql/filesort.cc b/sql/filesort.cc index 2130bdaeb93..13989bdae8f 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -519,7 +519,7 @@ static void make_sortkey(register SORTPARAM *param, switch (sort_field->result_type) { case STRING_RESULT: { - CHARSET_INFO *cs=item->charset(); + CHARSET_INFO *cs=item->collation.collation; if ((maybe_null=item->maybe_null)) *to++=1; /* All item->str() to use some extra byte for end null.. */ @@ -1040,7 +1040,7 @@ sortlength(SORT_FIELD *sortorder, uint s_length, bool *multi_byte_charset) switch ((sortorder->result_type=sortorder->item->result_type())) { case STRING_RESULT: sortorder->length=sortorder->item->max_length; - if (use_strnxfrm((cs=sortorder->item->charset()))) + if (use_strnxfrm((cs=sortorder->item->collation.collation))) { sortorder->length= sortorder->length*cs->strxfrm_multiply; sortorder->need_strxnfrm= 1; diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index 4f1021232a4..70322cef6fd 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -767,12 +767,20 @@ int ha_myisam::preload_keys(THD* thd, HA_CHECK_OPT *check_opt) void ha_myisam::deactivate_non_unique_index(ha_rows rows) { MYISAM_SHARE* share = file->s; + bool do_warning=0; if (share->state.key_map == ((ulonglong) 1L << share->base.keys)-1) { if (!(specialflag & SPECIAL_SAFE_MODE)) { if (rows == HA_POS_ERROR) + { + uint orig_update= file->update; + file->update ^= HA_STATE_CHANGED; + uint check_update= file->update; mi_extra(file, HA_EXTRA_NO_KEYS, 0); + do_warning= (file->update == check_update) && file->state->records; + file->update= orig_update; + } else { /* @@ -797,6 +805,10 @@ void ha_myisam::deactivate_non_unique_index(ha_rows rows) } else enable_activate_all_index=0; + if (do_warning) + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA, + ER(ER_ILLEGAL_HA), table->table_name); } diff --git a/sql/handler.cc b/sql/handler.cc index 150a0d5329e..90fd754a4c5 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -697,11 +697,15 @@ void handler::update_auto_increment() longlong nr; THD *thd; DBUG_ENTER("update_auto_increment"); - if (table->next_number_field->val_int() != 0) + if (table->next_number_field->val_int() != 0 || + table->auto_increment_field_not_null && + current_thd->variables.sql_mode & MODE_NO_AUTO_VALUE_ON_ZERO) { + table->auto_increment_field_not_null= false; auto_increment_column_changed=0; DBUG_VOID_RETURN; } + table->auto_increment_field_not_null= false; thd=current_thd; if ((nr=thd->next_insert_id)) thd->next_insert_id=0; // Clear after use diff --git a/sql/item.cc b/sql/item.cc index c7d0927c970..58c47025a6f 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -42,21 +42,25 @@ Item::Item(): { marker= 0; maybe_null=null_value=with_sum_func=unsigned_flag=0; - set_charset(default_charset(), DERIVATION_COERCIBLE); + collation.set(default_charset(), DERIVATION_COERCIBLE); name= 0; decimals= 0; max_length= 0; THD *thd= current_thd; next= thd->free_list; // Put in free list thd->free_list= this; - loop_id= 0; /* Item constructor can be called during execution other tnen SQL_COM command => we should check thd->lex.current_select on zero (thd->lex can be uninitialised) */ - if (thd->lex.current_select && - thd->lex.current_select->parsing_place == SELECT_LEX_NODE::SELECT_LIST) - thd->lex.current_select->select_items++; + if (thd->lex.current_select) + { + SELECT_LEX_NODE::enum_parsing_place place= + thd->lex.current_select->parsing_place; + if (place == SELECT_LEX_NODE::SELECT_LIST || + place == SELECT_LEX_NODE::IN_HAVING) + thd->lex.current_select->select_n_having_items++; + } } /* @@ -65,7 +69,6 @@ Item::Item(): tables */ Item::Item(THD *thd, Item &item): - loop_id(0), str_value(item.str_value), name(item.name), max_length(item.max_length), @@ -154,7 +157,7 @@ bool Item_string::eq(const Item *item, bool binary_cmp) const { if (binary_cmp) return !sortcmp(&str_value, &item->str_value, &my_charset_bin); - return !sortcmp(&str_value, &item->str_value, charset()); + return !sortcmp(&str_value, &item->str_value, collation.collation); } return 0; } @@ -263,7 +266,7 @@ bool DTCollation::aggregate(DTCollation &dt) Item_field::Item_field(Field *f) :Item_ident(NullS,f->table_name,f->field_name) { set_field(f); - set_charset(DERIVATION_IMPLICIT); + collation.set(DERIVATION_IMPLICIT); fixed= 1; // This item is not needed in fix_fields } @@ -272,7 +275,7 @@ Item_field::Item_field(THD *thd, Item_field &item): Item_ident(thd, item), field(item.field), result_field(item.result_field) -{ set_charset(DERIVATION_IMPLICIT); } +{ collation.set(DERIVATION_IMPLICIT); } void Item_field::set_field(Field *field_par) { @@ -284,7 +287,7 @@ void Item_field::set_field(Field *field_par) field_name=field_par->field_name; db_name=field_par->table->table_cache_key; unsigned_flag=test(field_par->flags & UNSIGNED_FLAG); - set_charset(field_par->charset(), DERIVATION_IMPLICIT); + collation.set(field_par->charset(), DERIVATION_IMPLICIT); } const char *Item_ident::full_name() const @@ -538,6 +541,11 @@ void Item_param::set_longdata(const char *str, ulong length) int Item_param::save_in_field(Field *field, bool no_conversions) { + THD *thd= current_thd; + + if (thd->command == COM_PREPARE) + return -1; + if (null_value) return (int) set_field_to_null(field); @@ -857,7 +865,7 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) sl= sl->outer_select()) { table_list= (last= sl)->get_table_list(); - if (sl->insert_select && table_list) + if (sl->resolve_mode == SELECT_LEX::INSERT_MODE && table_list) { // it is primary INSERT st_select_lex => skip first table resolving table_list= table_list->next; @@ -866,7 +874,8 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) table_list, &where, 0)) != not_found_field) break; - if ((refer= find_item_in_list(this, sl->item_list, &counter, + if (sl->resolve_mode == SELECT_LEX::SELECT_MODE && + (refer= find_item_in_list(this, sl->item_list, &counter, REPORT_EXCEPT_NOT_FOUND)) != (Item **) not_found_item) break; @@ -947,7 +956,7 @@ void Item::init_make_field(Send_field *tmp_field, tmp_field->org_col_name= empty_name; tmp_field->table_name= empty_name; tmp_field->col_name= name; - tmp_field->charsetnr= charset()->number; + tmp_field->charsetnr= collation.collation->number; tmp_field->flags=maybe_null ? 0 : NOT_NULL_FLAG; tmp_field->type=field_type; tmp_field->length=max_length; @@ -1061,7 +1070,7 @@ int Item::save_in_field(Field *field, bool no_conversions) field->result_type() == STRING_RESULT) { String *result; - CHARSET_INFO *cs=charset(); + CHARSET_INFO *cs= collation.collation; char buff[MAX_FIELD_WIDTH]; // Alloc buffer for small columns str_value.set_quick(buff,sizeof(buff),cs); result=val_str(&str_value); @@ -1098,7 +1107,8 @@ int Item_string::save_in_field(Field *field, bool no_conversions) if (null_value) return set_field_to_null(field); field->set_notnull(); - return (field->store(result->ptr(),result->length(),charset())) ? -1 : 0; + return (field->store(result->ptr(),result->length(),collation.collation)) ? + -1 : 0; } @@ -1152,7 +1162,7 @@ Item_varbinary::Item_varbinary(const char *str, uint str_length) str+=2; } *ptr=0; // Keep purify happy - set_charset(&my_charset_bin, DERIVATION_COERCIBLE); + collation.set(&my_charset_bin, DERIVATION_COERCIBLE); } longlong Item_varbinary::val_int() @@ -1173,7 +1183,7 @@ int Item_varbinary::save_in_field(Field *field, bool no_conversions) field->set_notnull(); if (field->result_type() == STRING_RESULT) { - error=field->store(str_value.ptr(),str_value.length(),charset()); + error=field->store(str_value.ptr(),str_value.length(),collation.collation); } else { @@ -1339,13 +1349,15 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) SELECT_LEX *last=0; for ( ; sl ; sl= sl->outer_select()) { - if ((ref= find_item_in_list(this, (last= sl)->item_list, + last= sl; + if (sl->resolve_mode == SELECT_LEX::SELECT_MODE && + (ref= find_item_in_list(this, sl->item_list, &counter, REPORT_EXCEPT_NOT_FOUND)) != (Item **)not_found_item) break; table_list= sl->get_table_list(); - if (sl->insert_select && table_list) + if (sl->resolve_mode == SELECT_LEX::INSERT_MODE && table_list) { // it is primary INSERT st_select_lex => skip first table resolving table_list= table_list->next; @@ -1431,7 +1443,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) max_length= (*ref)->max_length; maybe_null= (*ref)->maybe_null; decimals= (*ref)->decimals; - set_charset((*ref)->charset()); + collation.set((*ref)->collation); with_sum_func= (*ref)->with_sum_func; fixed= 1; @@ -1664,7 +1676,7 @@ Item_cache* Item_cache::get_cache(Item_result type) void Item_cache_str::store(Item *item) { - value_buff.set(buffer, sizeof(buffer), item->charset()); + value_buff.set(buffer, sizeof(buffer), item->collation.collation); value= item->str_result(&value_buff); if ((null_value= item->null_value)) value= 0; diff --git a/sql/item.h b/sql/item.h index da1c3dd9e51..82c61466200 100644 --- a/sql/item.h +++ b/sql/item.h @@ -85,7 +85,6 @@ public: typedef bool (Item::*Item_processor)(byte *arg); class Item { - uint loop_id; /* Used to find selfrefering loops */ Item(const Item &); /* Prevent use of these */ void operator=(Item &); public: @@ -172,21 +171,6 @@ public: virtual Item *get_tmp_table_item(THD *thd) { return copy_or_same(thd); } CHARSET_INFO *default_charset() const; - Derivation derivation() const { return collation.derivation; } - CHARSET_INFO *charset() const { return collation.collation; } - void set_charset(CHARSET_INFO *cs) - { collation.collation= cs; } - void set_charset(Derivation dv) - { collation.derivation= dv; } - void set_charset(CHARSET_INFO *cs, Derivation dv) - { collation.collation= cs; collation.derivation= dv; } - void set_charset(Item &item) - { collation= item.collation; } - void set_charset(DTCollation *collation_arg) - { - collation.collation= collation_arg->collation; - collation.derivation= collation_arg->derivation; - } virtual bool walk(Item_processor processor, byte *arg) { @@ -238,7 +222,7 @@ public: Item_field(const char *db_par,const char *table_name_par, const char *field_name_par) :Item_ident(db_par,table_name_par,field_name_par),field(0),result_field(0) - { set_charset(DERIVATION_IMPLICIT); } + { collation.set(DERIVATION_IMPLICIT); } // Constructor need to process subselect with temporary tables (see Item) Item_field(THD *thd, Item_field &item); Item_field(Field *field); @@ -441,7 +425,7 @@ public: Item_string(const char *str,uint length, CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE) { - set_charset(cs, dv); + collation.set(cs, dv); str_value.set(str,length,cs); max_length=length; set_name(str, length, cs); @@ -450,7 +434,7 @@ public: Item_string(const char *name_par, const char *str, uint length, CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE) { - set_charset(cs, dv); + collation.set(cs, dv); str_value.set(str,length,cs); max_length=length; set_name(name_par,0,cs); diff --git a/sql/item_buff.cc b/sql/item_buff.cc index c4431294dff..1559cfe958e 100644 --- a/sql/item_buff.cc +++ b/sql/item_buff.cc @@ -57,7 +57,7 @@ bool Item_str_buff::cmp(void) else if (null_value) return 0; // new and old value was null else - tmp= sortcmp(&value,res,item->charset()) != 0; + tmp= sortcmp(&value,res,item->collation.collation) != 0; if (tmp) value.copy(*res); // Remember for next cmp return tmp; diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index f77ce039dd6..6f493e2728c 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -167,15 +167,17 @@ void Item_bool_func2::fix_length_and_dec() uint strong= 0; uint weak= 0; - if ((args[0]->derivation() < args[1]->derivation()) && - !my_charset_same(args[0]->charset(), args[1]->charset()) && - (args[0]->charset()->state & MY_CS_UNICODE)) + if ((args[0]->collation.derivation < args[1]->collation.derivation) && + !my_charset_same(args[0]->collation.collation, + args[1]->collation.collation) && + (args[0]->collation.collation->state & MY_CS_UNICODE)) { weak= 1; } - else if ((args[1]->derivation() < args[0]->derivation()) && - !my_charset_same(args[0]->charset(), args[1]->charset()) && - (args[1]->charset()->state & MY_CS_UNICODE)) + else if ((args[1]->collation.derivation < args[0]->collation.derivation) && + !my_charset_same(args[0]->collation.collation, + args[1]->collation.collation) && + (args[1]->collation.collation->state & MY_CS_UNICODE)) { strong= 1; } @@ -188,15 +190,15 @@ void Item_bool_func2::fix_length_and_dec() String tmp, cstr; String *ostr= args[weak]->val_str(&tmp); cstr.copy(ostr->ptr(), ostr->length(), ostr->charset(), - args[strong]->charset()); + args[strong]->collation.collation); conv= new Item_string(cstr.ptr(),cstr.length(),cstr.charset(), - args[weak]->derivation()); + args[weak]->collation.derivation); ((Item_string*)conv)->str_value.copy(); } else { - conv= new Item_func_conv_charset(args[weak],args[strong]->charset()); - conv->collation.set(args[weak]->derivation()); + conv= new Item_func_conv_charset(args[weak],args[strong]->collation.collation); + conv->collation.set(args[weak]->collation.derivation); } args[weak]= conv ? conv : args[weak]; } @@ -265,7 +267,8 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type) We must set cmp_charset here as we may be called from for an automatic generated item, like in natural join */ - if (cmp_collation.set((*a)->collation, (*b)->collation)) + if (cmp_collation.set((*a)->collation, (*b)->collation) || + cmp_collation.derivation == DERIVATION_NONE) { my_coll_agg_error((*a)->collation, (*b)->collation, owner->func_name()); return 1; @@ -395,22 +398,7 @@ bool Item_in_optimizer::fix_left(THD *thd, (!cache && !(cache= Item_cache::get_cache(args[0]->result_type())))) return 1; cache->setup(args[0]); - return 0; -} - - - -bool Item_in_optimizer::fix_fields(THD *thd, struct st_table_list *tables, - Item ** ref) -{ - if (fix_left(thd, tables, ref)) - return 1; - if (args[0]->maybe_null) - maybe_null=1; - - with_sum_func= args[0]->with_sum_func; - used_tables_cache= args[0]->used_tables(); - const_item_cache= args[0]->const_item(); + cache->store(args[0]); if (cache->cols() == 1) { if (args[0]->used_tables()) @@ -429,6 +417,22 @@ bool Item_in_optimizer::fix_fields(THD *thd, struct st_table_list *tables, ((Item_cache *)cache->el(i))->set_used_tables(0); } } + return 0; +} + + + +bool Item_in_optimizer::fix_fields(THD *thd, struct st_table_list *tables, + Item ** ref) +{ + if (fix_left(thd, tables, ref)) + return 1; + if (args[0]->maybe_null) + maybe_null=1; + + with_sum_func= args[0]->with_sum_func; + used_tables_cache= args[0]->used_tables(); + const_item_cache= args[0]->const_item(); if (!args[1]->fixed && args[1]->fix_fields(thd, tables, args)) return 1; Item_in_subselect * sub= (Item_in_subselect *)args[1]; @@ -745,13 +749,13 @@ Item_func_ifnull::val_str(String *str) if (!args[0]->null_value) { null_value=0; - res->set_charset(charset()); + res->set_charset(collation.collation); return res; } res=args[1]->val_str(str); if ((null_value=args[1]->null_value)) return 0; - res->set_charset(charset()); + res->set_charset(collation.collation); return res; } @@ -770,12 +774,12 @@ Item_func_if::fix_length_and_dec() if (null1) { cached_result_type= arg2_type; - set_charset(args[2]->charset()); + collation.set(args[2]->collation.collation); } else if (null2) { cached_result_type= arg1_type; - set_charset(args[1]->charset()); + collation.set(args[1]->collation.collation); } else { @@ -787,7 +791,7 @@ Item_func_if::fix_length_and_dec() } else { - set_charset(&my_charset_bin); // Number + collation.set(&my_charset_bin); // Number } } } @@ -817,7 +821,7 @@ Item_func_if::val_str(String *str) Item *arg= args[0]->val_int() ? args[1] : args[2]; String *res=arg->val_str(str); if (res) - res->set_charset(charset()); + res->set_charset(collation.collation); null_value=arg->null_value; return res; } @@ -1202,7 +1206,7 @@ void in_string::set(uint pos,Item *item) if (!str->charset()) { CHARSET_INFO *cs; - if (!(cs= item->charset())) + if (!(cs= item->collation.collation)) cs= &my_charset_bin; // Should never happen for STR items str->set_charset(cs); } @@ -1280,7 +1284,7 @@ cmp_item* cmp_item::get_comparator(Item *item) { switch (item->result_type()) { case STRING_RESULT: - return new cmp_item_sort_string(item->charset()); + return new cmp_item_sort_string(item->collation.collation); break; case INT_RESULT: return new cmp_item_int; @@ -1861,7 +1865,7 @@ bool Item_func_like::fix_fields(THD *thd, TABLE_LIST *tlist, Item ** ref) We could also do boyer-more for non-const items, but as we would have to recompute the tables for each row it's not worth it. */ - if (args[1]->const_item() && !use_strnxfrm(charset()) && + if (args[1]->const_item() && !use_strnxfrm(collation.collation) && !(specialflag & SPECIAL_NO_NEW_FUNC)) { String* res2 = args[1]->val_str(&tmp_value2); @@ -1882,7 +1886,7 @@ bool Item_func_like::fix_fields(THD *thd, TABLE_LIST *tlist, Item ** ref) { const char* tmp = first + 1; for (; *tmp != wild_many && *tmp != wild_one && *tmp != escape; tmp++) ; - canDoTurboBM = (tmp == last) && !use_mb(args[0]->charset()); + canDoTurboBM = (tmp == last) && !use_mb(args[0]->collation.collation); } if (canDoTurboBM) diff --git a/sql/item_func.cc b/sql/item_func.cc index 8a27bf16b37..660b623987c 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -192,6 +192,8 @@ Item_func::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) } } fix_length_and_dec(); + if (thd && thd->net.last_errno) // An error inside fix_length_and_dec accured + return 1; fixed= 1; return 0; } @@ -311,9 +313,9 @@ Field *Item_func::tmp_table_field(TABLE *t_arg) break; case STRING_RESULT: if (max_length > 255) - res= new Field_blob(max_length, maybe_null, name, t_arg, charset()); + res= new Field_blob(max_length, maybe_null, name, t_arg, collation.collation); else - res= new Field_string(max_length, maybe_null, name, t_arg, charset()); + res= new Field_string(max_length, maybe_null, name, t_arg, collation.collation); break; case ROW_RESULT: default: @@ -978,13 +980,13 @@ String *Item_func_min_max::val_str(String *str) res2= args[i]->val_str(res == str ? &tmp_value : str); if (res2) { - int cmp= sortcmp(res,res2,charset()); + int cmp= sortcmp(res,res2,collation.collation); if ((cmp_sign < 0 ? cmp : -cmp) < 0) res=res2; } } } - res->set_charset(charset()); + res->set_charset(collation.collation); return res; } case ROW_RESULT: @@ -1102,7 +1104,7 @@ longlong Item_func_coercibility::val_int() return 0; } null_value= 0; - return (longlong) args[0]->derivation(); + return (longlong) args[0]->collation.derivation; } void Item_func_locate::fix_length_and_dec() @@ -1185,8 +1187,7 @@ longlong Item_func_field::val_int() for (uint i=1 ; i < arg_count ; i++) { String *tmp_value=args[i]->val_str(&tmp); - if (tmp_value && field->length() == tmp_value->length() && - !sortcmp(field,tmp_value,cmp_collation.collation)) + if (tmp_value && !sortcmp(field,tmp_value,cmp_collation.collation)) return (longlong) (i); } } @@ -1437,8 +1438,8 @@ udf_handler::fix_fields(THD *thd, TABLE_LIST *tables, Item_result_field *func, There is no a general rule for UDF. Everything depends on the particular user definted function. */ - if (item->charset()->state & MY_CS_BINSORT) - func->set_charset(&my_charset_bin); + if (item->collation.collation->state & MY_CS_BINSORT) + func->collation.set(&my_charset_bin); if (item->maybe_null) func->maybe_null=1; func->with_sum_func= func->with_sum_func || item->with_sum_func; @@ -2202,7 +2203,7 @@ Item_func_set_user_var::val_str(String *str) update_hash((void*) 0, 0, STRING_RESULT, &my_charset_bin, DERIVATION_NONE); else update_hash((void*) res->ptr(), res->length(), STRING_RESULT, - res->charset(), args[0]->derivation()); + res->charset(), args[0]->collation.derivation); return res; } diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 4e35e90b429..b92839e6c1e 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -310,7 +310,7 @@ String *Item_func_concat::val_str(String *str) } } } - res->set_charset(charset()); + res->set_charset(collation.collation); return res; null: @@ -596,7 +596,7 @@ String *Item_func_concat_ws::val_str(String *str) use_as_buff=str; } } - res->set_charset(charset()); + res->set_charset(collation.collation); return res; null: @@ -697,7 +697,7 @@ String *Item_func_reverse::val_str(String *str) void Item_func_reverse::fix_length_and_dec() { - set_charset(*args[0]); + collation.set(args[0]->collation); max_length = args[0]->max_length; } @@ -933,7 +933,7 @@ void Item_str_func::left_right_max_length() max_length=args[0]->max_length; if (args[1]->const_item()) { - int length=(int) args[1]->val_int()*charset()->mbmaxlen; + int length=(int) args[1]->val_int()*collation.collation->mbmaxlen; if (length <= 0) max_length=0; else @@ -944,7 +944,7 @@ void Item_str_func::left_right_max_length() void Item_func_left::fix_length_and_dec() { - set_charset(*args[0]); + collation.set(args[0]->collation); left_right_max_length(); } @@ -971,7 +971,7 @@ String *Item_func_right::val_str(String *str) void Item_func_right::fix_length_and_dec() { - set_charset(*args[0]); + collation.set(args[0]->collation); left_right_max_length(); } @@ -1006,7 +1006,7 @@ void Item_func_substr::fix_length_and_dec() { max_length=args[0]->max_length; - set_charset(*args[0]); + collation.set(args[0]->collation); if (args[1]->const_item()) { int32 start=(int32) args[1]->val_int()-1; @@ -1314,7 +1314,7 @@ void Item_func_trim::fix_length_and_dec() if (arg_count == 1) { collation.set(args[0]->collation); - remove.set_charset(charset()); + remove.set_charset(collation.collation); remove.set_ascii(" ",1); } else @@ -1535,7 +1535,7 @@ String *Item_func_user::val_str(String *str) void Item_func_soundex::fix_length_and_dec() { - set_charset(*args[0]); + collation.set(args[0]->collation); max_length=args[0]->max_length; set_if_bigger(max_length,4); } @@ -1567,7 +1567,7 @@ String *Item_func_soundex::val_str(String *str) { String *res =args[0]->val_str(str); char last_ch,ch; - CHARSET_INFO *cs= charset(); + CHARSET_INFO *cs= collation.collation; if ((null_value=args[0]->null_value)) return 0; /* purecov: inspected */ @@ -1707,7 +1707,7 @@ String *Item_func_elt::val_str(String *str) } null_value=0; res= args[tmp]->val_str(str); - res->set_charset(charset()); + res->set_charset(collation.collation); return res; } @@ -1813,7 +1813,7 @@ String *Item_func_char::val_str(String *str) int32 num=(int32) args[i]->val_int(); if (!args[i]->null_value) #ifdef USE_MB - if (use_mb(charset())) + if (use_mb(collation.collation)) { if (num&0xFF000000L) { str->append((char)(num>>24)); @@ -1860,7 +1860,7 @@ inline String* alloc_buffer(String *res,String *str,String *tmp_value, void Item_func_repeat::fix_length_and_dec() { - set_charset(*args[0]); + collation.set(args[0]->collation); if (args[1]->const_item()) { max_length=(long) (args[0]->max_length * args[1]->val_int()); @@ -2109,7 +2109,7 @@ String *Item_func_conv_charset::val_str(String *str) void Item_func_conv_charset::fix_length_and_dec() { - set_charset(conv_charset, DERIVATION_IMPLICIT); + collation.set(conv_charset, DERIVATION_IMPLICIT); max_length = args[0]->max_length*conv_charset->mbmaxlen; } @@ -2192,7 +2192,7 @@ String *Item_func_set_collation::val_str(String *str) str=args[0]->val_str(str); if ((null_value=args[0]->null_value)) return 0; - str->set_charset(charset()); + str->set_charset(collation.collation); return str; } @@ -2203,18 +2203,25 @@ void Item_func_set_collation::fix_length_and_dec() String tmp, *str= args[1]->val_str(&tmp); colname= str->c_ptr(); if (colname == binary_keyword) - set_collation= get_charset_by_csname(args[0]->charset()->csname, + set_collation= get_charset_by_csname(args[0]->collation.collation->csname, MY_CS_BINSORT,MYF(0)); else - set_collation= get_charset_by_name(colname,MYF(0)); + { + if (!(set_collation= get_charset_by_name(colname,MYF(0)))) + { + my_error(ER_UNKNOWN_COLLATION, MYF(0), colname); + return; + } + } - if (!set_collation || !my_charset_same(args[0]->charset(),set_collation)) + if (!set_collation || + !my_charset_same(args[0]->collation.collation,set_collation)) { my_error(ER_COLLATION_CHARSET_MISMATCH, MYF(0), - colname,args[0]->charset()->csname); + colname,args[0]->collation.collation->csname); return; } - set_charset(set_collation, DERIVATION_EXPLICIT); + collation.set(set_collation, DERIVATION_EXPLICIT); max_length= args[0]->max_length; } @@ -2231,7 +2238,7 @@ bool Item_func_set_collation::eq(const Item *item, bool binary_cmp) const func_name() != item_func->func_name()) return 0; Item_func_set_collation *item_func_sc=(Item_func_set_collation*) item; - if (charset() != item_func_sc->charset()) + if (collation.collation != item_func_sc->collation.collation) return 0; for (uint i=0; i < arg_count ; i++) if (!args[i]->eq(item_func_sc->args[i], binary_cmp)) @@ -2533,7 +2540,7 @@ String *Item_func_quote::val_str(String *str) } *to= '\''; str->length(new_length); - str->set_charset(charset()); + str->set_charset(collation.collation); return str; null: diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 4225dd43b12..f64a145b136 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -153,7 +153,7 @@ public: Item_str_conv(Item *item) :Item_str_func(item) {} void fix_length_and_dec() { - set_charset(*args[0]); + collation.set(args[0]->collation); max_length = args[0]->max_length; } }; @@ -335,12 +335,11 @@ public: class Item_func_database :public Item_str_func { public: - Item_func_database() { set_charset(DERIVATION_IMPLICIT); } + Item_func_database() { collation.set(system_charset_info,DERIVATION_IMPLICIT); } String *val_str(String *); void fix_length_and_dec() { max_length= MAX_FIELD_NAME * system_charset_info->mbmaxlen; - set_charset(system_charset_info); } const char *func_name() const { return "database"; } }; @@ -348,12 +347,11 @@ public: class Item_func_user :public Item_str_func { public: - Item_func_user() { set_charset(DERIVATION_IMPLICIT); } + Item_func_user() { collation.set(system_charset_info, DERIVATION_IMPLICIT); } String *val_str(String *); void fix_length_and_dec() { max_length= (USERNAME_LENGTH+HOSTNAME_LENGTH+1)*system_charset_info->mbmaxlen; - set_charset(system_charset_info); } const char *func_name() const { return "user"; } }; @@ -418,7 +416,7 @@ public: String *val_str(String *); void fix_length_and_dec() { - set_charset(default_charset()); + collation.set(default_charset()); max_length=args[0]->max_length+(args[0]->max_length-args[0]->decimals)/3; } const char *func_name() const { return "format"; } @@ -432,7 +430,7 @@ public: String *val_str(String *); void fix_length_and_dec() { - set_charset(default_charset()); + collation.set(default_charset()); maybe_null=0; max_length=arg_count; } const char *func_name() const { return "char"; } @@ -482,7 +480,7 @@ public: String *val_str(String *); void fix_length_and_dec() { - set_charset(default_charset()); + collation.set(default_charset()); decimals=0; max_length=64; } }; @@ -497,7 +495,7 @@ public: String *val_str(String *); void fix_length_and_dec() { - set_charset(default_charset()); + collation.set(default_charset()); decimals=0; max_length=args[0]->max_length*2; } }; @@ -518,7 +516,7 @@ public: } void fix_length_and_dec() { - set_charset(&my_charset_bin); + collation.set(&my_charset_bin); max_length=args[0]->max_length; } void print(String *str) { print_op(str); } @@ -534,7 +532,7 @@ public: const char *func_name() const { return "load_file"; } void fix_length_and_dec() { - set_charset(&my_charset_bin, DERIVATION_COERCIBLE); + collation.set(&my_charset_bin, DERIVATION_COERCIBLE); maybe_null=1; max_length=MAX_BLOB_WIDTH; } @@ -571,7 +569,7 @@ public: String *val_str(String *); void fix_length_and_dec() { - set_charset(*args[0]); + collation.set(args[0]->collation); max_length= args[0]->max_length * 2 + 2; } }; @@ -616,7 +614,7 @@ public: void fix_length_and_dec() { max_length=40; // should be enough - set_charset(default_charset()); + collation.set(system_charset_info); }; }; @@ -629,6 +627,6 @@ public: void fix_length_and_dec() { max_length=40; // should be enough - set_charset(default_charset()); + collation.set(system_charset_info); }; }; diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index ff9ca728b3d..77300dd2cf3 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -568,7 +568,7 @@ Item_in_subselect::single_value_transformer(JOIN *join, */ expr= new Item_ref((Item**)optimizer->get_cache(), (char *)"<no matter>", - (char *)"<left expr>"); + (char *)in_left_expr_name); unit->dependent= 1; } @@ -744,7 +744,7 @@ Item_in_subselect::row_value_transformer(JOIN *join, Item_bool_func2::eq_creator(new Item_ref((*optimizer->get_cache())-> addr(i), (char *)"<no matter>", - (char *)"<left expr>"), + (char *)in_left_expr_name), func); item= and_items(item, func); } @@ -876,6 +876,7 @@ static Item_result set_row(SELECT_LEX *select_lex, Item * item, if (!(row[i]= Item_cache::get_cache(res_type))) return STRING_RESULT; // we should return something row[i]->set_len_n_dec(sel_item->max_length, sel_item->decimals); + row[i]->collation.set(sel_item->collation); } } if (select_lex->item_list.elements > 1) @@ -887,6 +888,7 @@ void subselect_single_select_engine::fix_length_and_dec(Item_cache **row) { DBUG_ASSERT(row || select_lex->item_list.elements==1); res_type= set_row(select_lex, item, row, &maybe_null); + item->collation.set(row[0]->collation); if (cols() != 1) maybe_null= 0; } diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 65039589da4..9cfa304bb47 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -192,7 +192,7 @@ public: class Item_in_subselect :public Item_exists_subselect { protected: - Item * left_expr; + Item *left_expr; /* expr & optimizer used in subselect rewriting to store Item for all JOIN in UNION @@ -206,7 +206,7 @@ public: Item_in_subselect(THD *thd, Item * left_expr, st_select_lex *select_lex); Item_in_subselect(Item_in_subselect *item); - Item_in_subselect(): Item_exists_subselect(), abort_on_null(0) {} + Item_in_subselect(): Item_exists_subselect(), abort_on_null(0) {} subs_type substype() { return IN_SUBS; } void reset() diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 9cb1df80e97..450f102e4f3 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -194,13 +194,13 @@ Item_sum_hybrid::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) max_length=float_length(decimals); }else { - cmp_charset= item->charset(); + cmp_charset= item->collation.collation; max_length=item->max_length; } decimals=item->decimals; maybe_null=item->maybe_null; unsigned_flag=item->unsigned_flag; - set_charset(item->charset()); + collation.set(item->collation); result_field=0; null_value=1; fix_length_and_dec(); @@ -1024,7 +1024,9 @@ int simple_str_key_cmp(void* arg, byte* key1, byte* key2) Item_sum_count_distinct* item = (Item_sum_count_distinct*)arg; CHARSET_INFO *cs=item->key_charset; uint len=item->key_length; - return my_strnncoll(cs, (const uchar*) key1, len, (const uchar*) key2, len); + return cs->coll->strnncollsp(cs, + (const uchar*) key1, len, + (const uchar*) key2, len); } /* diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index c2d1504e94a..62d8afd7ec0 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -574,7 +574,7 @@ void Item_func_curdate::fix_length_and_dec() struct tm tm_tmp,*start; time_t query_start=current_thd->query_start(); - set_charset(default_charset()); + collation.set(default_charset()); decimals=0; max_length=10*default_charset()->mbmaxlen; localtime_r(&query_start,&tm_tmp); @@ -617,7 +617,7 @@ void Item_func_curtime::fix_length_and_dec() max_length=8*cs->mbmaxlen; localtime_r(&query_start,&tm_tmp); start=&tm_tmp; - set_charset(cs); + collation.set(cs); value=(longlong) ((ulong) ((uint) start->tm_hour)*10000L+ (ulong) (((uint) start->tm_min)*100L+ (uint) start->tm_sec)); @@ -644,7 +644,7 @@ void Item_func_now::fix_length_and_dec() decimals=0; max_length=19*cs->mbmaxlen; - set_charset(cs); + collation.set(cs); localtime_r(&query_start,&tm_tmp); start=&tm_tmp; value=((longlong) ((ulong) ((uint) start->tm_year+1900)*10000L+ @@ -1130,7 +1130,7 @@ bool Item_func_from_unixtime::get_date(TIME *ltime, void Item_date_add_interval::fix_length_and_dec() { enum_field_types arg0_field_type; - set_charset(default_charset()); + collation.set(default_charset()); maybe_null=1; max_length=26*MY_CHARSET_BIN_MB_MAXLEN; value.alloc(32); diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 20b95f8e22d..a6fb9b11de4 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -93,7 +93,7 @@ public: enum Item_result result_type () const { return INT_RESULT; } void fix_length_and_dec() { - set_charset(default_charset()); + collation.set(default_charset()); decimals=0; max_length=2*default_charset()->mbmaxlen; maybe_null=1; @@ -110,7 +110,7 @@ public: enum Item_result result_type () const { return STRING_RESULT; } void fix_length_and_dec() { - set_charset(default_charset()); + collation.set(default_charset()); decimals=0; max_length=10*default_charset()->mbmaxlen; maybe_null=1; @@ -254,7 +254,7 @@ public: enum Item_result result_type () const { return INT_RESULT; } void fix_length_and_dec() { - set_charset(default_charset()); + collation.set(default_charset()); decimals=0; max_length=1*default_charset()->mbmaxlen; maybe_null=1; @@ -270,7 +270,7 @@ class Item_func_dayname :public Item_func_weekday enum Item_result result_type () const { return STRING_RESULT; } void fix_length_and_dec() { - set_charset(default_charset()); + collation.set(default_charset()); decimals=0; max_length=9*default_charset()->mbmaxlen; maybe_null=1; @@ -322,7 +322,7 @@ public: const char *func_name() const { return "date"; } void fix_length_and_dec() { - set_charset(default_charset()); + collation.set(default_charset()); decimals=0; max_length=10*default_charset()->mbmaxlen; } @@ -440,7 +440,7 @@ class Item_func_from_unixtime :public Item_date_func const char *func_name() const { return "from_unixtime"; } void fix_length_and_dec() { - set_charset(default_charset()); + collation.set(default_charset()); decimals=0; max_length=19*default_charset()->mbmaxlen; } @@ -457,7 +457,7 @@ public: String *val_str(String *); void fix_length_and_dec() { - set_charset(default_charset()); + collation.set(default_charset()); maybe_null=1; max_length=13*default_charset()->mbmaxlen; } @@ -529,12 +529,12 @@ public: String *tmp=args[0]->val_str(a); null_value=args[0]->null_value; if (tmp) - tmp->set_charset(charset()); + tmp->set_charset(collation.collation); return tmp; } void fix_length_and_dec() { - set_charset(default_charset()); + collation.set(default_charset()); max_length=args[0]->max_length; } void print(String *str); @@ -547,7 +547,7 @@ public: Item_char_typecast(Item *a) :Item_typecast(a) {} void fix_length_and_dec() { - set_charset(default_charset()); + collation.set(default_charset()); max_length=args[0]->max_length; } }; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 28446ed746f..204a7cb7b1a 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -221,6 +221,7 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset; #define MODE_MYSQL323 32768 #define MODE_MYSQL40 65536 #define MODE_ANSI (MODE_MYSQL40*2) +#define MODE_NO_AUTO_VALUE_ON_ZERO (MODE_ANSI*2) #define RAID_BLOCK_SIZE 1024 @@ -704,6 +705,7 @@ extern const char *command_name[]; extern const char *first_keyword, *localhost, *delayed_user, *binary_keyword; extern const char **errmesg; /* Error messages */ extern const char *myisam_recover_options_str; +extern const char *in_left_expr_name; extern uchar *days_in_month; extern char language[LIBLEN],reg_ext[FN_EXTLEN]; extern char glob_hostname[FN_REFLEN], mysql_home[FN_REFLEN]; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index ef2fb78ef80..379e5aa8ea3 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -212,7 +212,7 @@ const char *sql_mode_names[] = "?", "ONLY_FULL_GROUP_BY", "NO_UNSIGNED_SUBTRACTION", "POSTGRESQL", "ORACLE", "MSSQL", "DB2", "SAPDB", "NO_KEY_OPTIONS", "NO_TABLE_OPTIONS", "NO_FIELD_OPTIONS", "MYSQL323", "MYSQL40", "ANSI", - NullS + "NO_AUTO_VALUE_ON_ZERO", NullS }; TYPELIB sql_mode_typelib= { array_elements(sql_mode_names)-1,"", sql_mode_names }; @@ -229,6 +229,7 @@ bool opt_large_files= sizeof(my_off_t) > 4; /* Used with --help for detailed option */ +bool opt_help= 0; bool opt_verbose= 0; arg_cmp_func Arg_comparator::comparator_matrix[4][2] = @@ -315,6 +316,8 @@ char *my_bind_addr_str; const char **errmesg; /* Error messages */ const char *myisam_recover_options_str="OFF"; const char *sql_mode_str="OFF"; +/* name of reference on left espression in rewritten IN subquery */ +const char *in_left_expr_name= "<left expr>"; FILE *bootstrap_file; @@ -3642,8 +3645,9 @@ Disable with --skip-bdb (will save memory).", "Percentage of dirty pages allowed in bufferpool.", (gptr*) &srv_max_buf_pool_modified_pct, (gptr*) &srv_max_buf_pool_modified_pct, 0, GET_ULONG, REQUIRED_ARG, 90, 0, 100, 0, 0, 0}, #endif /* End HAVE_INNOBASE_DB */ - {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, - 0, 0, 0, 0, 0}, + {"help", '?', "Display this help and exit.", + (gptr*) &opt_help, (gptr*) &opt_help, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, + 0, 0}, {"verbose", 'v', "Used with --help option for detailed help", (gptr*) &opt_verbose, (gptr*) &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -4882,16 +4886,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; #endif #include <sslopt-case.h> - case 'v': - usage(); - exit(0); case 'V': print_version(); exit(0); - case 'I': - case '?': - usage(); - exit(0); case 'T': test_flags= argument ? (uint) atoi(argument) : 0; test_flags&= ~TEST_NO_THREADS; @@ -5365,6 +5362,11 @@ static void get_options(int argc,char **argv) exit(ho_error); } + if (opt_help) + { + usage(); + exit(0); + } #if defined(HAVE_BROKEN_REALPATH) my_use_symdir=0; my_disable_symlinks=1; diff --git a/sql/net_serv.cc b/sql/net_serv.cc index fd5e4f1d71a..9e9eaf9eea1 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -30,7 +30,10 @@ 3 byte length & 1 byte package-number. */ -#ifndef EMBEDDED_LIBRARY +/* + HFTODO this must be hidden if we don't want client capabilities in + embedded library + */ #ifdef __WIN__ #include <winsock.h> #endif @@ -46,6 +49,17 @@ #include <signal.h> #include <errno.h> +#ifdef EMBEDDED_LIBRARY + +#undef net_flush + +extern "C" { +my_bool net_flush(NET *net); +} + +#endif /*EMBEDDED_LIBRARY */ + + /* The following handles the differences when this is linked between the client and the server. @@ -959,5 +973,3 @@ my_net_read(NET *net) return len; } -#endif /* #ifndef EMBEDDED_LIBRARY */ - diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 18c465ffde3..935abac5146 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -930,7 +930,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part, { bool like_error; char buff1[MAX_FIELD_WIDTH],*min_str,*max_str; - String tmp(buff1,sizeof(buff1),value->charset()),*res; + String tmp(buff1,sizeof(buff1),value->collation.collation),*res; uint length,offset,min_length,max_length; if (!field->optimize_range(param->real_keynr[key_part->key])) diff --git a/sql/protocol.cc b/sql/protocol.cc index 1b9256c7723..e90aa7585e2 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -83,6 +83,7 @@ void send_error(THD *thd, uint sql_errno, const char *err) #ifdef EMBEDDED_LIBRARY net->last_errno= sql_errno; strmake(net->last_error, err, sizeof(net->last_error)-1); + strmov(net->sqlstate, mysql_errno_to_sqlstate(sql_errno)); #else if (net->vio == 0) @@ -230,12 +231,12 @@ net_printf(THD *thd, uint errcode, ...) #else net->last_errno= errcode; strmake(net->last_error, text_pos, length); + strmake(net->sqlstate, mysql_errno_to_sqlstate(errcode), SQLSTATE_LENGTH); #endif thd->is_fatal_error=0; // Error message is given DBUG_VOID_RETURN; } - /* Return ok to the client. @@ -350,40 +351,6 @@ send_eof(THD *thd, bool no_flush) } #endif /* EMBEDDED_LIBRARY */ - -/**************************************************************************** - Store a field length in logical packet - This is used to code the string length for normal protocol -****************************************************************************/ - -char * -net_store_length(char *pkg, ulonglong length) -{ - uchar *packet=(uchar*) pkg; - if (length < LL(251)) - { - *packet=(uchar) length; - return (char*) packet+1; - } - /* 251 is reserved for NULL */ - if (length < LL(65536)) - { - *packet++=252; - int2store(packet,(uint) length); - return (char*) packet+2; - } - if (length < LL(16777216)) - { - *packet++=253; - int3store(packet,(ulong) length); - return (char*) packet+3; - } - *packet++=254; - int8store(packet,length); - return (char*) packet+8; -} - - /* Faster net_store_length when we know length is a 32 bit integer */ diff --git a/sql/records.cc b/sql/records.cc index 783ca663dfe..72a6d480356 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -73,7 +73,13 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table, info->ref_pos=table->file->ref; table->file->rnd_init(0); - if (! (specialflag & SPECIAL_SAFE_MODE) && + /* + table->sort.addon_field is checked because if we use addon fields, + it doesn't make sense to use cache - we don't read from the table + and table->sort.io_cache is read sequentially + */ + if (!table->sort.addon_field && + ! (specialflag & SPECIAL_SAFE_MODE) && thd->variables.read_rnd_buff_size && !table->file->fast_key_read() && (table->db_stat & HA_READ_ONLY || diff --git a/sql/set_var.cc b/sql/set_var.cc index cb6c875d513..6a6e010578f 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1240,7 +1240,7 @@ bool sys_var_collation::check(THD *thd, set_var *var) if (!(tmp=get_charset_by_name(res->c_ptr(),MYF(0)))) { - my_error(ER_UNKNOWN_CHARACTER_SET, MYF(0), res->c_ptr()); + my_error(ER_UNKNOWN_COLLATION, MYF(0), res->c_ptr()); return 1; } var->save_result.charset= tmp; // Save for update diff --git a/sql/set_var.h b/sql/set_var.h index 978aba3384a..968687ad382 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -607,7 +607,7 @@ public: { Item_field *item= (Item_field*) value_arg; if (!(value=new Item_string(item->field_name, strlen(item->field_name), - item->charset()))) + item->collation.collation))) value=value_arg; /* Give error message later */ } else diff --git a/sql/share/charsets/cp1251.xml b/sql/share/charsets/cp1251.xml index 795022cc179..94774cca0f1 100644 --- a/sql/share/charsets/cp1251.xml +++ b/sql/share/charsets/cp1251.xml @@ -34,9 +34,9 @@ 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F - 70 71 72 73 54 75 76 77 78 79 7A 5B 5C 5D 5E 5F + 70 71 72 73 74 75 76 77 78 79 7A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F - 70 71 72 73 54 75 76 77 78 79 7A 7B 7C 7D 7E 7F + 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 90 83 82 83 84 85 86 87 88 89 9A 8B 9C 9D 9E 9F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A2 A2 BC A4 B4 A6 A7 B8 A9 BA AB AC AD AE BF @@ -56,9 +56,9 @@ 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F - 50 51 52 53 74 55 56 57 58 59 5A 5B 5C 5D 5E 5F + 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F - 50 51 52 53 74 55 56 57 58 59 5A 7B 7C 7D 7E 7F + 50 51 52 53 54 55 56 57 58 59 5A 7B 7C 7D 7E 7F 80 81 82 81 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 80 91 92 93 94 95 96 97 98 99 8A 9B 8C 9D 8E 8F A0 A1 A1 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index 6f42243ba2b..b43c4b43b50 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -54,8 +54,8 @@ v/* "M-BАlo prostoru/pamЛti pro thread", "Nemohu zjistit jm-BИno stroje pro Va╧i adresu", "Chyba p-BЬi ustavovАnМ spojenМ", -"P-BЬМstup pro u╬ivatele '%-.32s@%-.64s' k databАzi '%-.64s' nenМ povolen", -"P-BЬМstup pro u╬ivatele '%-.32s@%-.64s' (s heslem %s)", +"P-BЬМstup pro u╬ivatele '%-.32s'@'%-.64s' k databАzi '%-.64s' nenМ povolen", +"P-BЬМstup pro u╬ivatele '%-.32s'@'%-.64s' (s heslem %s)", "Nebyla vybr-BАna ╬АdnА databАze", "Nezn-BАmЩ pЬМkaz", "Sloupec '%-.64s' nem-BЫ╬e bЩt null", @@ -152,8 +152,8 @@ v/* "Regul-BАrnМ vЩraz vrАtil chybu '%-.64s'", "Pokud nen-BМ ╬АdnА GROUP BY klauzule, nenМ dovoleno souХasnИ pou╬itМ GROUP polo╬ek (MIN(),MAX(),COUNT()...) s ne GROUP polo╬kami", "Neexistuje odpov-BМdajМcМ grant pro u╬ivatele '%-.32s' na stroji '%-.64s'", -"%-.16s p-BЬМkaz nepЬМstupnЩ pro u╬ivatele: '%-.32s@%-.64s' pro tabulku '%-.64s'", -"%-.16s p-BЬМkaz nepЬМstupnЩ pro u╬ivatele: '%-.32s@%-.64s' pro sloupec '%-.64s' v tabulce '%-.64s'", +"%-.16s p-BЬМkaz nepЬМstupnЩ pro u╬ivatele: '%-.32s'@'%-.64s' pro tabulku '%-.64s'", +"%-.16s p-BЬМkaz nepЬМstupnЩ pro u╬ivatele: '%-.32s'@'%-.64s' pro sloupec '%-.64s' v tabulce '%-.64s'", "Neplatn-BЩ pЬМkaz GRANT/REVOKE. ProsМm, pЬeХtЛte si v manuАlu, jakА privilegia je mo╬nИ pou╬Мt.", "Argument p-BЬМkazu GRANT u╬ivatel nebo stroj je pЬМli╧ dlouhЩ", "Tabulka '%-.64s.%s' neexistuje", @@ -221,7 +221,7 @@ v/* "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", +"'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", "The used table type doesn't support FULLTEXT indexes", @@ -276,3 +276,4 @@ v/* "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index 25a5020a30f..2eb9e6d2219 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -48,8 +48,8 @@ "UdgЕet for trЕde/hukommelse", "Kan ikke fЕ vФrtsnavn for din adresse", "Forkert hЕndtryk (handshake)", -"Adgang nФgtet bruger: '%-.32s@%-.64s' til databasen '%-.64s'", -"Adgang nФgtet bruger: '%-.32s@%-.64s' (Bruger adgangskode: %s)", +"Adgang nФgtet bruger: '%-.32s'@'%-.64s' til databasen '%-.64s'", +"Adgang nФgtet bruger: '%-.32s'@'%-.64s' (Bruger adgangskode: %s)", "Ingen database valgt", "Ukendt kommando", "Kolonne '%-.64s' kan ikke vФre NULL", @@ -146,8 +146,8 @@ "Fik fejl '%-.64s' fra regexp", "Sammenblanding af GROUP kolonner (MIN(),MAX(),COUNT()...) uden GROUP kolonner er ikke tilladt, hvis der ikke er noget GROUP BY prФdikat", "Denne tilladelse findes ikke for brugeren '%-.32s' pЕ vФrt '%-.64s'", -"%-.16s-kommandoen er ikke tilladt for brugeren '%-.32s@%-.64s' for tabellen '%-.64s'", -"%-.16s-kommandoen er ikke tilladt for brugeren '%-.32s@%-.64s' for kolonne '%-.64s' in tabellen '%-.64s'", +"%-.16s-kommandoen er ikke tilladt for brugeren '%-.32s'@'%-.64s' for tabellen '%-.64s'", +"%-.16s-kommandoen er ikke tilladt for brugeren '%-.32s'@'%-.64s' for kolonne '%-.64s' in tabellen '%-.64s'", "Forkert GRANT/REVOKE kommando. Se i brugervejledningen hvilke privilegier der kan specificeres.", "VФrts- eller brugernavn for langt til GRANT", "Tabellen '%-.64s.%-.64s' eksisterer ikke", @@ -215,7 +215,7 @@ "DROP DATABASE er ikke tilladt mens en trЕd holder pЕ globalt read lock", "CREATE DATABASE er ikke tilladt mens en trЕd holder pЕ globalt read lock", "Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", +"'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", "The used table type doesn't support FULLTEXT indexes", @@ -270,3 +270,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index 6aba93c246c..2a663a176f8 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -56,8 +56,8 @@ "Geen thread geheugen meer; controleer of mysqld of andere processen al het beschikbare geheugen gebruikt. Zo niet, dan moet u wellicht 'ulimit' gebruiken om mysqld toe te laten meer geheugen te benutten, of u kunt extra swap ruimte toevoegen", "Kan de hostname niet krijgen van uw adres", "Verkeerde handshake", -"Toegang geweigerd voor gebruiker: '%-.32s@%-.64s' naar database '%-.64s'", -"Toegang geweigerd voor gebruiker: '%-.32s@%-.64s' (Wachtwoord gebruikt: %s)", +"Toegang geweigerd voor gebruiker: '%-.32s'@'%-.64s' naar database '%-.64s'", +"Toegang geweigerd voor gebruiker: '%-.32s'@'%-.64s' (Wachtwoord gebruikt: %s)", "Geen database geselecteerd", "Onbekend commando", "Kolom '%-.64s' kan niet null zijn", @@ -154,8 +154,8 @@ "Fout '%-.64s' ontvangen van regexp", "Het mixen van GROUP kolommen (MIN(),MAX(),COUNT()...) met no-GROUP kolommen is foutief indien er geen GROUP BY clausule is", "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.32s' op host '%-.64s'", -"%-.16s commando geweigerd voor gebruiker: '%-.32s@%-.64s' voor tabel '%-.64s'", -"%-.16s commando geweigerd voor gebruiker: '%-.32s@%-.64s' voor kolom '%-.64s' in tabel '%-.64s'", +"%-.16s commando geweigerd voor gebruiker: '%-.32s'@'%-.64s' voor tabel '%-.64s'", +"%-.16s commando geweigerd voor gebruiker: '%-.32s'@'%-.64s' voor kolom '%-.64s' in tabel '%-.64s'", "Foutief GRANT/REVOKE commando. Raadpleeg de handleiding welke priveleges gebruikt kunnen worden.", "De host of gebruiker parameter voor GRANT is te lang", "Tabel '%-.64s.%s' bestaat niet", @@ -223,7 +223,7 @@ "DROP DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit", "CREATE DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit", "Foutieve parameters voor %s", -"%-.32s@%-.64s mag geen nieuwe gebruikers creeren", +"'%-.32s'@'%-.64s' mag geen nieuwe gebruikers creeren", "Incorrecte tabel definitie; alle MERGE tabellen moeten tot dezelfde database behoren", "Deadlock gevonden tijdens lock-aanvraag poging; Probeer herstart van de transactie", "Het gebruikte tabel type ondersteund geen FULLTEXT indexen", @@ -278,3 +278,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 11ae2c89019..f4019d63055 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -45,8 +45,8 @@ "Out of memory; Check if mysqld or some other process uses all available memory. If not you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space", "Can't get hostname for your address", "Bad handshake", -"Access denied for user: '%-.32s@%-.64s' to database '%-.64s'", -"Access denied for user: '%-.32s@%-.64s' (Using password: %s)", +"Access denied for user: '%-.32s'@'%-.64s' to database '%-.64s'", +"Access denied for user: '%-.32s'@'%-.64s' (Using password: %s)", "No Database Selected", "Unknown command", "Column '%-.64s' cannot be null", @@ -143,8 +143,8 @@ "Got error '%-.64s' from regexp", "Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", "There is no such grant defined for user '%-.32s' on host '%-.64s'", -"%-.16s command denied to user: '%-.32s@%-.64s' for table '%-.64s'", -"%-.16s command denied to user: '%-.32s@%-.64s' for column '%-.64s' in table '%-.64s'", +"%-.16s command denied to user: '%-.32s'@'%-.64s' for table '%-.64s'", +"%-.16s command denied to user: '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", "Illegal GRANT/REVOKE command. Please consult the manual which privileges can be used", "The host or user argument to GRANT is too long", "Table '%-.64s.%-.64s' doesn't exist", @@ -212,7 +212,7 @@ "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", +"'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", "The used table type doesn't support FULLTEXT indexes", @@ -272,3 +272,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 94e19fc6e9d..d3a38ede5bc 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -50,8 +50,8 @@ "MДlu sai otsa. VУimalik, et aitab swap-i lisamine vУi kДsu 'ulimit' abil MySQL-le rohkema mДlu kasutamise lubamine", "Ei suuda lahendada IP aadressi masina nimeks", "VДДr handshake", -"LigipДДs keelatud kasutajale '%-.32s@%-.64s' andmebaasile '%-.64s'", -"LigipДДs keelatud kasutajale '%-.32s@%-.64s' (kasutab parooli: %s)", +"LigipДДs keelatud kasutajale '%-.32s'@'%-.64s' andmebaasile '%-.64s'", +"LigipДДs keelatud kasutajale '%-.32s'@'%-.64s' (kasutab parooli: %s)", "Andmebaasi ei ole valitud", "Tundmatu kДsk", "Tulp '%-.64s' ei saa omada nullvДДrtust", @@ -148,8 +148,8 @@ "regexp tagastas vea '%-.64s'", "GROUP tulpade (MIN(),MAX(),COUNT()...) kooskasutamine tavaliste tulpadega ilma GROUP BY klauslita ei ole lubatud", "Sellist Уigust ei ole defineeritud kasutajale '%-.32s' masinast '%-.64s'", -"%-.16s kДsk ei ole lubatud kasutajale '%-.32s@%-.64s' tabelis '%-.64s'", -"%-.16s kДsk ei ole lubatud kasutajale '%-.32s@%-.64s' tulbale '%-.64s' tabelis '%-.64s'", +"%-.16s kДsk ei ole lubatud kasutajale '%-.32s'@'%-.64s' tabelis '%-.64s'", +"%-.16s kДsk ei ole lubatud kasutajale '%-.32s'@'%-.64s' tulbale '%-.64s' tabelis '%-.64s'", "Vigane GRANT/REVOKE kДsk. Tutvu kasutajajuhendiga", "Masina vУi kasutaja nimi GRANT lauses on liiga pikk", "Tabelit '%-.64s.%-.64s' ei eksisteeri", @@ -217,7 +217,7 @@ "DROP DATABASE ei ole lubatud kui lУim omab globaalset READ lukku", "CREATE DATABASE ei ole lubatud kui lУim omab globaalset READ lukku", "Vigased parameetrid %s-le", -"Kasutajal %-.32s@%-.64s ei ole lubatud luua uusi kasutajaid", +"Kasutajal '%-.32s'@'%-.64s' ei ole lubatud luua uusi kasutajaid", "Vigane tabelimДДratlus; kУik MERGE tabeli liikmed peavad asuma samas andmebaasis", "Lukustamisel tekkis tupik (deadlock); alusta transaktsiooni otsast", "Antud tabelitЭЭp ei toeta FULLTEXT indekseid", @@ -272,3 +272,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index dd062cc074a..ccff24c5759 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -45,8 +45,8 @@ "Manque de 'threads'/mИmoire", "Ne peut obtenir de hostname pour votre adresse", "Mauvais 'handshake'", -"AccХs refusИ pour l'utilisateur: '%-.32s@%-.64s'. Base '%-.64s'", -"AccХs refusИ pour l'utilisateur: '%-.32s@%-.64s' (mot de passe: %s)", +"AccХs refusИ pour l'utilisateur: '%-.32s'@'@%-.64s'. Base '%-.64s'", +"AccХs refusИ pour l'utilisateur: '%-.32s'@'@%-.64s' (mot de passe: %s)", "Aucune base n'a ИtИ sИlectionnИe", "Commande inconnue", "Le champ '%-.64s' ne peut Йtre vide (null)", @@ -143,8 +143,8 @@ "Erreur '%-.64s' provenant de regexp", "MИlanger les colonnes GROUP (MIN(),MAX(),COUNT()...) avec des colonnes normales est interdit s'il n'y a pas de clause GROUP BY", "Un tel droit n'est pas dИfini pour l'utilisateur '%-.32s' sur l'hТte '%-.64s'", -"La commande '%-.16s' est interdite Ю l'utilisateur: '%-.32s@%-.64s' sur la table '%-.64s'", -"La commande '%-.16s' est interdite Ю l'utilisateur: '%-.32s@%-.64s' sur la colonne '%-.64s' de la table '%-.64s'", +"La commande '%-.16s' est interdite Ю l'utilisateur: '%-.32s'@'@%-.64s' sur la table '%-.64s'", +"La commande '%-.16s' est interdite Ю l'utilisateur: '%-.32s'@'@%-.64s' sur la colonne '%-.64s' de la table '%-.64s'", "Commande GRANT/REVOKE incorrecte. Consultez le manuel.", "L'hТte ou l'utilisateur donnИ en argument Ю GRANT est trop long", "La table '%-.64s.%s' n'existe pas", @@ -212,7 +212,7 @@ "DROP DATABASE n'est pas autorisИe pendant qu'une tБche possХde un verrou global en lecture", "CREATE DATABASE n'est pas autorisИe pendant qu'une tБche possХde un verrou global en lecture", "Mauvais arguments Ю %s", -"%-.32s@%-.64s n'est pas autorisИ Ю crИer de nouveaux utilisateurs", +"'%-.32s'@'%-.64s' n'est pas autorisИ Ю crИer de nouveaux utilisateurs", "DИfinition de table incorrecte; toutes les tables MERGE doivent Йtre dans la mЙme base de donnИe", "Deadlock dИcouvert en essayant d'obtenir les verrous : essayez de redИmarrer la transaction", "Le type de table utilisИ ne supporte pas les index FULLTEXT", @@ -267,3 +267,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index e7cdf3f6f0d..52f3eb78c11 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -54,8 +54,8 @@ "Zuwenig Speicher.", "Kann Hostname fЭr diese Adresse nicht erhalten.", "Schlechter Handshake.", -"Keine Zugriffsberechtigung fЭr Benutzer: '%-.32s@%-.64s' fЭr Datenbank '%-.64s'.", -"Keine Zugriffsberechtigung fЭr Benutzer: '%-.32s@%-.64s'. (Verwendetes Passwort: %-.64s)", +"Keine Zugriffsberechtigung fЭr Benutzer: '%-.32s'@'%-.64s' fЭr Datenbank '%-.64s'.", +"Keine Zugriffsberechtigung fЭr Benutzer: '%-.32s'@'%-.64s'. (Verwendetes Passwort: %-.64s)", "Keine Datenbank ausgewДhlt.", "Unbekannter Befehl.", "Feld '%-.64s' kann nicht NULL sein.", @@ -152,8 +152,8 @@ "Fehler '%-.64s' von regexp", "Das Vermischen von GROUP Spalten (MIN(),MAX(),COUNT()...) mit Nicht-GROUP Spalten ist nicht erlaubt, sofern keine GROUP BY Klausel vorhanden ist.", "Keine solche Berechtigung fЭr User '%-.32s' auf Host '%-.64s'", -"%-.16s Befehl nicht erlaubt fЭr User: '%-.32s@%-.64s' fЭr Tabelle '%-.64s'", -"%-.16s Befehl nicht erlaubt fЭr User: '%-.32s@%-.64s' in Spalte '%-.64s' in Tabelle '%-.64s'", +"%-.16s Befehl nicht erlaubt fЭr User: '%-.32s'@'%-.64s' fЭr Tabelle '%-.64s'", +"%-.16s Befehl nicht erlaubt fЭr User: '%-.32s'@'%-.64s' in Spalte '%-.64s' in Tabelle '%-.64s'", "UnzulДssiger GRANT/REVOKE Befehl. Weiteres zum Thema Berechtigungen im Manual.", "Das Host oder User Argument fЭr GRANT ist zu lang", "Tabelle '%-.64s.%-.64s' existiert nicht", @@ -221,7 +221,7 @@ "Solange ein globaler Read LOCK gesetzt ist, ist DROP DATABASE nicht zulДssig.", "Solange ein globaler Read LOCK gesetzt ist, ist CREATE DATABASE nicht zulДssig.", "Falsche Argumente fЭr %s", -"%-.32s@%-.64s is nicht berechtigt neue Benutzer hinzuzufЭgen.", +"'%-.32s'@'%-.64s' is nicht berechtigt neue Benutzer hinzuzufЭgen.", "Falsche Tabellendefinition; sДmtliche MERGE-Tabellen mЭssen in derselben Datenbank sein.", "Beim Versuch einen Lock anzufordern ist ein Deadlock aufgetreten. Es wird versucht die Transaktion erneut zu starten.", "Der verwendete Tabellentyp unterstЭtzt keinen FULLTEXT-Index.", @@ -276,3 +276,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index ef423ae2758..1ce052bdf22 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -45,8 +45,8 @@ "пЯЭБКГЛА ЛЕ ТГ ДИАХщСИЛГ ЛМчЛГ (Out of thread space/memory)", "дЕМ щЦИМЕ ЦМЫСТЭ ТО hostname ЦИА ТГМ address САР", "г АМАЦМЧЯИСГ (handshake) ДЕМ щЦИМЕ СЫСТэ", -"дЕМ ЕПИТщЯЕТАИ Г ПЯЭСБАСГ СТО ВЯчСТГ: '%-.32s@%-.64s' СТГ БэСГ ДЕДОЛщМЫМ '%-.64s'", -"дЕМ ЕПИТщЯЕТАИ Г ПЯЭСБАСГ СТО ВЯчСТГ: '%-.32s@%-.64s' (ВЯчСГ password: %s)", +"дЕМ ЕПИТщЯЕТАИ Г ПЯЭСБАСГ СТО ВЯчСТГ: '%-.32s'@'%-.64s' СТГ БэСГ ДЕДОЛщМЫМ '%-.64s'", +"дЕМ ЕПИТщЯЕТАИ Г ПЯЭСБАСГ СТО ВЯчСТГ: '%-.32s'@'%-.64s' (ВЯчСГ password: %s)", "дЕМ ЕПИКщВХГЙЕ БэСГ ДЕДОЛщМЫМ", "аЦМЫСТГ ЕМТОКч", "тО ПЕДъО '%-.64s' ДЕМ ЛПОЯЕъ МА ЕъМАИ ЙЕМЭ (null)", @@ -143,8 +143,8 @@ "Got error '%-.64s' from regexp", "Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", "There is no such grant defined for user '%-.32s' on host '%-.64s'", -"%-.16s command denied to user: '%-.32s@%-.64s' for table '%-.64s'", -"%-.16s command denied to user: '%-.32s@%-.64s' for column '%-.64s' in table '%-.64s'", +"%-.16s command denied to user: '%-.32s'@'%-.64s' for table '%-.64s'", +"%-.16s command denied to user: '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", "Illegal GRANT/REVOKE command. Please consult the manual which privileges can be used.", "The host or user argument to GRANT is too long", "Table '%-.64s.%-.64s' doesn't exist", @@ -212,7 +212,7 @@ "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", +"'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", "The used table type doesn't support FULLTEXT indexes", @@ -267,3 +267,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 6b27cdc2551..6143ea2a1c4 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -47,8 +47,8 @@ "Elfogyott a thread-memoria", "A gepnev nem allapithato meg a cimbol", "A kapcsolatfelvetel nem sikerult (Bad handshake)", -"A(z) '%-.32s@%-.64s' felhasznalo szamara tiltott eleres az '%-.64s' adabazishoz.", -"A(z) '%-.32s@%-.64s' felhasznalo szamara tiltott eleres. (Hasznalja a jelszot: %s)", +"A(z) '%-.32s'@'%-.64s' felhasznalo szamara tiltott eleres az '%-.64s' adabazishoz.", +"A(z) '%-.32s'@'%-.64s' felhasznalo szamara tiltott eleres. (Hasznalja a jelszot: %s)", "Nincs kivalasztott adatbazis", "Ervenytelen parancs", "A(z) '%-.64s' oszlop erteke nem lehet nulla", @@ -145,8 +145,8 @@ "'%-.64s' hiba a regularis kifejezes hasznalata soran (regexp)", "A GROUP mezok (MIN(),MAX(),COUNT()...) kevert hasznalata nem lehetseges GROUP BY hivatkozas nelkul", "A '%-.32s' felhasznalonak nincs ilyen joga a '%-.64s' host-on", -"%-.16s parancs a '%-.32s@%-.64s' felhasznalo szamara nem engedelyezett a '%-.64s' tablaban", -"%-.16s parancs a '%-.32s@%-.64s' felhasznalo szamara nem engedelyezett a '%-.64s' mezo eseten a '%-.64s' tablaban", +"%-.16s parancs a '%-.32s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.64s' tablaban", +"%-.16s parancs a '%-.32s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.64s' mezo eseten a '%-.64s' tablaban", "Ervenytelen GRANT/REVOKE parancs. Kerem, nezze meg a kezikonyvben, milyen jogok lehetsegesek", "A host vagy felhasznalo argumentuma tul hosszu a GRANT parancsban", "A '%-.64s.%s' tabla nem letezik", @@ -214,7 +214,7 @@ "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", +"'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", "The used table type doesn't support FULLTEXT indexes", @@ -269,3 +269,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index 8b0598f64b5..8164757d823 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -45,8 +45,8 @@ "Fine dello spazio/memoria per i thread", "Impossibile risalire al nome dell'host dall'indirizzo (risoluzione inversa)", "Negoziazione impossibile", -"Accesso non consentito per l'utente: '%-.32s@%-.64s' al database '%-.64s'", -"Accesso non consentito per l'utente: '%-.32s@%-.64s' (Password: %s)", +"Accesso non consentito per l'utente: '%-.32s'@'%-.64s' al database '%-.64s'", +"Accesso non consentito per l'utente: '%-.32s'@'%-.64s' (Password: %s)", "Nessun database selezionato", "Comando sconosciuto", "La colonna '%-.64s' non puo` essere nulla", @@ -143,8 +143,8 @@ "Errore '%-.64s' da regexp", "Il mescolare funzioni di aggregazione (MIN(),MAX(),COUNT()...) e non e` illegale se non c'e` una clausula GROUP BY", "GRANT non definita per l'utente '%-.32s' dalla macchina '%-.64s'", -"Comando %-.16s negato per l'utente: '%-.32s@%-.64s' sulla tabella '%-.64s'", -"Comando %-.16s negato per l'utente: '%-.32s@%-.64s' sulla colonna '%-.64s' della tabella '%-.64s'", +"Comando %-.16s negato per l'utente: '%-.32s'@'%-.64s' sulla tabella '%-.64s'", +"Comando %-.16s negato per l'utente: '%-.32s'@'%-.64s' sulla colonna '%-.64s' della tabella '%-.64s'", "Comando GRANT/REVOKE illegale. Prego consultare il manuale per sapere quali privilegi possono essere usati.", "L'argomento host o utente per la GRANT e` troppo lungo", "La tabella '%-.64s.%s' non esiste", @@ -212,7 +212,7 @@ "DROP DATABASE non e' permesso mentre il thread ha un lock globale di lettura", "CREATE DATABASE non e' permesso mentre il thread ha un lock globale di lettura", "Argomenti errati a %s", -"A %-.32s@%-.64s non e' permesso creare nuovi utenti", +"A '%-.32s'@'%-.64s' non e' permesso creare nuovi utenti", "Definizione della tabella errata; tutte le tabelle di tipo MERGE devono essere nello stesso database", "Trovato deadlock durante il lock; Provare a far ripartire la transazione", "La tabella usata non supporta gli indici FULLTEXT", @@ -267,3 +267,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index 011d6a1faac..747d3611cc9 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -47,8 +47,8 @@ "Out of memory; mysqld ╓╚╓╫╓нб╬╓н╔в╔М╔╩╔╧╓╛╔А╔Б╔Й║╪╓Ра╢╓ф╩х╓ц╓ф╓╓╓К╓╚Ёнг╖╓╥╓ф╓╞╓ю╓╣╓╓. ╔А╔Б╔Й║╪╓Р╩х╓╓юз╓ц╓ф╓╓╓й╓╓╬Л╧Г║╒'ulimit' ╓РюъдЙ╓╥╓ф mysqld ╓н╔А╔Б╔Й║╪╩хмя╦бЁ╕нл╓Рб©╓╞╓╧╓К╓╚║╒swap space ╓РаЩ╓Д╓╥╓ф╓ъ╓ф╓╞╓ю╓╣╓╓", "╓╫╓н address ╓н hostname ╓╛╟З╓╠╓ч╓╩╓С.", "Bad handshake", -"╔Ф║╪╔╤║╪ '%-.32s@%-.64s' ╓н '%-.64s' ╔г║╪╔©╔ы║╪╔╧╓ь╓н╔╒╔╞╔╩╔╧╓Р╣Яхщ╓╥╓ч╓╧", -"╔Ф║╪╔╤║╪ '%-.32s@%-.64s' ╓Р╣Яхщ╓╥╓ч╓╧.(Using password: %s)", +"╔Ф║╪╔╤║╪ '%-.32s'@'%-.64s' ╓н '%-.64s' ╔г║╪╔©╔ы║╪╔╧╓ь╓н╔╒╔╞╔╩╔╧╓Р╣Яхщ╓╥╓ч╓╧", +"╔Ф║╪╔╤║╪ '%-.32s'@'%-.64s' ╓Р╣Яхщ╓╥╓ч╓╧.(Using password: %s)", "╔г║╪╔©╔ы║╪╔╧╓╛а╙бР╓╣╓Л╓ф╓╓╓ч╓╩╓С.", "╓╫╓н╔Ё╔ч╔С╔и╓о╡©║╘", "Column '%-.64s' ╓о null ╓к╓о╓г╓╜╓й╓╓╓н╓г╓╧", @@ -145,8 +145,8 @@ "Got error '%-.64s' from regexp", "Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", "╔Ф║╪╔╤║╪ '%-.32s' (╔ш╔╧╔х '%-.64s' ╓н╔Ф║╪╔╤║╪) ╓о╣Ж╡д╓╣╓Л╓ф╓╓╓ч╓╩╓С", -"╔Ё╔ч╔С╔и %-.16s ╓о ╔Ф║╪╔╤║╪ '%-.32s@%-.64s' ,╔ф║╪╔ж╔К '%-.64s' ╓кбп╓╥╓ф╣Ж╡д╓╣╓Л╓ф╓╓╓ч╓╩╓С", -"╔Ё╔ч╔С╔и %-.16s ╓о ╔Ф║╪╔╤║╪ '%-.32s@%-.64s'\n ╔╚╔И╔Ю '%-.64s' ╔ф║╪╔ж╔К '%-.64s' ╓кбп╓╥╓ф╣Ж╡д╓╣╓Л╓ф╓╓╓ч╓╩╓С", +"╔Ё╔ч╔С╔и %-.16s ╓о ╔Ф║╪╔╤║╪ '%-.32s'@'%-.64s' ,╔ф║╪╔ж╔К '%-.64s' ╓кбп╓╥╓ф╣Ж╡д╓╣╓Л╓ф╓╓╓ч╓╩╓С", +"╔Ё╔ч╔С╔и %-.16s ╓о ╔Ф║╪╔╤║╪ '%-.32s'@'%-.64s'\n ╔╚╔И╔Ю '%-.64s' ╔ф║╪╔ж╔К '%-.64s' ╓кбп╓╥╓ф╣Ж╡д╓╣╓Л╓ф╓╓╓ч╓╩╓С", "Illegal GRANT/REVOKE command. Please consult the manual which privleges can be used.", "The host or user argument to GRANT is too long", "Table '%-.64s.%s' doesn't exist", @@ -214,7 +214,7 @@ "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", +"'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", "The used table type doesn't support FULLTEXT indexes", @@ -269,3 +269,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index be7fee7cb45..93d86d32937 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -45,8 +45,8 @@ "Out of memory; mysqldЁ╙ ╤г╢ы╦╔ га╥н╪╪╪╜©║╪╜ ╩Г©К╟║╢игя ╦ч╦П╦╝╦╕ ╩Г©КгяаЖ ц╓е╘го╫ц©ю. ╦╦╬Ю ╠в╥╦аЖ ╬й╢ы╦И ulimit ╦М╥ию╩ юл©©Кго©╘ ╢У╦╧ю╨ ╦ч╦П╦╝╦╕ ╩Г©Кгр ╪Ж юж╣╣╥о го╟еЁ╙ ╫╨©р ╫╨фпюл╫╨╦╕ аУ╟║╫це╟╫ц©ю", "╢Г╫еюг ддг╩емюг хё╫╨ф╝юл╦╖ю╩ ╬Рю╩ ╪Ж ╬Ью╬╢о╢ы.", "Bad handshake", -"'%-.32s@%-.64s' ╩Г©Кюз╢б '%-.64s' ╣╔юле╦╨ёюл╫╨©║ а╒╠ыюл ╟е╨н ╣г╬З╫ю╢о╢ы.", -"'%-.32s@%-.64s' ╩Г©Кюз╢б а╒╠ыюл ╟е╨н ╣г╬З╫ю╢о╢ы. (Using password: %s)", +"'%-.32s'@'%-.64s' ╩Г©Кюз╢б '%-.64s' ╣╔юле╦╨ёюл╫╨©║ а╒╠ыюл ╟е╨н ╣г╬З╫ю╢о╢ы.", +"'%-.32s'@'%-.64s' ╩Г©Кюз╢б а╒╠ыюл ╟е╨н ╣г╬З╫ю╢о╢ы. (Using password: %s)", "╪╠ец╣х ╣╔юле╦╨ёюл╫╨╟║ ╬Ь╫ю╢о╢ы.", "╦М╥и╬Н╟║ ╧╨аЖ ╦П╦ё╟з╬Н©Д...", "д╝╥Ё '%-.64s'╢б Ён(Null)юл ╣г╦И ╬х╣к╢о╢ы. ", @@ -143,8 +143,8 @@ "regexp©║╪╜ '%-.64s'╟║ Ё╣╫ю╢о╢ы.", "Mixing of GROUP д╝╥Ёs (MIN(),MAX(),COUNT()...) with no GROUP д╝╥Ёs is illegal if there is no GROUP BY clause", "╩Г©Кюз '%-.32s' (хё╫╨ф╝ '%-.64s')╦╕ ю╖го©╘ а╓юг╣х ╠в╥╠ ╫бюню╨ ╬Ь╫ю╢о╢ы.", -"'%-.16s' ╦М╥ию╨ ╢ыю╫ ╩Г©Кюз©║╟т ╟е╨н╣г╬З╫ю╢о╢ы. : '%-.32s@%-.64s' for евюл╨М '%-.64s'", -"'%-.16s' ╦М╥ию╨ ╢ыю╫ ╩Г©Кюз©║╟т ╟е╨н╣г╬З╫ю╢о╢ы. : '%-.32s@%-.64s' for д╝╥Ё '%-.64s' in евюл╨М '%-.64s'", +"'%-.16s' ╦М╥ию╨ ╢ыю╫ ╩Г©Кюз©║╟т ╟е╨н╣г╬З╫ю╢о╢ы. : '%-.32s'@'%-.64s' for евюл╨М '%-.64s'", +"'%-.16s' ╦М╥ию╨ ╢ыю╫ ╩Г©Кюз©║╟т ╟е╨н╣г╬З╫ю╢о╢ы. : '%-.32s'@'%-.64s' for д╝╥Ё '%-.64s' in евюл╨М '%-.64s'", "юъ╦Ь╣х GRANT/REVOKE ╦М╥и. ╬Н╤╡ ╠г╦╝©м ╫бюнюл ╩Г©К╣г╬Н аЗ ╪Ж юж╢баЖ ╦ч╢╨╬Сю╩ ╨╦╫ц©ю.", "╫бюн(GRANT)ю╩ ю╖го©╘ ╩Г©Кгя ╩Г©КюзЁ╙ хё╫╨ф╝юг ╟╙╣Июл Ёй╧╚ ╠И╢о╢ы.", "евюл╨М '%-.64s.%s' ╢б а╦юГгоаЖ ╬й╫ю╢о╢ы.", @@ -212,7 +212,7 @@ "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", +"'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", "The used table type doesn't support FULLTEXT indexes", @@ -267,3 +267,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index 96c11871502..e9319246fc6 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -47,8 +47,8 @@ "Tomt for trЕd plass/minne", "Kan ikkje fЕ tak i vertsnavn for di adresse", "Feil handtrykk (handshake)", -"Tilgang ikkje tillate for brukar: '%-.32s@%-.64s' til databasen '%-.64s' nekta", -"Tilgang ikke tillate for brukar: '%-.32s@%-.64s' (Brukar passord: %s)", +"Tilgang ikkje tillate for brukar: '%-.32s'@'%-.64s' til databasen '%-.64s' nekta", +"Tilgang ikke tillate for brukar: '%-.32s'@'%-.64s' (Brukar passord: %s)", "Ingen database vald", "Ukjent kommando", "Kolonne '%-.64s' kan ikkje vere null", @@ -145,8 +145,8 @@ "Got error '%-.64s' from regexp", "Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", "There is no such grant defined for user '%-.32s' on host '%-.64s'", -"%-.16s command denied to user: '%-.32s@%-.64s' for table '%-.64s'", -"%-.16s command denied to user: '%-.32s@%-.64s' for column '%-.64s' in table '%-.64s'", +"%-.16s command denied to user: '%-.32s'@'%-.64s' for table '%-.64s'", +"%-.16s command denied to user: '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", "Illegal GRANT/REVOKE command. Please consult the manual which privleges can be used.", "The host or user argument to GRANT is too long", "Table '%-.64s.%s' doesn't exist", @@ -214,7 +214,7 @@ "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", +"'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", "The used table type doesn't support FULLTEXT indexes", @@ -269,3 +269,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index c505d512e9e..edb5854db7e 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -47,8 +47,8 @@ "Tomt for trЕd plass/minne", "Kan ikke fЕ tak i vertsnavn for din adresse", "Feil hЕndtrykk (handshake)", -"Tilgang nektet for bruker: '%-.32s@%-.64s' til databasen '%-.64s' nektet", -"Tilgang nektet for bruker: '%-.32s@%-.64s' (Bruker passord: %s)", +"Tilgang nektet for bruker: '%-.32s'@'%-.64s' til databasen '%-.64s' nektet", +"Tilgang nektet for bruker: '%-.32s'@'%-.64s' (Bruker passord: %s)", "Ingen database valgt", "Ukjent kommando", "Kolonne '%-.64s' kan ikke vere null", @@ -145,8 +145,8 @@ "Got error '%-.64s' from regexp", "Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", "There is no such grant defined for user '%-.32s' on host '%-.64s'", -"%-.16s command denied to user: '%-.32s@%-.64s' for table '%-.64s'", -"%-.16s command denied to user: '%-.32s@%-.64s' for column '%-.64s' in table '%-.64s'", +"%-.16s command denied to user: '%-.32s'@'%-.64s' for table '%-.64s'", +"%-.16s command denied to user: '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", "Illegal GRANT/REVOKE command. Please consult the manual which privleges can be used.", "The host or user argument to GRANT is too long", "Table '%-.64s.%s' doesn't exist", @@ -214,7 +214,7 @@ "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", +"'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", "The used table type doesn't support FULLTEXT indexes", @@ -269,3 +269,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index 33b2fbdb8a8..27b4d0d661f 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -49,8 +49,8 @@ "Zbyt maЁo miejsca/pamiЙci dla w?tku", "Nie mo©na otrzymaФ nazwy hosta dla twojego adresu", "ZЁy uchwyt(handshake)", -"Access denied for user: '%-.32s@%-.64s' to database '%-.64s'", -"Access denied for user: '%-.32s@%-.64s' (Using password: %s)", +"Access denied for user: '%-.32s'@'%-.64s' to database '%-.64s'", +"Access denied for user: '%-.32s'@'%-.64s' (Using password: %s)", "Nie wybrano ©adnej bazy danych", "Nieznana komenda", "Kolumna '%-.64s' nie mo©e byФ null", @@ -147,8 +147,8 @@ "Got error '%-.64s' from regexp", "Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", "There is no such grant defined for user '%-.32s' on host '%-.64s'", -"%-.16s command denied to user: '%-.32s@%-.64s' for table '%-.64s'", -"%-.16s command denied to user: '%-.32s@%-.64s' for column '%-.64s' in table '%-.64s'", +"%-.16s command denied to user: '%-.32s'@'%-.64s' for table '%-.64s'", +"%-.16s command denied to user: '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", "Illegal GRANT/REVOKE command. Please consult the manual which privleges can be used.", "The host or user argument to GRANT is too long", "Table '%-.64s.%s' doesn't exist", @@ -216,7 +216,7 @@ "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", +"'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", "The used table type doesn't support FULLTEXT indexes", @@ -271,3 +271,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index e8a3205ec5d..60ace09ab33 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -45,8 +45,8 @@ "Sem memСria. Verifique se o mysqld ou algum outro processo estА usando toda memСria disponМvel. Se nЦo, vocЙ pode ter que usar 'ulimit' para permitir ao mysqld usar mais memСria ou vocЙ pode adicionar mais Аrea de 'swap'", "NЦo pode obter nome do 'host' para seu endereГo", "NegociaГЦo de acesso falhou", -"Acesso negado para o usuАrio '%-.32s@%-.64s' ao banco de dados '%-.64s'", -"Acesso negado para o usuАrio '%-.32s@%-.64s' (senha usada: %s)", +"Acesso negado para o usuАrio '%-.32s'@'%-.64s' ao banco de dados '%-.64s'", +"Acesso negado para o usuАrio '%-.32s'@'%-.64s' (senha usada: %s)", "Nenhum banco de dados foi selecionado", "Comando desconhecido", "Coluna '%-.64s' nЦo pode ser vazia", @@ -143,8 +143,8 @@ "Obteve erro '%-.64s' em regexp", "Mistura de colunas agrupadas (com MIN(), MAX(), COUNT(), ...) com colunas nЦo agrupadas И ilegal, se nЦo existir uma clАusula de agrupamento (clАusula GROUP BY)", "NЦo existe tal permissЦo (grant) definida para o usuАrio '%-.32s' no 'host' '%-.64s'", -"Comando '%-.16s' negado para o usuАrio '%-.32s@%-.64s' na tabela '%-.64s'", -"Comando '%-.16s' negado para o usuАrio '%-.32s@%-.64s' na coluna '%-.64s', na tabela '%-.64s'", +"Comando '%-.16s' negado para o usuАrio '%-.32s'@'%-.64s' na tabela '%-.64s'", +"Comando '%-.16s' negado para o usuАrio '%-.32s'@'%-.64s' na coluna '%-.64s', na tabela '%-.64s'", "Comando GRANT/REVOKE ilegal. Por favor consulte no manual quais privilИgios podem ser usados.", "Argumento de 'host' ou de usuАrio para o GRANT И longo demais", "Tabela '%-.64s.%-.64s' nЦo existe", @@ -212,7 +212,7 @@ "DROP DATABASE nЦo permitido enquanto uma 'thread' estА mantendo um travamento global de leitura", "CREATE DATABASE nЦo permitido enquanto uma 'thread' estА mantendo um travamento global de leitura", "Argumentos errados para %s", -"NЦo И permitido a %-.32s@%-.64s criar novos usuАrios", +"NЦo И permitido a '%-.32s'@'%-.64s' criar novos usuАrios", "DefiniГЦo incorreta da tabela. Todas as tabelas contidas na junГЦo devem estar no mesmo banco de dados.", "Encontrado um travamento fatal (deadlock) quando tentava obter uma trava. Tente reiniciar a transaГЦo.", "O tipo de tabela utilizado nЦo suporta Мndices de texto completo (fulltext indexes)", @@ -267,3 +267,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index 6602b5d430c..8824d64876a 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -49,8 +49,8 @@ "Out of memory; Verifica daca mysqld sau vreun alt proces foloseste toate memoria disponbila. Altfel, trebuie sa folosesi 'ulimit' ca sa permiti lui memoria disponbila. Altfel, trebuie sa folosesi 'ulimit' ca sa permiti lui mysqld sa foloseasca mai multa memorie ori adauga mai mult spatiu pentru swap (swap space)", "Nu pot sa obtin hostname-ul adresei tale", "Prost inceput de conectie (bad handshake)", -"Acces interzis pentru utilizatorul: '%-.32s@%-.64s' la baza de date '%-.64s'", -"Acces interzis pentru utilizatorul: '%-.32s@%-.64s' (Folosind parola: %s)", +"Acces interzis pentru utilizatorul: '%-.32s'@'%-.64s' la baza de date '%-.64s'", +"Acces interzis pentru utilizatorul: '%-.32s'@'%-.64s' (Folosind parola: %s)", "Nici o baza de data nu a fost selectata inca", "Comanda invalida", "Coloana '%-.64s' nu poate sa fie null", @@ -147,8 +147,8 @@ "Eroarea '%-.64s' obtinuta din expresia regulara (regexp)", "Amestecarea de coloane GROUP (MIN(),MAX(),COUNT()...) fara coloane GROUP este ilegala daca nu exista o clauza GROUP BY", "Nu exista un astfel de grant definit pentru utilzatorul '%-.32s' de pe host-ul '%-.64s'", -"Comanda %-.16s interzisa utilizatorului: '%-.32s@%-.64s' pentru tabela '%-.64s'", -"Comanda %-.16s interzisa utilizatorului: '%-.32s@%-.64s' pentru coloana '%-.64s' in tabela '%-.64s'", +"Comanda %-.16s interzisa utilizatorului: '%-.32s'@'%-.64s' pentru tabela '%-.64s'", +"Comanda %-.16s interzisa utilizatorului: '%-.32s'@'%-.64s' pentru coloana '%-.64s' in tabela '%-.64s'", "Comanda GRANT/REVOKE ilegala. Consultati manualul in privinta privilegiilor ce pot fi folosite.", "Argumentul host-ului sau utilizatorului pentru GRANT e prea lung", "Tabela '%-.64s.%-.64s' nu exista", @@ -216,7 +216,7 @@ "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", +"'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", "The used table type doesn't support FULLTEXT indexes", @@ -271,3 +271,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index 70ff979bfdf..ddfc0a8f7de 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -47,8 +47,8 @@ "Недостаточно памяти; удостоверьтесь, что mysqld или какой-либо другой процесс не занимает всю доступную память. Если нет, то вы можете использовать ulimit, чтобы выделить для mysqld больше памяти, или увеличить объем файла подкачки", "Невозможно получить имя хоста для вашего адреса", "Некорректное приветствие", -"Для пользователя '%-.32s@%-.64s' доступ к базе данных '%-.64s' закрыт", -"Доступ закрыт для пользователя '%-.32s@%-.64s' (был использован пароль: %s)", +"Для пользователя '%-.32s'@'%-.64s' доступ к базе данных '%-.64s' закрыт", +"Доступ закрыт для пользователя '%-.32s'@'%-.64s' (был использован пароль: %s)", "База данных не выбрана", "Неизвестная команда коммуникационного протокола", "Столбец '%-.64s' не может принимать величину NULL", @@ -145,8 +145,8 @@ "Получена ошибка '%-.64s' от регулярного выражения", "Одновременное использование сгруппированных (GROUP) столбцов (MIN(),MAX(),COUNT(),...) с несгруппированными столбцами является некорректным, если в выражении есть GROUP BY", "Такие права не определены для пользователя '%-.32s' на хосте '%-.64s'", -"Команда %-.16s запрещена пользователю '%-.32s@%-.64s' для таблицы '%-.64s'", -"Команда %-.16s запрещена пользователю '%-.32s@%-.64s' для столбца '%-.64s' в таблице '%-.64s'", +"Команда %-.16s запрещена пользователю '%-.32s'@'%-.64s' для таблицы '%-.64s'", +"Команда %-.16s запрещена пользователю '%-.32s'@'%-.64s' для столбца '%-.64s' в таблице '%-.64s'", "Неверная команда GRANT или REVOKE. Обратитесь к документации, чтобы выяснить, какие привилегии можно использовать", "Слишком длинное имя пользователя/хоста для GRANT", "Таблица '%-.64s.%-.64s' не существует", @@ -214,7 +214,7 @@ "Не допускается DROP DATABASE, пока поток держит глобальную блокировку чтения", "Не допускается CREATE DATABASE, пока поток держит глобальную блокировку чтения", "Неверные параметры для %s", -"%-.32s@%-.64s не разрешается создавать новых пользователей", +"'%-.32s'@'%-.64s' не разрешается создавать новых пользователей", "Неверное определение таблицы; Все таблицы в MERGE должны принадлежать одной и той же базе данных", "Возникла тупиковая ситуация в процессе получения блокировки; Попробуйте перезапустить транзакцию", "Используемый тип таблиц не поддерживает полнотекстовых индексов", @@ -269,3 +269,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/serbian/errmsg.txt b/sql/share/serbian/errmsg.txt index f4ea3ac3c82..9e2a37e4053 100644 --- a/sql/share/serbian/errmsg.txt +++ b/sql/share/serbian/errmsg.txt @@ -51,8 +51,8 @@ "Nema memorije; Proverite da li MySQL server ili neki drugi proces koristi svu slobodnu memoriju. (UNIX: Ako ne, probajte da upotrebite 'ulimit' komandu da biste dozvolili daemon-u da koristi vi e memorije ili probajte da dodate vi e swap memorije)", "Ne mogu da dobijem ime host-a za va u IP adresu", "Lo poХetak komunikacije (handshake)", -"Pristup je zabranjen korisniku '%-.32s@%-.64s' za bazu '%-.64s'", -"Pristup je zabranjen korisniku '%-.32s@%-.64s' (koristi lozinku: '%s')", +"Pristup je zabranjen korisniku '%-.32s'@'%-.64s' za bazu '%-.64s'", +"Pristup je zabranjen korisniku '%-.32s'@'%-.64s' (koristi lozinku: '%s')", "Ni jedna baza nije selektovana", "Nepoznata komanda", "Kolona '%-.64s' ne mo·e biti NULL", @@ -149,8 +149,8 @@ "Funkcija regexp je vratila gre ku '%-.64s'", "Upotreba agregatnih funkcija (MIN(),MAX(),COUNT()...) bez 'GROUP' kolona je pogre na ako ne postoji 'GROUP BY' iskaz", "Ne postoji odobrenje za pristup korisniku '%-.32s' na host-u '%-.64s'", -"%-.16s komanda zabranjena za korisnika '%-.32s@%-.64s' za tabelu '%-.64s'", -"%-.16s komanda zabranjena za korisnika '%-.32s@%-.64s' za kolonu '%-.64s' iz tabele '%-.64s'", +"%-.16s komanda zabranjena za korisnika '%-.32s'@'%-.64s' za tabelu '%-.64s'", +"%-.16s komanda zabranjena za korisnika '%-.32s'@'%-.64s' za kolonu '%-.64s' iz tabele '%-.64s'", "Pogre na 'GRANT' odnosno 'REVOKE' komanda. Molim Vas pogledajte u priruХniku koje vrednosti mogu biti upotrebljene.", "Argument 'host' ili 'korisnik' prosleПen komandi 'GRANT' je predugaХak", "Tabela '%-.64s.%-.64s' ne postoji", @@ -218,7 +218,7 @@ "Komanda 'DROP DATABASE' nije dozvoljena dok thread globalno zakljuХava Хitanje podataka", "Komanda 'CREATE DATABASE' nije dozvoljena dok thread globalno zakljuХava Хitanje podataka", "Pogre ni argumenti prosleПeni na %s", -"Korisniku %-.32s@%-.64s nije dozvoljeno da kreira nove korisnike", +"Korisniku '%-.32s'@'%-.64s' nije dozvoljeno da kreira nove korisnike", "Pogre na definicija tabele; sve 'MERGE' tabele moraju biti u istoj bazi podataka", "Unakrsno zakljuХavanje pronaПeno kada sam poku ao da dobijem pravo na zakljuХavanje; Probajte da restartujete transakciju", "Upotrebljeni tip tabele ne podr·ava 'FULLTEXT' indekse", @@ -263,3 +263,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index 2ba4f2f0548..ed1d8cadb80 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -53,8 +53,8 @@ "MАlo miesta-pamДti pre vlАkno", "NemТ╬em zisti╩ meno hostite╣a pre va╧u adresu", "Chyba pri nadvДzovanМ spojenia", -"ZakАzanЩ prМstup pre u╬Мvate╣a: '%-.32s@%-.64s' k databАzi '%-.64s'", -"ZakАzanЩ prМstup pre u╬Мvate╣a: '%-.32s@%-.64s' (pou╬itie hesla: %s)", +"ZakАzanЩ prМstup pre u╬Мvate╣a: '%-.32s'@'%-.64s' k databАzi '%-.64s'", +"ZakАzanЩ prМstup pre u╬Мvate╣a: '%-.32s'@'%-.64s' (pou╬itie hesla: %s)", "Nebola vybranА databАza", "NeznАmy prМkaz", "Pole '%-.64s' nemТ╬e by╩ null", @@ -151,8 +151,8 @@ "Got error '%-.64s' from regexp", "Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", "There is no such grant defined for user '%-.32s' on host '%-.64s'", -"%-.16s command denied to user: '%-.32s@%-.64s' for table '%-.64s'", -"%-.16s command denied to user: '%-.32s@%-.64s' for column '%-.64s' in table '%-.64s'", +"%-.16s command denied to user: '%-.32s'@'%-.64s' for table '%-.64s'", +"%-.16s command denied to user: '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", "Illegal GRANT/REVOKE command. Please consult the manual which privleges can be used.", "The host or user argument to GRANT is too long", "Table '%-.64s.%s' doesn't exist", @@ -220,7 +220,7 @@ "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", +"'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", "The used table type doesn't support FULLTEXT indexes", @@ -275,3 +275,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index c7f8d51dee9..5f3a2f38109 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -46,8 +46,8 @@ "Memoria/espacio de tranpaso insuficiente", "No puedo obtener el nombre de maquina de tu direccion", "Protocolo erroneo", -"Acceso negado para usuario: '%-.32s@%-.64s' para la base de datos '%-.64s'", -"Acceso negado para usuario: '%-.32s@%-.64s' (Usando clave: %s)", +"Acceso negado para usuario: '%-.32s'@'%-.64s' para la base de datos '%-.64s'", +"Acceso negado para usuario: '%-.32s'@'%-.64s' (Usando clave: %s)", "Base de datos no seleccionada", "Comando desconocido", "La columna '%-.64s' no puede ser nula", @@ -144,8 +144,8 @@ "Obtenido error '%-.64s' de regexp", "Mezcla de columnas GROUP (MIN(),MAX(),COUNT()...) con no GROUP columnas es ilegal si no hat la clausula GROUP BY", "No existe permiso definido para usuario '%-.32s' en el servidor '%-.64s'", -"%-.16s comando negado para usuario: '%-.32s@%-.64s' para tabla '%-.64s'", -"%-.16s comando negado para usuario: '%-.32s@%-.64s' para columna '%-.64s' en la tabla '%-.64s'", +"%-.16s comando negado para usuario: '%-.32s'@'%-.64s' para tabla '%-.64s'", +"%-.16s comando negado para usuario: '%-.32s'@'%-.64s' para columna '%-.64s' en la tabla '%-.64s'", "Ilegal comando GRANT/REVOKE. Por favor consulte el manual para cuales permisos pueden ser usados.", "El argumento para servidor o usuario para GRANT es demasiado grande", "Tabla '%-.64s.%s' no existe", @@ -213,7 +213,7 @@ "DROP DATABASE no permitido mientras un thread estА ejerciendo un bloqueo de lectura global", "CREATE DATABASE no permitido mientras un thread estА ejerciendo un bloqueo de lectura global", "Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", +"'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", "The used table type doesn't support FULLTEXT indexes", @@ -268,3 +268,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index 0d51cb4b543..d108618834e 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -45,8 +45,8 @@ "Fick slut pЕ minnet. Kontrollera om mysqld eller nЕgon annan process anvДnder allt tillgДngligt minne. Om inte, fЖrsЖk anvДnda 'ulimit' eller allokera mera swap", "Kan inte hitta 'hostname' fЖr din adress", "Fel vid initiering av kommunikationen med klienten", -"AnvДndare '%-.32s@%-.64s' Дr ej berДttigad att anvДnda databasen %-.64s", -"AnvДndare '%-.32s@%-.64s' Дr ej berДttigad att logga in (AnvДnder lЖsen: %s)", +"AnvДndare '%-.32s'@'%-.64s' Дr ej berДttigad att anvДnda databasen %-.64s", +"AnvДndare '%-.32s'@'%-.64s' Дr ej berДttigad att logga in (AnvДnder lЖsen: %s)", "Ingen databas i anvДndning", "OkДnt commando", "Kolumn '%-.64s' fЕr inte vara NULL", @@ -143,8 +143,8 @@ "Fick fel '%-.64s' frЕn REGEXP", "Man fЕr ha bЕde GROUP-kolumner (MIN(),MAX(),COUNT()...) och fДlt i en frЕga om man inte har en GROUP BY-del", "Det finns inget privilegium definierat fЖr anvДndare '%-.32s' pЕ '%-.64s'", -"%-.16s ej tillЕtet fЖr '%-.32s@%-.64s' fЖr tabell '%-.64s'", -"%-.16s ej tillЕtet fЖr '%-.32s@%-.64s' fЖr kolumn '%-.64s' i tabell '%-.64s'", +"%-.16s ej tillЕtet fЖr '%-.32s'@'%-.64s' fЖr tabell '%-.64s'", +"%-.16s ej tillЕtet fЖr '%-.32s'@'%-.64s' fЖr kolumn '%-.64s' i tabell '%-.64s'", "Felaktigt GRANT-privilegium anvДnt", "Felaktigt maskinnamn eller anvДndarnamn anvДnt med GRANT", "Det finns ingen tabell som heter '%-.64s.%s'", @@ -212,7 +212,7 @@ "DROP DATABASE Дr inte tillЕtet nДr man har ett globalt lДslЕs", "CREATE DATABASE Дr inte tillЕtet nДr man har ett globalt lДslЕs", "Felaktiga argument till %s", -"%-.32s@%-.64s har inte rДttighet att skapa nya anvДndare", +"'%-.32s'@'%-.64s' har inte rДttighet att skapa nya anvДndare", "Felaktig tabelldefinition; alla tabeller i en MERGE-tabell mЕste vara i samma databas", "Fick 'DEADLOCK' vid lЕsfЖrsЖk av block/rad. FЖrsЖk att starta om transaktionen", "Tabelltypen har inte hantering av FULLTEXT-index", @@ -267,3 +267,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt index 4e22dbfcf3e..96b9f40feac 100644 --- a/sql/share/ukrainian/errmsg.txt +++ b/sql/share/ukrainian/errmsg.txt @@ -50,8 +50,8 @@ "Брак пам'ят╕; Перев╕рте чи mysqld або як╕сь ╕нш╕ процеси використовують усю доступну пам'ять. Як н╕, то ви можете скористатися 'ulimit', аби дозволити mysqld використовувати б╕льше пам'ят╕ або ви можете додати б╕льше м╕сця п╕д свап", "Не можу визначити ╕м'я хосту для вашо╖ адреси", "Нев╕рна установка зв'язку", -"Доступ заборонено для користувача: '%-.32s@%-.64s' до бази данних '%-.64s'", -"Доступ заборонено для користувача: '%-.32s@%-.64s' (Використано пароль: %s)", +"Доступ заборонено для користувача: '%-.32s'@'%-.64s' до бази данних '%-.64s'", +"Доступ заборонено для користувача: '%-.32s'@'%-.64s' (Використано пароль: %s)", "Базу данних не вибрано", "Нев╕дома команда", "Стовбець '%-.64s' не може бути нульовим", @@ -148,8 +148,8 @@ "Отримано помилку '%-.64s' в╕д регулярного виразу", "Зм╕шування GROUP стовбц╕в (MIN(),MAX(),COUNT()...) з не GROUP стовбцями ╓ забороненим, якщо не ма╓ GROUP BY", "Повноважень не визначено для користувача '%-.32s' з хосту '%-.64s'", -"%-.16s команда заборонена користувачу: '%-.32s@%-.64s' у таблиц╕ '%-.64s'", -"%-.16s команда заборонена користувачу: '%-.32s@%-.64s' для стовбця '%-.64s' у таблиц╕ '%-.64s'", +"%-.16s команда заборонена користувачу: '%-.32s'@'%-.64s' у таблиц╕ '%-.64s'", +"%-.16s команда заборонена користувачу: '%-.32s'@'%-.64s' для стовбця '%-.64s' у таблиц╕ '%-.64s'", "Хибна GRANT/REVOKE команда. Прочитайте документац╕ю стосовно того, як╕ права можна використовувати.", "Аргумент host або user для GRANT задовгий", "Таблиця '%-.64s.%-.64s' не ╕сну╓", @@ -217,7 +217,7 @@ "DROP DATABASE не дозволено доки г╕лка перебува╓ п╕д загальним блокуванням читання", "CREATE DATABASE не дозволено доки г╕лка перебува╓ п╕д загальним блокуванням читання", "Хибний аргумент для %s", -"Користувачу %-.32s@%-.64s не дозволено створювати нових користувач╕в", +"Користувачу '%-.32s'@'%-.64s' не дозволено створювати нових користувач╕в", "Incorrect table definition; all MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", "Використаний тип таблиц╕ не п╕дтриму╓ FULLTEXT ╕ндекс╕в", @@ -272,3 +272,4 @@ "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", "Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Unknown collation: '%-.64s'", diff --git a/sql/slave.cc b/sql/slave.cc index c45c11f8bef..37979576b73 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1565,6 +1565,48 @@ int register_slave_on_master(MYSQL* mysql) } +/* + Builds a String from a HASH of TABLE_RULE_ENT. Cannot be used for any other + hash, as it assumes that the hash entries are TABLE_RULE_ENT. + + SYNOPSIS + table_rule_ent_hash_to_str() + s pointer to the String to fill + h pointer to the HASH to read + + RETURN VALUES + none +*/ + +void table_rule_ent_hash_to_str(String* s, HASH* h) +{ + s->length(0); + for (uint i=0 ; i < h->records ; i++) + { + TABLE_RULE_ENT* e= (TABLE_RULE_ENT*) hash_element(h, i); + if (s->length()) + s->append(','); + s->append(e->db,e->key_len); + } +} + +/* + Mostly the same thing as above +*/ + +void table_rule_ent_dynamic_array_to_str(String* s, DYNAMIC_ARRAY* a) +{ + s->length(0); + for (uint i=0 ; i < a->elements ; i++) + { + TABLE_RULE_ENT* e; + get_dynamic(a, (gptr)&e, i); + if (s->length()) + s->append(','); + s->append(e->db,e->key_len); + } +} + int show_master_info(THD* thd, MASTER_INFO* mi) { // TODO: fix this for multi-master @@ -1594,6 +1636,10 @@ int show_master_info(THD* thd, MASTER_INFO* mi) field_list.push_back(new Item_empty_string("Slave_SQL_Running", 3)); field_list.push_back(new Item_empty_string("Replicate_do_db", 20)); field_list.push_back(new Item_empty_string("Replicate_ignore_db", 20)); + field_list.push_back(new Item_empty_string("Replicate_do_table", 20)); + field_list.push_back(new Item_empty_string("Replicate_ignore_table", 23)); + field_list.push_back(new Item_empty_string("Replicate_wild_do_table", 24)); + field_list.push_back(new Item_empty_string("Replicate_wild_ignore_table", 28)); field_list.push_back(new Item_return_int("Last_errno", 4, MYSQL_TYPE_LONG)); field_list.push_back(new Item_empty_string("Last_error", 20)); field_list.push_back(new Item_return_int("Skip_counter", 10, @@ -1626,6 +1672,23 @@ int show_master_info(THD* thd, MASTER_INFO* mi) protocol->store(mi->rli.slave_running ? "Yes":"No", &my_charset_bin); protocol->store(&replicate_do_db); protocol->store(&replicate_ignore_db); + /* + We can't directly use some protocol->store for + replicate_*_table, + as Protocol doesn't know the TABLE_RULE_ENT struct. + We first build Strings and then pass them to protocol->store. + */ + char buf[256]; + String tmp(buf, sizeof(buf), &my_charset_bin); + table_rule_ent_hash_to_str(&tmp, &replicate_do_table); + protocol->store(&tmp); + table_rule_ent_hash_to_str(&tmp, &replicate_ignore_table); + protocol->store(&tmp); + table_rule_ent_dynamic_array_to_str(&tmp, &replicate_wild_do_table); + protocol->store(&tmp); + table_rule_ent_dynamic_array_to_str(&tmp, &replicate_wild_ignore_table); + protocol->store(&tmp); + protocol->store((uint32) mi->rli.last_slave_errno); protocol->store(mi->rli.last_slave_error, &my_charset_bin); protocol->store((uint32) mi->rli.slave_skip_counter); diff --git a/sql/slave.h b/sql/slave.h index 429456eb0bb..668fff52d08 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -398,6 +398,8 @@ int mysql_table_dump(THD* thd, const char* db, int fetch_master_table(THD* thd, const char* db_name, const char* table_name, MASTER_INFO* mi, MYSQL* mysql); +void table_rule_ent_hash_to_str(String* s, HASH* h); +void table_rule_ent_dynamic_array_to_str(String* s, DYNAMIC_ARRAY* a); int show_master_info(THD* thd, MASTER_INFO* mi); int show_binlog_info(THD* thd); diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 1bdca7167e8..54a0ee05db2 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -590,7 +590,6 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user, /* OK. User found and password checked continue validation */ -#ifdef HAVE_OPENSSL { Vio *vio=thd->net.vio; /* @@ -604,6 +603,7 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user, case SSL_TYPE_NONE: /* SSL is not required to connect */ user_access=acl_user->access; break; +#ifdef HAVE_OPENSSL case SSL_TYPE_ANY: /* Any kind of SSL is good enough */ if (vio_type(vio) == VIO_TYPE_SSL) user_access=acl_user->access; @@ -686,11 +686,17 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user, free(ptr); } break; +#else /* HAVE_OPENSSL */ + default: + /* + If we don't have SSL but SSL is required for this user the + authentication should fail. + */ + break; +#endif /* HAVE_OPENSSL */ } } -#else /* HAVE_OPENSSL */ - user_access=acl_user->access; -#endif /* HAVE_OPENSSL */ + *mqh=acl_user->user_resource; if (!acl_user->user) *priv_user=(char*) ""; // Change to anonymous user /* purecov: inspected */ @@ -877,7 +883,7 @@ static void acl_insert_db(const char *user, const char *host, const char *db, *****************************************************************************/ ulong acl_get(const char *host, const char *ip, const char *bin_ip, - const char *user, const char *db) + const char *user, const char *db, my_bool db_is_pattern) { ulong host_access,db_access; uint i,key_length; @@ -911,7 +917,7 @@ ulong acl_get(const char *host, const char *ip, const char *bin_ip, { if (compare_hostname(&acl_db->host,host,ip)) { - if (!acl_db->db || !wild_compare(db,acl_db->db)) + if (!acl_db->db || !wild_compare(db,acl_db->db,db_is_pattern)) { db_access=acl_db->access; if (acl_db->host.hostname) @@ -933,7 +939,7 @@ ulong acl_get(const char *host, const char *ip, const char *bin_ip, ACL_HOST *acl_host=dynamic_element(&acl_hosts,i,ACL_HOST*); if (compare_hostname(&acl_host->host,host,ip)) { - if (!acl_host->db || !wild_compare(db,acl_host->db)) + if (!acl_host->db || !wild_compare(db,acl_host->db,db_is_pattern)) { host_access=acl_host->access; // Fully specified. Take it break; @@ -1271,7 +1277,7 @@ static bool compare_hostname(const acl_host_and_ip *host, const char *hostname, return (!host->hostname || (hostname && !wild_case_compare(&my_charset_latin1, hostname,host->hostname)) || - (ip && !wild_compare(ip,host->hostname))); + (ip && !wild_compare(ip,host->hostname,0))); } @@ -1331,7 +1337,7 @@ static bool test_if_create_new_users(THD *thd) tl.db= (char*) "mysql"; tl.real_name= (char*) "user"; db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr, - thd->priv_user, tl.db); + thd->priv_user, tl.db, 0); if (!(db_access & INSERT_ACL)) { if (check_grant(thd,INSERT_ACL,&tl,0,1)) @@ -3215,8 +3221,17 @@ int open_grant_tables(THD *thd, TABLE_LIST *tables) GRANT and REVOKE are applied the slave in/exclusion rules as they are some kind of updates to the mysql.% tables. */ - if (thd->slave_thread && table_rules_on && !tables_ok(0, tables)) - DBUG_RETURN(1); + if (thd->slave_thread && table_rules_on) + { + /* + The tables must be marked "updating" so that tables_ok() takes them into + account in tests. + */ + tables[0].updating=tables[1].updating=tables[2].updating=tables[3].updating=1; + if (!tables_ok(0, tables)) + DBUG_RETURN(1); + tables[0].updating=tables[1].updating=tables[2].updating=tables[3].updating=0; + } #endif if (open_and_lock_tables(thd, tables)) diff --git a/sql/sql_acl.h b/sql/sql_acl.h index e6c6771253c..ca976f43999 100644 --- a/sql/sql_acl.h +++ b/sql/sql_acl.h @@ -134,7 +134,7 @@ my_bool acl_init(THD *thd, bool dont_read_acl_tables); void acl_reload(THD *thd); void acl_free(bool end=0); ulong acl_get(const char *host, const char *ip, const char *bin_ip, - const char *user, const char *db); + const char *user, const char *db, my_bool db_is_pattern); ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user, const char *password,const char *scramble, char **priv_user, char *priv_host, diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc index ced5993e293..a6c24a25d6e 100644 --- a/sql/sql_analyse.cc +++ b/sql/sql_analyse.cc @@ -326,9 +326,9 @@ void field_str::add() if (length > max_length) max_length = length; - if (sortcmp(res, &min_arg,item->charset()) < 0) + if (sortcmp(res, &min_arg,item->collation.collation) < 0) min_arg.copy(*res); - if (sortcmp(res, &max_arg,item->charset()) > 0) + if (sortcmp(res, &max_arg,item->collation.collation) > 0) max_arg.copy(*res); } @@ -736,7 +736,7 @@ void field_str::get_opt_type(String *answer, ha_rows total_rows) { if (must_be_blob) { - if (item->charset() == &my_charset_bin) + if (item->collation.collation == &my_charset_bin) answer->append("TINYBLOB", 8); else answer->append("TINYTEXT", 8); @@ -754,21 +754,21 @@ void field_str::get_opt_type(String *answer, ha_rows total_rows) } else if (max_length < (1L << 16)) { - if (item->charset() == &my_charset_bin) + if (item->collation.collation == &my_charset_bin) answer->append("BLOB", 4); else answer->append("TEXT", 4); } else if (max_length < (1L << 24)) { - if (item->charset() == &my_charset_bin) + if (item->collation.collation == &my_charset_bin) answer->append("MEDIUMBLOB", 10); else answer->append("MEDIUMTEXT", 10); } else { - if (item->charset() == &my_charset_bin) + if (item->collation.collation == &my_charset_bin) answer->append("LONGBLOB", 8); else answer->append("LONGTEXT", 8); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 2fa88e9cfc8..f33533d9eb7 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -148,7 +148,7 @@ OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *wild) if (wild) { strxmov(name,entry->table_cache_key,".",entry->real_name,NullS); - if (wild_compare(name,wild)) + if (wild_compare(name,wild,0)) continue; } @@ -787,6 +787,7 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name, DBUG_RETURN(0); } table->query_id=thd->query_id; + table->clear_query_id=1; thd->tmp_table_used= 1; goto reset; } @@ -2039,8 +2040,9 @@ bool setup_tables(TABLE_LIST *tables) table->keys_in_use_for_query &= ~map; } table->used_keys &= table->keys_in_use_for_query; - if (table_list->shared) + if (table_list->shared || table->clear_query_id) { + table->clear_query_id= 0; /* Clear query_id that may have been set by previous select */ for (Field **ptr=table->field ; *ptr ; ptr++) (*ptr)->query_id=0; @@ -2236,7 +2238,11 @@ fill_record(List<Item> &fields,List<Item> &values, bool ignore_errors) while ((field=(Item_field*) f++)) { value=v++; - if (value->save_in_field(field->field, 0) > 0 && !ignore_errors) + Field *rfield= field->field; + TABLE *table= rfield->table; + if (rfield == table->next_number_field) + table->auto_increment_field_not_null= true; + if (value->save_in_field(rfield, 0) > 0 && !ignore_errors) DBUG_RETURN(1); } DBUG_RETURN(0); @@ -2254,6 +2260,9 @@ fill_record(Field **ptr,List<Item> &values, bool ignore_errors) while ((field = *ptr++)) { value=v++; + TABLE *table= field->table; + if (field == table->next_number_field) + table->auto_increment_field_not_null= true; if (value->save_in_field(field, 0) == 1 && !ignore_errors) DBUG_RETURN(1); } diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index ac6471e794c..767a1a46dcc 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1422,10 +1422,10 @@ ulong Query_cache::init_cache() DUMP(this); - VOID(hash_init(&queries,system_charset_info,def_query_hash_size, 0, 0, + VOID(hash_init(&queries, &my_charset_bin, def_query_hash_size, 0, 0, query_cache_query_get_key, 0, 0)); #ifndef FN_NO_CASE_SENCE - VOID(hash_init(&tables,system_charset_info,def_table_hash_size, 0, 0, + VOID(hash_init(&tables, &my_charset_bin, def_table_hash_size, 0, 0, query_cache_table_get_key, 0, 0)); #else // windows, OS/2 or other case insensitive file names work around diff --git a/sql/sql_db.cc b/sql/sql_db.cc index f8cf1eee0c5..34e81402dd0 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -127,7 +127,7 @@ static bool load_db_opt(THD *thd, const char *path, HA_CREATE_INFO *create) { if (!(create->table_charset=get_charset_by_name(pos+1, MYF(0)))) { - sql_print_error(ER(ER_UNKNOWN_CHARACTER_SET),pos+1); + sql_print_error(ER(ER_UNKNOWN_COLLATION),pos+1); } } } @@ -591,7 +591,7 @@ bool mysql_change_db(THD *thd, const char *name) db_access=DB_ACLS; else db_access= (acl_get(thd->host,thd->ip,(char*) &thd->remote.sin_addr, - thd->priv_user,dbname) | + thd->priv_user,dbname,0) | thd->master_access); if (!(db_access & DB_ACLS) && (!grant_option || check_grant_db(thd,dbname))) { @@ -625,8 +625,8 @@ bool mysql_change_db(THD *thd, const char *name) strmov(path+unpack_dirname(path,path), MY_DB_OPT_FILE); load_db_opt(thd, path, &create); - thd->db_charset= create.table_charset ? - create.table_charset : + thd->db_charset= create.table_charset ? + create.table_charset : global_system_variables.character_set_database; thd->variables.character_set_database= thd->db_charset; DBUG_RETURN(0); @@ -644,18 +644,18 @@ int mysqld_show_create_db(THD *thd, char *dbname, uint create_options = create_info ? create_info->options : 0; Protocol *protocol=thd->protocol; DBUG_ENTER("mysql_show_create_db"); - + if (check_db_name(dbname)) { net_printf(thd,ER_WRONG_DB_NAME, dbname); DBUG_RETURN(1); } - + if (test_all_bits(thd->master_access,DB_ACLS)) db_access=DB_ACLS; else db_access= (acl_get(thd->host,thd->ip,(char*) &thd->remote.sin_addr, - thd->priv_user,dbname) | + thd->priv_user,dbname,0) | thd->master_access); if (!(db_access & DB_ACLS) && (!grant_option || check_grant_db(thd,dbname))) { @@ -669,7 +669,7 @@ int mysqld_show_create_db(THD *thd, char *dbname, dbname); DBUG_RETURN(1); } - + (void) sprintf(path,"%s/%s",mysql_data_home, dbname); length=unpack_dirname(path,path); // Convert if not unix found_libchar= 0; diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 92e37f95f0e..d7a88ecd53e 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -122,11 +122,22 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, res= -1; goto exit; } + + /* + This is done in order to redo all field optimisations when any of the + involved tables is used in the outer query + */ + if (tables) + { + for (TABLE_LIST *cursor= tables; cursor; cursor= cursor->next) + cursor->table->clear_query_id= 1; + } item_list= select_cursor->item_list; select_cursor->with_wild= 0; if (setup_ref_array(thd, &select_cursor->ref_pointer_array, - (item_list.elements + select_cursor->select_items + + (item_list.elements + + select_cursor->select_n_having_items + select_cursor->order_list.elements + select_cursor->group_list.elements)) || setup_fields(thd, select_cursor->ref_pointer_array, first_table, diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 211377dcecb..2d1d08aa596 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -552,7 +552,7 @@ int yylex(void *arg, void *yythd) /* Note: "SELECT _bla AS 'alias'" _bla should be considered as a IDENT if charset haven't been found. - So we don't use MYF(MY_WME) with get_charset_by_name to avoid + So we don't use MYF(MY_WME) with get_charset_by_csname to avoid producing an error. */ @@ -977,7 +977,8 @@ void st_select_lex::init_query() join= 0; where= 0; olap= UNSPECIFIED_OLAP_TYPE; - insert_select= having_fix_field= 0; + having_fix_field= 0; + resolve_mode= NOMATTER_MODE; cond_count= with_wild= 0; ref_pointer_array= 0; } @@ -1006,7 +1007,7 @@ void st_select_lex::init_select() order_list.next= (byte**) &order_list.first; select_limit= HA_POS_ERROR; offset_limit= 0; - select_items= 0; + select_n_having_items= 0; with_sum_func= 0; parsing_place= SELECT_LEX_NODE::NO_MATTER; } diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 6d47894d737..fb336faa2a6 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -349,7 +349,12 @@ public: // Arrays of pointers to top elements of all_fields list Item **ref_pointer_array; - uint select_items; /* number of items in select_list */ + /* + number of items in select_list and HAVING clause used to get number + bigger then can be number of entries that will be added to all item + list during split_sum_func + */ + uint select_n_having_items; uint cond_count; /* number of arguments of and/or/xor in where/having */ enum_parsing_place parsing_place; /* where we are parsing expression */ bool with_sum_func; /* sum function indicator */ @@ -361,14 +366,27 @@ public: bool braces; /* SELECT ... UNION (SELECT ... ) <- this braces */ /* TRUE when having fix field called in processing of this SELECT */ bool having_fix_field; + /* - TRUE for primary st_select_lex structure of simple INSERT/REPLACE + SELECT for SELECT command st_select_lex. Used to privent scaning + item_list of non-SELECT st_select_lex (no sense find to finding + reference in it (all should be in tables, it is dangerouse due + to order of fix_fields calling for non-SELECTs commands (item list + can be not fix_fieldsd)). This value will be assigned for + primary select (sql_yac.yy) and for any subquery and + UNION SELECT (sql_parse.cc mysql_new_select()) + + + INSERT for primary st_select_lex structure of simple INSERT/REPLACE (used for name resolution, see Item_fiels & Item_ref fix_fields, FALSE for INSERT/REPLACE ... SELECT, because it's st_select_lex->table_list will be preprocessed (first table removed) before passing to handle_select) + + NOMATTER for other */ - bool insert_select; + enum {NOMATTER_MODE, SELECT_MODE, INSERT_MODE} resolve_mode; + void init_query(); void init_select(); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 78adebdfff3..f0eba167b90 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -549,6 +549,7 @@ check_connections(THD *thd) char *end, *user, *passwd, *db; char prepared_scramble[SCRAMBLE41_LENGTH+4]; /* Buffer for scramble&hash */ ACL_USER* cached_user=NULL; /* Initialise to NULL for first stage */ + String convdb; DBUG_PRINT("info",("New connection received on %s", vio_description(net->vio))); @@ -724,7 +725,12 @@ check_connections(THD *thd) db=0; using_password= test(passwd[0]); if (thd->client_capabilities & CLIENT_CONNECT_WITH_DB) + { db=strend(passwd)+1; + convdb.copy(db, strlen(db), + thd->variables.character_set_client, system_charset_info); + db= convdb.c_ptr(); + } /* We can get only old hash at this point */ if (using_password && strlen(passwd) != SCRAMBLE_LENGTH) @@ -1125,10 +1131,15 @@ bool dispatch_command(enum enum_server_command command, THD *thd, thd->lex.select_lex.options=0; // We store status here switch (command) { case COM_INIT_DB: - statistic_increment(com_stat[SQLCOM_CHANGE_DB],&LOCK_status); - if (!mysql_change_db(thd,packet)) - mysql_log.write(thd,command,"%s",thd->db); - break; + { + String convname; + statistic_increment(com_stat[SQLCOM_CHANGE_DB],&LOCK_status); + convname.copy(packet, strlen(packet), + thd->variables.character_set_client, system_charset_info); + if (!mysql_change_db(thd,convname.c_ptr())) + mysql_log.write(thd,command,"%s",thd->db); + break; + } #ifndef EMBEDDED_LIBRARY case COM_REGISTER_SLAVE: { @@ -3254,7 +3265,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, if (!(thd->master_access & SELECT_ACL) && (db && (!thd->db || strcmp(db,thd->db)))) db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr, - thd->priv_user, db); /* purecov: inspected */ + thd->priv_user, db, test(want_access & GRANT_ACL)); *save_priv=thd->master_access | db_access; DBUG_RETURN(FALSE); } @@ -3274,7 +3285,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, if (db && (!thd->db || strcmp(db,thd->db))) db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr, - thd->priv_user, db); /* purecov: inspected */ + thd->priv_user, db, test(want_access & GRANT_ACL)); else db_access=thd->db_access; // Remove SHOW attribute and access rights we already have @@ -3546,6 +3557,7 @@ mysql_new_select(LEX *lex, bool move_down) unit->link_prev= 0; unit->return_to= lex->current_select; select_lex->include_down(unit); + // TODO: assign resolve_mode for fake subquery after merging with new tree } else { @@ -3571,6 +3583,7 @@ mysql_new_select(LEX *lex, bool move_down) select_lex->master_unit()->global_parameters= select_lex; select_lex->include_global((st_select_lex_node**)&lex->all_selects_list); lex->current_select= select_lex; + select_lex->resolve_mode= SELECT_LEX::SELECT_MODE; return 0; } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 3c5c53422ae..9f135e7f586 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -295,7 +295,8 @@ JOIN::prepare(Item ***rref_pointer_array, fields_list, &all_fields, wild_num))) || setup_ref_array(thd, rref_pointer_array, (fields_list.elements + - select_lex->select_items + + select_lex-> + select_n_having_items + og_num)) || setup_fields(thd, (*rref_pointer_array), tables_list, fields_list, 1, &all_fields, 1) || @@ -771,7 +772,8 @@ JOIN::optimize() if (!having) { Item *where= 0; - if (join_tab[0].type == JT_EQ_REF) + if (join_tab[0].type == JT_EQ_REF && + join_tab[0].ref.items[0]->name == in_left_expr_name) { if (test_in_subselect(&where)) { @@ -784,7 +786,8 @@ JOIN::optimize() where))); } } - else if (join_tab[0].type == JT_REF) + else if (join_tab[0].type == JT_REF && + join_tab[0].ref.items[0]->name == in_left_expr_name) { if (test_in_subselect(&where)) { @@ -799,6 +802,7 @@ JOIN::optimize() } } } else if (join_tab[0].type == JT_REF_OR_NULL && + join_tab[0].ref.items[0]->name == in_left_expr_name && having->type() == Item::FUNC_ITEM && ((Item_func *) having)->functype() == Item_func::ISNOTNULLTEST_FUNC) @@ -2346,7 +2350,8 @@ sort_keyuse(KEYUSE *a,KEYUSE *b) if (a->keypart != b->keypart) return (int) (a->keypart - b->keypart); // Place const values before other ones - if ((res= test(a->used_tables) - test(b->used_tables))) + if ((res= test((a->used_tables & ~OUTER_REF_TABLE_BIT)) - + test((b->used_tables & ~OUTER_REF_TABLE_BIT)))) return res; /* Place rows that are not 'OPTIMIZE_REF_OR_NULL' first */ return (int) ((a->optimize & KEY_OPTIMIZE_REF_OR_NULL) - @@ -2477,6 +2482,12 @@ static void optimize_keyuse(JOIN *join, DYNAMIC_ARRAY *keyuse_array) keyuse->ref_table_rows= max(tmp_table->file->records, 100); } } + /* + Outer reference (external field) is constant for single executing + of subquery + */ + if (keyuse->used_tables == OUTER_REF_TABLE_BIT) + keyuse->ref_table_rows= 1; } } @@ -4343,9 +4354,9 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, case STRING_RESULT: if (item_sum->max_length > 255) return new Field_blob(item_sum->max_length,maybe_null, - item->name,table,item->charset()); + item->name,table,item->collation.collation); return new Field_string(item_sum->max_length,maybe_null, - item->name,table,item->charset()); + item->name,table,item->collation.collation); case ROW_RESULT: default: // This case should never be choosen @@ -4402,10 +4413,10 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, case STRING_RESULT: if (item->max_length > 255) new_field= new Field_blob(item->max_length,maybe_null, - item->name,table,item->charset()); + item->name,table,item->collation.collation); else new_field= new Field_string(item->max_length,maybe_null, - item->name,table,item->charset()); + item->name,table,item->collation.collation); break; case ROW_RESULT: default: diff --git a/sql/sql_show.cc b/sql/sql_show.cc index e8cb59e387e..9084269f486 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -75,7 +75,7 @@ mysqld_show_dbs(THD *thd,const char *wild) { if (thd->master_access & (DB_ACLS | SHOW_DB_ACL) || acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr, - thd->priv_user, file_name) || + thd->priv_user, file_name,0) || (grant_option && !check_grant_db(thd, file_name))) { protocol->prepare_for_resend(); @@ -415,7 +415,7 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path, #endif { if (file->name[0] == '.' || !MY_S_ISDIR(file->mystat.st_mode) || - (wild && wild_compare(file->name,wild))) + (wild && wild_compare(file->name,wild,0))) continue; } } @@ -433,7 +433,7 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path, if (wild_case_compare(system_charset_info,file->name,wild)) continue; } - else if (wild_compare(file->name,wild)) + else if (wild_compare(file->name,wild,0)) continue; } } @@ -1031,7 +1031,7 @@ store_create_info(THD *thd, TABLE *table, String *packet) my_bool limited_mysql_mode= (thd->variables.sql_mode & (MODE_NO_FIELD_OPTIONS | MODE_MYSQL323 | MODE_MYSQL40)) != 0; - + DBUG_ENTER("store_create_info"); DBUG_PRINT("enter",("table: %s",table->real_name)); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 2e6585583ba..e16d7a0067d 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1858,10 +1858,19 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, /* COND_refresh will be signaled in close_thread_tables() */ break; case DISABLE: - VOID(pthread_mutex_lock(&LOCK_open)); - wait_while_table_is_used(thd, table); - VOID(pthread_mutex_unlock(&LOCK_open)); - table->file->deactivate_non_unique_index(HA_POS_ERROR); + if (table->db_type == DB_TYPE_MYISAM) + { + VOID(pthread_mutex_lock(&LOCK_open)); + wait_while_table_is_used(thd, table); + VOID(pthread_mutex_unlock(&LOCK_open)); + table->file->deactivate_non_unique_index(HA_POS_ERROR); + } + else + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA, + ER(ER_ILLEGAL_HA), table->table_name); + break; + /* COND_refresh will be signaled in close_thread_tables() */ break; } diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 04a5904b5f7..c0f6819d8fe 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -136,7 +136,7 @@ int st_select_lex_unit::prepare(THD *thd, select_result *sel_result, found_rows_for_union= first_select()->options & OPTION_FOUND_ROWS && global_parameters->select_limit; if (found_rows_for_union) - first_select()->options ^= OPTION_FOUND_ROWS; + first_select()->options&= ~OPTION_FOUND_ROWS; } if (t_and_f) { @@ -154,18 +154,23 @@ int st_select_lex_unit::prepare(THD *thd, select_result *sel_result, goto err; List_iterator<Item> it(select_cursor->item_list); Item *item; - while((item=it++)) - item->maybe_null=1; item_list= select_cursor->item_list; select_cursor->with_wild= 0; if (setup_ref_array(thd, &select_cursor->ref_pointer_array, - (item_list.elements + select_cursor->select_items + + (item_list.elements + + select_cursor->select_n_having_items + select_cursor->order_list.elements + select_cursor->group_list.elements)) || setup_fields(thd, select_cursor->ref_pointer_array, first_table, item_list, 0, 0, 1)) goto err; t_and_f= 1; + while((item=it++)) + { + item->maybe_null=1; + if (item->type() == Item::FIELD_ITEM) + ((class Item_field *)item)->field->table->maybe_null=1; + } } tmp_table_param.field_count=item_list.elements; @@ -240,7 +245,6 @@ err: int st_select_lex_unit::exec() { - int do_print_slow= 0; SELECT_LEX *lex_select_save= thd->lex.current_select; SELECT_LEX *select_cursor=first_select_in_union(); DBUG_ENTER("st_select_lex_unit::exec"); @@ -310,7 +314,6 @@ int st_select_lex_unit::exec() thd->lex.current_select= lex_select_save; DBUG_RETURN(res); } - do_print_slow|= select_cursor->options; } } optimized= 1; @@ -371,12 +374,6 @@ int st_select_lex_unit::exec() Mark for slow query log if any of the union parts didn't use indexes efficiently */ - select_cursor->options= ((select_cursor->options & - ~(QUERY_NO_INDEX_USED | - QUERY_NO_GOOD_INDEX_USED)) | - do_print_slow & - (QUERY_NO_INDEX_USED | - QUERY_NO_GOOD_INDEX_USED)); } } thd->lex.current_select= lex_select_save; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 743f3b0d53b..59aaf7e0c42 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -547,7 +547,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token SUBJECT_SYM %token CIPHER_SYM -%token HELP %token BEFORE_SYM %left SET_VAR %left OR_OR_CONCAT OR @@ -1411,7 +1410,7 @@ collation_name: { if (!($$=get_charset_by_name($1.str,MYF(0)))) { - net_printf(YYTHD,ER_UNKNOWN_CHARACTER_SET,$1.str); + net_printf(YYTHD,ER_UNKNOWN_COLLATION,$1.str); YYABORT; } }; @@ -1911,7 +1910,12 @@ opt_ignore_leaves: select: - select_init { Lex->sql_command=SQLCOM_SELECT; }; + select_init + { + LEX *lex= Lex; + lex->sql_command= SQLCOM_SELECT; + lex->select_lex.resolve_mode= SELECT_LEX::SELECT_MODE; + }; /* Need select_init2 for subselects. */ select_init: @@ -3402,7 +3406,7 @@ insert: lex->sql_command = SQLCOM_INSERT; /* for subselects */ lex->lock_option= (using_update_log) ? TL_READ_NO_INSERT : TL_READ; - lex->select_lex.insert_select= 1; + lex->select_lex.resolve_mode= SELECT_LEX::INSERT_MODE; } insert_lock_option opt_ignore insert2 { @@ -3418,7 +3422,7 @@ replace: LEX *lex=Lex; lex->sql_command = SQLCOM_REPLACE; lex->duplicates= DUP_REPLACE; - lex->select_lex.insert_select= 1; + lex->select_lex.resolve_mode= SELECT_LEX::INSERT_MODE; } replace_lock_option insert2 { @@ -3487,7 +3491,7 @@ insert_values: it is not simple select => table list will be preprocessed before passing to handle_select */ - lex->select_lex.insert_select= 0; + lex->select_lex.resolve_mode= SELECT_LEX::NOMATTER_MODE; lex->current_select->parsing_place= SELECT_LEX_NODE::SELECT_LIST; } select_options select_item_list diff --git a/sql/table.cc b/sql/table.cc index 0fc2a09f749..1cee0587f17 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -138,7 +138,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, outparam->raid_chunks= head[42]; outparam->raid_chunksize= uint4korr(head+43); if (!(outparam->table_charset=get_charset((uint) head[38],MYF(0)))) - outparam->table_charset=NULL; // QQ display error message? + outparam->table_charset=default_charset_info; // QQ display error message? null_field_first=1; } outparam->db_record_offset=1; @@ -398,8 +398,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, if (!strpos[14]) charset= &my_charset_bin; else if (!(charset=get_charset((uint) strpos[14], MYF(0)))) - charset= (outparam->table_charset ? outparam->table_charset: - default_charset_info); + charset= outparam->table_charset; } if (!comment_length) { @@ -423,8 +422,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, /* old frm file */ field_type= (enum_field_types) f_packtype(pack_flag); - charset=(outparam->table_charset ? outparam->table_charset : - default_charset_info); + charset=f_is_binary(pack_flag) ? &my_charset_bin : outparam->table_charset; bzero((char*) &comment, sizeof(comment)); } *field_ptr=reg_field= @@ -599,7 +597,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, } keyinfo->usable_key_parts=usable_parts; // Filesort } - if (primary_key < MAX_KEY && + if (primary_key < MAX_KEY && (outparam->keys_in_use & ((key_map) 1 << primary_key))) { outparam->primary_key=primary_key; diff --git a/sql/table.h b/sql/table.h index 185b22a64f2..fce2d97e393 100644 --- a/sql/table.h +++ b/sql/table.h @@ -116,6 +116,8 @@ struct st_table { my_bool crashed; my_bool is_view; my_bool no_keyread; + my_bool clear_query_id; /* To reset query_id for tables and cols */ + my_bool auto_increment_field_not_null; Field *next_number_field, /* Set if next_number is activated */ *found_next_number_field, /* Set on open */ *rowid_field; |