diff options
author | paul@teton.kitebird.com <> | 2004-03-08 14:08:10 -0600 |
---|---|---|
committer | paul@teton.kitebird.com <> | 2004-03-08 14:08:10 -0600 |
commit | d292e9bd1ff0e00ada68c22eef1b6574c82f3158 (patch) | |
tree | 6e8d7940567f1540c9bce9a1728f827843bc375c /sql | |
parent | c696fc62993b54c127551277ccde92d3b48ea156 (diff) | |
parent | 6a10859beef92a451a52d9a5ff54076f0ac1407c (diff) | |
download | mariadb-git-d292e9bd1ff0e00ada68c22eef1b6574c82f3158.tar.gz |
Merge paul@bk-internal.mysql.com:/home/bk/mysql-4.1
into teton.kitebird.com:/home/paul/mysql-4.1
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.cc | 120 | ||||
-rw-r--r-- | sql/set_var.cc | 2 | ||||
-rw-r--r-- | sql/share/czech/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/danish/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/dutch/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/english/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/estonian/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/french/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/greek/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/hungarian/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/italian/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/japanese/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/korean/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/norwegian-ny/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/norwegian/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/polish/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/portuguese/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/romanian/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/russian/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/slovak/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/spanish/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/swedish/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/ukrainian/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/sql_parse.cc | 13 |
24 files changed, 117 insertions, 60 deletions
diff --git a/sql/field.cc b/sql/field.cc index 48e7dbb32ca..93827a8cd1f 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -2271,13 +2271,18 @@ void Field_longlong::sql_type(String &res) const int Field_float::store(const char *from,uint len,CHARSET_INFO *cs) { int err; - Field_float::store(my_strntod(cs,(char*) from,len,(char**)NULL,&err)); - if (err || current_thd->count_cuted_fields && !test_if_real(from,len,cs)) + char *end; + double nr= my_strntod(cs,(char*) from,len,&end,&err); + if (!err && (!current_thd->count_cuted_fields || end-from==len)) + { + return Field_float::store(nr); + } + else { set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_TRUNCATED); + Field_float::store(nr); return 1; } - return (err) ? 1 : 0; } @@ -2285,28 +2290,48 @@ int Field_float::store(double nr) { float j; int error= 0; - if (dec < NOT_FIXED_DEC) - nr=floor(nr*log_10[dec]+0.5)/log_10[dec]; // To fixed point - if (unsigned_flag && nr < 0) + + if (isnan(nr)) { + j= 0; + set_null(); set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE); - nr=0; error= 1; } - if (nr < -FLT_MAX) + else if (unsigned_flag && nr < 0) { - j= -FLT_MAX; + j= 0; set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE); error= 1; } - else if (nr > FLT_MAX) + else { - j=FLT_MAX; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE); - error= 1; + double max_value; + if (dec >= NOT_FIXED_DEC) + { + max_value= FLT_MAX; + } + else + { + max_value= (log_10[field_length]-1)/log_10[dec]; + nr= floor(nr*log_10[dec]+0.5)/log_10[dec]; + } + if (nr < -max_value) + { + j= (float)-max_value; + set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE); + error= 1; + } + else if (nr > max_value) + { + j= (float)max_value; + set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE); + error= 1; + } + else + j= (float) nr; } - else - j= (float) nr; + #ifdef WORDS_BIGENDIAN if (table->db_low_byte_first) { @@ -2544,41 +2569,64 @@ void Field_float::sql_type(String &res) const int Field_double::store(const char *from,uint len,CHARSET_INFO *cs) { int err; - double j= my_strntod(cs,(char*) from,len,(char**)0,&err); - if (err || current_thd->count_cuted_fields && !test_if_real(from,len,cs)) - { - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_TRUNCATED); - err= 1; - } - if (unsigned_flag && j < 0) + char *end; + double nr= my_strntod(cs,(char*) from,len,&end,&err); + if (!err && (!current_thd->count_cuted_fields || end-from==len)) { - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE); - j=0; - err= 1; + return Field_double::store(nr); } -#ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + else { - float8store(ptr,j); + set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_TRUNCATED); + Field_double::store(nr); + return 1; } - else -#endif - doublestore(ptr,j); - return err; } int Field_double::store(double nr) { int error= 0; - if (dec < NOT_FIXED_DEC) - nr=floor(nr*log_10[dec]+0.5)/log_10[dec]; // To fixed point - if (unsigned_flag && nr < 0) + + if (isnan(nr)) { + nr= 0; + set_null(); + set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE); + error= 1; + } + else if (unsigned_flag && nr < 0) + { + nr= 0; set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE); - nr=0; error= 1; } + else + { + double max_value; + if (dec >= NOT_FIXED_DEC) + { + max_value= DBL_MAX; + } + else + { + max_value= (log_10[field_length]-1)/log_10[dec]; + nr= floor(nr*log_10[dec]+0.5)/log_10[dec]; + } + if (nr < -max_value) + { + nr= -max_value; + set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE); + error= 1; + } + else if (nr > max_value) + { + nr= max_value; + set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE); + error= 1; + } + } + #ifdef WORDS_BIGENDIAN if (table->db_low_byte_first) { diff --git a/sql/set_var.cc b/sql/set_var.cc index 12be0225421..6dfaf310e4b 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1401,7 +1401,7 @@ Item *sys_var::item(THD *thd, enum_var_type var_type, LEX_STRING *base) if (var_type != OPT_DEFAULT) { net_printf(thd, ER_INCORRECT_GLOBAL_LOCAL_VAR, - name, var_type == OPT_GLOBAL ? "LOCAL" : "GLOBAL"); + name, var_type == OPT_GLOBAL ? "SESSION" : "GLOBAL"); return 0; } /* As there was no local variable, return the global value */ diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index e05e21e22a5..eeee1fd819b 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -240,7 +240,7 @@ character-set=latin2 "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index 45de00cfc39..a0ee760793e 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -234,7 +234,7 @@ character-set=latin1 "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index 73386f49ab2..e62a8bf2a91 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -242,7 +242,7 @@ character-set=latin1 "Optie '%s' tweemaal gebruikt in opdracht", "Gebruiker '%-.64s' heeft het maximale gebruik van de '%s' faciliteit overschreden (huidige waarde: %ld)", "Toegang geweigerd. U moet het %-.128s privilege hebben voor deze operatie", -"Variabele '%-.64s' is LOCAL en kan niet worden gebruikt met SET GLOBAL", +"Variabele '%-.64s' is SESSION en kan niet worden gebruikt met SET GLOBAL", "Variabele '%-.64s' is GLOBAL en dient te worden gewijzigd met SET GLOBAL", "Variabele '%-.64s' heeft geen standaard waarde", "Variabele '%-.64s' kan niet worden gewijzigd naar de waarde '%-.64s'", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 196b55495ed..7b73ced6e0d 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -231,7 +231,7 @@ character-set=latin1 "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 8b6d0b4cea4..cbc963200c3 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -236,7 +236,7 @@ character-set=latin7 "Määrangut '%s' on lauses kasutatud topelt", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index 307bf841eab..16bfa468c1b 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -231,7 +231,7 @@ character-set=latin1 "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index 0aa6796751b..d54ef2eece0 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -231,7 +231,7 @@ character-set=greek "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 31514de6455..6b0e42f8b5c 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -233,7 +233,7 @@ character-set=latin2 "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index 61f62a9e7e7..50da818b1fc 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -231,7 +231,7 @@ character-set=latin1 "L'opzione '%s' e' stata usata due volte nel comando", "L'utente '%-.64s' ha ecceduto la risorsa '%s' (valore corrente: %ld)", "Accesso non consentito. Serve il privilegio %-.128s per questa operazione", -"La variabile '%-.64s' e' una variabile locale ( LOCAL ) e non puo' essere cambiata usando SET GLOBAL", +"La variabile '%-.64s' e' una variabile locale ( SESSION ) e non puo' essere cambiata usando SET GLOBAL", "La variabile '%-.64s' e' una variabile globale ( GLOBAL ) e deve essere cambiata usando SET GLOBAL", "La variabile '%-.64s' non ha un valore di default", "Alla variabile '%-.64s' non puo' essere assegato il valore '%-.64s'", diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index 89d98d994e5..55dd49db5f7 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -233,7 +233,7 @@ character-set=ujis "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index 1ad548ae878..5b0103a8336 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -231,7 +231,7 @@ character-set=euckr "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index b82648ce210..5b944e0c0d5 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -233,7 +233,7 @@ character-set=latin1 "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index 2198113876f..446c148e075 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -233,7 +233,7 @@ character-set=latin1 "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index 5dfe6e251ad..3a34fac4600 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -235,7 +235,7 @@ character-set=latin2 "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index 508a7880749..7ea5fbd649e 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -232,7 +232,7 @@ character-set=latin1 "Opção '%s' usada duas vezes no comando", "Usuário '%-.64s' tem excedido o '%s' recurso (atual valor: %ld)", "Acesso negado. Você precisa o privilégio %-.128s para essa operação", -"Variável '%-.64s' é uma LOCAL variável e não pode ser usada com SET GLOBAL", +"Variável '%-.64s' é uma SESSION variável e não pode ser usada com SET GLOBAL", "Variável '%-.64s' é uma GLOBAL variável e deve ser configurada com SET GLOBAL", "Variável '%-.64s' não tem um valor padrão", "Variável '%-.64s' não pode ser configurada para o valor de '%-.64s'", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index 42027b3915b..58348c41830 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -235,7 +235,7 @@ character-set=latin2 "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index 50ee6416070..8c7e35ae41c 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -233,7 +233,7 @@ character-set=koi8r "ïÐÃÉÑ '%s' Ä×ÁÖÄÙ ÉÓÐÏÌØÚÏ×ÁÎÁ × ×ÙÒÁÖÅÎÉÉ", "ðÏÌØÚÏ×ÁÔÅÌØ '%-.64s' ÐÒÅ×ÙÓÉÌ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÒÅÓÕÒÓÁ '%s' (ÔÅËÕÝÅÅ ÚÎÁÞÅÎÉÅ: %ld)", "÷ ÄÏÓÔÕÐÅ ÏÔËÁÚÁÎÏ. ÷ÁÍ ÎÕÖÎÙ ÐÒÉ×ÉÌÅÇÉÉ %-.128s ÄÌÑ ÜÔÏÊ ÏÐÅÒÁÃÉÉ", -"ðÅÒÅÍÅÎÎÁÑ '%-.64s' Ñ×ÌÑÅÔÓÑ ÐÏÔÏËÏ×ÏÊ (LOCAL) ÐÅÒÅÍÅÎÎÏÊ É ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÚÍÅÎÅÎÁ Ó ÐÏÍÏÝØÀ SET GLOBAL", +"ðÅÒÅÍÅÎÎÁÑ '%-.64s' Ñ×ÌÑÅÔÓÑ ÐÏÔÏËÏ×ÏÊ (SESSION) ÐÅÒÅÍÅÎÎÏÊ É ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÚÍÅÎÅÎÁ Ó ÐÏÍÏÝØÀ SET GLOBAL", "ðÅÒÅÍÅÎÎÁÑ '%-.64s' Ñ×ÌÑÅÔÓÑ ÇÌÏÂÁÌØÎÏÊ (GLOBAL) ÐÅÒÅÍÅÎÎÏÊ, É ÅÅ ÓÌÅÄÕÅÔ ÉÚÍÅÎÑÔØ Ó ÐÏÍÏÝØÀ SET GLOBAL", "ðÅÒÅÍÅÎÎÁÑ '%-.64s' ÎÅ ÉÍÅÅÔ ÚÎÁÞÅÎÉÑ ÐÏ ÕÍÏÌÞÁÎÉÀ", "ðÅÒÅÍÅÎÎÁÑ '%-.64s' ÎÅ ÍÏÖÅÔ ÂÙÔØ ÕÓÔÁÎÏ×ÌÅÎÁ × ÚÎÁÞÅÎÉÅ '%-.64s'", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index 6f6b743862c..59ea40fffc6 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -239,7 +239,7 @@ character-set=latin2 "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index da0633edb74..f26755c53be 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -233,7 +233,7 @@ character-set=latin1 "Opción '%s' usada dos veces en el comando", "Usuario '%-.64s' ha excedido el recurso '%s' (actual valor: %ld)", "Acceso negado. Usted necesita el privilegio %-.128s para esta operación", -"Variable '%-.64s' es una LOCAL variable y no puede ser usada con SET GLOBAL", +"Variable '%-.64s' es una SESSION variable y no puede ser usada con SET GLOBAL", "Variable '%-.64s' es una GLOBAL variable y no puede ser configurada con SET GLOBAL", "Variable '%-.64s' no tiene un valor patrón", "Variable '%-.64s' no puede ser configurada para el valor de '%-.64s'", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index dac3c2d8d10..9fd7783b454 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -231,7 +231,7 @@ character-set=latin1 "Option '%s' användes två gånger", "Användare '%-.64s' har överskridit '%s' (nuvarande värde: %ld)", "Du har inte privlegiet '%-.128s' som behövs för denna operation", -"Variabel '%-.64s' är en LOCAL variabel och kan inte ändrad med SET GLOBAL", +"Variabel '%-.64s' är en SESSION variabel och kan inte ändrad med SET GLOBAL", "Variabel '%-.64s' är en GLOBAL variabel och bör sättas med SET GLOBAL", "Variabel '%-.64s' har inte ett DEFAULT-värde", "Variabel '%-.64s' kan inte sättas till '%-.64s'", diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt index cb949e2d026..96b3b007cc0 100644 --- a/sql/share/ukrainian/errmsg.txt +++ b/sql/share/ukrainian/errmsg.txt @@ -236,7 +236,7 @@ character-set=koi8u "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", "Access denied. You need the %-.128s privilege for this operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", +"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 99a8a248d24..97bae472757 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1180,9 +1180,18 @@ err: } - /* Execute one command from socket (query or simple command) */ - #ifndef EMBEDDED_LIBRARY + +/* + Read one command from socket and execute it (query or simple command). + This function is called in loop from thread function. + SYNOPSIS + do_command() + RETURN VALUE + 0 success + 1 request of thread shutdown (see dispatch_command() description) +*/ + bool do_command(THD *thd) { char *packet; |