diff options
author | unknown <monty@hundin.mysql.fi> | 2001-08-29 22:25:06 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-08-29 22:25:06 +0300 |
commit | a221315fa94310bad927a0a76ca9baf204166ccb (patch) | |
tree | 56c0f4119dcb2c520150c373400f05f4e892885e /sql | |
parent | 79a356b0877aec81e85ddaa9b88530f6eaf4c90b (diff) | |
parent | f78df02a720e621c3a41913f417e925be6456fc6 (diff) | |
download | mariadb-git-a221315fa94310bad927a0a76ca9baf204166ccb.tar.gz |
Merge work:/home/bk/mysql into hundin.mysql.fi:/my/bk/mysql
Diffstat (limited to 'sql')
-rw-r--r-- | sql/gen_lex_hash.cc | 2 | ||||
-rw-r--r-- | sql/ha_myisammrg.cc | 6 | ||||
-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.txt | 1 | ||||
-rw-r--r-- | sql/sql_parse.cc | 12 |
24 files changed, 32 insertions, 9 deletions
diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc index d55197a8b60..e05fdafcbc4 100644 --- a/sql/gen_lex_hash.cc +++ b/sql/gen_lex_hash.cc @@ -472,7 +472,7 @@ int main(int argc,char **argv) int error; MY_INIT(argv[0]); - start_value=4597269L; best_t1=6001982L; best_t2=5063828L; best_type=4; /* mode=4513 add=8 type: 0 */ + start_value=6130115L; best_t1=3632784L; best_t2=86437L; best_type=3; /* mode=4229 add=2 type: 0 */ if (get_options(argc,(char **) argv)) exit(1); diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index 866fd1e69f9..1feaa4e5d66 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -86,7 +86,6 @@ int ha_myisammrg::delete_row(const byte * buf) int ha_myisammrg::index_read(byte * buf, const byte * key, uint key_len, enum ha_rkey_function find_flag) { -// return (my_errno=HA_ERR_WRONG_COMMAND); statistic_increment(ha_read_key_count,&LOCK_status); int error=myrg_rkey(file,buf,active_index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; @@ -96,7 +95,6 @@ int ha_myisammrg::index_read(byte * buf, const byte * key, int ha_myisammrg::index_read_idx(byte * buf, uint index, const byte * key, uint key_len, enum ha_rkey_function find_flag) { -// return (my_errno=HA_ERR_WRONG_COMMAND); statistic_increment(ha_read_key_count,&LOCK_status); int error=myrg_rkey(file,buf,index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; @@ -105,7 +103,6 @@ int ha_myisammrg::index_read_idx(byte * buf, uint index, const byte * key, int ha_myisammrg::index_next(byte * buf) { -// return (my_errno=HA_ERR_WRONG_COMMAND); statistic_increment(ha_read_next_count,&LOCK_status); int error=myrg_rnext(file,buf,active_index); table->status=error ? STATUS_NOT_FOUND: 0; @@ -114,7 +111,6 @@ int ha_myisammrg::index_next(byte * buf) int ha_myisammrg::index_prev(byte * buf) { -// return (my_errno=HA_ERR_WRONG_COMMAND); statistic_increment(ha_read_prev_count,&LOCK_status); int error=myrg_rprev(file,buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; @@ -123,7 +119,6 @@ int ha_myisammrg::index_prev(byte * buf) int ha_myisammrg::index_first(byte * buf) { -// return (my_errno=HA_ERR_WRONG_COMMAND); statistic_increment(ha_read_first_count,&LOCK_status); int error=myrg_rfirst(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; @@ -132,7 +127,6 @@ int ha_myisammrg::index_first(byte * buf) int ha_myisammrg::index_last(byte * buf) { -// return (my_errno=HA_ERR_WRONG_COMMAND); statistic_increment(ha_read_last_count,&LOCK_status); int error=myrg_rlast(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index f67496da923..1ca2aa9b02b 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -222,3 +222,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index 34c3d8ed95d..e6c828625eb 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -216,3 +216,4 @@ "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", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index b4573a551dc..abaa475402e 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -217,3 +217,4 @@ "CREATE DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit", "Foutieve parameters voor %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 80b99c58940..7fc0928d67d 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -213,3 +213,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 59a8b156ab2..d9c98fa919d 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -217,3 +217,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index 98902e847b9..6dc6f150d57 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -213,3 +213,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index 1d9e770ea8d..262390d42ea 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -216,3 +216,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index f879c281422..146f196852b 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -213,3 +213,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 303032d73b2..1d76fd1d898 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -215,3 +215,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index c927eceb163..79e8c8aed8b 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -213,3 +213,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index a177fcf81a8..2971882d431 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -215,3 +215,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index 5c12cbf7d42..7fbc60b8953 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -213,3 +213,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index 05562e675bb..9fb3f5f5666 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -215,3 +215,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index 8d973a57137..cc04859d99d 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -215,3 +215,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index 705eb7f86ef..989c1f7f45d 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -217,3 +217,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index 9bb32287543..82670f503b0 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -213,3 +213,4 @@ "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", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index 2364bbb6d7d..ba214e540e6 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -217,3 +217,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index 0d778d67f11..94889100847 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -216,3 +216,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index e990e00722b..652f50c77c8 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -221,3 +221,4 @@ "CREATE DATABASE not allowed while thread is holding global read lock", "Wrong arguments to %s", "%-.32s@%-.64s is not allowed to create new users", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index 35788a72935..271b362f63f 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -214,3 +214,4 @@ "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", +"Incorrect table definition; All MERGE tables must be in the same database", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index 5914ea31188..1eb3e9db1e7 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -213,3 +213,4 @@ "CREATE DATABASE är inte tillåtet när man har ett globalt läs-lås", "Felaktiga argument till %s", "%-.32s@%-.64s har inte rättigheter att skapa nya användare", +"Felaktig tabell definition: Alla tabeller i en MERGE tabell måste vara i samma databas", diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 2e5333925e7..99fc0fc8fbf 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2178,10 +2178,18 @@ static bool check_merge_table_access(THD *thd, char *db, int error=0; if (table_list) { - /* Force all tables to use the current database */ + /* Check that all tables use the current database */ TABLE_LIST *tmp; for (tmp=table_list; tmp ; tmp=tmp->next) - tmp->db=db; + { + if (!tmp->db || !tmp->db[0]) + tmp->db=db; + else if (!strcmp(tmp->db,db)) + { + send_error(&thd->net,ER_UNION_TABLES_IN_DIFFERENT_DIR); + return 1; + } + } error=check_table_access(thd, SELECT_ACL | UPDATE_ACL | DELETE_ACL, table_list); } |