diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-03-02 14:05:03 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-03-02 14:05:03 +0400 |
commit | 10190533925b35f7a9c22548751ca9c917aed93d (patch) | |
tree | dcde912eca28f9bc0b31e164c7918c8674948a04 | |
parent | 0d19df2f5d019657b46d11f9e725b2eea704e209 (diff) | |
download | mariadb-git-10190533925b35f7a9c22548751ca9c917aed93d.tar.gz |
New error message for situation like:
SELECT latin1_expr COLLATE anpther_charset_collation
-rw-r--r-- | include/mysqld_error.h | 3 | ||||
-rw-r--r-- | sql/item_strfunc.cc | 11 | ||||
-rw-r--r-- | sql/share/czech/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/danish/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/dutch/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/english/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/estonian/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/french/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/german/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/greek/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/hungarian/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/italian/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/japanese/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/korean/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/norwegian-ny/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/norwegian/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/polish/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/portuguese/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/romanian/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/russian/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/serbian/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/slovak/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/spanish/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/swedish/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/ukrainian/errmsg.txt | 1 |
25 files changed, 35 insertions, 2 deletions
diff --git a/include/mysqld_error.h b/include/mysqld_error.h index d2d2ded41af..ca3fe07e889 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -267,4 +267,5 @@ #define ER_TABLENAME_NOT_ALLOWED_HERE 1248 #define ER_NOT_SUPPORTED_AUTH_MODE 1249 #define ER_SPATIAL_CANT_HAVE_NULL 1250 -#define ER_ERROR_MESSAGES 251 +#define ER_COLLATION_CHARSET_MISMATCH 1251 +#define ER_ERROR_MESSAGES 252 diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 36768cc4926..b1bc92a1210 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -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)) return 1; 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); + coercibility= COER_EXPLICIT; with_sum_func= with_sum_func || args[0]->with_sum_func; used_tables_cache=args[0]->used_tables(); const_item_cache=args[0]->const_item(); fix_length_and_dec(); fixed= 1; - coercibility= COER_EXPLICIT; return 0; } diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index 98ccf03cfed..dd64cd1dbf0 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -261,3 +261,4 @@ v/* "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index 3db793aaf3b..c17f983d995 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -255,3 +255,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index 5ba6227a456..574d029ef0b 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -263,3 +263,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index cc0810aeee1..b89556bd92c 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -252,3 +252,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 6b82b6088d5..2b56e648fa2 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -257,3 +257,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index bafabdecc33..199f85b6e8e 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -252,3 +252,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index 2368beb5ad5..feeb8b73d3e 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -262,3 +262,4 @@ "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", "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index 9c4da850024..31bc7aeec27 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -252,3 +252,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index e95313a7afc..0dd1a8584f4 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -254,3 +254,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index ea764ccff17..7d502c29685 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -252,3 +252,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index d5efb9c2b1e..2685994c9f2 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -254,3 +254,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index e0d7971d09d..d2ccc9197eb 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -252,3 +252,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index 07461b51674..c8f15851abf 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -254,3 +254,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index b6d3d44db95..3d3091d2182 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -254,3 +254,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index 449a146a54c..f8c813c30c3 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -256,3 +256,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index f296ecda5a4..1477c60c151 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -252,3 +252,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index 9991468ecc8..b1f116ff875 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -256,3 +256,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index 61de4241b85..848d9969d58 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -255,3 +255,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/serbian/errmsg.txt b/sql/share/serbian/errmsg.txt index e8d25da659f..748bada66b4 100644 --- a/sql/share/serbian/errmsg.txt +++ b/sql/share/serbian/errmsg.txt @@ -248,3 +248,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index 79174a65a36..6bf1440e2a6 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -260,3 +260,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index cadc96e347d..6033e19cb7c 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -253,3 +253,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index afdf47549c0..02a0c445c26 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -252,3 +252,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt index 7ca891988b6..68a94e43d97 100644 --- a/sql/share/ukrainian/errmsg.txt +++ b/sql/share/ukrainian/errmsg.txt @@ -257,3 +257,4 @@ "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" "All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" |