From 13fea36d03529eefceadaa16b8a9d1faf3802eed Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 31 Aug 2007 15:24:43 -0400 Subject: Bug#15776: 32-bit signed int used for length of blob Based on contributed patch from Martin Friebe, CLA from 2007-02-24. The parser lacked support for field sizes after signed long, when it should extend to 2**32-1. Now, we correct that limitation, and also make the error handling consistent for casts. mysql-test/r/type_blob.result: Verify that blobs may be created with the size that is already documented. Additionally, test the limits of several other types. mysql-test/t/type_blob.test: Verify that blobs may be created with the size that is already documented. Additionally, test the limits of several other types. sql/field.cc: atoi() insufficient to gauge the length of some fields. Change it to strtoul(). sql/item_create.cc: atoi() insufficient to gauge the length of some fields. Change it to strtoul(). If a casted length is too long, raise an error. sql/share/errmsg.txt: Change ER_TOO_BIG_FIELDLENGTH so that it can accept sizes larger than 2**15 -- instead, 2**32. sql/sql_yacc.yy: Make lengths take, in addition to NUM, LONG_NUM, ULONGLONG_NUM, and DECIMAL_NUM. sql/unireg.h: Define new constant. --- sql/share/errmsg.txt | 60 ++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'sql/share') diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index a52ffa8216c..80ed9c788cc 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -1771,30 +1771,30 @@ ER_BLOB_USED_AS_KEY 42000 S1009 swe "En BLOB '%-.64s' kan inte vara nyckel med den anvnda tabelltypen" ukr "BLOB '%-.64s' Φ Ц æ" ER_TOO_BIG_FIELDLENGTH 42000 S1009 - cze "P-Bli velk dlka sloupce '%-.64s' (nejvce %d). Pouijte BLOB" - dan "For stor feltlngde for kolonne '%-.64s' (maks = %d). Brug BLOB i stedet" - nla "Te grote kolomlengte voor '%-.64s' (max = %d). Maak hiervoor gebruik van het type BLOB" - eng "Column length too big for column '%-.64s' (max = %d); use BLOB or TEXT instead" - jps "column '%-.64s' ,mۂ column ̑傫܂. (ő %d ܂). BLOB ɎgpĂ.", - est "Tulba '%-.64s' pikkus on liiga pikk (maksimaalne pikkus: %d). Kasuta BLOB vljatpi" - fre "Champ '%-.64s' trop long (max = %d). Utilisez un BLOB" - ger "Feldlnge fr Feld '%-.64s' zu gro (maximal %d). BLOB- oder TEXT-Spaltentyp verwenden!" - greek " '%-.64s' (max = %d). BLOB" - hun "A(z) '%-.64s' oszlop tul hosszu. (maximum = %d). Hasznaljon BLOB tipust inkabb." - ita "La colonna '%-.64s' e` troppo grande (max=%d). Utilizza un BLOB." - jpn "column '%-.64s' ,ݤ column 礭¿ޤ. ( %d ޤ). BLOB 򤫤˻ѤƤ." - kor "Į '%-.64s' Į ̰ ʹ ϴ (ִ = %d). ſ BLOB ϼ." - nor "For stor nkkellengde for kolonne '%-.64s' (maks = %d). Bruk BLOB istedenfor" - norwegian-ny "For stor nykkellengde for felt '%-.64s' (maks = %d). Bruk BLOB istadenfor" - pol "Zbyt dua dugo? kolumny '%-.64s' (maks. = %d). W zamian uyj typu BLOB" - por "Comprimento da coluna '%-.64s' grande demais (max = %d); use BLOB em seu lugar" - rum "Lungimea coloanei '%-.64s' este prea lunga (maximum = %d). Foloseste BLOB mai bine" - rus " '%-.64s' ( = %d). BLOB TEXT " - serbian "Previe podataka za kolonu '%-.64s' (maksimum je %d). Upotrebite BLOB polje" - slo "Prli vek dka pre pole '%-.64s' (maximum = %d). Pouite BLOB" - spa "Longitud de columna demasiado grande para la columna '%-.64s' (maximo = %d).Usar BLOB en su lugar" - swe "Fr stor kolumnlngd angiven fr '%-.64s' (max= %d). Anvnd en BLOB instllet" - ukr " '%-.64s' (max = %d). BLOB" + cze "P-Bli velk dlka sloupce '%-.64s' (nejvce %lu). Pouijte BLOB" + dan "For stor feltlngde for kolonne '%-.64s' (maks = %lu). Brug BLOB i stedet" + nla "Te grote kolomlengte voor '%-.64s' (max = %lu). Maak hiervoor gebruik van het type BLOB" + eng "Column length too big for column '%-.64s' (max = %lu); use BLOB or TEXT instead" + jps "column '%-.64s' ,mۂ column ̑傫܂. (ő %lu ܂). BLOB ɎgpĂ.", + est "Tulba '%-.64s' pikkus on liiga pikk (maksimaalne pikkus: %lu). Kasuta BLOB vljatpi" + fre "Champ '%-.64s' trop long (max = %lu). Utilisez un BLOB" + ger "Feldlnge fr Feld '%-.64s' zu gro (maximal %lu). BLOB- oder TEXT-Spaltentyp verwenden!" + greek " '%-.64s' (max = %lu). BLOB" + hun "A(z) '%-.64s' oszlop tul hosszu. (maximum = %lu). Hasznaljon BLOB tipust inkabb." + ita "La colonna '%-.64s' e` troppo grande (max=%lu). Utilizza un BLOB." + jpn "column '%-.64s' ,ݤ column 礭¿ޤ. ( %lu ޤ). BLOB 򤫤˻ѤƤ." + kor "Į '%-.64s' Į ̰ ʹ ϴ (ִ = %lu). ſ BLOB ϼ." + nor "For stor nkkellengde for kolonne '%-.64s' (maks = %lu). Bruk BLOB istedenfor" + norwegian-ny "For stor nykkellengde for felt '%-.64s' (maks = %lu). Bruk BLOB istadenfor" + pol "Zbyt dua dugo? kolumny '%-.64s' (maks. = %lu). W zamian uyj typu BLOB" + por "Comprimento da coluna '%-.64s' grande demais (max = %lu); use BLOB em seu lugar" + rum "Lungimea coloanei '%-.64s' este prea lunga (maximum = %lu). Foloseste BLOB mai bine" + rus " '%-.64s' ( = %lu). BLOB TEXT " + serbian "Previe podataka za kolonu '%-.64s' (maksimum je %lu). Upotrebite BLOB polje" + slo "Prli vek dka pre pole '%-.64s' (maximum = %lu). Pouite BLOB" + spa "Longitud de columna demasiado grande para la columna '%-.64s' (maximo = %lu).Usar BLOB en su lugar" + swe "Fr stor kolumnlngd angiven fr '%-.64s' (max= %lu). Anvnd en BLOB instllet" + ukr " '%-.64s' (max = %lu). BLOB" ER_WRONG_AUTO_KEY 42000 S1009 cze "M-Bete mt pouze jedno AUTO pole a to mus bt definovno jako kl" dan "Der kan kun specificeres eet AUTO_INCREMENT-felt, og det skal vre indekseret" @@ -5508,11 +5508,11 @@ ER_SP_NO_RECURSION eng "Recursive stored functions and triggers are not allowed." ger "Rekursive gespeicherte Routinen und Triggers sind nicht erlaubt" ER_TOO_BIG_SCALE 42000 S1009 - eng "Too big scale %d specified for column '%-.64s'. Maximum is %d." - ger "Zu groer Skalierungsfaktor %d fr Feld '%-.64s' angegeben. Maximum ist %d" + eng "Too big scale %lu specified for column '%-.64s'. Maximum is %d." + ger "Zu groer Skalierungsfaktor %lu fr Feld '%-.64s' angegeben. Maximum ist %d" ER_TOO_BIG_PRECISION 42000 S1009 - eng "Too big precision %d specified for column '%-.64s'. Maximum is %d." - ger "Zu groe Genauigkeit %d fr Feld '%-.64s' angegeben. Maximum ist %d" + eng "Too big precision %lu specified for column '%-.64s'. Maximum is %lu." + ger "Zu groe Genauigkeit %lu fr Feld '%-.64s' angegeben. Maximum ist %lu" ER_M_BIGGER_THAN_D 42000 S1009 eng "For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%-.64s')." ger "Fr FLOAT(M,D), DOUBLE(M,D) oder DECIMAL(M,D) muss M >= D sein (Feld '%-.64s')" @@ -5550,8 +5550,8 @@ ER_WARN_CANT_DROP_DEFAULT_KEYCACHE eng "Cannot drop default keycache" ger "Der vorgabemige Schlssel-Cache kann nicht gelscht werden" ER_TOO_BIG_DISPLAYWIDTH 42000 S1009 - eng "Display width out of range for column '%-.64s' (max = %d)" - ger "Anzeigebreite auerhalb des zulssigen Bereichs fr Spalte '%-.64s' (Maximum: %d)" + eng "Display width out of range for column '%-.64s' (max = %lu)" + ger "Anzeigebreite auerhalb des zulssigen Bereichs fr Spalte '%-.64s' (Maximum: %lu)" ER_XAER_DUPID XAE08 eng "XAER_DUPID: The XID already exists" ger "XAER_DUPID: Die XID existiert bereits" -- cgit v1.2.1