1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

New error message for situation like:

SELECT latin1_expr COLLATE anpther_charset_collation
This commit is contained in:
bar@bar.mysql.r18.ru
2003-03-02 14:05:03 +04:00
parent 264d8c095d
commit 475e64520b
25 changed files with 35 additions and 2 deletions

View File

@ -267,4 +267,5 @@
#define ER_TABLENAME_NOT_ALLOWED_HERE 1248 #define ER_TABLENAME_NOT_ALLOWED_HERE 1248
#define ER_NOT_SUPPORTED_AUTH_MODE 1249 #define ER_NOT_SUPPORTED_AUTH_MODE 1249
#define ER_SPATIAL_CANT_HAVE_NULL 1250 #define ER_SPATIAL_CANT_HAVE_NULL 1250
#define ER_ERROR_MESSAGES 251 #define ER_COLLATION_CHARSET_MISMATCH 1251
#define ER_ERROR_MESSAGES 252

View File

@ -2196,13 +2196,22 @@ bool Item_func_set_collation::fix_fields(THD *thd,struct st_table_list *tables,
if (args[0]->fix_fields(thd, tables, args) || args[0]->check_cols(1)) if (args[0]->fix_fields(thd, tables, args) || args[0]->check_cols(1))
return 1; return 1;
maybe_null=args[0]->maybe_null; maybe_null=args[0]->maybe_null;
if (strcmp(args[0]->charset()->csname,set_collation->csname))
{
if (strcmp(set_collation->name,"binary"))
{
my_error(ER_COLLATION_CHARSET_MISMATCH, MYF(0),
set_collation->name,args[0]->charset()->csname);
return 1;
}
}
set_charset(set_collation); set_charset(set_collation);
coercibility= COER_EXPLICIT;
with_sum_func= with_sum_func || args[0]->with_sum_func; with_sum_func= with_sum_func || args[0]->with_sum_func;
used_tables_cache=args[0]->used_tables(); used_tables_cache=args[0]->used_tables();
const_item_cache=args[0]->const_item(); const_item_cache=args[0]->const_item();
fix_length_and_dec(); fix_length_and_dec();
fixed= 1; fixed= 1;
coercibility= COER_EXPLICIT;
return 0; return 0;
} }

View File

@ -261,3 +261,4 @@ v/*
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -255,3 +255,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -263,3 +263,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -252,3 +252,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -257,3 +257,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -252,3 +252,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -262,3 +262,4 @@
"Tabelle '%-.64s', die in einem der SELECT-Befehle verwendet wurde kann nicht in %-.32s verwendet werden", "Tabelle '%-.64s', die in einem der SELECT-Befehle verwendet wurde kann nicht in %-.32s verwendet werden",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client", "Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -252,3 +252,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -254,3 +254,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -252,3 +252,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -254,3 +254,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -252,3 +252,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -254,3 +254,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -254,3 +254,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -256,3 +256,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -252,3 +252,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -256,3 +256,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -255,3 +255,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -248,3 +248,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -260,3 +260,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -253,3 +253,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -252,3 +252,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"

View File

@ -257,3 +257,4 @@
"Table '%-.64s' from one of SELECT's can not be used in %-.32s" "Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" "Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL" "All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"