When the fractional part in a multiplication of DECIMALs
overflowed, we truncated the first operand rather than the
longest. Now truncating least significant places instead
for more precise multiplications.
(Queuing at demand of Trudy/Davi.)
mysql-test/r/type_newdecimal.result:
show that if we need to truncate the scale of an operand, we pick the
right one (that is, we discard the least significant decimal places)
mysql-test/t/type_newdecimal.test:
show that if we need to truncate the scale of an operand, we pick the
right one (that is, we discard the least significant decimal places)
strings/decimal.c:
when needing to disregard fractional parts, pick the least
significant ones
Grouping or ordering of long values in not indexed BLOB/TEXT columns
with GBK or BIG5 charsets crashes the server.
MySQL server uses sorting (the filesort procedure) in the temporary
table to evaluate the GROUP BY clause in case of lack of suitable index.
That procedure takes into account only first @max_sort_length bytes
(system variable, usually 1024) of TEXT/BLOB sorting key string.
The my_strnxfrm_gbk and my_strnxfrm_big5 fill temporary keys
with data of whole blob length instead of @max_sort_length bytes
length. That buffer overrun has been fixed.
mysql-test/r/ctype_gbk.result:
Added test case for bug #35993.
mysql-test/t/ctype_gbk.test:
Added test case for bug #35993.
strings/ctype-big5.c:
Fixed bug #35993: memory corruption and crash with multibyte conversion.
Buffer overrun has been fixed in the my_strnxfrm_big5 function.
strings/ctype-gbk.c:
Fixed bug #35993: memory corruption and crash with multibyte conversion.
Buffer overrun has been fixed in the my_strnxfrm_gbk function.
into mysql.com:/home/bar/mysql-work/mysql-5.0.b32510v2
mysql-test/r/ctype_big5.result:
Auto merged
mysql-test/r/ctype_cp932.result:
Auto merged
mysql-test/r/ctype_euckr.result:
Auto merged
mysql-test/r/ctype_gb2312.result:
Auto merged
mysql-test/r/ctype_gbk.result:
Auto merged
mysql-test/r/ctype_uca.result:
Auto merged
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/t/ctype_cp932.test:
Auto merged
mysql-test/t/ctype_uca.test:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
strings/ctype-ucs2.c:
Auto merged
Problem: some collation handlers called incorrect version
of my_like_range_xxx(), which led to wrong min_str and max_str,
so like range optimizer threw away good records.
Fix: changing the wrong handlers to call proper version of
my_like_range_xxx().
mysql-test/r/ctype_big5.result:
Adding test
mysql-test/r/ctype_cp932.result:
Adding test
mysql-test/r/ctype_eucjpms.result:
Adding test
mysql-test/r/ctype_euckr.result:
Adding test
mysql-test/r/ctype_gb2312.result:
Adding test
mysql-test/r/ctype_gbk.result:
Adding test
mysql-test/r/ctype_sjis.result:
Adding test
mysql-test/r/ctype_uca.result:
Adding test
mysql-test/r/ctype_ucs.result:
Adding test
mysql-test/r/ctype_ujis.result:
Adding test
mysql-test/t/ctype_big5.test:
Adding test
mysql-test/t/ctype_cp932.test:
Adding test
mysql-test/t/ctype_eucjpms.test:
Adding test
mysql-test/t/ctype_euckr.test:
Adding test
mysql-test/t/ctype_gb2312.test:
Adding test
mysql-test/t/ctype_gbk.test:
Adding test
mysql-test/t/ctype_sjis.test:
Adding test
mysql-test/t/ctype_uca.test:
Adding test
mysql-test/t/ctype_ucs.test:
Adding test
mysql-test/t/ctype_ujis.test:
Adding test
strings/ctype-euc_kr.c:
Changing like_range function
strings/ctype-eucjpms.c:
Changing like_range function
strings/ctype-gb2312.c:
Changing like_range function
strings/ctype-ucs2.c:
Changing like_range function
strings/ctype-ujis.c:
Changing like_range function
mysql-test/include/ctype_like_range_f1f2.inc:
New BitKeeper file ``mysql-test/include/ctype_like_range_f1f2.inc''
The ROUND(X, D) function would change the Item::decimals field during
execution to achieve the effect of a dynamic number of decimal digits.
This caused a series of bugs:
Bug #30617:Round() function not working under some circumstances in InnoDB
Bug #33402:ROUND with decimal and non-constant cannot round to 0 decimal places
Bug #30889:filesort and order by with float/numeric crashes server
Fixed by never changing the number of shown digits for DECIMAL when
used with a nonconstant number of decimal digits.
mysql-test/r/type_decimal.result:
Bug#33143: Test result
mysql-test/t/type_decimal.test:
Bug#33143: Test case
sql/item_func.cc:
Bug#33143:
- Moved the DECIMAL_MAX_SCALE limitation to fix_length_and_dec.
- Removed resetting of Item::decimals field.
- set the frac field of the output value to current scale.
strings/decimal.c:
Bug#33143: It is necessary to set all digits in the buffer following the
rounded one to zero, as they may now be displayed.
into mysql.com:/misc/mysql/31752_/50-31752_
client/mysql.cc:
Auto merged
sql/log.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/unireg.cc:
Auto merged
into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
include/mysql_com.h:
Auto merged
libmysql/CMakeLists.txt:
Auto merged
myisam/mi_check.c:
Auto merged
mysql-test/r/delayed.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/merge.test:
Auto merged
mysql-test/t/myisam.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/type_datetime.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/field.cc:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/func_misc.result:
manual merge
mysql-test/r/innodb_mysql.result:
manual merge
mysql-test/t/func_misc.test:
manual merge
mysql-test/t/innodb_mysql.test:
manual merge
sql/sql_insert.cc:
manual merge
into ramayana.hindu.god:/home/tsmith/m/bk/maint/50
client/mysqldump.c:
Auto merged
include/my_sys.h:
Auto merged
libmysql/CMakeLists.txt:
Auto merged
libmysql/Makefile.shared:
Auto merged
myisam/ft_boolean_search.c:
Auto merged
myisam/sort.c:
Auto merged
mysql-test/t/cast.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/field.cc:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/mysql-test-run.pl:
Manual merge
mysql-test/r/ctype_ucs.result:
Manual merge
mysql-test/r/func_misc.result:
Manual merge
mysql-test/t/binlog_killed.test:
Manual merge
mysql-test/t/ctype_ucs.test:
Manual merge
mysql-test/t/func_misc.test:
Manual merge
sql/item_strfunc.h:
Manual merge
strings/ctype-simple.c:
Manual merge
Default values of variables were not subject to upper/lower bounds
and step, while setting variables was. Bounds and step are also
applied to defaults now; defaults are corrected quietly, values
given by the user are corrected, and a correction-warning is thrown
as needed. Lastly, very large values could wrap around, starting
from 0 again. They are bounded at the maximum value for the
respective data-type now if no lower maximum is specified in the
variable's definition.
client/mysql.cc:
correct maxima in options array
client/mysqltest.c:
adjust minimum for "sleep" option so default value is no longer
out of bounds.
include/m_string.h:
ullstr() - the unsigned brother of llstr()
include/my_getopt.h:
Flag if we bounded the value (that is, correct anything aside from
making value a multiple of block-size)
mysql-test/r/delayed.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/index_merge.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/innodb.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/innodb_mysql.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/key_cache.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/packet.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/ps.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/subselect.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/type_bit.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/type_bit_innodb.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/variables.result:
correct results: bounds and step apply to variables' default values, too
mysql-test/t/variables.test:
correct results: bounds and step apply to variables' default values, too
mysys/my_getopt.c:
- apply bounds/step to default values of variables (based on work by serg)
- print complaints about incorrect values for variables (truncation etc.,
by requestion of consulting)
- if no lower maximum is specified in variable definition, bound unsigned
values at their maximum to prevent wrap-around
- some calls to error_reporter had a \n, some didn't. remove \n from calls,
let reporter-function handle it, so the default reporter behaves like that
in mysqld
sql/mysql_priv.h:
correct RANGE_ALLOC_BLOCK_SIZE (cleared with monty)
sql/mysqld.cc:
correct maxima to correct data-type.
correct minima where higher than default.
correct range-alloc-block-size.
correct inno variables so GET_* corresponds to actual variable's type.
sql/set_var.cc:
When the new value for a variable is out of bounds, we'll send the
client a warning (but not if the value was simply not a multiple of
'blocksize'). sys_var_thd_ulong had this, sys_var_long_ptr_global
didn't; broken out and streamlined to avoid duplication of code.
strings/llstr.c:
ullstr() - the unsigned brother of llstr()
- fix for #31070 (missed during merging) applied for cp932 charset.
- tests/results adjusted.
mysql-test/include/ctype_common.inc:
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
mysql-test/r/ctype_big5.result:
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
mysql-test/r/ctype_cp932.result:
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
mysql-test/r/ctype_euckr.result:
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
mysql-test/r/ctype_gb2312.result:
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
mysql-test/r/ctype_gbk.result:
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
mysql-test/r/ctype_uca.result:
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
mysql-test/t/ctype_cp932.test:
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
strings/ctype-cp932.c:
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- fix for #31070 (missed during merging) applied for cp932.
into mysql.com:/misc/mysql/31752_/50-31752_
sql/log.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.cc:
Auto merged
strings/strmake.c:
Auto merged
sql/sql_show.cc:
manually merged
sql/unireg.cc:
manual merge
strmake() calls are easy to get wrong. Add checks in extra
debug mode to identify possible exploits.
Remove some dead code.
Remove some off-by-one errors identified with new checks.
sql/log.cc:
fix off-by-one buffer-length argument to prevent stack smashing
sql/repl_failsafe.cc:
fix off-by-one buffer-length argument to prevent stack smashing
sql/set_var.cc:
fix off-by-one buffer-length argument to prevent stack smashing
(already approved, backports #31588)
sql/sql_show.cc:
misdimensioned buffers: functions further down the callstack
expect bufsize of FN_REFLEN
sql/unireg.cc:
When EXTRA_DEBUG is enabled, strmake() will write funny patterns to
buffers it operates on to identify possibly overflows. This leads to
badness in mysql_create_frm(), so we explicitly put any unused bytes
(back) into a defined state. Not a bug-fix, but part of the strmake()
bug detector.
strings/strmake.c:
strmake() takes maximum string length rather than buffer-length
(string length + 1 to accomodate \0 terminator) as argument.
Since this is easy to get wrong, add extra debug code to identify
off-by-ones so we can prevent stack smashing.
Alternative "BAD_STRING_COMPILER" removed after checking
with Monty.
into dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
client/mysql.cc:
Auto merged
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/t/ctype_uca.test:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.h:
Auto merged
into mysql.com:/home/kent/bk/bug30069/mysql-5.0-build
mysql-test/t/bigint.test:
Auto merged
strings/ctype-simple.c:
Auto merged
mysql-test/r/bigint.result:
SCCS merged
An integer overflow in number->string conversion caused completely
wrong output of the number LONGLONG_MIN with gcc 4.2.1.
Fixed by eliminating the overflow, using only operations that are
well-defined in ANSI C.
strings/ctype-simple.c:
An integer overflow in number->string conversion caused completely
wrong output of the number LONGLONG_MIN with gcc 4.2.1.
Fixed by eliminating the overflow, using only operations that are
well-defined in ANSI C.
strings/ctype-ucs2.c:
An integer overflow in number->string conversion caused completely
wrong output of the number LONGLONG_MIN with gcc 4.2.1.
Fixed by eliminating the overflow, using only operations that are
well-defined in ANSI C.
strings/int2str.c:
An integer overflow in number->string conversion caused completely
wrong output of the number LONGLONG_MIN with gcc 4.2.1.
Fixed by eliminating the overflow, using only operations that are
well-defined in ANSI C.
strings/longlong2str.c:
An integer overflow in number->string conversion caused completely
wrong output of the number LONGLONG_MIN with gcc 4.2.1.
Fixed by eliminating the overflow, using only operations that are
well-defined in ANSI C.
into mysql.com:/home/bar/mysql-work/mysql-5.0-rpl-merge
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/r/func_regexp.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
mysql-test/t/func_regexp.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/ctype_ucs.result:
After merge fix
mysql-test/t/ctype_ucs.test:
After merge fix
into mysql.com:/home/bar/mysql-work/mysql-5.0-rpl-mr
client/mysql.cc:
Auto merged
mysql-test/r/ctype_euckr.result:
Auto merged
mysql-test/r/ctype_uca.result:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
strings/ctype-euc_kr.c:
Auto merged
into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
client/mysqldump.c:
Auto merged
include/config-win.h:
Auto merged
libmysql/libmysql.c:
Auto merged
myisam/sort.c:
Auto merged
mysql-test/r/func_sapdb.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/field.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/type_datetime.result:
manual merge
mysql-test/r/type_decimal.result:
manual merge
mysql-test/t/type_datetime.test:
manual merge
mysql-test/t/type_decimal.test:
manual merge
sql/item.cc:
manual merge
Problem:
my_strntoull10rnd_8bit() handled incorrectly cases when the input
string contains a decimal point and is long enough to overrun the
'unsigned long long' type. The position of the decimal point was not
taken into account which resulted in miscalculated numbers and
truncation to appropriate SQL data type limits.
Solution:
Fix my_strntoull10rnd_8bit() to take the position of a decimal point
into account in such cases.
mysql-test/r/insert.result:
Added a test case for bug #30453.
mysql-test/t/insert.test:
Added a test case for bug #30453.
strings/ctype-simple.c:
In cases when the 'unsigned long long' type is overrun by the input
string and a decimal point has occurred, adjust the 'shift' according to
the position of the decimal point and skip all subsequent digits.
when a divisor is less than 1 and its fractional part is very long.
For example:
1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789;
Stack buffer overflow has been fixed in the do_div_mod function.
strings/decimal.c:
Fixed bug #31019.
Stack buffer overflow has been fixed in the do_div_mod function:
a value of the upper bound of the buffer was increased where
a decrement is required.
mysql-test/t/type_decimal.test:
Added test case for bug #31019.
mysql-test/r/type_decimal.result:
Added test case for bug #31019.
into mysql.com:/home/ram/work/b31070/b31070.5.0
mysql-test/r/ctype_big5.result:
Auto merged
mysql-test/r/ctype_gbk.result:
Auto merged
mysql-test/r/ctype_uca.result:
Auto merged
strings/ctype-big5.c:
Auto merged
strings/ctype-euc_kr.c:
Auto merged
strings/ctype-gb2312.c:
Auto merged
strings/ctype-sjis.c:
Auto merged
BitKeeper/deleted/.del-ctype-cp932.c:
Auto merged
and for bug #31070: crash during conversion of charsets
Problem: passing a 0 byte length string to some my_mb_wc_XXX()
functions leads to server crash due to improper argument check.
Fix: properly check arguments passed to my_mb_wc_XXX() functions.
mysql-test/include/ctype_common.inc:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- test case.
mysql-test/r/ctype_big5.result:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- test result.
mysql-test/r/ctype_euckr.result:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- test result.
mysql-test/r/ctype_gb2312.result:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- test result.
mysql-test/r/ctype_gbk.result:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- test result.
mysql-test/r/ctype_uca.result:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- test result.
strings/ctype-big5.c:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- check the string length before testing its first byte.
strings/ctype-cp932.c:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- check the string length before testing its first byte.
strings/ctype-euc_kr.c:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- check the string length before testing its first byte.
strings/ctype-gb2312.c:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- check the string length before testing its first byte.
strings/ctype-sjis.c:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- check the string length before testing its first byte.
Problem: some valid euc-kr characters were rejected because
condition checking multi-byte tail didn't allow
multi-byte characters having the second byte in the ranges
[0x41..0x5A] and [0x61..0x7A].
Fix: allow these byte ranges for mb tails
mysql-test/r/ctype_euckr.result:
Adding tests
mysql-test/t/ctype_euckr.test:
Adding tests
strings/ctype-euc_kr.c:
Fixing wrong tail character pattern
Two character mappings were way off (backtick and tilde were "E"
and "Y"!), and three others were slightly rotated. The first
would cause collisions, and the latter was probably benign.
Now, assign the character mappings exactly to their normal values.
sql/share/charsets/ascii.xml:
Change the character mapping for
"`" to "`" (was "E") and
"[" to "[" (was "\") and
"\" to "\" (was "]") and
"]" to "]" (was "[") and
"~" to "~" (was "Y").
strings/ctype-extra.c:
Generated from charsets directory.
mysql-test/r/ctype_ascii.result:
Add new test file.
Test all combinations of printable letter comparisons for
similarity.
mysql-test/t/ctype_ascii.test:
Add new test file.
Test all combinations of printable letter comparisons for
similarity.
into mysql.com:/home/bar/mysql-work/mysql-5.0-rpl
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
strings/conf_to_src.c:
Auto merged
strings/ctype-extra.c:
Auto merged
mysql-test/r/ctype_ucs.result:
After merge fix
mysql-test/t/ctype_ucs.test:
After merge fix
(Regression, caused by a patch for the bug 22646).
Problem: when result type of date_format() was changed from
binary string to character string, mixing date_format()
with a ascii column in CONCAT() stopped to work.
Fix:
- adding "repertoire" flag into DTCollation class,
to mark items which can return only pure ASCII strings.
- allow character set conversion from pure ASCII to other character sets.
include/m_ctype.h:
Defining new flags.
Adding new function prototypes.
mysql-test/r/ctype_ucs.result:
Adding tests.
mysql-test/r/ctype_utf8.result:
Adding tests.
mysql-test/r/func_time.result:
Adding tests.
mysql-test/t/ctype_ucs.test:
Adding tests.
mysql-test/t/ctype_utf8.test:
Adding tests.
mysql-test/t/func_time.test:
Adding test.
mysys/charset.c:
Adding pure ASCII detection when loading a dynamic character set.
sql/item.cc:
- Moving detection of a Unicode superset into function.
- Adding detection of a ASCII subset.
- Adding creation of to-ASCII character set convertor when
safe_charset_converter() failed and when the argument.
repertoire is know to be pure ASCII.
sql/item.h:
- Adding "repertoire" member into DTCollation class.
- Adding "repertoire" argument to constructors.
- Adding new methods:
set_repertoire_from_charset()
set_repertoire_from_value()
sql/item_func.cc:
Adding "repertoire" argument.
sql/item_strfunc.cc:
Adding "repertoire" argument.
sql/item_timefunc.cc:
Initializing the result repertoire taking into account the "is_ascii"
flag of the current locale.
sql/sql_lex.cc:
Detect 7bit strings, return in Lex->text_string_is_7bit.
sql/sql_lex.h:
Adding new member into LEX structure.
Adding new member into Lex_input_stream
sql/sql_string.cc:
Allow simple copy from pure ASCII to a ASCII-based character set.
sql/sql_yacc.yy:
Depening on Lex->text_string_is_7bit and character set features,
create Item_string with MY_REPERTOIRE_ASCII when it is possible.
strings/conf_to_src.c:
- Adding printing of the "MY_CS_PUREASCII" flag
- Adding printing of copyright
strings/ctype-extra.c:
Recreating ctype-extra.c: ascii_general_ci and ascii_bin
are now marked with MY_CS_PUREASCII flag.
strings/ctype.c:
Adding new functions.
with the space character.
When the my_strnncollsp_simple function compares two strings and one is a prefix
of another then this function compares characters in the rest of longer key
with the space character to find whether the longer key is greater or less.
But the sort order of the collation isn't used in this comparison. This may
lead to a wrong comparison result, wrongly created index or wrong order of the
result set of a query with the ORDER BY clause.
Now the my_strnncollsp_simple function uses collation sort order to compare
the characters in the rest of longer key with the space character.
mysql-test/t/ctype_collate.test:
Added a test case for the bug#29461: Sort order of the collation wasn't used when
comparing characters with the space character.
mysql-test/r/ctype_collate.result:
Added a test case for the bug#29461: Sort order of the collation wasn't used when
comparing characters with the space character.
strings/ctype-simple.c:
Bug#29461: Sort order of the collation wasn't used when comparing characters
with the space character.Now the my_strnncollsp_simple function uses collation sort order to compare
the characters in the rest of longer key with the space character.
Problem: wrong comparison with trailing space.
This problem was fixed for all other character sets under terms of
bug 7788 ""Table is full" occurs during a multitable update".
ctype-cp932.c was forgotten.
Fix: applying the same fix for ctype-cp932.c.
(see ctype-sjis.c as an example of a previously correctly fixed file)
mysql-test/r/ctype_cp932.result:
Adding test
mysql-test/t/ctype_cp932.test:
Adding test
strings/ctype-cp932.c:
Applying the same fix which was done for all other
character sets under terms of bug 7788.
strings/ctype-utf8.c:
Fixing the same problem for utf8_general_cs,
which was forgotten in bug 7788 as well.
spaces.
When the my_strnncollsp_simple function compares two strings and one is a prefix
of another then this function compares characters in the rest of longer key
with the space character to find whether the longer key is greater or less.
But the sort order of the collation isn't used in this comparison. This may
lead to a wrong comparison result, wrongly created index or wrong order of the
result set of a query with the ORDER BY clause.
Now the my_strnncollsp_simple function uses collation sort order to compare
the characters in the rest of longer key with the space character.
mysql-test/t/ctype_collate.test:
Added a test case for the bug#29261: Sort order of the collation wasn't used
when comparing trailing spaces.
mysql-test/r/ctype_collate.result:
Added a test case for the bug#29261: Sort order of the collation wasn't used
when comparing trailing spaces.
strings/ctype-simple.c:
Bug#29261: Sort order of the collation wasn't used when comparing trailing
spaces.
Now the my_strnncollsp_simple function uses collation sort order to compare
the characters in the rest of longer key with the space character.
Problem: like_range() returned wrong ranges for contractions (like 'ch' in Czech').
Fix: adding a special code to handle tricky cases:
- contraction head followed by a wild character
- full contraction
- contraction part followed by another contraction part,
but they are not a contraction together.
mysql-test/r/ctype_uca.result:
Adding test case
mysql-test/t/ctype_uca.test:
Adding test case
strings/ctype-mb.c:
Adding test case
strings/ctype-uca.c:
Allocate additional 256 bytes for flags "is contraction part".
strings/ctype-ucs2.c:
Adding test case
and is not described in the manual
- Adding missing initialization for utf8 collations
- Minor code clean-ups: renaming variables,
moving code into a new separate function.
- Adding test, to check that both ucs2 and utf8 user
defined collations work (ucs2_test_ci and utf8_test_ci)
- Adding Vietnamese collation as a complex user defined
collation example.
include/m_ctype.h:
Renaming variable names to match collation names (for convenience).
mysys/charset-def.c:
- Removing redundant declarations for variables declared in m_ctype.h
- Renaming variable names to match collation names (for convenience).
mysys/charset.c:
- Renaming "new" to "newcs", to avoid using C reserved word as a variable name
- Moving UCA initialization code into a separate function
- The bug fix itself: adding initialization of utf8 collations
strings/ctype-uca.c:
Renaming variable names to match collation names (for convenience).
strings/ctype.c:
Increasing buffer size to fit tailoring for languages
with complex rules (e.g. Vietnamese).
mysql-test/r/ctype_ldml.result:
Adding test case
mysql-test/std_data/Index.xml:
Adding Index.xml example with user defined collations.
mysql-test/t/ctype_ldml-master.opt:
Adding OPT file for the test case,
to use the example Index.xml file.
mysql-test/t/ctype_ldml.test:
Adding test case
Problem: "SELECT INTO OUTFILE" created incorrect dumps for BLOBs,
so "LOAD DATA" later incorrectly interpreted 0x5C as the second
byte of a multi-byte sequence, instead of escape character.
Fix: adding escaping of multi-byte heads.
mysql-test/r/ctype_big5.result:
Adding test case
mysql-test/t/ctype_big5.test:
Adding test case
sql/sql_class.cc:
Add escape characters before multi-byte heads.
strings/ctype-big5.c:
Flagging character set as dangerous for escaping.
strings/ctype-gbk.c:
Flagging character set as dangerous for escaping.
strings/ctype-sjis.c:
Flagging character set as dangerous for escaping.
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/50
client/mysqldump.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Problem:
HASH indexes on VARCHAR columns with binary collations did not ignore trailing spaces from strings before comparisons. This could result in duplicate records being successfully inserted into a MEMORY table with unique key constraints.
As a direct consequence of the above, internal MEMORY tables used for GROUP BY calculation in testcases for bug #27643 contained duplicate rows which resulted in duplicate key errors when converting those temporary tables to MyISAM. Additionally, that error was incorrectly converted to the 'table is full' error.
Solution:
- ignore trailing spaces in VARCHAR fields with binary collations when calculating hashes.
- return a proper error from create_myisam_from_heap() when conversion fails.
mysql-test/r/ctype_ucs2_def.result:
Added a testcase for bug #27643.
mysql-test/r/heap_hash.result:
Added a testcase for bug #27643.
mysql-test/t/ctype_ucs2_def.test:
Added a testcase for bug #27643.
mysql-test/t/heap_hash.test:
Added a testcase for bug #27643.
sql/sql_select.cc:
Return an appropriate error instead of 'table is full' when conversion from MEMORY to MyISAM fails.
strings/ctype-bin.c:
Added my_hash_sort_8bit_bin() which ignores trailing spaces when calculating hashes, and is now used for VARCHAR columns instead of my_hash_sort_bin().
strings/ctype-mb.c:
Ignore trailing spaces when calculating a string hash in my_hash_sort_mb_bin().
strings/ctype-ucs2.c:
Ignore trailing spaces when calculating a string hash in my_hash_sort_ucs2_bin().