From e11efbddfa721536e24236e3d0b616ad51df7e58 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Sun, 6 Jul 2003 17:12:45 +0200 Subject: [PATCH 01/22] renamed enum Item_cast as it's not a 'class Item' child --- sql/item_create.cc | 2 +- sql/item_create.h | 2 +- sql/item_func.h | 2 +- sql/sql_yacc.yy | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/item_create.cc b/sql/item_create.cc index 90f42cee959..125c8de2275 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -470,7 +470,7 @@ Item *create_load_file(Item* a) } -Item *create_func_cast(Item *a, Item_cast cast_type, CHARSET_INFO *cs) +Item *create_func_cast(Item *a, Cast_target cast_type, CHARSET_INFO *cs) { Item *res; LINT_INIT(res); diff --git a/sql/item_create.h b/sql/item_create.h index 4151f59a87f..5646afb991e 100644 --- a/sql/item_create.h +++ b/sql/item_create.h @@ -28,7 +28,7 @@ Item *create_func_bit_length(Item* a); Item *create_func_coercibility(Item* a); Item *create_func_ceiling(Item* a); Item *create_func_char_length(Item* a); -Item *create_func_cast(Item *a, Item_cast cast_type, CHARSET_INFO *cs); +Item *create_func_cast(Item *a, Cast_target cast_type, CHARSET_INFO *cs); Item *create_func_connection_id(void); Item *create_func_conv(Item* a, Item *b, Item *c); Item *create_func_cos(Item* a); diff --git a/sql/item_func.h b/sql/item_func.h index 6a08d961bc3..33b7de5d32c 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1081,7 +1081,7 @@ public: /* For type casts */ -enum Item_cast +enum Cast_target { ITEM_CAST_BINARY, ITEM_CAST_SIGNED_INT, ITEM_CAST_UNSIGNED_INT, ITEM_CAST_DATE, ITEM_CAST_TIME, ITEM_CAST_DATETIME, ITEM_CAST_CHAR diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 6072be28dca..7a16cb4fc56 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -74,7 +74,7 @@ inline Item *or_or_concat(THD *thd, Item* A, Item* B) enum row_type row_type; enum ha_rkey_function ha_rkey_mode; enum enum_tx_isolation tx_isolation; - enum Item_cast cast_type; + enum Cast_target cast_type; enum Item_udftype udf_type; CHARSET_INFO *charset; thr_lock_type lock_type; From da5a81cf1fbb15fbea14bda16ef1f8d0439cddfb Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Tue, 15 Jul 2003 15:20:22 +0200 Subject: [PATCH 02/22] cut&paste fixed --- sql/sql_select.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_select.h b/sql/sql_select.h index 7de9007369e..76960876158 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -259,7 +259,7 @@ class JOIN :public Sql_alloc bool rollup_init(); bool rollup_make_fields(List &all_fields, List &fields, Item_sum ***func); - int JOIN::rollup_send_data(uint idx); + int rollup_send_data(uint idx); }; From b0cea06b2e6743161d86ce368fddd7b0a8ea779b Mon Sep 17 00:00:00 2001 From: "paul@ice.snake.net" <> Date: Tue, 15 Jul 2003 11:33:01 -0500 Subject: [PATCH 03/22] Modifications to error messages, and affected test results. --- mysql-test/r/merge.result | 4 ++-- sql/share/danish/errmsg.txt | 4 ++-- sql/share/dutch/errmsg.txt | 4 ++-- sql/share/english/errmsg.txt | 8 ++++---- sql/share/estonian/errmsg.txt | 2 +- sql/share/french/errmsg.txt | 2 +- sql/share/german/errmsg.txt | 4 ++-- sql/share/greek/errmsg.txt | 4 ++-- sql/share/hungarian/errmsg.txt | 4 ++-- sql/share/italian/errmsg.txt | 4 ++-- sql/share/japanese/errmsg.txt | 6 +++--- sql/share/korean/errmsg.txt | 6 +++--- sql/share/norwegian-ny/errmsg.txt | 4 ++-- sql/share/norwegian/errmsg.txt | 4 ++-- sql/share/polish/errmsg.txt | 4 ++-- sql/share/romanian/errmsg.txt | 4 ++-- sql/share/russian/errmsg.txt | 4 ++-- sql/share/serbian/errmsg.txt | 4 ++-- sql/share/slovak/errmsg.txt | 4 ++-- sql/share/spanish/errmsg.txt | 4 ++-- sql/share/swedish/errmsg.txt | 10 +++++----- 21 files changed, 47 insertions(+), 47 deletions(-) diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 413277fee43..507ceb8951c 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -178,9 +178,9 @@ t3 CREATE TABLE `t3` ( ) TYPE=MRG_MyISAM CHARSET=latin1 UNION=(`t1`,`t2`) create table t4 (a int not null, b char(10), key(a)) type=MERGE UNION=(t1,t2); select * from t4; -ERROR HY000: Can't open file: 't4.MRG'. (errno: 143) +ERROR HY000: Can't open file: 't4.MRG' (errno: 143) alter table t4 add column c int; -ERROR HY000: Can't open file: 't4.MRG'. (errno: 143) +ERROR HY000: Can't open file: 't4.MRG' (errno: 143) create database mysqltest; create table mysqltest.t6 (a int not null primary key auto_increment, message char(20)); create table t5 (a int not null, b char(20), key(a)) type=MERGE UNION=(test.t1,mysqltest.t6); diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index 224b168e15b..b5d0d907ab1 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -20,12 +20,12 @@ "Kan ikke læse status af '%-.64s' (Fejlkode: %d)", "Kan ikke læse aktive folder (Fejlkode: %d)", "Kan ikke låse fil (Fejlkode: %d)", -"Kan ikke åbne fil: '%-.64s'. (Fejlkode: %d)", +"Kan ikke åbne fil: '%-.64s' (Fejlkode: %d)", "Kan ikke finde fila: '%-.64s' (Fejlkode: %d)", "Kan ikke læse folder '%-.64s' (Fejlkode: %d)", "Kan ikke skifte folder til '%-.64s' (Fejlkode: %d)", "Posten er ændret siden sidste læsning '%-.64s'", -"Ikke mere diskplads (%s). Venter på at få frigjort plads....", +"Ikke mere diskplads (%s). Venter på at få frigjort plads...", "Kan ikke skrive, flere ens nøgler i tabellen '%-.64s'", "Fejl ved lukning af '%-.64s' (Fejlkode: %d)", "Fejl ved læsning af '%-.64s' (Fejlkode: %d)", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index ad843ae2e4e..0d48c8b33e8 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -28,8 +28,8 @@ "Kan de status niet krijgen van '%-.64s' (Errcode: %d)", "Kan de werkdirectory niet krijgen (Errcode: %d)", "Kan de file niet blokeren (Errcode: %d)", -"Kan de file '%-.64s' niet openen. (Errcode: %d)", -"Kan de file: '%-.64s' niet vinden. (Errcode: %d)", +"Kan de file '%-.64s' niet openen (Errcode: %d)", +"Kan de file: '%-.64s' niet vinden (Errcode: %d)", "Kan de directory niet lezen van '%-.64s' (Errcode: %d)", "Kan de directory niet veranderen naar '%-.64s' (Errcode: %d)", "Record is veranderd sinds de laatste lees activiteit in de tabel '%-.64s'", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 778854c820b..cc6f90d0126 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -17,12 +17,12 @@ "Can't get status of '%-.64s' (errno: %d)", "Can't get working directory (errno: %d)", "Can't lock file (errno: %d)", -"Can't open file: '%-.64s'. (errno: %d)", +"Can't open file: '%-.64s' (errno: %d)", "Can't find file: '%-.64s' (errno: %d)", "Can't read dir of '%-.64s' (errno: %d)", "Can't change dir to '%-.64s' (errno: %d)", "Record has changed since last read in table '%-.64s'", -"Disk full (%s). Waiting for someone to free some space....", +"Disk full (%s). Waiting for someone to free some space...", "Can't write, duplicate key in table '%-.64s'", "Error on close of '%-.64s' (errno: %d)", "Error reading file '%-.64s' (errno: %d)", @@ -85,7 +85,7 @@ "Can't create IP socket", "Table '%-.64s' has no index like the one used in CREATE INDEX. Recreate the table", "Field separator argument is not what is expected. Check the manual", -"You can't use fixed rowlength with BLOBs. Please use 'fields terminated by'.", +"You can't use fixed rowlength with BLOBs. Please use 'fields terminated by'", "The file '%-.64s' must be in the database directory or be readable by all", "File '%-.80s' already exists", "Records: %ld Deleted: %ld Skipped: %ld Warnings: %ld", @@ -145,7 +145,7 @@ "There is no such grant defined for user '%-.32s' on host '%-.64s'", "%-.16s command denied to user: '%-.32s@%-.64s' for table '%-.64s'", "%-.16s command denied to user: '%-.32s@%-.64s' for column '%-.64s' in table '%-.64s'", -"Illegal GRANT/REVOKE command. Please consult the manual which privileges can be used.", +"Illegal GRANT/REVOKE command. Please consult the manual which privileges can be used", "The host or user argument to GRANT is too long", "Table '%-.64s.%-.64s' doesn't exist", "There is no such grant defined for user '%-.32s' on host '%-.64s' on table '%-.64s'", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 0ac668ce01c..8879f1126ac 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -22,7 +22,7 @@ "Ei suuda lugeda '%-.64s' olekut (veakood: %d)", "Ei suuda identifitseerida jooksvat kataloogi (veakood: %d)", "Ei suuda lukustada faili (veakood: %d)", -"Ei suuda avada faili '%-.64s'. (veakood: %d)", +"Ei suuda avada faili '%-.64s' (veakood: %d)", "Ei suuda leida faili '%-.64s' (veakood: %d)", "Ei suuda lugeda kataloogi '%-.64s' (veakood: %d)", "Ei suuda siseneda kataloogi '%-.64s' (veakood: %d)", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index 51053dc5632..176a67e539d 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -17,7 +17,7 @@ "Ne peut obtenir le status de '%-.64s' (Errcode: %d)", "Ne peut obtenir le répertoire de travail (Errcode: %d)", "Ne peut verrouiller le fichier (Errcode: %d)", -"Ne peut ouvrir le fichier: '%-.64s'. (Errcode: %d)", +"Ne peut ouvrir le fichier: '%-.64s' (Errcode: %d)", "Ne peut trouver le fichier: '%-.64s' (Errcode: %d)", "Ne peut lire le répertoire de '%-.64s' (Errcode: %d)", "Ne peut changer le répertoire pour '%-.64s' (Errcode: %d)", diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index 49615c08223..bf7221dd9dc 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -26,8 +26,8 @@ "Kann Status von '%-.64s' nicht ermitteln. (Fehler: %d)", "Kann Arbeitsverzeichnis nicht ermitteln. (Fehler: %d)", "Datei nicht sperrbar. (Fehler: %d)", -"Kann Datei '%-.64s' nicht öffnen. (Fehler: %d)", -"Kann Datei '%-.64s' nicht finden. (Fehler: %d)", +"Kann Datei '%-.64s' nicht öffnen (Fehler: %d)", +"Kann Datei '%-.64s' nicht finden (Fehler: %d)", "Verzeichnis von '%-.64s' nicht lesbar. (Fehler: %d)", "Kann nicht in das Verzeichnis '%-.64s' wechseln. (Fehler: %d)", "Datensatz hat sich seit dem letzten Zugriff auf Tabelle '%-.64s' geändert.", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index d49e80135e3..fcedecd752b 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -17,12 +17,12 @@ "Áäýíáôç ç ëÞøç ðëçñïöïñéþí ãéá ôçí êáôÜóôáóç ôïõ '%-.64s' (êùäéêüò ëÜèïõò: %d)", "Ï öÜêåëëïò åñãáóßáò äåí âñÝèçêå (êùäéêüò ëÜèïõò: %d)", "Ôï áñ÷åßï äåí ìðïñåß íá êëåéäùèåß (êùäéêüò ëÜèïõò: %d)", -"Äåí åßíáé äõíáôü íá áíïé÷ôåß ôï áñ÷åßï: '%-.64s'. (êùäéêüò ëÜèïõò: %d)", +"Äåí åßíáé äõíáôü íá áíïé÷ôåß ôï áñ÷åßï: '%-.64s' (êùäéêüò ëÜèïõò: %d)", "Äåí âñÝèçêå ôï áñ÷åßï: '%-.64s' (êùäéêüò ëÜèïõò: %d)", "Äåí åßíáé äõíáôü íá äéáâáóôåß ï öÜêåëëïò ôïõ '%-.64s' (êùäéêüò ëÜèïõò: %d)", "Áäýíáôç ç áëëáãÞ ôïõ ôñÝ÷ïíôïò êáôáëüãïõ óå '%-.64s' (êùäéêüò ëÜèïõò: %d)", "Ç åããñáöÞ Ý÷åé áëëÜîåé áðü ôçí ôåëåõôáßá öïñÜ ðïõ áíáóýñèçêå áðü ôïí ðßíáêá '%-.64s'", -"Äåí õðÜñ÷åé ÷þñïò óôï äßóêï (%s). Ðáñáêáëþ, ðåñéìÝíåôå íá åëåõèåñùèåß ÷þñïò....", +"Äåí õðÜñ÷åé ÷þñïò óôï äßóêï (%s). Ðáñáêáëþ, ðåñéìÝíåôå íá åëåõèåñùèåß ÷þñïò...", "Äåí åßíáé äõíáôÞ ç êáôá÷þñçóç, ç ôéìÞ õðÜñ÷åé Þäç óôïí ðßíáêá '%-.64s'", "ÐáñïõóéÜóôçêå ðñüâëçìá êëåßíïíôáò ôï '%-.64s' (êùäéêüò ëÜèïõò: %d)", "Ðñüâëçìá êáôÜ ôçí áíÜãíùóç ôïõ áñ÷åßïõ '%-.64s' (êùäéêüò ëÜèïõò: %d)", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 8fc12da1f00..9bdd031d2cc 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -19,8 +19,8 @@ "A(z) '%-.64s' statusza nem allapithato meg (hibakod: %d)", "A munkakonyvtar nem allapithato meg (hibakod: %d)", "A file nem zarolhato. (hibakod: %d)", -"A '%-.64s' file nem nyithato meg. (hibakod: %d)", -"A(z) '%-.64s' file nem talalhato. (hibakod: %d)", +"A '%-.64s' file nem nyithato meg (hibakod: %d)", +"A(z) '%-.64s' file nem talalhato (hibakod: %d)", "A(z) '%-.64s' konyvtar nem olvashato. (hibakod: %d)", "Konyvtarvaltas nem lehetseges a(z) '%-.64s'-ba. (hibakod: %d)", "A(z) '%-.64s' tablaban talalhato rekord megvaltozott az utolso olvasas ota", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index 18ce664e7fd..89461310726 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -17,12 +17,12 @@ "Impossibile leggere lo stato di '%-.64s' (errno: %d)", "Impossibile leggere la directory di lavoro (errno: %d)", "Impossibile il locking il file (errno: %d)", -"Impossibile aprire il file: '%-.64s'. (errno: %d)", +"Impossibile aprire il file: '%-.64s' (errno: %d)", "Impossibile trovare il file: '%-.64s' (errno: %d)", "Impossibile leggere la directory di '%-.64s' (errno: %d)", "Impossibile cambiare la directory in '%-.64s' (errno: %d)", "Il record e` cambiato dall'ultima lettura della tabella '%-.64s'", -"Disco pieno (%s). In attesa che qualcuno liberi un po' di spazio....", +"Disco pieno (%s). In attesa che qualcuno liberi un po' di spazio...", "Scrittura impossibile: chiave duplicata nella tabella '%-.64s'", "Errore durante la chiusura di '%-.64s' (errno: %d)", "Errore durante la lettura del file '%-.64s' (errno: %d)", diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index fedf0fd8e9c..011d6a1faac 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -17,9 +17,9 @@ "'%-.64s' ¤Îºï½ü¤¬¥¨¥é¡¼ (errno: %d)", "system table ¤Î¥ì¥³¡¼¥É¤òÆÉ¤à»ö¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿", "'%-.64s' ¤Î¥¹¥Æ¥¤¥¿¥¹¤¬ÆÀ¤é¤ì¤Þ¤»¤ó. (errno: %d)", -"working directory ¤òÆÀ¤ë»ö¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿. (errno: %d)", -"¥Õ¥¡¥¤¥ë¤ò¥í¥Ã¥¯¤Ç¤­¤Þ¤»¤ó.(errno: %d)", -"'%-.64s' ¥Õ¥¡¥¤¥ë¤ò³«¤¯»ö¤¬¤Ç¤­¤Þ¤»¤ó.(errno: %d)", +"working directory ¤òÆÀ¤ë»ö¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿ (errno: %d)", +"¥Õ¥¡¥¤¥ë¤ò¥í¥Ã¥¯¤Ç¤­¤Þ¤»¤ó (errno: %d)", +"'%-.64s' ¥Õ¥¡¥¤¥ë¤ò³«¤¯»ö¤¬¤Ç¤­¤Þ¤»¤ó (errno: %d)", "'%-.64s' ¥Õ¥¡¥¤¥ë¤ò¸«ÉÕ¤±¤ë»ö¤¬¤Ç¤­¤Þ¤»¤ó.(errno: %d)", "'%-.64s' ¥Ç¥£¥ì¥¯¥È¥ê¤¬ÆÉ¤á¤Þ¤»¤ó.(errno: %d)", "'%-.64s' ¥Ç¥£¥ì¥¯¥È¥ê¤Ë chdir ¤Ç¤­¤Þ¤»¤ó.(errno: %d)", diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index 8c37b824342..be7fee7cb45 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -17,12 +17,12 @@ "'%-.64s'ÀÇ »óŸ¦ ¾òÁö ¸øÇß½À´Ï´Ù. (¿¡·¯¹øÈ£: %d)", "¼öÇà µð·ºÅ丮¸¦ ãÁö ¸øÇß½À´Ï´Ù. (¿¡·¯¹øÈ£: %d)", "È­ÀÏÀ» Àá±×Áö(lock) ¸øÇß½À´Ï´Ù. (¿¡·¯¹øÈ£: %d)", -"È­ÀÏÀ» ¿­Áö ¸øÇß½À´Ï´Ù.: '%-.64s'. (¿¡·¯¹øÈ£: %d)", +"È­ÀÏÀ» ¿­Áö ¸øÇß½À´Ï´Ù.: '%-.64s' (¿¡·¯¹øÈ£: %d)", "È­ÀÏÀ» ãÁö ¸øÇß½À´Ï´Ù.: '%-.64s' (¿¡·¯¹øÈ£: %d)", "'%-.64s'µð·ºÅ丮¸¦ ÀÐÁö ¸øÇß½À´Ï´Ù. (¿¡·¯¹øÈ£: %d)", "'%-.64s'µð·ºÅ丮·Î À̵¿ÇÒ ¼ö ¾ø¾ú½À´Ï´Ù. (¿¡·¯¹øÈ£: %d)", "Å×À̺í '%-.64s'¿¡¼­ ¸¶Áö¸·À¸·Î ÀÐÀº ÈÄ Record°¡ º¯°æµÇ¾ú½À´Ï´Ù.", -"Disk full (%s). ´Ù¸¥ »ç¶÷ÀÌ Áö¿ï¶§±îÁö ±â´Ù¸³´Ï´Ù.....", +"Disk full (%s). ´Ù¸¥ »ç¶÷ÀÌ Áö¿ï¶§±îÁö ±â´Ù¸³´Ï´Ù...", "±â·ÏÇÒ ¼ö ¾øÀ¾´Ï´Ù., Å×À̺í '%-.64s'¿¡¼­ Áߺ¹ Ű", "'%-.64s'´Ý´Â Áß ¿¡·¯ (¿¡·¯¹øÈ£: %d)", "'%-.64s'È­ÀÏ Àб⠿¡·¯ (¿¡·¯¹øÈ£: %d)", @@ -48,7 +48,7 @@ "'%-.32s@%-.64s' »ç¿ëÀÚ´Â '%-.64s' µ¥ÀÌŸº£À̽º¿¡ Á¢±ÙÀÌ °ÅºÎ µÇ¾ú½À´Ï´Ù.", "'%-.32s@%-.64s' »ç¿ëÀÚ´Â Á¢±ÙÀÌ °ÅºÎ µÇ¾ú½À´Ï´Ù. (Using password: %s)", "¼±ÅÃµÈ µ¥ÀÌŸº£À̽º°¡ ¾ø½À´Ï´Ù.", -"¸í·É¾î°¡ ¹ºÁö ¸ð¸£°Ú¾î¿ä....", +"¸í·É¾î°¡ ¹ºÁö ¸ð¸£°Ú¾î¿ä...", "Ä®·³ '%-.64s'´Â ³Î(Null)ÀÌ µÇ¸é ¾ÈµË´Ï´Ù. ", "µ¥ÀÌŸº£À̽º '%-.64s'´Â ¾Ë¼ö ¾øÀ½", "Å×À̺í '%-.64s'´Â ÀÌ¹Ì Á¸ÀçÇÔ", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index 4e5bed92916..3ce8eeb53d9 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -19,12 +19,12 @@ "Kan ikkje lese statusen til '%-.64s' (Feilkode: %d)", "Kan ikkje lese aktiv katalog(Feilkode: %d)", "Kan ikkje låse fila (Feilkode: %d)", -"Kan ikkje åpne fila: '%-.64s'. (Feilkode: %d)", +"Kan ikkje åpne fila: '%-.64s' (Feilkode: %d)", "Kan ikkje finne fila: '%-.64s' (Feilkode: %d)", "Kan ikkje lese katalogen '%-.64s' (Feilkode: %d)", "Kan ikkje skifte katalog til '%-.64s' (Feilkode: %d)", "Posten har vorte endra sidan den sist vart lesen '%-.64s'", -"Ikkje meir diskplass (%s). Ventar på å få frigjort plass....", +"Ikkje meir diskplass (%s). Ventar på å få frigjort plass...", "Kan ikkje skrive, flere like nyklar i tabellen '%-.64s'", "Feil ved lukking av '%-.64s' (Feilkode: %d)", "Feil ved lesing av '%-.64s' (Feilkode: %d)", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index 4b4f4e6a1f3..917cbf8ac5f 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -19,12 +19,12 @@ "Kan ikke lese statusen til '%-.64s' (Feilkode: %d)", "Kan ikke lese aktiv katalog(Feilkode: %d)", "Kan ikke låse fila (Feilkode: %d)", -"Kan ikke åpne fila: '%-.64s'. (Feilkode: %d)", +"Kan ikke åpne fila: '%-.64s' (Feilkode: %d)", "Kan ikke finne fila: '%-.64s' (Feilkode: %d)", "Kan ikke lese katalogen '%-.64s' (Feilkode: %d)", "Kan ikke skifte katalog til '%-.64s' (Feilkode: %d)", "Posten har blitt endret siden den ble lest '%-.64s'", -"Ikke mer diskplass (%s). Venter på å få frigjort plass....", +"Ikke mer diskplass (%s). Venter på å få frigjort plass...", "Kan ikke skrive, flere like nøkler i tabellen '%-.64s'", "Feil ved lukking av '%-.64s' (Feilkode: %d)", "Feil ved lesing av '%-.64s' (Feilkode: %d)", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index cc710376052..33b1b770a62 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -21,12 +21,12 @@ "Nie mo¿na otrzymaæ statusu '%-.64s' (Kod b³êdu: %d)", "Nie mo¿na rozpoznaæ aktualnego katalogu (Kod b³êdu: %d)", "Nie mo¿na zablokowaæ pliku (Kod b³êdu: %d)", -"Nie mo¿na otworzyæ pliku: '%-.64s'. (Kod b³êdu: %d)", +"Nie mo¿na otworzyæ pliku: '%-.64s' (Kod b³êdu: %d)", "Nie mo¿na znale¥æ pliku: '%-.64s' (Kod b³êdu: %d)", "Nie mo¿na odczytaæ katalogu '%-.64s' (Kod b³êdu: %d)", "Nie mo¿na zmieniæ katalogu na '%-.64s' (Kod b³êdu: %d)", "Rekord zosta³ zmieniony od ostaniego odczytania z tabeli '%-.64s'", -"Dysk pe³ny (%s). Oczekiwanie na zwolnienie miejsca....", +"Dysk pe³ny (%s). Oczekiwanie na zwolnienie miejsca...", "Nie mo¿na zapisaæ, powtórzone klucze w tabeli '%-.64s'", "B³?d podczas zamykania '%-.64s' (Kod b³êdu: %d)", "B³?d podczas odczytu pliku '%-.64s' (Kod b³êdu: %d)", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index f8bbba75a9f..12a1105d24e 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -21,12 +21,12 @@ "Nu pot sa obtin statusul lui '%-.64s' (Eroare: %d)", "Nu pot sa obtin directorul current (working directory) (Eroare: %d)", "Nu pot sa lock fisierul (Eroare: %d)", -"Nu pot sa deschid fisierul: '%-.64s'. (Eroare: %d)", +"Nu pot sa deschid fisierul: '%-.64s' (Eroare: %d)", "Nu pot sa gasesc fisierul: '%-.64s' (Eroare: %d)", "Nu pot sa citesc directorul '%-.64s' (Eroare: %d)", "Nu pot sa schimb directorul '%-.64s' (Eroare: %d)", "Cimpul a fost schimbat de la ultima citire a tabelei '%-.64s'", -"Hard-disk-ul este plin (%s). Astept sa se elibereze ceva spatiu....", +"Hard-disk-ul este plin (%s). Astept sa se elibereze ceva spatiu...", "Nu pot sa scriu (can't write), cheie duplicata in tabela '%-.64s'", "Eroare inchizind '%-.64s' (errno: %d)", "Eroare citind fisierul '%-.64s' (errno: %d)", diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index 1981e7e7a5a..70ff979bfdf 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -19,12 +19,12 @@ "îÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÓÔÁÔÕÓÎÕÀ ÉÎÆÏÒÍÁÃÉÀ Ï '%-.64s' (ÏÛÉÂËÁ: %d)", "îÅ×ÏÚÍÏÖÎÏ ÏÐÒÅÄÅÌÉÔØ ÒÁÂÏÞÉÊ ËÁÔÁÌÏÇ (ÏÛÉÂËÁ: %d)", "îÅ×ÏÚÍÏÖÎÏ ÐÏÓÔÁ×ÉÔØ ÂÌÏËÉÒÏ×ËÕ ÎÁ ÆÁÊÌÅ (ÏÛÉÂËÁ: %d)", -"îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ: '%-.64s'. (ÏÛÉÂËÁ: %d)", +"îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ: '%-.64s' (ÏÛÉÂËÁ: %d)", "îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÆÁÊÌ: '%-.64s' (ÏÛÉÂËÁ: %d)", "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ ËÁÔÁÌÏÇ '%-.64s' (ÏÛÉÂËÁ: %d)", "îÅ×ÏÚÍÏÖÎÏ ÐÅÒÅÊÔÉ × ËÁÔÁÌÏÇ '%-.64s' (ÏÛÉÂËÁ: %d)", "úÁÐÉÓØ ÉÚÍÅÎÉÌÁÓØ Ó ÍÏÍÅÎÔÁ ÐÏÓÌÅÄÎÅÊ ×ÙÂÏÒËÉ × ÔÁÂÌÉÃÅ '%-.64s'", -"äÉÓË ÚÁÐÏÌÎÅÎ. (%s). ïÖÉÄÁÅÍ, ÐÏËÁ ËÔÏ-ÔÏ ÎÅ ÕÂÅÒÅÔ ÐÏÓÌÅ ÓÅÂÑ ÍÕÓÏÒ....", +"äÉÓË ÚÁÐÏÌÎÅÎ. (%s). ïÖÉÄÁÅÍ, ÐÏËÁ ËÔÏ-ÔÏ ÎÅ ÕÂÅÒÅÔ ÐÏÓÌÅ ÓÅÂÑ ÍÕÓÏÒ...", "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÉÚ×ÅÓÔÉ ÚÁÐÉÓØ, ÄÕÂÌÉÒÕÀÝÉÊÓÑ ËÌÀÞ × ÔÁÂÌÉÃÅ '%-.64s'", "ïÛÉÂËÁ ÐÒÉ ÚÁËÒÙÔÉÉ '%-.64s' (ÏÛÉÂËÁ: %d)", "ïÛÉÂËÁ ÞÔÅÎÉÑ ÆÁÊÌÁ '%-.64s' (ÏÛÉÂËÁ: %d)", diff --git a/sql/share/serbian/errmsg.txt b/sql/share/serbian/errmsg.txt index e1583bbb791..7fa79364eb6 100644 --- a/sql/share/serbian/errmsg.txt +++ b/sql/share/serbian/errmsg.txt @@ -23,12 +23,12 @@ "Ne mogu da dobijem stanje file-a '%-.64s' (errno: %d)", "Ne mogu da dobijem trenutni direktorijum (errno: %d)", "Ne mogu da zakljuèam file (errno: %d)", -"Ne mogu da otvorim file: '%-.64s'. (errno: %d)", +"Ne mogu da otvorim file: '%-.64s' (errno: %d)", "Ne mogu da pronaðem file: '%-.64s' (errno: %d)", "Ne mogu da proèitam direktorijum '%-.64s' (errno: %d)", "Ne mogu da promenim direktorijum na '%-.64s' (errno: %d)", "Slog je promenjen od zadnjeg èitanja tabele '%-.64s'", -"Disk je pun (%s). Èekam nekoga da doðe i oslobodi nešto mesta....", +"Disk je pun (%s). Èekam nekoga da doðe i oslobodi nešto mesta...", "Ne mogu da pišem pošto postoji duplirani kljuè u tabeli '%-.64s'", "Greška pri zatvaranju '%-.64s' (errno: %d)", "Greška pri èitanju file-a '%-.64s' (errno: %d)", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index c6fad79e15a..3a0d02d1812 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -25,12 +25,12 @@ "Nemô¾em zisti» stav '%-.64s' (chybový kód: %d)", "Nemô¾em zisti» pracovný adresár (chybový kód: %d)", "Nemô¾em zamknú» súbor (chybový kód: %d)", -"Nemô¾em otvori» súbor: '%-.64s'. (chybový kód: %d)", +"Nemô¾em otvori» súbor: '%-.64s' (chybový kód: %d)", "Nemô¾em nájs» súbor: '%-.64s' (chybový kód: %d)", "Nemô¾em èíta» adresár '%-.64s' (chybový kód: %d)", "Nemô¾em vojs» do adresára '%-.64s' (chybový kód: %d)", "Záznam bol zmenený od posledného èítania v tabuµke '%-.64s'", -"Disk je plný (%s), èakám na uvoµnenie miesta....", +"Disk je plný (%s), èakám na uvoµnenie miesta...", "Nemô¾em zapísa», duplikát kµúèa v tabuµke '%-.64s'", "Chyba pri zatváraní '%-.64s' (chybový kód: %d)", "Chyba pri èítaní súboru '%-.64s' (chybový kód: %d)", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index 731e576fafd..abab5d0fae8 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -18,12 +18,12 @@ "No puedo obtener el estado de '%-.64s' (Error: %d)", "No puedo acceder al directorio (Error: %d)", "No puedo bloquear archivo: (Error: %d)", -"No puedo abrir archivo: '%-.64s'. (Error: %d)", +"No puedo abrir archivo: '%-.64s' (Error: %d)", "No puedo encontrar archivo: '%-.64s' (Error: %d)", "No puedo leer el directorio de '%-.64s' (Error: %d)", "No puedo cambiar al directorio de '%-.64s' (Error: %d)", "El registro ha cambiado desde la ultima lectura de la tabla '%-.64s'", -"Disco lleno (%s). Esperando para que se libere algo de espacio....", +"Disco lleno (%s). Esperando para que se libere algo de espacio...", "No puedo escribir, clave duplicada en la tabla '%-.64s'", "Error en el cierre de '%-.64s' (Error: %d)", "Error leyendo el fichero '%-.64s' (Error: %d)", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index 9e34dbb138a..0f7a5606778 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -17,12 +17,12 @@ "Kan inte läsa filinformationen (stat) från '%-.64s' (Felkod: %d)", "Kan inte inte läsa aktivt bibliotek. (Felkod: %d)", "Kan inte låsa filen. (Felkod: %d)", -"Kan inte använda '%-.64s'. (Felkod: %d)", -"Hittar inte filen '%-.64s'. (Felkod: %d)", -"Kan inte läsa från bibliotek '%-.64s'. (Felkod: %d)", -"Kan inte byta till '%-.64s'. (Felkod: %d)", +"Kan inte använda '%-.64s' (Felkod: %d)", +"Hittar inte filen '%-.64s' (Felkod: %d)", +"Kan inte läsa från bibliotek '%-.64s' (Felkod: %d)", +"Kan inte byta till '%-.64s' (Felkod: %d)", "Posten har förändrats sedan den lästes i register '%-.64s'", -"Disken är full (%s). Väntar tills det finns ledigt utrymme....", +"Disken är full (%s). Väntar tills det finns ledigt utrymme...", "Kan inte skriva, dubbel söknyckel i register '%-.64s'", "Fick fel vid stängning av '%-.64s' (Felkod: %d)", "Fick fel vid läsning av '%-.64s' (Felkod %d)", From 84b9c4e78dc6cd132c55d7faef82cf7af07c34fd Mon Sep 17 00:00:00 2001 From: "paul@ice.snake.net" <> Date: Wed, 16 Jul 2003 14:37:00 -0500 Subject: [PATCH 04/22] Error message consistency edits + updates to affected test results. --- mysql-test/r/innodb.result | 2 +- mysql-test/r/repair_part2.result | 2 +- mysql-test/r/type_blob.result | 2 +- sql/share/czech/errmsg.txt | 4 ++-- sql/share/danish/errmsg.txt | 8 ++++---- sql/share/dutch/errmsg.txt | 4 ++-- sql/share/english/errmsg.txt | 8 ++++---- sql/share/estonian/errmsg.txt | 4 ++-- sql/share/french/errmsg.txt | 4 ++-- sql/share/german/errmsg.txt | 34 +++++++++++++++---------------- sql/share/greek/errmsg.txt | 2 +- sql/share/hungarian/errmsg.txt | 4 ++-- sql/share/italian/errmsg.txt | 4 ++-- sql/share/norwegian-ny/errmsg.txt | 4 ++-- sql/share/norwegian/errmsg.txt | 4 ++-- sql/share/polish/errmsg.txt | 4 ++-- sql/share/portuguese/errmsg.txt | 4 ++-- sql/share/romanian/errmsg.txt | 4 ++-- sql/share/serbian/errmsg.txt | 4 ++-- sql/share/slovak/errmsg.txt | 4 ++-- sql/share/spanish/errmsg.txt | 4 ++-- sql/share/swedish/errmsg.txt | 4 ++-- sql/share/ukrainian/errmsg.txt | 2 +- 23 files changed, 60 insertions(+), 60 deletions(-) diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 4fb6efe6a14..4d5a6094ec3 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -788,7 +788,7 @@ id id3 UNLOCK TABLES; DROP TABLE t1; create table t1 (a char(20), unique (a(5))) type=innodb; -ERROR HY000: Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the store engine doesn't support unique sub keys +ERROR HY000: Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the storage engine doesn't support unique sub keys create table t1 (a char(20), index (a(5))) type=innodb; show create table t1; Table Create Table diff --git a/mysql-test/r/repair_part2.result b/mysql-test/r/repair_part2.result index 77aa98c3da9..c9cf6c019f7 100644 --- a/mysql-test/r/repair_part2.result +++ b/mysql-test/r/repair_part2.result @@ -1,6 +1,6 @@ repair table t1; Table Op Msg_type Msg_text -test.t1 repair error Can't open file: 't1.MYI'. (errno: 130) +test.t1 repair error Can't open file: 't1.MYI' (errno: 130) repair table t1 use_frm; Table Op Msg_type Msg_text test.t1 repair warning Number of rows changed from 0 to 1 diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index d39f72cbe0b..592c787031f 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -347,7 +347,7 @@ a 1 hello 1 drop table t1; create table t1 (a text, key (a(300))); -ERROR HY000: Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the store engine doesn't support unique sub keys +ERROR HY000: Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the storage engine doesn't support unique sub keys create table t1 (a text, key (a(255))); drop table t1; CREATE TABLE t1 ( diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index 5ed743962eb..6f42243ba2b 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -44,8 +44,8 @@ v/* "Obsluha tabulky '%-.64s' nem-Bá tento parametr", "Nemohu naj-Bít záznam v '%-.64s'", "Nespr-Bávná informace v souboru '%-.64s'", -"Nespr-Bávný klíè pro tabulku '%-.64s'. Pokuste se ho opravit", -"Star-Bý klíèový soubor pro '%-.64s'. Opravte ho.", +"Nespr-Bávný klíè pro tabulku '%-.64s'; pokuste se ho opravit", +"Star-Bý klíèový soubor pro '%-.64s'; opravte ho.", "'%-.64s' je jen pro -Bètení", "M-Bálo pamìti. Pøestartujte daemona a zkuste znovu (je potøeba %d bytù)", "M-Bálo pamìti pro tøídìní. Zvy¹te velikost tøídícího bufferu", diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index b5d0d907ab1..25a5020a30f 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -13,8 +13,8 @@ "Kan ikke oprette databasen '%-.64s' (Fejlkode: %d)", "Kan ikke oprette databasen '%-.64s'; databasen eksisterer", "Kan ikke slette (droppe) '%-.64s'; databasen eksisterer ikke", -"Fejl ved sletning (drop) af databasen (kan ikke slette '%-.64s', Fejl %d)", -"Fejl ved sletting af database (kan ikke slette folderen '%-.64s', Fejl %d)", +"Fejl ved sletning (drop) af databasen (kan ikke slette '%-.64s', Fejlkode %d)", +"Fejl ved sletting af database (kan ikke slette folderen '%-.64s', Fejlkode %d)", "Fejl ved sletning af '%-.64s' (Fejlkode: %d)", "Kan ikke læse posten i systemfolderen", "Kan ikke læse status af '%-.64s' (Fejlkode: %d)", @@ -38,8 +38,8 @@ "Denne mulighed eksisterer ikke for tabeltypen '%-.64s'", "Kan ikke finde posten i '%-.64s'", "Forkert indhold i: '%-.64s'", -"Fejl i indeksfilen til tabellen '%-.64s', prøv at reparere den", -"Gammel indeksfil for tabellen '%-.64s'; Reparer den", +"Fejl i indeksfilen til tabellen '%-.64s'; prøv at reparere den", +"Gammel indeksfil for tabellen '%-.64s'; reparer den", "'%-.64s' er skrivebeskyttet", "Ikke mere hukommelse. Genstart serveren og prøv igen (mangler %d bytes)", "Ikke mere sorteringshukommelse. Øg sorteringshukommelse (sort buffer size) for serveren", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index 0d48c8b33e8..6aba93c246c 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -46,8 +46,8 @@ "Tabel handler voor '%-.64s' heeft deze optie niet", "Kan record niet vinden in '%-.64s'", "Verkeerde info in file: '%-.64s'", -"Verkeerde zoeksleutel file voor tabel: '%-.64s'. Probeer het te repareren", -"Oude zoeksleutel file voor tabel '%-.64s'; Repareer het!", +"Verkeerde zoeksleutel file voor tabel: '%-.64s'; probeer het te repareren", +"Oude zoeksleutel file voor tabel '%-.64s'; repareer het!", "'%-.64s' is alleen leesbaar", "Geen geheugen meer. Herstart server en probeer opnieuw (%d bytes nodig)", "Geen geheugen om te sorteren. Verhoog de server sort buffer size", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index cc6f90d0126..57336647f2a 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -35,8 +35,8 @@ "Table storage engine for '%-.64s' doesn't have this option", "Can't find record in '%-.64s'", "Incorrect information in file: '%-.64s'", -"Incorrect key file for table: '%-.64s'. Try to repair it", -"Old key file for table '%-.64s'; Repair it!", +"Incorrect key file for table: '%-.64s'; try to repair it", +"Old key file for table '%-.64s'; repair it!", "Table '%-.64s' is read only", "Out of memory. Restart daemon and try again (needed %d bytes)", "Out of sort memory. Increase daemon sort buffer size", @@ -90,7 +90,7 @@ "File '%-.80s' already exists", "Records: %ld Deleted: %ld Skipped: %ld Warnings: %ld", "Records: %ld Duplicates: %ld", -"Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the store engine doesn't support unique sub keys", +"Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the storage engine doesn't support unique sub keys", "You can't delete all columns with ALTER TABLE. Use DROP TABLE instead", "Can't DROP '%-.64s'. Check that column/key exists", "Records: %ld Duplicates: %ld Warnings: %ld", @@ -186,7 +186,7 @@ "Got error %d during FLUSH_LOGS", "Got error %d during CHECKPOINT", "Aborted connection %ld to db: '%-.64s' user: '%-.32s' host: `%-.64s' (%-.64s)", -"The store engine for the table does not support binary table dump", +"The storage engine for the table does not support binary table dump", "Binlog closed, cannot RESET MASTER", "Failed rebuilding the index of dumped table '%-.64s'", "Error from master: '%-.64s'", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 8879f1126ac..94e19fc6e9d 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -40,8 +40,8 @@ "Tabeli '%-.64s' handler ei toeta antud operatsiooni", "Ei suuda leida kirjet '%-.64s'-s", "Vigane informatsioon failis '%-.64s'", -"Tabeli '%-.64s' võtmefail on vigane; Proovi seda parandada", -"Tabeli '%-.64s' võtmefail on aegunud; Paranda see!", +"Tabeli '%-.64s' võtmefail on vigane; proovi seda parandada", +"Tabeli '%-.64s' võtmefail on aegunud; paranda see!", "Tabel '%-.64s' on ainult lugemiseks", "Mälu sai otsa. Proovi MySQL uuesti käivitada (puudu jäi %d baiti)", "Mälu sai sorteerimisel otsa. Suurenda MySQL-i sorteerimispuhvrit", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index 176a67e539d..dd062cc074a 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -35,8 +35,8 @@ "Le handler de la table '%-.64s' n'a pas cette option", "Ne peut trouver l'enregistrement dans '%-.64s'", "Information erronnée dans le fichier: '%-.64s'", -"Index corrompu dans la table: '%-.64s'. Essayez de le réparer", -"Vieux fichier d'index pour la table '%-.64s'; Réparez le!", +"Index corrompu dans la table: '%-.64s'; essayez de le réparer", +"Vieux fichier d'index pour la table '%-.64s'; réparez le!", "'%-.64s' est en lecture seulement", "Manque de mémoire. Redémarrez le démon et ré-essayez (%d octets nécessaires)", "Manque de mémoire pour le tri. Augmentez-la.", diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index bf7221dd9dc..e7cdf3f6f0d 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -28,25 +28,25 @@ "Datei nicht sperrbar. (Fehler: %d)", "Kann Datei '%-.64s' nicht öffnen (Fehler: %d)", "Kann Datei '%-.64s' nicht finden (Fehler: %d)", -"Verzeichnis von '%-.64s' nicht lesbar. (Fehler: %d)", -"Kann nicht in das Verzeichnis '%-.64s' wechseln. (Fehler: %d)", -"Datensatz hat sich seit dem letzten Zugriff auf Tabelle '%-.64s' geändert.", +"Verzeichnis von '%-.64s' nicht lesbar (Fehler: %d)", +"Kann nicht in das Verzeichnis '%-.64s' wechseln (Fehler: %d)", +"Datensatz hat sich seit dem letzten Zugriff auf Tabelle '%-.64s' geändert", "Festplatte voll (%-.64s). Warte bis jemand Platz schafft ...", -"Kann nicht speichern, doppelter Schlüssel in Tabelle '%-.64s'.", -"Fehler beim Schließen von '%-.64s'. (Fehler: %d)", -"Fehler beim Lesen der Datei '%-.64s'. (Fehler: %d)", -"Fehler beim Umbenennen von '%-.64s' nach '%-.64s'. (Fehler: %d)", -"Fehler beim Speichern der Datei '%-.64s'. (Fehler: %d)", -"'%-.64s' ist für Veränderungen gesperrt.", -"Sortieren abgebrochen.", -"View '%-.64s' existiert für '%-.64s' nicht.", -"Fehler %d. (Tabellenhandler)", -"Diese Option gibt es nicht. (Tabellenhandler)", -"Kann Datensatz nicht finden.", +"Kann nicht speichern, doppelter Schlüssel in Tabelle '%-.64s'", +"Fehler beim Schließen von '%-.64s' (Fehler: %d)", +"Fehler beim Lesen der Datei '%-.64s' (Fehler: %d)", +"Fehler beim Umbenennen von '%-.64s' nach '%-.64s' (Fehler: %d)", +"Fehler beim Speichern der Datei '%-.64s' (Fehler: %d)", +"'%-.64s' ist für Veränderungen gesperrt", +"Sortieren abgebrochen", +"View '%-.64s' existiert für '%-.64s' nicht", +"Fehler %d (Tabellenhandler)", +"Diese Option gibt es nicht (Tabellenhandler)", +"Kann Datensatz nicht finden", "Falsche Information in Datei: '%-.64s'", -"Falsche Schlüssel-Datei für Tabelle '%-.64s'. Versuche zu reparieren!", -"Alte Schlüssel-Datei für Tabelle '%-.64s'. Repariere!", -"'%-.64s' ist nur lesbar.", +"Falsche Schlüssel-Datei für Tabelle '%-.64s'; versuche zu reparieren!", +"Alte Schlüssel-Datei für Tabelle '%-.64s'; repariere!", +"'%-.64s' ist nur lesbar", "Kein Speicher vorhanden (benötigt %d bytes). Server neu starten.", "Kein Speicher zum Sortieren. sort_buffer_size sollte erhöht werden.", "Unerwartetes Ende beim Lesen der Datei '%-.64s'. (Fehler: %d)", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index fcedecd752b..ef423ae2758 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -35,7 +35,7 @@ "Ï ÷åéñéóôÞò ðßíáêá (table handler) ãéá '%-.64s' äåí äéáèÝôåé áõôÞ ôçí åðéëïãÞ", "Áäýíáôç ç áíåýñåóç åããñáöÞò óôï '%-.64s'", "ËÜèïò ðëçñïöïñßåò óôï áñ÷åßï: '%-.64s'", -"ËÜèïò áñ÷åßï ôáîéíüìéóçò (key file) ãéá ôïí ðßíáêá: '%-.64s'. Ðáñáêáëþ, äéïñèþóôå ôï!", +"ËÜèïò áñ÷åßï ôáîéíüìéóçò (key file) ãéá ôïí ðßíáêá: '%-.64s'; Ðáñáêáëþ, äéïñèþóôå ôï!", "Ðáëáéü áñ÷åßï ôáîéíüìéóçò (key file) ãéá ôïí ðßíáêá '%-.64s'; Ðáñáêáëþ, äéïñèþóôå ôï!", "'%-.64s' åðéôñÝðåôáé ìüíï ç áíÜãíùóç", "Äåí õðÜñ÷åé äéáèÝóéìç ìíÞìç. ÐñïóðáèÞóôå ðÜëé, åðáíåêéíþíôáò ôç äéáäéêáóßá (demon) (÷ñåéÜæïíôáé %d bytes)", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 9bdd031d2cc..6b27cdc2551 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -37,8 +37,8 @@ "A(z) '%-.64s' tablakezelonek nincs ilyen opcioja", "Nem talalhato a rekord '%-.64s'-ben", "Ervenytelen info a file-ban: '%-.64s'", -"Ervenytelen kulcsfile a tablahoz: '%-.64s'. Probalja kijavitani!", -"Regi kulcsfile a '%-.64s'tablahoz; Probalja kijavitani!", +"Ervenytelen kulcsfile a tablahoz: '%-.64s'; probalja kijavitani!", +"Regi kulcsfile a '%-.64s'tablahoz; probalja kijavitani!", "'%-.64s' irasvedett", "Nincs eleg memoria. Inditsa ujra a demont, es probalja ismet. (%d byte szukseges.)", "Nincs eleg memoria a rendezeshez. Novelje a rendezo demon puffermeretet", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index 89461310726..8b0598f64b5 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -35,8 +35,8 @@ "Il gestore delle tabelle per '%-.64s' non ha questa opzione", "Impossibile trovare il record in '%-.64s'", "Informazione errata nel file: '%-.64s'", -"File chiave errato per la tabella : '%-.64s'. Prova a riparalo", -"File chiave vecchio per la tabella '%-.64s'; Riparalo!", +"File chiave errato per la tabella : '%-.64s'; prova a riparalo", +"File chiave vecchio per la tabella '%-.64s'; riparalo!", "'%-.64s' e` di sola lettura", "Memoria esaurita. Fai ripartire il demone e riprova (richiesti %d bytes)", "Memoria per gli ordinamenti esaurita. Incrementare il 'sort_buffer' al demone", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index 3ce8eeb53d9..96c11871502 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -37,8 +37,8 @@ "Tabell håndteraren for '%-.64s' har ikkje denne moglegheita", "Kan ikkje finne posten i '%-.64s'", "Feil informasjon i fila: '%-.64s'", -"Tabellen '%-.64s' har feil i nykkelfila, Prøv å reparere den", -"Gammel nykkelfil for tabellen '%-.64s'; Reparer den!", +"Tabellen '%-.64s' har feil i nykkelfila; prøv å reparere den", +"Gammel nykkelfil for tabellen '%-.64s'; reparer den!", "'%-.64s' er skrivetryggja", "Ikkje meir minne. Start på nytt tenesten og prøv igjen (trengte %d bytar)", "Ikkje meir sorteringsminne. Auk sorteringsminnet (sorteringsbffer storleik) for tenesten", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index 917cbf8ac5f..c505d512e9e 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -37,8 +37,8 @@ "Tabell håndtereren for '%-.64s' har ikke denne muligheten", "Kan ikke finne posten i '%-.64s'", "Feil informasjon i filen: '%-.64s'", -"Tabellen '%-.64s' har feil i nøkkelfilen, forsøk å reparer den", -"Gammel nøkkelfil for tabellen '%-.64s'; Reparer den!", +"Tabellen '%-.64s' har feil i nøkkelfilen; forsøk å reparer den", +"Gammel nøkkelfil for tabellen '%-.64s'; reparer den!", "'%-.64s' er skrivebeskyttet", "Ikke mer minne. Star på nytt tjenesten og prøv igjen (trengte %d byter)", "Ikke mer sorteringsminne. Øk sorteringsminnet (sort buffer size) for tjenesten", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index 33b1b770a62..33b2fbdb8a8 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -39,8 +39,8 @@ "Obs³uga tabeli '%-.64s' nie posiada tej opcji", "Nie mo¿na znale¥æ rekordu w '%-.64s'", "Niew³a?ciwa informacja w pliku: '%-.64s'", -"Niew³a?ciwy plik kluczy dla tabeli: '%-.64s'. Spróbuj go naprawiæ", -"Plik kluczy dla tabeli '%-.64s' jest starego typu; Napraw go!", +"Niew³a?ciwy plik kluczy dla tabeli: '%-.64s'; spróbuj go naprawiæ", +"Plik kluczy dla tabeli '%-.64s' jest starego typu; napraw go!", "'%-.64s' jest tylko do odczytu", "Zbyt ma³o pamiêci. Uruchom ponownie demona i spróbuj ponownie (potrzeba %d bajtów)", "Zbyt ma³o pamiêci dla sortowania. Zwiêksz wielko?æ bufora demona dla sortowania", diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index 14a1e6763b4..e8a3205ec5d 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -35,8 +35,8 @@ "Manipulador de tabela para '%-.64s' não tem esta opção", "Não pode encontrar registro em '%-.64s'", "Informação incorreta no arquivo '%-.64s'", -"Arquivo de índice incorreto para tabela '%-.64s'. Tente repará-lo", -"Arquivo de índice desatualizado para tabela '%-.64s'. Repare-o!", +"Arquivo de índice incorreto para tabela '%-.64s'; tente repará-lo", +"Arquivo de índice desatualizado para tabela '%-.64s'; repare-o!", "Tabela '%-.64s' é somente para leitura", "Sem memória. Reinicie o programa e tente novamente (necessita de %d bytes)", "Sem memória para ordenação. Aumente tamanho do 'buffer' de ordenação", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index 12a1105d24e..6602b5d430c 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -39,8 +39,8 @@ "Handlerul tabelei pentru '%-.64s' nu are aceasta optiune", "Nu pot sa gasesc recordul in '%-.64s'", "Informatie incorecta in fisierul: '%-.64s'", -"Cheia fisierului incorecta pentru tabela: '%-.64s'. Incearca s-o repari", -"Cheia fisierului e veche pentru tabela '%-.64s'; Repar-o!", +"Cheia fisierului incorecta pentru tabela: '%-.64s'; incearca s-o repari", +"Cheia fisierului e veche pentru tabela '%-.64s'; repar-o!", "Tabela '%-.64s' e read-only", "Out of memory. Porneste daemon-ul din nou si incearca inca o data (e nevoie de %d bytes)", "Out of memory pentru sortare. Largeste marimea buffer-ului pentru sortare in daemon (sort buffer size)", diff --git a/sql/share/serbian/errmsg.txt b/sql/share/serbian/errmsg.txt index 7fa79364eb6..f4ea3ac3c82 100644 --- a/sql/share/serbian/errmsg.txt +++ b/sql/share/serbian/errmsg.txt @@ -41,8 +41,8 @@ "Handler tabela za '%-.64s' nema ovu opciju", "Ne mogu da pronaðem slog u '%-.64s'", "Pogrešna informacija u file-u: '%-.64s'", -"Pogrešan key file za tabelu: '%-.64s'. Probajte da ga ispravite", -"Zastareo key file za tabelu '%-.64s'; Ispravite ga", +"Pogrešan key file za tabelu: '%-.64s'; probajte da ga ispravite", +"Zastareo key file za tabelu '%-.64s'; ispravite ga", "Tabelu '%-.64s' je dozvoljeno samo èitati", "Nema memorije. Restartujte MySQL server i probajte ponovo (potrebno je %d byte-ova)", "Nema memorije za sortiranje. Poveæajte velièinu sort buffer-a MySQL server-u", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index 3a0d02d1812..2ba4f2f0548 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -43,8 +43,8 @@ "Obsluha tabuµky '%-.64s' nemá tento parameter", "Nemô¾em nájs» záznam v '%-.64s'", "Nesprávna informácia v súbore: '%-.64s'", -"Nesprávny kµúè pre tabuµku '%-.64s'. Pokúste sa ho opravi»", -"Starý kµúèový súbor pre '%-.64s'; Opravte ho!", +"Nesprávny kµúè pre tabuµku '%-.64s'; pokúste sa ho opravi»", +"Starý kµúèový súbor pre '%-.64s'; opravte ho!", "'%-.64s' is èíta» only", "Málo pamäti. Re¹tartujte daemona a skúste znova (je potrebných %d bytov)", "Málo pamäti pre triedenie, zvý¹te veµkos» triediaceho bufferu", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index abab5d0fae8..c7f8d51dee9 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -36,8 +36,8 @@ "El manejador de la tabla de '%-.64s' no tiene esta opcion", "No puedo encontrar el registro en '%-.64s'", "Informacion erronea en el archivo: '%-.64s'", -"Clave de archivo erronea para la tabla: '%-.64s'. Intente repararlo", -"Clave de archivo antigua para la tabla '%-.64s'; Reparelo!", +"Clave de archivo erronea para la tabla: '%-.64s'; intente repararlo", +"Clave de archivo antigua para la tabla '%-.64s'; reparelo!", "'%-.64s' es de solo lectura", "Memoria insuficiente. Reinicie el demonio e intentelo otra vez (necesita %d bytes)", "Memoria de ordenacion insuficiente. Incremente el tamano del buffer de ordenacion", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index 0f7a5606778..0d51cb4b543 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -35,8 +35,8 @@ "Registrets databas har inte denna facilitet", "Hittar inte posten", "Felaktig fil: '%-.64s'", -"Fatalt fel vid hantering av register '%-.64s'. Kör en reparation", -"Gammal nyckelfil '%-.64s'. Reparera registret", +"Fatalt fel vid hantering av register '%-.64s'; kör en reparation", +"Gammal nyckelfil '%-.64s'; reparera registret", "'%-.64s' är skyddad mot förändring", "Oväntat slut på minnet, starta om programmet och försök på nytt (Behövde %d bytes)", "Sorteringsbufferten räcker inte till. Kontrollera startparametrarna", diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt index adbb35dc7c0..4e22dbfcf3e 100644 --- a/sql/share/ukrainian/errmsg.txt +++ b/sql/share/ukrainian/errmsg.txt @@ -40,7 +40,7 @@ "äÅÓËÒÉÐÔÏÒ ÔÁÂÌÉæ '%-.64s' ÎÅ ÍÁ¤ 椧 ×ÌÁÓÔÉ×ÏÓÔ¦", "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ Õ '%-.64s'", "èÉÂÎÁ ¦ÎÆÏÒÍÁÃ¦Ñ Õ ÆÁÊ̦: '%-.64s'", -"èÉÂÎÉÊ ÆÁÊÌ ËÌÀÞÅÊ ÄÌÑ ÔÁÂÌÉæ: '%-.64s'. óÐÒÏÂÕÊÔÅ ÊÏÇÏ ×¦ÄÎÏ×ÉÔÉ", +"èÉÂÎÉÊ ÆÁÊÌ ËÌÀÞÅÊ ÄÌÑ ÔÁÂÌÉæ: '%-.64s'; óÐÒÏÂÕÊÔÅ ÊÏÇÏ ×¦ÄÎÏ×ÉÔÉ", "óÔÁÒÉÊ ÆÁÊÌ ËÌÀÞÅÊ ÄÌÑ ÔÁÂÌÉæ '%-.64s'; ÷¦ÄÎÏ×¦ÔØ ÊÏÇÏ!", "ôÁÂÌÉÃÑ '%-.64s' Ô¦ÌØËÉ ÄÌÑ ÞÉÔÁÎÎÑ", "âÒÁË ÐÁÍ'ÑÔ¦. òÅÓÔÁÒÔÕÊÔÅ ÓÅÒ×ÅÒ ÔÁ ÓÐÒÏÂÕÊÔÅ ÚÎÏ×Õ (ÐÏÔÒ¦ÂÎÏ %d ÂÁÊÔ¦×)", From 7fb37ad847e2161f0754840c5a7c732aaf94fa32 Mon Sep 17 00:00:00 2001 From: "paul@ice.snake.net" <> Date: Wed, 16 Jul 2003 23:47:48 -0500 Subject: [PATCH 05/22] Fix openssl_2 test so it passes or fails. (It was being reported as [skipped], even when run explicitly.) --- mysql-test/include/have_openssl_2.inc | 2 +- mysql-test/r/have_openssl_2.require | 2 +- mysql-test/r/openssl_2.result | 25 ++++++++++++++++++++++++- mysql-test/t/openssl_2.test | 2 +- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/mysql-test/include/have_openssl_2.inc b/mysql-test/include/have_openssl_2.inc index 724d295a398..9671ce29573 100644 --- a/mysql-test/include/have_openssl_2.inc +++ b/mysql-test/include/have_openssl_2.inc @@ -1,4 +1,4 @@ -- require r/have_openssl_2.require disable_query_log; -SHOW STATUS LIKE "SSL_get_cipher"; +SHOW STATUS LIKE "Ssl_cipher"; enable_query_log; diff --git a/mysql-test/r/have_openssl_2.require b/mysql-test/r/have_openssl_2.require index 09a65d7d9bc..032b60d544a 100644 --- a/mysql-test/r/have_openssl_2.require +++ b/mysql-test/r/have_openssl_2.require @@ -1,2 +1,2 @@ Variable_name Value -jkhjkhfs +Ssl_cipher EDH-RSA-DES-CBC3-SHA diff --git a/mysql-test/r/openssl_2.result b/mysql-test/r/openssl_2.result index b5c67dfbcb0..879c623dd40 100644 --- a/mysql-test/r/openssl_2.result +++ b/mysql-test/r/openssl_2.result @@ -1,2 +1,25 @@ -SHOW STATUS LIKE 'SSL%'; +SHOW STATUS LIKE 'Ssl%'; Variable_name Value +Ssl_accepts 1 +Ssl_finished_accepts 1 +Ssl_finished_connects 0 +Ssl_accept_renegotiates 0 +Ssl_connect_renegotiates 0 +Ssl_callback_cache_hits 0 +Ssl_session_cache_hits 0 +Ssl_session_cache_misses 0 +Ssl_session_cache_timeouts 0 +Ssl_used_session_cache_entries 1 +Ssl_client_connects 0 +Ssl_session_cache_overflows 0 +Ssl_session_cache_size 128 +Ssl_session_cache_mode SERVER +Ssl_sessions_reused 0 +Ssl_ctx_verify_mode 7 +Ssl_ctx_verify_depth 4294967295 +Ssl_verify_mode 7 +Ssl_verify_depth 4294967295 +Ssl_version TLSv1 +Ssl_cipher EDH-RSA-DES-CBC3-SHA +Ssl_cipher_list +Ssl_default_timeout 7200 diff --git a/mysql-test/t/openssl_2.test b/mysql-test/t/openssl_2.test index 12f1240f3af..a8ee62db7f6 100644 --- a/mysql-test/t/openssl_2.test +++ b/mysql-test/t/openssl_2.test @@ -1,5 +1,5 @@ # We want to test everything with SSL turned on. -- source include/have_openssl_2.inc -SHOW STATUS LIKE 'SSL%'; +SHOW STATUS LIKE 'Ssl%'; From c6ade13d8b5f974f7d64ad9eadf67abd5b22d041 Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Thu, 17 Jul 2003 10:21:30 +0500 Subject: [PATCH 06/22] ctype-utf8.c: Stupid bug fix --- strings/ctype-utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index f5da95571c4..1982b9e3ba8 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -2030,7 +2030,7 @@ CHARSET_INFO my_charset_utf8_bin= 3, /* mbmaxlen */ 0, &my_charset_handler, - &my_collation_ci_handler + &my_collation_bin_handler }; From 8c06421c12eb34ff47b901012408afefee95dbc1 Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Thu, 17 Jul 2003 16:07:56 +0500 Subject: [PATCH 07/22] CASE stores first_expr and else_expr in args[] array now. This allowed to reuse a lot of code. --- sql/item_cmpfunc.cc | 118 ++++++++------------------------------------ sql/item_cmpfunc.h | 24 ++++++--- sql/item_func.cc | 11 +++-- sql/item_func.h | 1 + 4 files changed, 46 insertions(+), 108 deletions(-) diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 758733aaa2c..df02dc5fe32 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -872,9 +872,9 @@ Item *Item_func_case::find_item(String *str) LINT_INIT(first_expr_real); // Compare every WHEN argument with it and return the first match - for (uint i=0 ; i < arg_count ; i+=2) + for (uint i=0 ; i < ncases ; i+=2) { - if (!first_expr) + if (first_expr_num == -1) { // No expression between CASE and first WHEN if (args[i]->val_int()) @@ -887,8 +887,8 @@ Item *Item_func_case::find_item(String *str) { str_used=1; // We can't use 'str' here as this may be overwritten - if (!(first_expr_str= first_expr->val_str(&str_value))) - return else_expr; // Impossible + if (!(first_expr_str= args[first_expr_num]->val_str(&str_value))) + return else_expr_num != -1 ? args[else_expr_num] : 0; // Impossible } if ((tmp=args[i]->val_str(str))) // If not null { @@ -906,9 +906,9 @@ Item *Item_func_case::find_item(String *str) if (!int_used) { int_used=1; - first_expr_int= first_expr->val_int(); - if (first_expr->null_value) - return else_expr; + first_expr_int= args[first_expr_num]->val_int(); + if (args[first_expr_num]->null_value) + return else_expr_num != -1 ? args[else_expr_num] : 0; } if (args[i]->val_int()==first_expr_int && !args[i]->null_value) return args[i+1]; @@ -917,9 +917,9 @@ Item *Item_func_case::find_item(String *str) if (!real_used) { real_used=1; - first_expr_real= first_expr->val(); - if (first_expr->null_value) - return else_expr; + first_expr_real= args[first_expr_num]->val(); + if (args[first_expr_num]->null_value) + return else_expr_num != -1 ? args[else_expr_num] : 0; } if (args[i]->val()==first_expr_real && !args[i]->null_value) return args[i+1]; @@ -932,7 +932,7 @@ Item *Item_func_case::find_item(String *str) } } // No, WHEN clauses all missed, return ELSE expression - return else_expr; + return else_expr_num != -1 ? args[else_expr_num] : 0; } @@ -989,103 +989,25 @@ double Item_func_case::val() } -bool -Item_func_case::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) -{ - if (first_expr && (first_expr->fix_fields(thd, tables, &first_expr) || - first_expr->check_cols(1)) || - else_expr && (else_expr->fix_fields(thd, tables, &else_expr) || - else_expr->check_cols(1))) - return 1; - if (Item_func::fix_fields(thd, tables, ref)) - return 1; - if (first_expr) - { - used_tables_cache|=(first_expr)->used_tables(); - const_item_cache&= (first_expr)->const_item(); - with_sum_func= with_sum_func || (first_expr)->with_sum_func; - first_expr_is_binary= first_expr->charset()->state & MY_CS_BINSORT; - } - if (else_expr) - { - used_tables_cache|=(else_expr)->used_tables(); - const_item_cache&= (else_expr)->const_item(); - with_sum_func= with_sum_func || (else_expr)->with_sum_func; - } - if (!else_expr || else_expr->maybe_null) - maybe_null=1; // The result may be NULL - return 0; -} - - -void Item_func_case::split_sum_func(Item **ref_pointer_array, - List &fields) -{ - if (first_expr) - { - if (first_expr->with_sum_func && first_expr->type() != SUM_FUNC_ITEM) - first_expr->split_sum_func(ref_pointer_array, fields); - else if (first_expr->used_tables() || first_expr->type() == SUM_FUNC_ITEM) - { - uint el= fields.elements; - fields.push_front(first_expr); - ref_pointer_array[el]= first_expr; - first_expr= new Item_ref(ref_pointer_array + el, 0, first_expr->name); - } - } - if (else_expr) - { - if (else_expr->with_sum_func && else_expr->type() != SUM_FUNC_ITEM) - else_expr->split_sum_func(ref_pointer_array, fields); - else if (else_expr->used_tables() || else_expr->type() == SUM_FUNC_ITEM) - { - uint el= fields.elements; - fields.push_front(else_expr); - ref_pointer_array[el]= else_expr; - else_expr= new Item_ref(ref_pointer_array + el, 0, else_expr->name); - } - } - Item_func::split_sum_func(ref_pointer_array, fields); -} - - -void Item_func_case::set_outer_resolving() -{ - first_expr->set_outer_resolving(); - else_expr->set_outer_resolving(); - Item_func::set_outer_resolving(); -} - -void Item_func_case::update_used_tables() -{ - Item_func::update_used_tables(); - if (first_expr) - { - used_tables_cache|=(first_expr)->used_tables(); - const_item_cache&= (first_expr)->const_item(); - } - if (else_expr) - { - used_tables_cache|=(else_expr)->used_tables(); - const_item_cache&= (else_expr)->const_item(); - } -} - - void Item_func_case::fix_length_and_dec() { + if (first_expr_num != -1) + first_expr_is_binary= args[first_expr_num]->charset()->state & MY_CS_BINSORT; + if (!else_expr_num != -1 || args[else_expr_num]->maybe_null) + maybe_null=1; + max_length=0; decimals=0; cached_result_type = args[1]->result_type(); - for (uint i=0 ; i < arg_count ; i+=2) + for (uint i=0 ; i < ncases ; i+=2) { set_if_bigger(max_length,args[i+1]->max_length); set_if_bigger(decimals,args[i+1]->decimals); } - if (else_expr != NULL) + if (else_expr_num != -1) { - set_if_bigger(max_length,else_expr->max_length); - set_if_bigger(decimals,else_expr->decimals); + set_if_bigger(max_length,args[else_expr_num]->max_length); + set_if_bigger(decimals,args[else_expr_num]->decimals); } } diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 9de222aafaf..9953e3d87a4 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -348,27 +348,37 @@ public: class Item_func_case :public Item_func { - Item * first_expr, *else_expr; + int first_expr_num, else_expr_num; enum Item_result cached_result_type; String tmp_value; bool first_expr_is_binary; + uint ncases; public: Item_func_case(List &list, Item *first_expr_arg, Item *else_expr_arg) - :Item_func(list), first_expr(first_expr_arg), else_expr(else_expr_arg), + :Item_func(), first_expr_num(-1), else_expr_num(-1), cached_result_type(INT_RESULT) - {} + { + ncases= list.elements; + if (first_expr_arg) + { + first_expr_num= list.elements; + list.push_back(first_expr_arg); + } + if (else_expr_arg) + { + else_expr_num= list.elements; + list.push_back(else_expr_arg); + } + set_arguments(list); + } double val(); longlong val_int(); String *val_str(String *); void fix_length_and_dec(); - void update_used_tables(); enum Item_result result_type () const { return cached_result_type; } const char *func_name() const { return "case"; } void print(String *str); - bool fix_fields(THD *thd, struct st_table_list *tlist, Item **ref); - void split_sum_func(Item **ref_pointer_array, List &fields); Item *find_item(String *str); - void set_outer_resolving(); }; diff --git a/sql/item_func.cc b/sql/item_func.cc index 7e236225067..ea3c3980a50 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -102,10 +102,9 @@ eval_const_cond(COND *cond) return ((Item_func*) cond)->val_int() ? TRUE : FALSE; } - -Item_func::Item_func(List &list) - :allowed_arg_cols(1) +void Item_func::set_arguments(List &list) { + allowed_arg_cols= 1; arg_count=list.elements; if ((args=(Item**) sql_alloc(sizeof(Item*)*arg_count))) { @@ -122,6 +121,12 @@ Item_func::Item_func(List &list) list.empty(); // Fields are used } +Item_func::Item_func(List &list) + :allowed_arg_cols(1) +{ + set_arguments(list); +} + /* Resolve references to table column for a function and it's argument diff --git a/sql/item_func.h b/sql/item_func.h index a0969fc6b9a..7002f885c50 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -115,6 +115,7 @@ public: virtual const char *func_name() const { return "?"; } virtual bool const_item() const { return const_item_cache; } inline Item **arguments() const { return args; } + void set_arguments(List &list); inline uint argument_count() const { return arg_count; } inline void remove_arguments() { arg_count=0; } virtual void split_sum_func(Item **ref_pointer_array, List &fields); From e76d7848644d75b4dca9b2881ba85e96530367df Mon Sep 17 00:00:00 2001 From: "vva@eagle.mysql.r18.ru" <> Date: Thu, 17 Jul 2003 12:15:41 -0400 Subject: [PATCH 08/22] fixed bug with location of mysql_create_sytem_tables --- scripts/mysql_install_db.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 9e4f35dd5e1..a69995e51a0 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -191,7 +191,7 @@ then echo "Installing all prepared tables" fi if ( - $pkgdatadir/mysql_create_system_tables $create_option $mdata $hostname $windows + $bindir/mysql_create_system_tables $create_option $mdata $hostname $windows if test -n "$fill_help_tables" then cat $fill_help_tables From a2f7ef9c8bf0d34d63f8c5b11ea33675335637ac Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Thu, 17 Jul 2003 22:58:05 +0500 Subject: [PATCH 09/22] CASE now aggregates all argument types instead of using the only one argument --- sql/item_cmpfunc.cc | 60 ++++++++++++++++++++++++++++++++++++++------- sql/item_cmpfunc.h | 3 ++- 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index df02dc5fe32..1f1b449e9a7 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -892,13 +892,7 @@ Item *Item_func_case::find_item(String *str) } if ((tmp=args[i]->val_str(str))) // If not null { - /* QQ: COERCIBILITY */ - if (first_expr_is_binary || (args[i]->charset()->state & MY_CS_BINSORT)) - { - if (sortcmp(tmp,first_expr_str,&my_charset_bin)==0) - return args[i+1]; - } - else if (sortcmp(tmp,first_expr_str,tmp->charset())==0) + if (sortcmp(tmp,first_expr_str,&my_charset_bin)==0) return args[i+1]; } break; @@ -988,14 +982,62 @@ double Item_func_case::val() return res; } +static void agg_result_type(Item_result *type, Item **items, uint nitems) +{ + uint i; + type[0]= items[0]->result_type(); + for (i=1 ; i < nitems ; i++) + type[0]= item_store_type(type[0], items[i]->result_type()); +} + +static void agg_cmp_type(Item_result *type, Item **items, uint nitems) +{ + uint i; + type[0]= items[0]->result_type(); + for (i=1 ; i < nitems ; i++) + type[0]= item_cmp_type(type[0], items[i]->result_type()); +} void Item_func_case::fix_length_and_dec() { + Item **agg; + uint nagg; + + if (!(agg= (Item**) sql_alloc(sizeof(Item*)*(ncases+1)))) + return; + + // Aggregate all THEN and ELSE expression types + // and collations when string result + + for (nagg= 0 ; nagg < ncases/2 ; nagg++) + agg[nagg]= args[nagg*2+1]; + + if (else_expr_num != -1) + agg[nagg++]= args[else_expr_num]; + + agg_result_type(&cached_result_type, agg, nagg); + if ((cached_result_type == STRING_RESULT) && + agg_arg_collations(collation, agg, nagg)) + return; + + + // Aggregate first expression and all THEN expression types + // and collations when string comparison if (first_expr_num != -1) - first_expr_is_binary= args[first_expr_num]->charset()->state & MY_CS_BINSORT; + { + agg[0]= args[first_expr_num]; + for (nagg= 0; nagg < ncases/2 ; nagg++) + agg[nagg+1]= args[nagg]; + nagg++; + agg_cmp_type(&cmp_type, agg, nagg); + if ((cmp_type == STRING_RESULT) && + agg_arg_collations_for_comparison(cmp_collation, agg, nagg)) + return; + } + if (!else_expr_num != -1 || args[else_expr_num]->maybe_null) maybe_null=1; - + max_length=0; decimals=0; cached_result_type = args[1]->result_type(); diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 9953e3d87a4..a9fba76a7b8 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -351,8 +351,9 @@ class Item_func_case :public Item_func int first_expr_num, else_expr_num; enum Item_result cached_result_type; String tmp_value; - bool first_expr_is_binary; uint ncases; + Item_result cmp_type; + DTCollation cmp_collation; public: Item_func_case(List &list, Item *first_expr_arg, Item *else_expr_arg) :Item_func(), first_expr_num(-1), else_expr_num(-1), From ccece982fbfc0185bc17b833b9db6f466ff3f883 Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Fri, 18 Jul 2003 12:42:35 +0500 Subject: [PATCH 10/22] Some fixes in CASE. Test suit was extended to conver various arguments mixes. --- mysql-test/r/case.result | 46 ++++++++++++++++++++++++++++++++++++++-- mysql-test/t/case.test | 39 +++++++++++++++++++++++++++++++++- sql/item_cmpfunc.cc | 5 ++--- 3 files changed, 84 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index 04627a7a493..08f148f94c0 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -10,10 +10,10 @@ CASE "c" when "a" then 1 when "b" then 2 ELSE 3 END 3 select CASE BINARY "b" when "a" then 1 when "B" then 2 WHEN "b" then "ok" END; CASE BINARY "b" when "a" then 1 when "B" then 2 WHEN "b" then "ok" END -0 +ok select CASE "b" when "a" then 1 when binary "B" then 2 WHEN "b" then "ok" END; CASE "b" when "a" then 1 when binary "B" then 2 WHEN "b" then "ok" END -0 +ok select CASE concat("a","b") when concat("ab","") then "a" when "b" then "b" end; CASE concat("a","b") when concat("ab","") then "a" when "b" then "b" end a @@ -72,6 +72,48 @@ yellow green drop table t1; SET NAMES latin1; +CREATE TABLE t1 SELECT +CASE WHEN 1 THEN _latin1'a' COLLATE latin1_danish_ci ELSE _latin1'a' END AS c1, +CASE WHEN 1 THEN _latin1'a' ELSE _latin1'a' COLLATE latin1_danish_ci END AS c2, +CASE WHEN 1 THEN 'a' ELSE 1 END AS c3, +CASE WHEN 1 THEN 1 ELSE 'a' END AS c4, +CASE WHEN 1 THEN 'a' ELSE 1.0 END AS c5, +CASE WHEN 1 THEN 1.0 ELSE 'a' END AS c6, +CASE WHEN 1 THEN 1 ELSE 1.0 END AS c7, +CASE WHEN 1 THEN 1.0 ELSE 1 END AS c8 +; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` char(1) character set latin1 collate latin1_danish_ci default NULL, + `c2` char(1) character set latin1 collate latin1_danish_ci default NULL, + `c3` char(1) default NULL, + `c4` char(1) default NULL, + `c5` char(3) default NULL, + `c6` char(3) default NULL, + `c7` double(3,1) default NULL, + `c8` double(3,1) default NULL +) TYPE=MyISAM CHARSET=latin1 +DROP TABLE t1; +SELECT CASE +WHEN 1 +THEN _latin1'a' COLLATE latin1_danish_ci +ELSE _latin1'a' COLLATE latin1_swedish_ci +END; +ERROR HY000: Illegal mix of collations (latin1_danish_ci,EXPLICIT) and (latin1_swedish_ci,EXPLICIT) for operation 'case' +SELECT CASE _latin1'a' COLLATE latin1_general_ci +WHEN _latin1'a' COLLATE latin1_danish_ci THEN 1 +WHEN _latin1'a' COLLATE latin1_swedish_ci THEN 2 +END; +ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT), (latin1_danish_ci,EXPLICIT), (latin1_swedish_ci,EXPLICIT) for operation 'case' +SELECT +CASE _latin1'a' COLLATE latin1_general_ci WHEN _latin1'A' THEN '1' ELSE 2 END, +CASE _latin1'a' COLLATE latin1_bin WHEN _latin1'A' THEN '1' ELSE 2 END, +CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_swedish_ci THEN '1' ELSE 2 END, +CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_bin THEN '1' ELSE 2 END +; +CASE _latin1'a' COLLATE latin1_general_ci WHEN _latin1'A' THEN '1' ELSE 2 END CASE _latin1'a' COLLATE latin1_bin WHEN _latin1'A' THEN '1' ELSE 2 END CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_swedish_ci THEN '1' ELSE 2 END CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_bin THEN '1' ELSE 2 END +1 2 1 2 CREATE TABLE t1 SELECT COALESCE(_latin1'a',_latin2'a'); ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'coalesce' CREATE TABLE t1 SELECT COALESCE('a' COLLATE latin1_swedish_ci,'b' COLLATE latin1_bin); diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test index 0249a8eefba..8aa17061174 100644 --- a/mysql-test/t/case.test +++ b/mysql-test/t/case.test @@ -42,6 +42,44 @@ insert into t1 values (1,1,'orange'),(1,2,'large'),(2,1,'yellow'),(2,2,'medium') select max(case col when 1 then val else null end) as color from t1 group by row; drop table t1; +SET NAMES latin1; + +# +# CASE and argument types/collations aggregation into result +# +CREATE TABLE t1 SELECT + CASE WHEN 1 THEN _latin1'a' COLLATE latin1_danish_ci ELSE _latin1'a' END AS c1, + CASE WHEN 1 THEN _latin1'a' ELSE _latin1'a' COLLATE latin1_danish_ci END AS c2, + CASE WHEN 1 THEN 'a' ELSE 1 END AS c3, + CASE WHEN 1 THEN 1 ELSE 'a' END AS c4, + CASE WHEN 1 THEN 'a' ELSE 1.0 END AS c5, + CASE WHEN 1 THEN 1.0 ELSE 'a' END AS c6, + CASE WHEN 1 THEN 1 ELSE 1.0 END AS c7, + CASE WHEN 1 THEN 1.0 ELSE 1 END AS c8 +; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +--error 1265 +SELECT CASE + WHEN 1 + THEN _latin1'a' COLLATE latin1_danish_ci + ELSE _latin1'a' COLLATE latin1_swedish_ci + END; + +--error 1268 +SELECT CASE _latin1'a' COLLATE latin1_general_ci + WHEN _latin1'a' COLLATE latin1_danish_ci THEN 1 + WHEN _latin1'a' COLLATE latin1_swedish_ci THEN 2 + END; + +SELECT +CASE _latin1'a' COLLATE latin1_general_ci WHEN _latin1'A' THEN '1' ELSE 2 END, +CASE _latin1'a' COLLATE latin1_bin WHEN _latin1'A' THEN '1' ELSE 2 END, +CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_swedish_ci THEN '1' ELSE 2 END, +CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_bin THEN '1' ELSE 2 END +; + # # COALESCE is a CASE abbrevation: # @@ -52,7 +90,6 @@ drop table t1; # # Check COALESCE argument types aggregation -SET NAMES latin1; --error 1265 CREATE TABLE t1 SELECT COALESCE(_latin1'a',_latin2'a'); --error 1265 diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 1f1b449e9a7..b73499942a3 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -892,7 +892,7 @@ Item *Item_func_case::find_item(String *str) } if ((tmp=args[i]->val_str(str))) // If not null { - if (sortcmp(tmp,first_expr_str,&my_charset_bin)==0) + if (sortcmp(tmp,first_expr_str,cmp_collation.collation)==0) return args[i+1]; } break; @@ -1027,7 +1027,7 @@ void Item_func_case::fix_length_and_dec() { agg[0]= args[first_expr_num]; for (nagg= 0; nagg < ncases/2 ; nagg++) - agg[nagg+1]= args[nagg]; + agg[nagg+1]= args[nagg*2]; nagg++; agg_cmp_type(&cmp_type, agg, nagg); if ((cmp_type == STRING_RESULT) && @@ -1040,7 +1040,6 @@ void Item_func_case::fix_length_and_dec() max_length=0; decimals=0; - cached_result_type = args[1]->result_type(); for (uint i=0 ; i < ncases ; i+=2) { set_if_bigger(max_length,args[i+1]->max_length); From c8ecb452236ce9d8dadb0b4ba1f5ff030ebe8f1b Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Fri, 18 Jul 2003 13:11:47 +0500 Subject: [PATCH 11/22] CASE optimization --- sql/item_cmpfunc.cc | 58 +++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index b73499942a3..cb7c2cb0198 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -863,58 +863,60 @@ Item *Item_func_case::find_item(String *str) String *first_expr_str,*tmp; longlong first_expr_int; double first_expr_real; - bool int_used, real_used,str_used; - int_used=real_used=str_used=0; - + /* These will be initialized later */ LINT_INIT(first_expr_str); LINT_INIT(first_expr_int); LINT_INIT(first_expr_real); + if (first_expr_num != -1) + { + switch (cmp_type) + { + case STRING_RESULT: + // We can't use 'str' here as this may be overwritten + if (!(first_expr_str= args[first_expr_num]->val_str(&str_value))) + return else_expr_num != -1 ? args[else_expr_num] : 0; // Impossible + break; + case INT_RESULT: + first_expr_int= args[first_expr_num]->val_int(); + if (args[first_expr_num]->null_value) + return else_expr_num != -1 ? args[else_expr_num] : 0; + break; + case REAL_RESULT: + first_expr_real= args[first_expr_num]->val(); + if (args[first_expr_num]->null_value) + return else_expr_num != -1 ? args[else_expr_num] : 0; + break; + case ROW_RESULT: + default: + // This case should never be choosen + DBUG_ASSERT(0); + break; + } + } + // Compare every WHEN argument with it and return the first match for (uint i=0 ; i < ncases ; i+=2) { if (first_expr_num == -1) { - // No expression between CASE and first WHEN + // No expression between CASE and the first WHEN if (args[i]->val_int()) return args[i+1]; continue; } - switch (args[i]->result_type()) { + switch (cmp_type) { case STRING_RESULT: - if (!str_used) - { - str_used=1; - // We can't use 'str' here as this may be overwritten - if (!(first_expr_str= args[first_expr_num]->val_str(&str_value))) - return else_expr_num != -1 ? args[else_expr_num] : 0; // Impossible - } if ((tmp=args[i]->val_str(str))) // If not null - { if (sortcmp(tmp,first_expr_str,cmp_collation.collation)==0) return args[i+1]; - } break; case INT_RESULT: - if (!int_used) - { - int_used=1; - first_expr_int= args[first_expr_num]->val_int(); - if (args[first_expr_num]->null_value) - return else_expr_num != -1 ? args[else_expr_num] : 0; - } if (args[i]->val_int()==first_expr_int && !args[i]->null_value) return args[i+1]; break; case REAL_RESULT: - if (!real_used) - { - real_used=1; - first_expr_real= args[first_expr_num]->val(); - if (args[first_expr_num]->null_value) - return else_expr_num != -1 ? args[else_expr_num] : 0; - } if (args[i]->val()==first_expr_real && !args[i]->null_value) return args[i+1]; break; From 0b7f817fa4e11ee4bc71cb5ac41dd40fd8175d3e Mon Sep 17 00:00:00 2001 From: "gluh@gluh.mysql.r18.ru" <> Date: Fri, 18 Jul 2003 13:28:38 +0500 Subject: [PATCH 12/22] Scrum task 425: Added --verbose option for --help --- sql/mysqld.cc | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 709ba036f7e..ef2fb78ef80 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -225,6 +225,12 @@ const char *localhost= "localhost", *delayed_user= "DELAYED"; #endif bool opt_large_files= sizeof(my_off_t) > 4; + +/* + Used with --help for detailed option +*/ +bool opt_verbose= 0; + arg_cmp_func Arg_comparator::comparator_matrix[4][2] = {{&Arg_comparator::compare_string, &Arg_comparator::compare_e_string}, {&Arg_comparator::compare_real, &Arg_comparator::compare_e_real}, @@ -3638,6 +3644,9 @@ Disable with --skip-bdb (will save memory).", #endif /* End HAVE_INNOBASE_DB */ {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"verbose", 'v', "Used with --help option for detailed help", + (gptr*) &opt_verbose, (gptr*) &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, + 0, 0}, {"init-file", OPT_INIT_FILE, "Read SQL commands from this file at startup.", (gptr*) &opt_init_file, (gptr*) &opt_init_file, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -3973,8 +3982,6 @@ replicating a LOAD DATA INFILE command.", 0, 0, 0, 0, 0, 0}, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"version", 'v', "Synonym for option -V.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, - 0, 0, 0, 0}, {"log-warnings", 'W', "Log some not critical warnings to the log file.", (gptr*) &global_system_variables.log_warnings, (gptr*) &max_system_variables.log_warnings, 0, GET_BOOL, NO_ARG, 0, 0, 0, @@ -4573,6 +4580,10 @@ and you are welcome to modify and redistribute it under the GPL license\n\ Starts the MySQL server\n"); printf("Usage: %s [OPTIONS]\n", my_progname); + if (!opt_verbose) + puts("\nFor more help options (several pages), use mysqld --verbose --help\n"); + else + { #ifdef __WIN__ puts("NT and Win32 specific options:\n\ --install Install the default service (NT)\n\ @@ -4596,7 +4607,8 @@ Starts the MySQL server\n"); puts("\n\ To see what values a running MySQL server is using, type\n\ -'mysqladmin variables' instead of 'mysqld --help'."); +'mysqladmin variables' instead of 'mysqld --verbose --help'.\n"); + } } @@ -4871,6 +4883,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), #endif #include case 'v': + usage(); + exit(0); case 'V': print_version(); exit(0); From e6cd54379e0419cf2fe4d9c43f4d1ac48735107d Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Fri, 18 Jul 2003 14:03:54 +0500 Subject: [PATCH 13/22] IN now aggregates all argument types for comparison --- mysql-test/r/func_in.result | 21 +++++++++++++++++++++ mysql-test/t/func_in.test | 8 ++++++++ sql/item_cmpfunc.cc | 7 ++++--- sql/item_cmpfunc.h | 1 + 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result index 4b15c44fdb1..a197371b345 100644 --- a/mysql-test/r/func_in.result +++ b/mysql-test/r/func_in.result @@ -143,3 +143,24 @@ select * from t1 where 'a' in (a,b,c collate latin1_bin); a b c a c c drop table t1; +select '1.0' in (1,2); +'1.0' in (1,2) +1 +select 1 in ('1.0',2); +1 in ('1.0',2) +1 +select 1 in (1,'2.0'); +1 in (1,'2.0') +1 +select 1 in ('1.0',2.0); +1 in ('1.0',2.0) +1 +select 1 in (1.0,'2.0'); +1 in (1.0,'2.0') +1 +select 1 in ('1.1',2); +1 in ('1.1',2) +0 +select 1 in ('1.1',2.0); +1 in ('1.1',2.0) +0 diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test index dca068f368a..105612bf238 100644 --- a/mysql-test/t/func_in.test +++ b/mysql-test/t/func_in.test @@ -73,3 +73,11 @@ select * from t1 where 'a' collate latin1_general_ci in (a,b,c); select * from t1 where 'a' collate latin1_bin in (a,b,c); select * from t1 where 'a' in (a,b,c collate latin1_bin); drop table t1; + +select '1.0' in (1,2); +select 1 in ('1.0',2); +select 1 in (1,'2.0'); +select 1 in ('1.0',2.0); +select 1 in (1.0,'2.0'); +select 1 in ('1.1',2); +select 1 in ('1.1',2.0); diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index cb7c2cb0198..78ec253c7a2 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1405,7 +1405,8 @@ void Item_func_in::fix_length_and_dec() Item **arg, **arg_end; uint const_itm= 1; - if ((args[0]->result_type() == STRING_RESULT) && + agg_cmp_type(&cmp_type, args, arg_count); + if ((cmp_type == STRING_RESULT) && (agg_arg_collations_for_comparison(cmp_collation, args, arg_count))) return; @@ -1418,7 +1419,7 @@ void Item_func_in::fix_length_and_dec() */ if (const_itm && !nulls_in_row()) { - switch (args[0]->result_type()) { + switch (cmp_type) { case STRING_RESULT: uint i; array=new in_string(arg_count-1,(qsort2_cmp) srtcmp_in, @@ -1452,7 +1453,7 @@ void Item_func_in::fix_length_and_dec() else { in_item= cmp_item::get_comparator(args[0]); - if (args[0]->result_type() == STRING_RESULT) + if (cmp_type == STRING_RESULT) in_item->cmp_charset= cmp_collation.collation; } maybe_null= args[0]->maybe_null; diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index a9fba76a7b8..25cc97d60bf 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -611,6 +611,7 @@ public: class Item_func_in :public Item_int_func { + Item_result cmp_type; in_vector *array; cmp_item *in_item; bool have_null; From 46813d545d39ff7cd7293f442fdf87ad3db30b7f Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Fri, 18 Jul 2003 15:50:40 +0500 Subject: [PATCH 14/22] All functions now use the same function to aggregate comparison and result types --- mysql-test/r/null.result | 2 +- sql/item_cmpfunc.cc | 89 ++++++++++++++++++---------------------- 2 files changed, 42 insertions(+), 49 deletions(-) diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index fd621d06c2b..0dd9754d0c5 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -7,7 +7,7 @@ select 1 | NULL,1 & NULL,1+NULL,1-NULL; NULL NULL NULL NULL select NULL=NULL,NULL<>NULL,IFNULL(NULL,1.1)+0,IFNULL(NULL,1) | 0; NULL=NULL NULL<>NULL IFNULL(NULL,1.1)+0 IFNULL(NULL,1) | 0 -NULL NULL 1 1 +NULL NULL 1.1 1 select strcmp("a",NULL),(1 +static Item_result item_store_type(Item_result a,Item_result b) +{ + if (a == STRING_RESULT || b == STRING_RESULT) + return STRING_RESULT; + else if (a == REAL_RESULT || b == REAL_RESULT) + return REAL_RESULT; + else + return INT_RESULT; +} + +static void agg_result_type(Item_result *type, Item **items, uint nitems) +{ + uint i; + type[0]= items[0]->result_type(); + for (i=1 ; i < nitems ; i++) + type[0]= item_store_type(type[0], items[i]->result_type()); +} + +static void agg_cmp_type(Item_result *type, Item **items, uint nitems) +{ + uint i; + type[0]= items[0]->result_type(); + for (i=1 ; i < nitems ; i++) + type[0]= item_cmp_type(type[0], items[i]->result_type()); +} + static void my_coll_agg_error(DTCollation &c1, DTCollation &c2, const char *fname) { my_error(ER_CANT_AGGREGATE_2COLLATIONS,MYF(0), @@ -556,10 +582,7 @@ void Item_func_between::fix_length_and_dec() */ if (!args[0] || !args[1] || !args[2]) return; - cmp_type=item_cmp_type(args[0]->result_type(), - item_cmp_type(args[1]->result_type(), - args[2]->result_type())); - + agg_cmp_type(&cmp_type, args, 3); if (cmp_type == STRING_RESULT && agg_arg_collations_for_comparison(cmp_collation, args, 3)) return; @@ -650,28 +673,17 @@ longlong Item_func_between::val_int() return 0; } -static Item_result item_store_type(Item_result a,Item_result b) -{ - if (a == STRING_RESULT || b == STRING_RESULT) - return STRING_RESULT; - else if (a == REAL_RESULT || b == REAL_RESULT) - return REAL_RESULT; - else - return INT_RESULT; -} - void Item_func_ifnull::fix_length_and_dec() { maybe_null=args[1]->maybe_null; max_length=max(args[0]->max_length,args[1]->max_length); decimals=max(args[0]->decimals,args[1]->decimals); - if ((cached_result_type=item_store_type(args[0]->result_type(), - args[1]->result_type())) != - REAL_RESULT) - decimals= 0; + agg_result_type(&cached_result_type, args, 2); if (cached_result_type == STRING_RESULT) agg_arg_collations(collation, args, arg_count); + else if (cached_result_type != REAL_RESULT) + decimals= 0; } @@ -744,19 +756,18 @@ Item_func_if::fix_length_and_dec() cached_result_type= arg1_type; set_charset(args[1]->charset()); } - else if (arg1_type == STRING_RESULT || arg2_type == STRING_RESULT) - { - cached_result_type = STRING_RESULT; - if (agg_arg_collations(collation, args+1, 2)) - return; - } else { - set_charset(&my_charset_bin); // Number - if (arg1_type == REAL_RESULT || arg2_type == REAL_RESULT) - cached_result_type = REAL_RESULT; + agg_result_type(&cached_result_type, args+1, 2); + if (cached_result_type == STRING_RESULT) + { + if (agg_arg_collations(collation, args+1, 2)) + return; + } else - cached_result_type=arg1_type; // Should be INT_RESULT + { + set_charset(&my_charset_bin); // Number + } } } @@ -800,7 +811,7 @@ Item_func_nullif::fix_length_and_dec() { max_length=args[0]->max_length; decimals=args[0]->decimals; - cached_result_type=args[0]->result_type(); + agg_result_type(&cached_result_type, args, 2); } } @@ -984,22 +995,6 @@ double Item_func_case::val() return res; } -static void agg_result_type(Item_result *type, Item **items, uint nitems) -{ - uint i; - type[0]= items[0]->result_type(); - for (i=1 ; i < nitems ; i++) - type[0]= item_store_type(type[0], items[i]->result_type()); -} - -static void agg_cmp_type(Item_result *type, Item **items, uint nitems) -{ - uint i; - type[0]= items[0]->result_type(); - for (i=1 ; i < nitems ; i++) - type[0]= item_cmp_type(type[0], items[i]->result_type()); -} - void Item_func_case::fix_length_and_dec() { Item **agg; @@ -1109,13 +1104,11 @@ void Item_func_coalesce::fix_length_and_dec() { max_length= 0; decimals= 0; - cached_result_type = args[0]->result_type(); + agg_result_type(&cached_result_type, args, arg_count); for (uint i=0 ; i < arg_count ; i++) { set_if_bigger(max_length,args[i]->max_length); set_if_bigger(decimals,args[i]->decimals); - cached_result_type=item_store_type(cached_result_type, - args[i]->result_type()); } if (cached_result_type == STRING_RESULT) agg_arg_collations(collation, args, arg_count); From 30eaa657a1cf67c3ab11db7a966998671ab5d0f1 Mon Sep 17 00:00:00 2001 From: "paul@ice.snake.net" <> Date: Sat, 19 Jul 2003 23:19:19 -0500 Subject: [PATCH 15/22] errmsg.txt: fix typo --- sql/share/english/errmsg.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 57336647f2a..11ae2c89019 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -179,7 +179,7 @@ "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", "Key '%-.64s' doesn't exist in table '%-.64s'", "Can't open table", -"The storage enginge for the table doesn't support %s", +"The storage engine for the table doesn't support %s", "You are not allowed to execute this command in a transaction", "Got error %d during COMMIT", "Got error %d during ROLLBACK", From 3ca302dbacc319dc4fccdc24415cf74f75bf686b Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Sun, 20 Jul 2003 12:26:18 +0200 Subject: [PATCH 16/22] bug #715: SELECT YEAR+0 FROM foobar is parsed as 'SELECT' 'YEAR' '+0' => syntax error --- mysql-test/r/bigint.result | 7 ++++-- mysql-test/r/type_decimal.result | 6 ++--- mysql-test/t/bigint.test | 2 ++ mysql-test/t/type_decimal.test | 6 ++--- mysys/charset.c | 5 ++--- sql/item.h | 2 +- sql/item_func.cc | 3 ++- sql/sql_lex.cc | 38 ++++++-------------------------- sql/sql_yacc.yy | 7 +++--- 9 files changed, 28 insertions(+), 48 deletions(-) diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index 12dc146ba2b..93214ae8479 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -1,12 +1,12 @@ drop table if exists t1; select 0,256,00000000000000065536,2147483647,-2147483648,2147483648,+4294967296; -0 256 00000000000000065536 2147483647 -2147483648 2147483648 +4294967296 +0 256 00000000000000065536 2147483647 -2147483648 2147483648 4294967296 0 256 65536 2147483647 -2147483648 2147483648 4294967296 select 9223372036854775807,-009223372036854775808; 9223372036854775807 -009223372036854775808 9223372036854775807 -9223372036854775808 select +9999999999999999999,-9999999999999999999; -+9999999999999999999 -9999999999999999999 +9999999999999999999 -9999999999999999999 9999999999999999999 -10000000000000000000 select cast(9223372036854775808 as unsigned)+1; cast(9223372036854775808 as unsigned)+1 @@ -14,6 +14,9 @@ cast(9223372036854775808 as unsigned)+1 select 9223372036854775808+1; 9223372036854775808+1 9223372036854775809 +select -(0-3),round(-(0-3)), round(9999999999999999999); +-(0-3) round(-(0-3)) round(9999999999999999999) +3 3 10000000000000000000 create table t1 (a bigint unsigned not null, primary key(a)); insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE); select * from t1; diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result index 57df0c67ac9..b31ef73742d 100644 --- a/mysql-test/r/type_decimal.result +++ b/mysql-test/r/type_decimal.result @@ -436,8 +436,8 @@ a 99999999999 drop table t1; CREATE TABLE t1 (a_dec DECIMAL(-1,0)); -ERROR 42000: Too big column length for column 'a_dec' (max = 255). Use BLOB instead +ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-1,0))' at line 1 CREATE TABLE t1 (a_dec DECIMAL(-2,1)); -ERROR 42000: Too big column length for column 'a_dec' (max = 255). Use BLOB instead +ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-2,1))' at line 1 CREATE TABLE t1 (a_dec DECIMAL(-1,1)); -ERROR 42000: Too big column length for column 'a_dec' (max = 255). Use BLOB instead +ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-1,1))' at line 1 diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test index 060d45c29a4..9ac44c8ba0a 100644 --- a/mysql-test/t/bigint.test +++ b/mysql-test/t/bigint.test @@ -13,6 +13,8 @@ select 9223372036854775807,-009223372036854775808; select +9999999999999999999,-9999999999999999999; select cast(9223372036854775808 as unsigned)+1; select 9223372036854775808+1; +select -(0-3),round(-(0-3)), round(9999999999999999999); + # # In 3.23 we have to disable the test of column to bigint as # this fails on AIX powerpc (the resolution for double is not good enough) diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test index 8653c06a644..acbc738995f 100644 --- a/mysql-test/t/type_decimal.test +++ b/mysql-test/t/type_decimal.test @@ -237,9 +237,9 @@ drop table t1; # Test of wrong decimal type # ---error 1074 +--error 1064 CREATE TABLE t1 (a_dec DECIMAL(-1,0)); ---error 1074 +--error 1064 CREATE TABLE t1 (a_dec DECIMAL(-2,1)); ---error 1074 +--error 1064 CREATE TABLE t1 (a_dec DECIMAL(-1,1)); diff --git a/mysys/charset.c b/mysys/charset.c index 7dab1a38325..7a82f8780a0 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -63,7 +63,7 @@ static void init_state_maps(CHARSET_INFO *cs) uint i; uchar *state_map= cs->state_map; uchar *ident_map= cs->ident_map; - + /* Fill state_map with states to get a faster parser */ for (i=0; i < 256 ; i++) { @@ -76,13 +76,12 @@ static void init_state_maps(CHARSET_INFO *cs) state_map[i]=(uchar) MY_LEX_IDENT; #endif else if (!my_isgraph(cs,i)) - state_map[i]=(uchar) MY_LEX_SKIP; + state_map[i]=(uchar) MY_LEX_SKIP; else state_map[i]=(uchar) MY_LEX_CHAR; } state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT; state_map[(uchar)'\'']=(uchar) MY_LEX_STRING; - state_map[(uchar)'-']=state_map[(uchar)'+']=(uchar) MY_LEX_SIGNED_NUMBER; state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT; state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP; state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP; diff --git a/sql/item.h b/sql/item.h index 57061221878..450cb396787 100644 --- a/sql/item.h +++ b/sql/item.h @@ -374,7 +374,7 @@ public: Item_uint(const char *str_arg, uint length) : Item_int(str_arg, (longlong) strtoull(str_arg,(char**) 0,10), length) {} Item_uint(uint32 i) :Item_int((longlong) i, 10) {} - double val() { return ulonglong2double(value); } + double val() { return ulonglong2double((ulonglong)value); } String *val_str(String*); Item *new_item() { return new Item_uint(name,max_length); } bool fix_fields(THD *thd, struct st_table_list *list, Item **item) diff --git a/sql/item_func.cc b/sql/item_func.cc index ea3c3980a50..9ecc062d645 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -597,7 +597,8 @@ void Item_func_neg::fix_length_and_dec() { decimals=args[0]->decimals; max_length=args[0]->max_length; - hybrid_type= args[0]->result_type() == INT_RESULT ? INT_RESULT : REAL_RESULT; + hybrid_type= args[0]->result_type() == INT_RESULT && !args[0]->unsigned_flag ? + INT_RESULT : REAL_RESULT; } double Item_func_abs::val() diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 425890ab446..16ebd758639 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -455,6 +455,13 @@ int yylex(void *arg, void *yythd) } case MY_LEX_CHAR: // Unknown or single char token case MY_LEX_SKIP: // This should not happen + if (c == '-' && yyPeek() == '-' && + (my_isspace(cs,yyPeek2()) || + my_iscntrl(cs,yyPeek2()))) + { + state=MY_LEX_COMMENT; + break; + } yylval->lex_str.str=(char*) (lex->ptr=lex->tok_start);// Set to first chr yylval->lex_str.length=1; c=yyGet(); @@ -694,37 +701,6 @@ int yylex(void *arg, void *yythd) lex->next_state= MY_LEX_START; return(IDENT); } - case MY_LEX_SIGNED_NUMBER: // Incomplete signed number - if (prev_state == MY_LEX_OPERATOR_OR_IDENT) - { - if (c == '-' && yyPeek() == '-' && - (my_isspace(cs,yyPeek2()) || - my_iscntrl(cs,yyPeek2()))) - state=MY_LEX_COMMENT; - else - state= MY_LEX_CHAR; // Must be operator - break; - } - if (!my_isdigit(cs,c=yyGet()) || yyPeek() == 'x') - { - if (c != '.') - { - if (c == '-' && my_isspace(cs,yyPeek())) - state= MY_LEX_COMMENT; - else - state= MY_LEX_CHAR; // Return sign as single char - break; - } - yyUnget(); // Fix for next loop - } - while (my_isdigit(cs,c=yyGet())) ; // Incomplete real or int number - if ((c == 'e' || c == 'E') && - (yyPeek() == '+' || yyPeek() == '-' || my_isdigit(cs,yyPeek()))) - { // Real number - yyUnget(); - c= '.'; // Fool next test - } - // fall through case MY_LEX_INT_OR_REAL: // Compleat int or incompleat real if (c != '.') { // Found complete integer number. diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index ba0489c7585..709181af7fa 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -2294,7 +2294,8 @@ simple_expr: YYABORT; } | sum_expr - | '-' expr %prec NEG { $$= new Item_func_neg($2); } + | '+' expr %prec NEG { $$= $2; } + | '-' expr %prec NEG { $$= new Item_func_neg($2); } | '~' expr %prec NEG { $$= new Item_func_bit_neg($2); } | NOT expr %prec NEG { $$= new Item_func_not($2); } | '!' expr %prec NEG { $$= new Item_func_not($2); } @@ -4138,7 +4139,7 @@ literal: Lex->next_state=MY_LEX_OPERATOR_OR_IDENT;} | HEX_NUM { $$ = new Item_varbinary($1.str,$1.length);} | UNDERSCORE_CHARSET HEX_NUM - { + { Item *tmp= new Item_varbinary($2.str,$2.length); String *str= tmp ? tmp->val_str((String*) 0) : (String*) 0; $$ = new Item_string(str ? str->ptr() : "", str ? str->length() : 0, @@ -4310,8 +4311,6 @@ ident: LEX *lex= Lex; $$.str= lex->thd->strmake($1.str,$1.length); $$.length=$1.length; - if (lex->next_state != MY_LEX_END) - lex->next_state= MY_LEX_OPERATOR_OR_IDENT; } ; From 2ddef9fcf8834d964bd36437df5f8d70338a21ec Mon Sep 17 00:00:00 2001 From: "paul@ice.snake.net" <> Date: Sun, 20 Jul 2003 07:00:00 -0500 Subject: [PATCH 17/22] Fix test results affected by error message edit. --- mysql-test/r/bdb.result | 2 +- mysql-test/r/innodb.result | 6 +++--- mysql-test/r/isam.result | 6 +++--- mysql-test/r/repair_part1.result | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index b0566011996..fd2f7b7e49b 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -203,7 +203,7 @@ a 2 check table t1; Table Op Msg_type Msg_text -test.t1 check error The storage enginge for the table doesn't support check +test.t1 check error The storage engine for the table doesn't support check drop table t1; create table t1 (a int,b varchar(20)) type=bdb; insert into t1 values (1,""), (2,"testing"); diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 4d5a6094ec3..f80f9644e5a 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -156,7 +156,7 @@ level id parent_id 1 1007 101 optimize table t1; Table Op Msg_type Msg_text -test.t1 optimize error The storage enginge for the table doesn't support optimize +test.t1 optimize error The storage engine for the table doesn't support optimize show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 0 PRIMARY 1 id A # NULL NULL BTREE @@ -180,7 +180,7 @@ create table t1 (a int) type=innodb; insert into t1 values (1), (2); optimize table t1; Table Op Msg_type Msg_text -test.t1 optimize error The storage enginge for the table doesn't support optimize +test.t1 optimize error The storage engine for the table doesn't support optimize delete from t1 where a = 1; select * from t1; a @@ -712,7 +712,7 @@ world 2 hello 1 optimize table t1; Table Op Msg_type Msg_text -test.t1 optimize error The storage enginge for the table doesn't support optimize +test.t1 optimize error The storage engine for the table doesn't support optimize show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 0 PRIMARY 1 a A 2 NULL NULL BTREE diff --git a/mysql-test/r/isam.result b/mysql-test/r/isam.result index 5ac54668443..b83185b0c01 100644 --- a/mysql-test/r/isam.result +++ b/mysql-test/r/isam.result @@ -57,14 +57,14 @@ test.t1 optimize status OK check table t1,t2; Table Op Msg_type Msg_text test.t1 check status OK -test.t2 check error The storage enginge for the table doesn't support check +test.t2 check error The storage engine for the table doesn't support check repair table t1,t2; Table Op Msg_type Msg_text test.t1 repair status OK -test.t2 repair error The storage enginge for the table doesn't support repair +test.t2 repair error The storage engine for the table doesn't support repair check table t2,t1; Table Op Msg_type Msg_text -test.t2 check error The storage enginge for the table doesn't support check +test.t2 check error The storage engine for the table doesn't support check test.t1 check status OK lock tables t1 write; check table t2,t1; diff --git a/mysql-test/r/repair_part1.result b/mysql-test/r/repair_part1.result index eb46622dcc1..27dfdac24f0 100644 --- a/mysql-test/r/repair_part1.result +++ b/mysql-test/r/repair_part1.result @@ -7,7 +7,7 @@ test.t1 repair status OK alter table t1 TYPE=HEAP; repair table t1 use_frm; Table Op Msg_type Msg_text -test.t1 repair error The storage enginge for the table doesn't support repair +test.t1 repair error The storage engine for the table doesn't support repair drop table t1; repair table t1 use_frm; Table Op Msg_type Msg_text From 44f656708b13cd28fe43434236ed566232513b40 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Mon, 21 Jul 2003 00:32:35 +0200 Subject: [PATCH 18/22] absurd (and syntaxically incorrect) column definition corrected --- mysql-test/r/innodb.result | 2 +- mysql-test/t/innodb.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 4d5a6094ec3..07ae9ed7520 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1289,7 +1289,7 @@ a b 111 100 drop table t1; CREATE TABLE t1 (col1 int(1))TYPE=InnoDB; -CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP(+0),INDEX stamp_idx +CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx (stamp))TYPE=InnoDB; insert into t1 values (1),(2),(3); insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ); diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 17df79a69fa..635a15baa41 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -868,7 +868,7 @@ drop table t1; CREATE TABLE t1 (col1 int(1))TYPE=InnoDB; -CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP(+0),INDEX stamp_idx +CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx (stamp))TYPE=InnoDB; insert into t1 values (1),(2),(3); insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ); From bc7cf3033885e91812688a9c9248d8a7acdea211 Mon Sep 17 00:00:00 2001 From: "venu@myvenu.com" <> Date: Mon, 21 Jul 2003 00:13:22 -0700 Subject: [PATCH 19/22] Enable warnings by default for single value list inserts also when the client protocol is >= 4.1 --- INSTALL-WIN-SOURCE | 2 +- mysql-test/r/warnings.result | 3 ++ mysql-test/t/warnings.test | 1 + sql/sql_insert.cc | 4 +- tests/client_test.c | 91 ++++++++++++++++++++++++++++++++++-- 5 files changed, 95 insertions(+), 6 deletions(-) diff --git a/INSTALL-WIN-SOURCE b/INSTALL-WIN-SOURCE index bce093633f5..78a8f0e5d5a 100755 --- a/INSTALL-WIN-SOURCE +++ b/INSTALL-WIN-SOURCE @@ -92,7 +92,7 @@ To build the latest Windows source package from the current BitKeeper source tree, use the following instructions. Please note that this procedure must be performed on a system running a Unix or Unix-like operating system. (The procedure -is know to work well on Linux, for example. +is know to work well on Linux), for example. - Clone the BitKeeper source tree for MySQL (version 4.1 or above, as desired). For more information how to clone diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index d84c284d7b4..4e526d85d90 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -90,6 +90,9 @@ Warning 1263 Data truncated for column 'b' at row 2 Warning 1263 Data truncated for column 'b' at row 3 Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 4 Warning 1263 Data truncated for column 'b' at row 4 +insert into t2(b) values('mysqlab'); +Warnings: +Warning 1263 Data truncated for column 'b' at row 1 drop table t1, t2; create table t1(a char(10)); alter table t1 add b char; diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test index 6374fbf83ac..6991f9d9b2f 100644 --- a/mysql-test/t/warnings.test +++ b/mysql-test/t/warnings.test @@ -51,6 +51,7 @@ update t1 set c='mysql ab' where c='test'; update t1 set d=c; create table t2(a tinyint NOT NULL, b char(3)); insert into t2 select b,c from t1; +insert into t2(b) values('mysqlab'); drop table t1, t2; # diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 947205949f1..e2a7c517688 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -231,7 +231,9 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, info.update_fields=&update_fields; info.update_values=&update_values; // Don't count warnings for simple inserts - if (values_list.elements > 1 || (thd->options & OPTION_WARNINGS)) + if ((thd->client_capabilities & CLIENT_PROTOCOL_41) || + values_list.elements > 1 || + (thd->options & OPTION_WARNINGS)) thd->count_cuted_fields = 1; thd->cuted_fields = 0L; table->next_number_field=table->found_next_number_field; diff --git a/tests/client_test.c b/tests/client_test.c index 2741da1bbba..6ee7487ac45 100644 --- a/tests/client_test.c +++ b/tests/client_test.c @@ -176,7 +176,7 @@ static void client_connect() int rc; myheader_r("client_connect"); - fprintf(stdout, "\n Establishing a connection ..."); + fprintf(stdout, "\n Establishing a connection to '%s' ...", opt_host); if (!(mysql = mysql_init(NULL))) { @@ -3729,7 +3729,7 @@ static void test_stmt_close() fprintf(stdout, "\n Establishing a test connection ..."); if (!(lmysql = mysql_init(NULL))) { - myerror("mysql_init() failed"); + myerror("mysql_init() failed"); exit(0); } if (!(mysql_real_connect(lmysql,opt_host,opt_user, @@ -6071,7 +6071,7 @@ static void test_prepare_grant() fprintf(stdout, "\n Establishing a test connection ..."); if (!(lmysql = mysql_init(NULL))) { - myerror("mysql_init() failed"); + myerror("mysql_init() failed"); exit(0); } if (!(mysql_real_connect(lmysql,opt_host,"test_grant", @@ -6460,7 +6460,7 @@ static void test_drop_temp() fprintf(stdout, "\n Establishing a test connection ..."); if (!(lmysql = mysql_init(NULL))) { - myerror("mysql_init() failed"); + myerror("mysql_init() failed"); exit(0); } @@ -7160,6 +7160,11 @@ static void test_mem_overun() rc = mysql_real_query(mysql, buffer, length); myquery(rc); + + rc = mysql_query(mysql,"select * from t_mem_overun"); + myquery(rc); + + myassert(1 == my_process_result(mysql)); stmt = mysql_prepare(mysql, "select * from t_mem_overun",30); mystmt_init(stmt); @@ -7456,6 +7461,83 @@ static void test_sqlmode() mysql_stmt_close(stmt); } +/* + test for timestamp handling +*/ +static void test_ts() +{ + MYSQL_STMT *stmt; + MYSQL_BIND bind[2]; + MYSQL_TIME ts; + char strts[30]; + long length; + int rc; + + myheader("test_ts"); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_ts"); + myquery(rc); + + rc= mysql_query(mysql,"CREATE TABLE test_ts(a TIMESTAMP)"); + myquery(rc); + + rc = mysql_commit(mysql); + myquery(rc); + + stmt = mysql_prepare(mysql,"INSERT INTO test_ts VALUES(?),(?)",40); + mystmt_init(stmt); + + ts.year= 2003; + ts.month= 07; + ts.day= 12; + ts.hour= 21; + ts.minute= 07; + ts.second= 46; + length= (long)(strmov(strts,"2003-07-12 21:07:46") - strts); + + bind[0].buffer_type= MYSQL_TYPE_STRING; + bind[0].buffer= (char *)strts; + bind[0].buffer_length= sizeof(strts); + bind[0].is_null= 0; + bind[0].length= &length; + + bind[1].buffer_type= MYSQL_TYPE_TIMESTAMP; + bind[1].buffer= (char *)&ts; + bind[1].buffer_length= sizeof(ts); + bind[1].is_null= 0; + bind[1].length= 0; + + rc = mysql_bind_param(stmt, bind); + mystmt(stmt,rc); + + rc = mysql_execute(stmt); + mystmt(stmt,rc); + + mysql_stmt_close(stmt); + + verify_col_data("test_ts","a","2003-07-12 21:07:46"); + + stmt = mysql_prepare(mysql,"SELECT a FROM test_ts WHERE a >= ?",50); + mystmt_init(stmt); + + rc = mysql_bind_param(stmt, bind); + mystmt(stmt,rc); + + rc = mysql_execute(stmt); + mystmt(stmt,rc); + + rc = mysql_fetch(stmt); + mystmt(stmt,rc); + + rc = mysql_fetch(stmt); + mystmt(stmt,rc); + + rc = mysql_fetch(stmt); + myassert(rc == MYSQL_NO_DATA); + + mysql_stmt_close(stmt); +} + /* Read and parse arguments and MySQL options from my.cnf @@ -7703,6 +7785,7 @@ int main(int argc, char **argv) test_fetch_offset(); /* to test mysql_fetch_column with offset */ test_fetch_column(); /* to test mysql_fetch_column */ test_sqlmode(); /* test for SQL_MODE */ + test_ts(); /* test for timestamp BR#819 */ end_time= time((time_t *)0); total_time+= difftime(end_time, start_time); From 0440e70a96a774a1c484c49939e1b7ef1ab87df5 Mon Sep 17 00:00:00 2001 From: "venu@hundin.mysql.fi" <> Date: Mon, 21 Jul 2003 19:37:18 +0300 Subject: [PATCH 20/22] undo one row warning instead use sql_warnings=1 --- mysql-test/r/warnings.result | 3 +++ mysql-test/t/warnings.test | 3 +++ sql/sql_insert.cc | 4 +--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index 4e526d85d90..0ad165a861a 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -91,8 +91,11 @@ Warning 1263 Data truncated for column 'b' at row 3 Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 4 Warning 1263 Data truncated for column 'b' at row 4 insert into t2(b) values('mysqlab'); +set sql_warnings=1; +insert into t2(b) values('mysqlab'); Warnings: Warning 1263 Data truncated for column 'b' at row 1 +set sql_warnings=0; drop table t1, t2; create table t1(a char(10)); alter table t1 add b char; diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test index 6991f9d9b2f..41aa02e925f 100644 --- a/mysql-test/t/warnings.test +++ b/mysql-test/t/warnings.test @@ -52,6 +52,9 @@ update t1 set d=c; create table t2(a tinyint NOT NULL, b char(3)); insert into t2 select b,c from t1; insert into t2(b) values('mysqlab'); +set sql_warnings=1; +insert into t2(b) values('mysqlab'); +set sql_warnings=0; drop table t1, t2; # diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index e2a7c517688..947205949f1 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -231,9 +231,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, info.update_fields=&update_fields; info.update_values=&update_values; // Don't count warnings for simple inserts - if ((thd->client_capabilities & CLIENT_PROTOCOL_41) || - values_list.elements > 1 || - (thd->options & OPTION_WARNINGS)) + if (values_list.elements > 1 || (thd->options & OPTION_WARNINGS)) thd->count_cuted_fields = 1; thd->cuted_fields = 0L; table->next_number_field=table->found_next_number_field; From 43cc5a343192d1eabcebd87abe4021afca72ebe7 Mon Sep 17 00:00:00 2001 From: "paul@teton.kitebird.com" <> Date: Mon, 21 Jul 2003 12:23:41 -0500 Subject: [PATCH 21/22] INSTALL-WIN-SOURCE: tweak --- INSTALL-WIN-SOURCE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL-WIN-SOURCE b/INSTALL-WIN-SOURCE index 78a8f0e5d5a..969eb91f5b1 100755 --- a/INSTALL-WIN-SOURCE +++ b/INSTALL-WIN-SOURCE @@ -92,7 +92,7 @@ To build the latest Windows source package from the current BitKeeper source tree, use the following instructions. Please note that this procedure must be performed on a system running a Unix or Unix-like operating system. (The procedure -is know to work well on Linux), for example. +is known to work well on Linux, for example.) - Clone the BitKeeper source tree for MySQL (version 4.1 or above, as desired). For more information how to clone From 52e043fd44bba290a7a8fea94a9baff887263211 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Mon, 21 Jul 2003 21:13:52 +0200 Subject: [PATCH 22/22] gen_lex_hash sigsegv fixed --- sql/gen_lex_hash.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc index 1c6f124aac7..ae46bcc9ea5 100644 --- a/sql/gen_lex_hash.cc +++ b/sql/gen_lex_hash.cc @@ -89,6 +89,7 @@ static struct my_option my_long_options[] = 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"version", 'V', "Output version information and exit", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; struct hash_lex_struct @@ -101,8 +102,8 @@ struct hash_lex_struct }; int ithis; }; - -hash_lex_struct *get_hash_struct_by_len(hash_lex_struct **root_by_len, + +hash_lex_struct *get_hash_struct_by_len(hash_lex_struct **root_by_len, int len, int *max_len) { if (*max_len