diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_func.cc | 20 | ||||
-rw-r--r-- | sql/mysqld.cc | 2 | ||||
-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/slovak/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/spanish/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/swedish/errmsg.OLD | 4 | ||||
-rw-r--r-- | sql/share/swedish/errmsg.txt | 1 |
24 files changed, 41 insertions, 6 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index e540f850063..10298ce67f2 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1954,13 +1954,17 @@ bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist) maybe_null=1; join_key=0; - /* Why testing for const_item ? Monty */ - /* I'll remove it later, but this should include modifications to - find_best and auto_close as complement to auto_init code above. SerG */ - /* I'd rather say now that const_item is assumed in quite a bit of - places, so it would be difficult to remove. SerG */ + /* Serg: + I'd rather say now that const_item is assumed in quite a bit of + places, so it would be difficult to remove; If it would ever to be + removed, this should include modifications to find_best and auto_close + as complement to auto_init code above. + */ if (Item_func::fix_fields(thd,tlist) || !const_item()) + { + my_error(ER_WRONG_ARGUMENTS,MYF(0),"AGAINST"); return 1; + } while ((item=li++)) { @@ -1969,12 +1973,18 @@ bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist) if (item->type() == Item::REF_ITEM) li.replace(item= *((Item_ref *)item)->ref); if (item->type() != Item::FIELD_ITEM || !item->used_tables()) + { + my_error(ER_WRONG_ARGUMENTS,MYF(0),"MATCH"); return 1; + } used_tables_cache|=item->used_tables(); } /* check that all columns come from the same table */ if (count_bits(used_tables_cache) != 1) + { + my_error(ER_WRONG_ARGUMENTS,MYF(0),"MATCH"); return 1; + } const_item_cache=0; table=((Item_field *)fields.head())->field->table; return 0; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 5d4339d3ca6..a9771184b4b 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1481,7 +1481,7 @@ static void open_log(MYSQL_LOG *log, const char *hostname, // get rid of extention if the log is binary to avoid problems if (type == LOG_BIN) { - char* p = strrchr(opt_name, FN_EXTCHAR); + char* p = strrchr((char*) opt_name, FN_EXTCHAR); if (p) *p = 0; } diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index 6d35e913ffd..a0540bfe270 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -220,3 +220,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index d1e0ea71175..73fa8b79f0f 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -214,3 +214,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index 7ae6c564283..df3d35600ba 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -211,3 +211,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 2a6e23b6281..f6ab398e92f 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -211,3 +211,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 264badebe38..8686b7e17a4 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -215,3 +215,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index 0da5cf94ed8..fb181535764 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -211,3 +211,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index 9abbb3a8a2f..eabbff043f3 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -214,3 +214,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index 8f81fcfda31..2dcbad5ffba 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -211,3 +211,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 84d8c56cd04..edeaec62590 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -213,3 +213,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index b85dc03286a..434fb2fc7a0 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -211,3 +211,4 @@ "I lock di aggiornamento non possono essere acquisiti durante una transazione 'READ UNCOMMITTED'", "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", diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index 49e58079588..306fe22ab1d 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -213,3 +213,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index 2e278dbd129..89e3abd9680 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -211,3 +211,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index df9efbd28a4..dd9b153acff 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -213,3 +213,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index c95669aa016..87c25bd933f 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -213,3 +213,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index d708bc6fffb..2bb0dbb9802 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -215,3 +215,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index 8acb2365996..a8a7b0a565f 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -211,3 +211,4 @@ "Travamentos de atualização não podem ser obtidos durante um READ UNCOMMITTED na transação", "DROP DATABASE não permitido enquanto uma 'thread' está assegurando um travamento global de leitura", "CREATE DATABASE não permitido enquanto uma 'thread' está assegurando um travamento global de leitura", +"Wrong arguments to %s", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index 8069f9907bb..9a964780398 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -215,3 +215,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index 6bc845d5599..6d4fd4bcea6 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -214,3 +214,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index 8631ee6bdeb..de12b57638f 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -219,3 +219,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "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", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index a56bebbcf47..3bb80df41a9 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -212,3 +212,4 @@ "Bloqueos de actualización no pueden ser adqueridos durante una transición READ UNCOMMITTED", "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", diff --git a/sql/share/swedish/errmsg.OLD b/sql/share/swedish/errmsg.OLD index fc26a08e9ee..cc54e051e63 100644 --- a/sql/share/swedish/errmsg.OLD +++ b/sql/share/swedish/errmsg.OLD @@ -209,3 +209,7 @@ "Lock wait timeout exceeded", "The total number of locks exceeds the lock table size", "Update locks cannot be acquired during a READ UNCOMMITTED transaction", +"DROP DATABASE not allowed while thread is holding global read lock", +"CREATE DATABASE not allowed while thread is holding global read lock", +#ER_WRONG_ARGUMENTS +"Felaktiga argument till %s", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index 7f43afd04b6..0451e4fe6eb 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -211,3 +211,4 @@ "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", +"Felaktiga argument till %s", |