Commit graph

371 commits

Author SHA1 Message Date
bar@mysql.com
f206a123a1 Bug#15581: COALESCE function truncates mutli-byte TINYTEXT values
field.cc:
  BLOB variations have number-in-bytes limit,
  unlike CHAR/VARCHAR which have number-of-characters limits.
  A tinyblob column can store up to 255 bytes.
  In the case of basic Latin letters (which use 1 byte per character)
  we can store up to 255 characters in a tinyblob column.
  When passing an utf8 tinyblob column as an argument into
  a function (e.g. COALESCE) we need to reserve 3*255 bytes.
  I.e. multiply length in bytes to mbcharlen for the character set.
  Although in reality a tinyblob column can never be 3*255 bytes long,
  we need to set max_length to multiply to make fix_length_and_dec()
  of the function-caller (e.g. COALESCE) calculate the correct max_length
  for the column being created.

ctype_utf8.result, ctype_utf8.test:
  Adding test case.
2005-12-19 15:52:10 +04:00
hf@deer.(none)
5150bd8f9f Merge bk@192.168.21.1:/usr/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.12839
2005-10-31 12:24:43 +04:00
hf@deer.(none)
16c66d49ca Additional fix for #12839 2005-10-31 12:05:27 +04:00
sergefp@mysql.com
2219ada7f6 BUG#14139: When handling "CREATE TABLE(field_X type_spec,...) SELECT smth AS field_X, ...."
avoid multiplying length of field_X by charset->mbmaxlen twice when calculating space 
required for field_X in the new table.
2005-10-26 00:56:17 +04:00
hf@deer.(none)
12068b45e8 Fix for bug #12839 (Endian support is absurd) 2005-09-21 14:35:01 +05:00
monty@mysql.com
987edeaa9b Fixed compiler warnings 2005-07-28 21:25:05 +03:00
konstantin@mysql.com
62b8e6fdd1 A fix and a test case for Bug#9735.
No separate typecode for MEDIUMTEXT/LONGTEXT is added, as we
have no sound decision yet what typecodes and for what types are
sent by the server (aka what constitutes a distinct type in MySQL).
2005-07-14 15:13:23 +04:00
igor@rurik.mysql.com
42bb0eaf9f Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into rurik.mysql.com:/home/igor/mysql-4.1
2005-06-28 03:20:00 -07:00
igor@rurik.mysql.com
c73c2af614 func_str.result, func_str.test:
Added a test case for bug #10124.
sql_select.h, item_subselect.cc, sql_select.cc:
  Fixed bug #10124.
  The copy method of the store_key classes can return
  STORE_KEY_OK=0, STORE_KEY_FATAL=1, STORE_KEY_CONV=2 now.
field.cc:
  Fixed bug #10124.
  When ussuing a warning the store methods return 2 instead of 1 now.
2005-06-23 06:15:50 -07:00
monty@mishka.local
1524cd001d Cleanup during review of new code
Fixed wrong allocation that could cause buffer overrun when using join cache
2005-06-21 18:18:58 +03:00
serg@serg.mylan
6a5349028c a compiler must see '#pragma implementation' *before*
'#pragma interface' (that comes with the #include'd header file)
2005-06-05 19:38:52 +02:00
monty@mysql.com
29fd1f2fd9 Move USE_PRAGMA_IMPLEMENTATION to proper place
Ensure that 'null_value' is not accessed before val() is called in FIELD() functions
Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys
Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable
2005-06-03 23:46:03 +03:00
bar@mysql.com
1002a9416b ctype_utf8.result, ctype_utf8.test:
adding test
field.cc:
  bug#10714 Inserting double value into utf8 column crashes server:
  sprintf was executed with too big length, which caused
  crash on some Windows platforms.
2005-06-03 09:37:53 +05:00
kent@mysql.com
bd48eed988 tztime.cc:
Set #pragma implementation" earlier
Many files:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
2005-06-02 02:43:32 +02:00
msvensson@neptunus.(none)
83d430353e Add ifdefs to control when "#pragma implementation" should be used
Added some more ifdefs for "#pragma interface"
2005-05-26 12:09:14 +02:00
bar@mysql.com
1c46a02069 Minor clean-ups for the previous commit. 2005-04-06 15:12:44 +05:00
bar@mysql.com
0134a2b286 Adding a new parameter for well_formed_length to
return error. We'll use it for better warnign reporting.
2005-04-06 11:53:15 +05:00
bell@sanja.is.com.ua
4554b1f263 fixed union types merging and table related metadata (BUG#8824) 2005-03-23 08:36:48 +02:00
monty@mysql.com
22a76c1dfb Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2005-02-22 12:51:54 +02:00
monty@mysql.com
e2dc9b4099 Backport my_strntod() from 5.0
Change string->float conversion to delay division as long as possible.
This gives us more exact integer->float conversion for numbers of type '123.45E+02' (Bug #7740)
2005-02-22 12:51:23 +02:00
bar@mysql.com
c709ad87db field.cc:
optimize test_if_minus() when not UCS2 support is compiled.
2005-02-22 08:35:15 +04:00
bar@mysql.com
9ba7392306 Bug#8235 Connection collation change & table create with default result in crash 2005-02-12 16:27:22 +04:00
jimw@mysql.com
b509f2b373 Merge mysql.com:/home/jimw/my/mysql-4.1-6067
into mysql.com:/home/jimw/my/mysql-4.1-clean
2005-02-04 10:39:13 -08:00
gluh@gluh.mysql.r18.ru
34915f7a91 A fix: bug#6931: Date Type column problem when using UNION-Table
bug#7833:  Wrong datatype of aggregate column is returned
2005-02-04 15:31:36 +03:00
jimw@mysql.com
891e8d076c Fix value of YEAR field when set from a non-numeric string. (Bug #6067) 2005-02-01 15:08:31 -08:00
jimw@mysql.com
7639e5afaf Merge jwinstead2@wwwtst1.mysql.com:mysql-4.1-7774
into mysql.com:/home/jimw/my/mysql-4.1-clean
2005-01-13 09:07:21 -08:00
bar@mysql.com
e3d6e6736b bug#7284: strnxfrm returns different results for equal strings 2005-01-13 18:12:04 +04:00
jimw@mysql.com
0a3fba7f18 Small fix for Field_str::store() to avoid trying to read past beginning
of log_10 array.
2005-01-13 00:52:19 +01:00
jimw@mysql.com
51781b0bfc Fix conversion of floating point values to character fields when the
absolute value of the float is less than 1, and also fix calculation of
length for negative values. (Bug #7774)
2005-01-13 00:41:45 +01:00
jimw@mysql.com
c2eb3bf9f6 Correctly truncate integers inserted into field and double columns
with a number of decimals specified. (Bug #7361)
2005-01-07 17:44:18 +01:00
gluh@gluh.mysql.r18.ru
f2fa6fd343 merge 2004-12-07 13:56:48 +03:00
bar@mysql.com
248a968581 UCS2 support in ENUM and SET, which also fixes:
Bug #5174 SHOW CREATE TABLE hangs up if the table contains half-with katakana enum values
UCS2 values are stored in HEX encoding in FRM file
2004-12-06 20:45:32 +04:00
bar@mysql.com
8878c58fe2 Fixed thar proper charset was not set in Field_set::val_str() 2004-12-06 16:22:51 +04:00
monty@mysql.com
985400e0f5 merge (new code fixed the ALTER TABLE problem) 2004-12-02 15:14:01 +02:00
monty@mysql.com
55cc515c8f merged on pull 2004-12-02 14:47:14 +02:00
monty@mysql.com
d1a666d59a Cleanups during review stage
Added auto-correct of field length for enum/set tables for ALTER TABLE
This is becasue of a bug in previous MySQL 4.1 versions where the length for enum/set was set incorrectly after ALTER TABLE
2004-12-02 14:43:51 +02:00
ram@gw.mysql.r18.ru
c15b45df50 Portability fix. Why not to use UINT_MAX32 here? 2004-11-30 15:10:48 +04:00
dlenev@mysql.com
cb7e272e46 Manual merge of fix for bug #6266 "Invalid DATETIME value is not handled
properly" with main tree.
2004-11-19 18:35:36 +03:00
dlenev@brandersnatch.localdomain
b02f5aa692 Fix for bug #6266 "Invalid DATETIME value is not handled properly".
In server we assume that datetime values stored in MYSQL_TIME struct
are normalized (and year is not greater than 9999), so we should 
perform range checks in all places then we convert something to
MYSQL_TIME.
2004-11-15 15:44:29 +03:00
monty@mysql.com
c724163e14 Fix to allow usage of 4.0 tables with 4.1 2004-11-12 19:01:49 +02:00
monty@mysql.com
c7e85ef9b9 More debugging
Print position in normal log for Binlog dump
2004-11-10 18:07:39 +02:00
gluh@gluh.mysql.r18.ru
a98c29921c Fix for bug #6077: Problem with make test from 4.1.7 and bk
portability fix(UnixWare)
2004-11-10 18:16:58 +03:00
monty@mysql.com
6c44563fc5 Simple optimization 2004-11-09 03:20:58 +02:00
bar@mysql.com
b7776f83e7 ctype_ujis.result, ctype_ujis.test, field.cc:
Bug#6345 Unexpected behaviour with partial indices
2004-11-08 13:15:01 +04:00
bar@mysql.com
f979603cf2 field.cc, sql_mode.result, sql_mode.test:
"SHOW CREATE TABLE" mysql-4.0 and mysql-3.23 
  compatibiliry mode change:
  Check that a binary collation adds 'binary'
  suffix into a char() column definition in
  mysql40 and mysql2323 modes. This allows
  not to lose the column's case sensitivity
  when loading the dump in pre-4.1 servers.
2004-11-04 08:50:07 +04:00
bar@mysql.com
7577c8bfc9 A fix according to Monty's request:
"uint *errors" is now a non-optional parameter in String:copy()
and copy_and_convert().
2004-10-29 17:00:39 +05:00
bar@mysql.com
541883f9d8 Produce a "truncated" warning if a value cannot be converted
into the column character set on INSERT/UPDATE.
2004-10-28 15:21:20 +05:00
serg@serg.mylan
51d3d41e8e merged 2004-10-26 21:12:14 +02:00
serg@serg.mylan
8dab51445e Bug #6019 - SELECT tries to use too short prefix index on utf8 data
Field_string::pack should respect max_length as Field_string::pack_key does
2004-10-26 20:31:41 +02:00
monty@mysql.com
7698054d19 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-10-26 19:30:57 +03:00