Commit graph

4846 commits

Author SHA1 Message Date
unknown
bb40065a1f Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into  rurik.mysql.com:/home/igor/mysql-4.1
2006-04-21 08:22:03 -07:00
unknown
04be401f96 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  production.mysql.com:/usersnfs/rkalimullin/4.1.b18643
2006-04-21 13:56:40 +02:00
unknown
d4f4f5bdaf Merge rurik.mysql.com:/home/igor/mysql-4.1
into  rurik.mysql.com:/home/igor/dev/mysql-4.1-0
2006-04-20 22:34:37 -07:00
unknown
9225a51c58 Fixed bug #18767.
The bug caused wrong result sets for union constructs of the form
(SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2.
For such queries order lists were concatenated and limit clause was
completely neglected. 


mysql-test/r/order_by.result:
  Added a test case for bug #18767.
mysql-test/t/order_by.test:
  Added a test case for bug #18767.
sql/sql_lex.h:
  Fixed bug #18767.
  Placed the code the created a fake SELECT_LEX into a separate function.
sql/sql_parse.cc:
  Fixed bug #18767.
  Placed the code the created a fake SELECT_LEX into a separate function.
sql/sql_select.cc:
  Fixed bug #18767.
  Changed the condition on which a SELECT is treated as part of a UNION.
  The SELECT in 
  (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2 
  now is handled in the same way as the first SELECT in a UNION
  sequence.
sql/sql_union.cc:
  Fixed bug #18767.
  Changed the condition at which a SELECT is treated as part of a UNION.
  The SELECT in 
  (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2 
  now is handled in the same way as the first SELECT in a UNION
  sequence.
sql/sql_yacc.yy:
  Fixed bug #18767.
  Changed the condition at which a SELECT is treated as part of a UNION.
  The SELECT in 
  (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2 
  now is handled in the same way as the first SELECT in a UNION
  sequence. In the same way is handled the SELECT in
  (SELECT ... LIMIT n) ORDER BY order list.
  Yet if there is neither ORDER BY nor LIMIT in the single-select
  union construct
  (SELECT ...) ORDER BY order_list
  then it is still handled as simple select with an order clause.
2006-04-20 22:15:38 -07:00
unknown
5f3c91080c Merge mleich@bk-internal.mysql.com:/home/bk/mysql-4.1
into  production.mysql.com:/usersnfs/mleich/src
2006-04-20 11:31:22 +02:00
unknown
e4d653abb8 Temporarily commented out a query from the test case for bug 14169 to make it pass with --ps-protocol.
mysql-test/r/func_gconcat.result:
  Added DROP TABLE command to the test case for bug 14169.
2006-04-19 16:08:37 -07:00
unknown
34efb701ed Merge rurik.mysql.com:/home/igor/mysql-4.1
into  rurik.mysql.com:/home/igor/dev/mysql-4.1-2
2006-04-19 14:42:51 -07:00
unknown
913c8fa185 func_gconcat.result:
Corrected test case for the bug#14169 to make it pass in --ps-protocol mode.


mysql-test/r/func_gconcat.result:
  Corrected test case for the bug#14169 to make it pass in --ps-protocol mode.
2006-04-20 00:27:43 +04:00
unknown
b97e48a95b Fixed bug #19079.
The bug caused a reported index corruption in the cases when
key_cache_block_size was not a multiple of myisam_block_size,
e.g. when key_cache_block_size=1536 while myisam_block_size=1024.


mysql-test/r/key_cache.result:
  Added a test case for bug #19079.
mysql-test/t/key_cache.test:
  Added a test case for bug #19079.
2006-04-18 20:57:31 -07:00
unknown
eb9c676fa2 Merge mysql.com:/home/matthias/Arbeit/mysql-4.1/src
into  mysql.com:/home/matthias/Arbeit/mysql-4.1/src-1
2006-04-18 14:18:51 +02:00
unknown
d7055274ed Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/14169-bug-4.1-mysql
2006-04-14 17:25:58 +04:00
unknown
f1a5003548 Fixes for Bug#12429: Replication tests fail: "Slave_IO_Running" (?) differs related to
MySQL 4.1
  and Bug#16920 rpl_deadlock_innodb fails in show slave status (reported for MySQL 5.1)
  - backport of several fixes done in MySQL 5.0 to 4.1
  - fix for new discovered instability (see comment on Bug#12429 + Bug#16920)
  - reenabling of testcases


mysql-test/r/rpl_deadlock.result:
  Updated results
mysql-test/r/rpl_relayrotate.result:
  Updated results
mysql-test/t/disabled.def:
  Reenabling of tests
mysql-test/t/rpl_deadlock.test:
  - replace sleep with real_sleep (backport fix for Bug#15624 MySQL 5.0)
  - egalized value for Slave_IO_Running 
  - line 105 (backport fix for Bug#12429 MySQL 5.0)
  - line 85 (see comment in Bug#12429 
             + Bug#16920 rpl_deadlock_innodb fails in show slave status)
  - improve readability of show slave status output (--vertical_results)
mysql-test/t/rpl_relayrotate.test:
  - Replace select ... with select max(a)
  - add sync_with_master (backport fix done by Kristian in MySQL 5.0 because of timing
    problems similar to Bug#15624)
mysql-test/t/rpl_until.test:
  Add wait_for_slave_to_stop like in the current MySQL 5.0 version of this test.
  I assume this makes the test results more predictable.
2006-04-13 20:42:48 +02:00
unknown
5c87b55f7e Fix for bug #18643: crazy UNCOMPRESS().
mysql-test/r/func_compress.result:
  Fix for bug #18643: crazy UNCOMPRESS().
    - test-case
mysql-test/t/func_compress.test:
  Fix for bug #18643: crazy UNCOMPRESS().
    - test-case
sql/item_strfunc.cc:
  Fix for bug #18643: crazy UNCOMPRESS().
    - set null_value.
2006-04-13 16:19:21 +05:00
unknown
5c0c1dcc3d Bug#18691: Converting number to UNICODE string returns invalid result.
Conversion from int and real numbers to UCS2 didn't work fine: 
CONVERT(100, CHAR(50) UNICODE)
CONVERT(103.9, CHAR(50) UNICODE)

The problem appeared because numbers have binary charset, so,
simple charset recast binary->ucs2 was performed
instead of real conversion.

Fixed to make numbers pretend to be non-binary.


mysql-test/r/ctype_ucs.result:
  Adding test case
mysql-test/t/ctype_ucs.test:
  Adding test case
sql/item_timefunc.cc:
  Adding new member from_cs, to replace my_charset_bin
  to a non-binary charset when converting from numbers to UCS2
sql/item_timefunc.h:
  Adding new member from_cs, to replace my_charset_bin
  to a non-binary charset when converting from numbers to UCS2
2006-04-13 10:55:48 +05:00
unknown
a2066982f1 Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was
used

In a simple queries a result of the GROUP_CONCAT() function was always of 
varchar type.
But if length of GROUP_CONCAT() result is greater than 512 chars and temporary
table is used during select then the result is converted to blob, due to
policy to not to store fields longer than 512 chars in tmp table as varchar
fields.

In order to provide consistent behaviour, result of GROUP_CONCAT() now
will always be converted to blob if it is longer than 512 chars.
Item_func_group_concat::field_type() is modified accordingly.


mysql-test/t/func_gconcat.test:
  Added test case for bug#14169: type of group_concat() result changed to blob if tmp_table was used
mysql-test/r/func_gconcat.result:
  Added test case for bug#14169: type of group_concat() result changed to blob if tmp_table was used
sql/unireg.h:
  Added the CONVERT_IF_BIGGER_TO_BLOB constant
sql/sql_select.cc:
  Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was used
  The unnamed constant 255 in the create_tmp_field() and create_tmp_field_from_item() functions now defined as the CONVERT_IF_BIGGER_TO_BLOB constant.
  The create_tmp_field() function now converts the Item_sum string result to a blob field based on its char length.
sql/item_sum.h:
  Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was used
  To the Item_func_group_concat calls added the member function field_type() which returns the BLOB or VAR_STRING type based on the items length.
sql/item_func.cc:
  Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was used
  In the Item_func::tmp_table_field() function the unnamed constant 255 is changed to the CONVERT_IF_BIGGER_TO_BLOB constant.
  The Item_func::tmp_table_field() function now measures the result length in chars rather than bytes when converting string result to a blob.
2006-04-12 23:05:38 +04:00
unknown
d8a46094be Merge mysql.com:/home/mydev/mysql-4.1
into  mysql.com:/home/mydev/mysql-4.1-bug5390
2006-04-11 15:18:16 +02:00
unknown
974752bc1e Merge mysql.com:/usr/home/ram/work/mysql-4.0
into  mysql.com:/usr/home/ram/work/mysql-4.1


mysql-test/r/func_op.result:
  Auto merged
sql/item_func.cc:
  Auto merged
mysql-test/t/func_op.test:
  SCCS merged
2006-04-11 13:53:44 +05:00
unknown
d943c58761 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into  mysql.com:/usr/home/ram/work/mysql-4.0
2006-04-11 10:46:21 +05:00
unknown
f37d610147 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/opt/local/work/mysql-4.1-16365


sql/mysql_priv.h:
  Auto merged
sql/sql_class.h:
  Auto merged
mysql-test/r/ps.result:
  Manual merge
mysql-test/t/ps.test:
  Manual merge
2006-04-07 23:50:45 +04:00
unknown
5b5530daa5 A fix and a test case for Bug#16365 "Prepared Statements: DoS with
too many open statements". The patch adds a new global variable
@@max_prepared_stmt_count. This variable limits the total number
of prepared statements in the server. The default value of
@@max_prepared_stmt_count is 16382. 16382 small statements
(a select against 3 tables with GROUP, ORDER and LIMIT) consume 
100MB of RAM. Once this limit has been reached, the server will 
refuse to prepare a new statement and return ER_UNKNOWN_ERROR 
(unfortunately, we can't add new errors to 4.1 without breaking 5.0). The limit is changeable after startup
and can accept any value from 0 to 1 million. In case
the new value of the limit is less than the current
statement count, no new statements can be added, while the old
still can be used. Additionally, the current count of prepared 
statements is now available through a global read-only variable 
@@prepared_stmt_count.


mysql-test/r/ps.result:
  Test results fixed (a test case for Bug#16365)
mysql-test/t/ps.test:
  A test case for Bug#16365 "Prepared Statements: DoS with too many 
  open statements". Also fix statement leaks in other tests.
sql/mysql_priv.h:
  Add declarations for new global variables.
sql/mysqld.cc:
  Add definitions of max_prepared_stmt_count, prepared_stmt_count.
sql/set_var.cc:
  Implement support for @@prepared_stmt_count and 
  @@max_prepared_stmt_count. Currently these variables are queried
  without acquiring LOCK_prepared_stmt_count due to limitations of
  the set_var/sys_var class design. Updates are, however, protected 
  with a lock.
sql/set_var.h:
  New declarations to add support for @@max_prepared_stmt_count.
  Implement a new class, where the lock to be used when updating
  a variable is a parameter.
sql/sql_class.cc:
  Add accounting of the total number of prepared statements in the
  server to the methods of Statement_map.
sql/sql_class.h:
  Add accounting of the total number of prepared statements in the
  server to the methods of Statement_map.
sql/sql_prepare.cc:
  Statement_map::insert will now send a message in case of an
  error.
2006-04-07 23:37:06 +04:00
unknown
9b6e83f4b8 A fix and a test case for Bug#16248 "WHERE (col1,col2) IN ((?,?))
gives wrong results". Implement previously missing 
Item_row::cleanup. The bug is not repeatable in 5.0, probably 
due to a coincidence: the problem is present in 5.0 as well.


mysql-test/r/ps.result:
  Update the result file (Bug#16248)
mysql-test/t/ps.test:
  Add a test case for Bug#16248 "WHERE (col1,col2) IN ((?,?)) gives 
  wrong results"
sql/item_row.cc:
  Implement Item_row::cleanup(): we should reset used_tables_cache
  before reexecution of a prepared statement. In case ROW
  arguments contain a placeholder, used_tables_cache has PARAM_TABLE
  bit set in statement prepare. As a result, when executing a statement,
  the condition push down algorithm (make_cond_for_table) would think
  that the WHERE clause belongs to the non-existent PARAM_TABLE and
  wouldn't attach the WHERE clause to any of the real tables, 
  effectively optimizing the clause away.
sql/item_row.h:
  Remove a never used member 'array_holder'. Add declaration for
  Item_row::cleanup.
2006-04-07 22:26:25 +04:00
unknown
5475703bad This problem has already been fixed by one of the previous changes.
Adding test case to cover queries which worked incorrectly earlier:
Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci


mysql-test/r/ctype_latin1.result:
  Adding test case for Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci
mysql-test/t/ctype_latin1.test:
  Adding test case for Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci
2006-04-06 10:51:23 +05:00
unknown
ff4de90501 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into sunlight.local:/local_work/15560-bug-4.1-mysql


sql/sql_table.cc:
  Auto merged
2006-03-30 10:22:03 +04:00
unknown
2d6a51b4c8 Fix error in prefix compression of keys in MyISAM when key length changed from 254 -> 255
Bug #17705 "FT Index corruption occurs with UTF8 data..."
(Actually, the bug had nothing to do with FT index but with general key compression)



myisam/mi_search.c:
  Fix error in prefix compression of keys in MyISAM when key length changed from 254 -> 255
mysql-test/r/ctype_utf8.result:
  Test of fix for key compression bug
mysql-test/t/ctype_utf8.test:
  Test of fix for key compression bug
2006-03-30 01:50:52 +03:00
unknown
b25315469e Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
The GROUP_CONCAT uses its own temporary table. When ROLLUP is present
it creates the second copy of Item_func_group_concat. This copy receives the
same list of arguments that original group_concat does. When the copy is
set up the result_fields of functions from the argument list are reset to the
temporary table of this copy.
As a result of this action data from functions flow directly to the ROLLUP copy
and the original group_concat functions shows wrong result.
Since queries with COUNT(DISTINCT ...) use temporary tables to store
the results the COUNT function they are also affected by this bug.

The idea of the fix is to copy content of the result_field for the function
under GROUP_CONCAT/COUNT from  the first temporary table to the second one,
rather than setting result_field to point to the second temporary table.
To achieve this goal force_copy_fields flag is added to Item_func_group_concat
and Item_sum_count_distinct classes. This flag is initialized to 0 and set to 1
into the make_unique() member function of both classes.
To the TMP_TABLE_PARAM structure is modified to include the similar flag as
well.
The create_tmp_table() function passes that flag to create_tmp_field().
When the flag is set the create_tmp_field() function will set result_field
as a source field and will not reset that result field to newly created 
field for Item_func_result_field and its descendants. Due to this there
will be created copy func to copy data from old result_field to newly 
created field.


mysql-test/t/func_gconcat.test:
  Added test for bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
mysql-test/r/func_gconcat.result:
  Added test for bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
sql/sql_table.cc:
  Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
  Added 0 as a last parameter to create_tmp_field()  to force old behaviour.
sql/sql_select.cc:
  Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
  
  Added the flag 'make_copy_field' to create_tmp_field(), so that for Item_result_field descendants create_tmp_field() sets the item's result field as a source field and deny resetting that result field to a new value.
sql/sql_class.h:
  Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
  Added the flag 'force_copy_fields' to the structure TMP_TABLE_PARAM in order to make create_tmp_field() force the creation of 'copy_field' objects.
sql/mysql_priv.h:
  Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
  Added the bool parameter 'make_copy_field' to create_tmp_field().
sql/item_sum.cc:
  Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
  Added initialization of the force_copy_fields flag and passing it to create_tmp_table() through TMP_TBLE_PARAM in the Item_func_group_concat and Item_sum_count_distinct member functions.
sql/item_sum.h:
  Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
  Added the flag 'force_copy_fields' to the Item_func_group_concat and Item_sum_count_distinct classes.
2006-03-29 23:30:34 +04:00
unknown
4af4e1e704 Fix for bug#15316 SET value having comma not correctly handled
disallow the use of comma in SET members


mysql-test/r/create.result:
  Fix for bug#15316 SET value having comma not correctly handled
   test case
mysql-test/t/create.test:
  Fix for bug#15316 SET value having comma not correctly handled
   test case
2006-03-29 19:52:26 +05:00
unknown
a8c9bbd4be Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15098


sql/field.cc:
  Auto merged
2006-03-28 18:32:58 +05:00
unknown
278b83a84d Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15376


include/m_ctype.h:
  Auto merged
strings/ctype-bin.c:
  Auto merged
strings/ctype-euc_kr.c:
  Auto merged
strings/ctype-gb2312.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
2006-03-23 14:29:43 +04:00
unknown
49d2b4f061 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b17374
2006-03-23 11:51:46 +04:00
unknown
83bc8c4e38 Bug#17374: select ... like 'A%' operator fails to find value on columuns with key
Fixed that LIKE worked case insensitively for latin2_czech_cs,
which was wrong for a case sensitive collation.


include/m_ctype.h:
  Making my_wildcmp_bin public instead of static
strings/ctype-bin.c:
  Making my_wildcmp_bin public instead of static
strings/ctype-czech.c:
  Use my_wildcmp_bin instead of case insensitive my_wildcmp_8bit
mysql-test/include/have_latin2_ch.inc:
  New BitKeeper file ``mysql-test/include/have_latin2_ch.inc''
mysql-test/r/ctype_latin2_ch.result:
  New BitKeeper file ``mysql-test/r/ctype_latin2_ch.result''
mysql-test/r/have_latin2_ch.require:
  New BitKeeper file ``mysql-test/r/have_latin2_ch.require''
mysql-test/t/ctype_latin2_ch.test:
  New BitKeeper file ``mysql-test/t/ctype_latin2_ch.test''
2006-03-20 16:28:25 +04:00
unknown
7913527eb8 Bug#18004 Connecting crashes server when default charset is UCS2
table.cc:
  Fixing to use system_charset_info instead of default_charset_info.
  Crash happened because the "ctype" array is empty in UCS2,
  and thus cannot be used with my_isspace().
  The reason why UCS2 appeared in this context was because of
  of default_charset_info variable incorrectly substituted to my_isspace().
  As functions check_db_name(), check_table_name() and check_column_name()
  always get values in utf8, system_charset_info must be used instead.
ctype_ucs2_def.test, ctype_ucs2_def-master.opt, ctype_ucs2_def.result:
  new file


sql/table.cc:
  Bug#18004 Connecting crashes server when default charset is UCS2
  Use of default_charset_info was wrong.
  Functions check_db_name, check_table_name and check_column_name
  get values of system_charset_info character set (utf8).
2006-03-20 14:43:02 +04:00
unknown
0085230782 Merge mysql.com:/home/mydev/mysql-4.1
into  mysql.com:/home/mydev/mysql-4.1-bug14980
2006-03-10 22:32:37 +01:00
unknown
fbe17c2a36 Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
For "count(*) while index_column = value" an index read
is done. It consists of an index scan and retrieval of
each key.

For efficiency reasons the index scan stores the key in
the special buffer 'lastkey2' once only. At the first 
iteration it notes this fact with the flag 
HA_STATE_RNEXT_SAME in 'info->update'.

For efficiency reasons, the key retrieval for blobs
does not allocate a new buffer, but uses 'lastkey2'...

Now I clear the HA_STATE_RNEXT_SAME flag whenever the 
buffer has been polluted. In this case, the index scan
copies the key value again (and sets the flag again).


include/my_base.h:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Changed the comment for HA_STATE_RNEXT_SAME as a warning
  for future uses.
myisam/mi_delete.c:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Removing the flag HA_STATE_RNEXT_SAME from info->update
  if info->lastkey2 was reused for another purpose than
  index scanning.
myisam/mi_key.c:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Removing the flag HA_STATE_RNEXT_SAME from info->update
  if info->lastkey2 was reused for another purpose than
  index scanning.
myisam/mi_rnext_same.c:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Removed trailing space and fixed a comment.
myisam/mi_unique.c:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Removing the flag HA_STATE_RNEXT_SAME from info->update
  if info->lastkey2 was reused for another purpose than
  index scanning.
myisam/mi_update.c:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Removing the flag HA_STATE_RNEXT_SAME from info->update
  if info->lastkey2 was reused for another purpose than
  index scanning.
myisam/mi_write.c:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Removing the flag HA_STATE_RNEXT_SAME from info->update
  if info->lastkey2 was reused for another purpose than
  index scanning.
mysql-test/r/myisam.result:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Added test result.
mysql-test/t/myisam.test:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Added test.
2006-03-10 15:03:04 +01:00
unknown
3c83b827be Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/bug17137/my41-bug17137
2006-03-08 11:20:12 +01:00
unknown
f491db2119 Bug#17137 Running "truncate table" on temporary table leaves the table open on a slave
- Decrease "slave_open_temp_tables" during reopen of truncated table.
 - Add test "rpl_trunc_temp" 


sql/sql_delete.cc:
  Decrease "slave_open_temp_tables" after temporary table has been closed, it will be
  increased again when the temp table is reopened after it's been truncated.
mysql-test/r/rpl_trunc_temp.result:
  New BitKeeper file ``mysql-test/r/rpl_trunc_temp.result''
mysql-test/t/rpl_trunc_temp.test:
  New BitKeeper file ``mysql-test/t/rpl_trunc_temp.test''
2006-03-08 10:15:48 +01:00
unknown
19a1f488a8 merged 2006-03-06 18:34:38 +01:00
unknown
a127344a6c kill (subquery) - three years old bugfix that never worked 2006-03-06 18:26:39 +01:00
unknown
f372641876 Fix for bug #17896: MIN of CASE WHEN returns non-minimum value!
sql/item_cmpfunc.cc:
  Fix for bug #17896: MIN of CASE WHEN returns non-minimum value!
  - NULL items should not affect the result type.
2006-03-06 16:38:35 +04:00
unknown
d86a66d483 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15949
2006-03-06 14:50:34 +04:00
unknown
3ecf9f040a Fix for bug#14385 GRANT and mapping to correct user account problems
Check if the host of table hash record exactly matches host from GRANT command


mysql-test/r/grant.result:
  Fix for bug#14385 GRANT and mapping to correct user account problems
    test case
mysql-test/t/grant.test:
  Fix for bug#14385 GRANT and mapping to correct user account problems
    test case
2006-03-06 14:03:40 +04:00
unknown
2fe8095662 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/opt/local/work/mysql-4.1-root


mysql-test/r/heap.result:
  Auto merged
mysql-test/t/heap.test:
  Auto merged
2006-03-04 22:33:19 +03:00
unknown
c64c108eda Bug#15949 union + illegal mix of collations (IMPLICIT + COERCIBLE)
union.result, union.test:
  Adding test case.
item.cc:
  Allow safe character set conversion in UNION
  - string constant to column's charset
  - to unicode
  Thus, UNION now works the same with CONCAT (and other string functions)
  in respect of aggregating arguments with different character sets.


sql/item.cc:
  Allow character set conversion in UNION
  - string to column's charset
  - to unicode
  Bug#15949 union + illegal mix of collations (IMPLICIT + COERCIBLE)
mysql-test/t/union.test:
  Adding test case.
mysql-test/r/union.result:
  Adding test case.
2006-03-01 17:58:01 +04:00
unknown
8d5f0fcddc mysql-test-run.sh:
Fix URLs.
README:
  Fix URL.
mysqltest.result:
  Update test result for real_sleep error message.
mysqltest.c:
  Fix do_sleep() to print correct command name for real_sleep.


client/mysqltest.c:
  Fix do_sleep() to print correct command name for real_sleep.
mysql-test/r/mysqltest.result:
  Update test result for real_sleep error message.
mysql-test/README:
  Fix URL.
mysql-test/mysql-test-run.sh:
  Fix URLs.
2006-02-28 15:08:16 -06:00
unknown
ea9ea952be Remove 'delayed' to make the test deterministic (already
fixed in 5.0).
A post-review fix (Bug#13134)


mysql-test/r/heap.result:
  Remove 'delayed' to make the test deterministic.
mysql-test/r/ps.result:
  Remove an unneeded drop table (test case for Bug#13134)
mysql-test/t/heap.test:
  Remove 'delayed' to make the test deterministic.
mysql-test/t/ps.test:
  A post-review fix (Bug#13134)
2006-02-23 23:41:15 +03:00
unknown
9cf3f255bd A fix and a test case for Bug#13134 "Length of VARCHAR() utf8
column is increasing when table is recreated with PS/SP":
make use of create_field::char_length more consistent in the code.
Reinit create_field::length from create_field::char_length
for every execution of a prepared statement (actually fixes the 
bug).


mysql-test/r/ps.result:
  Test results fixed (Bug#13134)
mysql-test/t/ps.test:
  A test case for Bug#13134 "Length of VARCHAR() utf8 column is 
  increasing when table is recreated with PS/SP"
sql/field.cc:
  Move initialization of create_field::char_length to the constructor
  of create_field.
sql/field.h:
  Rename chars_length to char_length (to be consistent with
  how this term is used throughout the rest of the code).
sql/sql_parse.cc:
  Initialize char_length in add_field_to_list. This function
  effectively works as another create_field constructor.
sql/sql_table.cc:
  Reinit length from char_length for every field in 
  mysql_prepare_table. This is not needed if we're executing
  a statement for the first time, however, at subsequent executions
  length contains the number of bytes, not characters (as it's expected 
  to).
2006-02-21 19:52:20 +03:00
unknown
b23aa5c0be Merge bk@192.168.21.1:mysql-4.1
into mysql.com:/home/hf/work/mysql-4.1.15225


sql/sql_table.cc:
  Auto merged
2006-02-20 18:01:59 +04:00
unknown
32d32b6eca Merge mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/mysql-4.1
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/FIXES/mysql-4.1-bug16217
2006-02-13 19:15:02 +02:00
unknown
9a68ba18c7 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
2006-02-10 17:53:13 +01:00
unknown
26287714d5 Bug #17249 ndb, delete statement with join where clause fails when table do not have pk
Bug #17257 ndb, update fails for inner joins if tables do not have Primary Key

change: the allocated area by setValue may not be around for later, store hidden key in special member variable instead


mysql-test/r/ndb_basic.result:
  Bug #17249 delete statement with join where clause fails when table do not have pk
  Bug #17257 update fails for inner joins if tables do not have Primary Key
mysql-test/t/ndb_basic.test:
  Bug #17249 delete statement with join where clause fails when table do not have pk
  Bug #17257 update fails for inner joins if tables do not have Primary Key
sql/ha_ndbcluster.cc:
  Bug #17249 delete statement with join where clause fails when table do not have pk
  Bug #17257 update fails for inner joins if tables do not have Primary Key
  
  change: the allocated area by setValue may not be around for later, store hidden key in special member variable instead
sql/ha_ndbcluster.h:
  Bug #17249 delete statement with join where clause fails when table do not have pk
  Bug #17257 update fails for inner joins if tables do not have Primary Key
  
  change: the allocated area by setValue may not be around for later, store hidden key in special member variable instead
2006-02-10 17:40:22 +01:00
unknown
a68f171585 BUG#16217 fix partly backported from 5.0. It is different in mysqlbinlog part.
This changeset is assumed to stay in 4.1.


client/mysql.cc:
  BUG#16217 forced to introduce a separate mysql client command.
  Feature is backported from 5.0, precisely 
  ChangeSet 1.2034 06/02/09 16:23:09 aelkin@mysql.com
  (under second review at the moment)
mysql-test/r/mysqlbinlog.result:
  changed in 5.0
mysql-test/t/mysqlbinlog.test:
  backported from 5.0. The last part of the test to mimic bug#16217
sql/log_event.cc:
  Inserting exclaiming comment command for mysql client made differently than in 5.0.
  Parsing still is cheap enough not to think to modify server code instead.
2006-02-10 15:12:27 +02:00
unknown
1a27a433fc Removed 'delayed' to make the test deterministic (as the bug itself has nothing to do with 'delayed'). 2006-02-08 16:00:39 +04:00
unknown
2408644096 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-4.1
2006-02-07 14:23:16 +02:00
unknown
26f7afaf35 kill.test fixed for kill on Mac OS X (which do not send OK)
mysql-test/r/kill.result:
  This result chenged because of the correspondent test change.
mysql-test/t/kill.test:
  This test fixed for kill on Mac OS X (which do not send OK)
2006-02-07 13:45:16 +02:00
unknown
0b9270009c Merge april.(none):/home/svoj/devel/mysql/BUG14496/mysql-4.1
into  april.(none):/home/svoj/devel/mysql/merge/mysql-4.1
2006-02-07 13:49:03 +04:00
unknown
8deb6616bc Bug #17154 load data infile of char values into a table of char(PK) hangs
Bug #17158  	load data infile of char values into table of char with no (PK) fails to load
Bug #17081  	Doing "LOAD DATA INFILE" directly after delete can cause missing data


mysql-test/r/ndb_load.result:
  New BitKeeper file ``mysql-test/r/ndb_load.result''
mysql-test/t/ndb_load.test:
  New BitKeeper file ``mysql-test/t/ndb_load.test''
2006-02-07 00:03:39 +01:00
unknown
b301e65883 ndb - replace+tinyblob back-patch from 5.0 [ discard on 4.1->5.0 merge ]
mysql-test/r/ndb_blob.result:
  replace+tinyblob back-patch from 5.0
mysql-test/t/ndb_blob.test:
  replace+tinyblob back-patch from 5.0
ndb/src/ndbapi/NdbBlob.cpp:
  replace+tinyblob back-patch from 5.0
2006-02-03 15:23:58 +01:00
unknown
e3c3086304 BUG#14496: Crash or strange results with prepared statement,
MATCH and FULLTEXT
Fixed that fulltext query using PS results in unexpected behaviour
when executed 2 or more times.


mysql-test/r/fulltext.result:
  Testcase for BUG#14496.
mysql-test/t/fulltext.test:
  Testcase for BUG#14496.
sql/item_func.h:
  In Item_func_match::cleanup() always reset ft_handler to 0.
2006-02-01 20:40:12 +04:00
unknown
43f122c410 Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/alexi/innodb/mysql-4.1-merged
2006-01-30 15:31:35 +03:00
unknown
cc47eb7791 Fixed BUG#16387.
Applied innodb-4.1-ss17 snapshot.
  Do not mistake TABLENAME_ibfk_0 for auto-generated id.


innobase/dict/dict0dict.c:
  Applied innodb-4.1-ss17 snapshot.
    dict_table_get_highest_foreign_id(): Ignore foreign
    constraint identifiers starting with the pattern
    TABLENAME_ibfk_0 (BUG#16387).
mysql-test/r/innodb.result:
  Applied innodb-4.1-ss17 snapshot.
    Fixed results for added test case.
mysql-test/t/innodb.test:
  Applied innodb-4.1-ss17 snapshot.
    Added test case.
2006-01-30 15:17:33 +03:00
unknown
79f575a8f7 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into  c-5c0be253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug12796
2006-01-27 09:29:59 -05:00
unknown
e7f4df036b Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug8-4.1
2006-01-26 19:01:54 +02:00
unknown
f9ab554985 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug8-4.1


sql/sql_select.cc:
  Auto merged
2006-01-26 16:00:49 +02:00
unknown
956a5b6dfa BUG#15699 importing the fix from 5.0
sql/sql_parse.cc:
  BUG#15699,16487 merge of the fix made in 5.0
mysql-test/r/rpl_multi_update4.result:
  New BitKeeper file ``mysql-test/r/rpl_multi_update4.result''
mysql-test/t/rpl_multi_update4-slave.opt:
  New BitKeeper file ``mysql-test/t/rpl_multi_update4-slave.opt''
mysql-test/t/rpl_multi_update4.test:
  New BitKeeper file ``mysql-test/t/rpl_multi_update4.test''
mysql-test/r/rpl_ignore_table.result:
  New BitKeeper file ``mysql-test/r/rpl_ignore_table.result''
2006-01-26 12:49:55 +02:00
unknown
6025cd4672 Merge 2006-01-26 00:06:20 +03:00
unknown
d33ac37ba6 BUG#15935: In mysql_update, don't use full index scan when we could have used quick select scan.
mysql-test/r/update.result:
  Testcase for BUG#15935
mysql-test/t/update.test:
  Testcase for BUG#15935
sql/sql_update.cc:
  BUG#15935: 
  - Do account for the fact that used_index!=MAX_KEY is also true for cases
    when quick select is used, and use quick select then (and not full index scan).
  - Also removed the redundant "used_index= MAX_KEY" statement
2006-01-25 23:25:23 +03:00
unknown
4a525b3f92 Manually merged
sql/sql_base.cc:
  Auto merged
2006-01-24 22:10:39 +03:00
unknown
e14c9c5d9c Fixed bug #16510: Updating field named like '*name' caused server crash.
When setup_fields() function finds field named '*' it expands it to the list
of all table fields. It does so by checking that the first char of
field_name is '*', but it doesn't checks that the '* is the only char.
Due to this, when updating table with a field named like '*name', such field
is wrongly treated as '*' and expanded. This leads to making list of fields
to update being longer than list of the new values. Later, the fill_record() 
function crashes by dereferencing null when there is left fields to update,
but no more values.

Added check in the setup_fields() function which ensures that the field
expanding will be done only when '*' is the only char in the field name.


mysql-test/t/update.test:
  Added test case for bug#16510: Updating field named like '*name' caused server crash
mysql-test/r/update.result:
  Added test case for bug#16510: Updating field named like '*name' caused server crash
sql/sql_base.cc:
  Fixed bug #16510: Updating field named like '*name' caused server crash.
  Added check in the setup_fields() function which ensures that the field
  expanding will be done only when '*' is the only char in the field name.
2006-01-23 21:51:32 +03:00
unknown
cfbb86034d Merge mysql.com:/home/mydev/mysql-4.0-bug5390
into  mysql.com:/home/mydev/mysql-4.1-bug5390


sql/table.h:
  Auto merged
mysql-test/r/lock.result:
  BUG#5390 - problems with merge tables
  Manual merge from 4.0.
mysql-test/t/lock.test:
  BUG#5390 - problems with merge tables
  Manual merge from 4.0.
sql/lock.cc:
  BUG#5390 - problems with merge tables
  Manual merge from 4.0.
2006-01-23 19:19:29 +01:00
unknown
15ecf9228a BUG#5390 - problems with merge tables
After-fix optimizations proposed and finally
implemented by Monty.


mysql-test/r/lock.result:
  BUG#5390 - problems with merge tables
  After-fix optimizations proposed and finally
  implemented by Monty.
  Additional test results.
mysql-test/t/lock.test:
  BUG#5390 - problems with merge tables
  After-fix optimizations proposed and finally
  implemented by Monty.
  Additional tests.
sql/lock.cc:
  BUG#5390 - problems with merge tables
  After-fix optimizations proposed and finally
  implemented by Monty.
  get_lock_data() gets a flag for storing the lock
  positions in the new TABLE elements.
  mysql_lock_remove() can now remove a lock faster
  and more precisely as it has needed info in TABLE now.
  mysql_unlock_read_tables() and mysql_lock_merge() must 
  now adjust the new elements of TABLE when modifying locks.
  mysql_lock_have_duplicate() can now work faster on
  the existing lock as the positions in the lock
  arrays are known for each table.
  get_lock_data() assigns the new TABLE elements 
  on request of the new flag.
sql/table.h:
  BUG#5390 - problems with merge tables
  After-fix optimizations proposed and finally
  implemented by Monty.
  Additional elements of TABLE.
2006-01-23 19:12:29 +01:00
unknown
736f9c09d7 Merge gboehn@bk-internal.mysql.com:/home/bk/mysql-4.1
into  phoenix.(none):/data/mysql-4.1-BK
2006-01-23 16:34:53 +01:00
unknown
0ee28e1a4d BUG#16489 - utf8 + fulltext leads to corrupt index file.
Fixed that UPDATE statement crashes multi-byte charset fulltext index.


myisam/ft_update.c:
  Fixed that UPDATE statement crashes multi-byte charset fulltext index.
  While updating, always rewrite multi-byte charset fulltext index.
mysql-test/r/fulltext2.result:
  Added a testcase for BUG#16489.
mysql-test/t/fulltext2.test:
  Added a testcase for BUG#16489.
2006-01-23 17:15:33 +04:00
unknown
c56ae50732 Merge gboehn@bk-internal.mysql.com:/home/bk/mysql-4.1
into  phoenix.(none):/data/mysql-4.1-BK
2006-01-23 11:18:06 +01:00
unknown
32fc680089 Merge hf@192.168.21.12:work/mysql-4.1.9855
into eagle.intranet.mysql.r18.ru:/home/hf/work/mysql-4.1.mrg


sql/item_func.cc:
  Auto merged
2006-01-21 17:53:29 +04:00
unknown
029eb59455 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug8-4.1


sql/sql_class.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-01-18 13:49:37 +02:00
unknown
e7c25ed4a1 Excluded posibility of tmp_table_param.copy_field double deletion (BUG#14851).
mysql-test/r/kill.result:
  BUG#14851 test
mysql-test/t/kill.test:
  BUG#14851 test
sql/sql_class.cc:
  Debug prints are added.
sql/sql_select.cc:
  Allocation of tmp_join fixed to involve constructor (it is not related to the bug directly but might cause other problems).
  Excluded posibility of tmp_table_param.copy_field double deletion (BUG#14851).
sql/sql_select.h:
  JOINs constructor added, initialization of them fixed (it is not related to the bug directly but might cause other problems).
2006-01-18 13:48:57 +02:00
unknown
17ccdd1a05 A fix for Bug#13337 "ps test fails if configure wo/ usc2"
mysql-test/r/ctype_ucs.result:
  Test results changed (Bug#13337)
mysql-test/r/ps.result:
  Test results changed (Bug#13337)
mysql-test/t/ctype_ucs.test:
  Fix Bug#13337 (move the test that uses UCS character set to 
  ctype_ucs)
mysql-test/t/ps.test:
  Fix Bug#13337 (move the test that uses UCS character set to 
  ctype_ucs)
2006-01-17 01:03:03 +03:00
unknown
f41b7bca6c Merge
mysql-test/r/create.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
sql/sql_table.cc:
  SCCS merged
2006-01-16 16:21:41 +01:00
unknown
e5f077f79a date_formats.test:
fix for bug #15828 after review
  doing val_str now before testing of null value secures the function for null values returned by dynamic functions - the fix before was incomplete andy covered constant null values


mysql-test/t/date_formats.test:
  fix for bug #15828 after review
  doing val_str now before testing of null value secures the function for null values returned by dynamic functions - the fix before was incomplete andy covered constant null values
2006-01-16 15:46:37 +01:00
unknown
ab30b3e09c Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/alexi/innodb-ss/mysql-4.1-ss14
2006-01-15 14:56:38 +03:00
unknown
5497a05a98 Changes from innodb-4.1-ss14 snapshot
Fixed BUG#14056: Column prefix index on UTF-8 primary key
 causes "Can't find record.."
 Also fixed bug 15991.


innobase/include/os0file.h:
  Changes from innodb-4.1-ss14 snapshot
   os_file_hadle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
   to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
   This fixes the crash on RENAME TABLE when the .ibd file is a symbolic
   link to a different file system. (Bug 15991)
innobase/os/os0file.c:
  Changes from innodb-4.1-ss14 snapshot
   os_file_hadle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
   to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
   This fixes the crash on RENAME TABLE when the .ibd file is a symbolic
   link to a different file system. (Bug 15991)
mysql-test/r/innodb.result:
  Changes from innodb-4.1-ss14 snapshot
   Fixed BUG#14056: Column prefix index on UTF-8 primary key
   causes "Can't find record.."
mysql-test/t/innodb.test:
  Changes from innodb-4.1-ss14 snapshot
   Fixed BUG#14056: Column prefix index on UTF-8 primary key
   causes "Can't find record.."
sql/ha_innodb.cc:
  Changes from innodb-4.1-ss14 snapshot
   Fixed BUG#14056: Column prefix index on UTF-8 primary key
   causes "Can't find record.."
2006-01-15 14:50:47 +03:00
unknown
04a7810627 A fix and a test case for Bug#12734 " prepared statement may
return incorrect result set for a select SQL request"


mysql-test/r/ps.result:
  Test results fixed (Bug#12734)
mysql-test/t/ps.test:
  A test case for Bug#12734
sql/item_cmpfunc.cc:
  Reset canDoTurboBM in Item_func_like::cleanup()
sql/item_cmpfunc.h:
  Add Item_func_like::cleanup()
2006-01-14 04:55:07 +03:00
unknown
25e32d83d6 fix for bug#15828
problem was not checking 2nd parameter of str_to_date against NULL


mysql-test/r/date_formats.result:
  bk commit
2006-01-13 14:42:46 +01:00
unknown
0bb6e33957 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15377
2006-01-13 14:22:53 +04:00
unknown
ef58dc435b Merge mysql.com:/usr/home/bar/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15377
2006-01-13 14:16:16 +04:00
unknown
f00e5b36c7 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15581
2006-01-12 11:13:34 +04:00
unknown
29818203eb Commenting out testcases which cause type_time.test failure.
To be uncommented after fixing bug 15805.


mysql-test/r/type_time.result:
  Fixing testcases results.
mysql-test/t/type_time.test:
  Temporaly commented out testcases which cause type_time.test failure.
   To be uncommented after fixing bug 15805.
2006-01-10 17:57:46 +03:00
unknown
7341c73748 Merge rurik.mysql.com:/home/igor/mysql-4.1
into  rurik.mysql.com:/home/igor/dev/mysql-4.1-0
2006-01-09 15:20:01 -08:00
unknown
da800fe5a4 Merge msvensson@10.100.68.5:/home/msvensson/mysql/bug15598/my41-bug15598
into  devsrv-b.mysql.com:/space/magnus/my41-bug15598


sql/sql_acl.cc:
  Auto merged
2006-01-09 10:57:28 +01:00
unknown
16257e8b35 Bug #15598 Server crashes in specific case during setting new password
- When acl_user->host.hostname is NULL compare it as ""


mysql-test/r/grant.result:
  Test user with host ''
mysql-test/t/grant.test:
  Test user with host ''
sql/sql_acl.cc:
  If acl_user->host.hostname is NULL compare it as ""
2006-01-09 10:31:07 +01:00
unknown
770e0e8118 Fixed bug #14274: a query with a having clause containing only set function returned a wrong result set.
mysql-test/r/having.result:
  Added a test case for bug #14274.
mysql-test/t/having.test:
  Added a test case for bug #14274.
sql/sql_select.cc:
  Fixed bug #14274: a query with a having clause containing only set function returned a wrong result set.
  It happened because processing of the set functions in having started with a call of the split_sum_func
  method, instead of the split_sum_func2 method.
2006-01-07 23:00:06 -08:00
unknown
7207d7d5b7 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/bug15775_part2/my41-bug15775_part2
2005-12-29 09:19:25 +01:00
unknown
c37389cfdf Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/14583-bug-4.1-mysql
2005-12-28 16:00:10 +03:00
unknown
9a8dde9bc7 BUG#15775 "drop user" command does not refresh acl_check_hosts
- DROP USER command didn't reload the acl_check_hosts cache causing subsequent 
     connect's via TCP to fail randomly.
   - 4.1 version


mysql-test/r/grant2.result:
  Update test results
mysql-test/t/grant2.test:
  Add test for to check that connect via TCP work after "drop user"
sql/sql_acl.cc:
  Reload acl_check_hosts as its memory is mapped to acl_user
  Use acl_user->host.hostname when searching the acl_check_hosts list
2005-12-28 09:23:27 +01:00
unknown
9a128b97d1 Fix bug#14583
When InnoDB compares varchar field in ucs2 with given key using bin collation,
it calls my_strnncollsp_ucs2_bin() to perform comparison.
Because field length was lesser than length of key field should be padded
with trailing spaces in order to get correct result. 
Because  my_strnncollsp_ucs2_bin() was calling my_strnncollp_ucs2_bin(), which
doesn't pads field, wrong comparison result was returned. This results in
wrong result set.

my_strnncollsp_ucs2_bin() now compares fields like my_strnncollsp_ucs2 do,
but using binary collation.


mysql-test/t/ctype_ucs.test:
  Test case for bug#14583  Wrong my_strnncollsp_ucs2_bin() behaviour results in skipping
  correct records.
mysql-test/r/ctype_ucs.result:
  Test case for bug#14583  Wrong my_strnncollsp_ucs2_bin() behaviour results in skipping correct records.
strings/ctype-ucs2.c:
  Fix bug#14583 Wrong my_strnncollsp_ucs2_bin() behaviour results in skipping
  correct records.my_strnncollsp_ucs2_bin() now compares fields like my_strnncollsp_ucs2 do,
  but using binary collation.
2005-12-27 20:16:59 +03:00
unknown
4b543591b0 Merge mysql.com:/home/mydev/mysql-4.1
into  mysql.com:/home/mydev/mysql-4.1-bug5390


libmysqld/ha_blackhole.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
2005-12-27 10:36:19 +01:00
unknown
e1c6141340 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.


mysql-test/t/ctype_utf8.test:
  Adding test case.
mysql-test/r/ctype_utf8.result:
  Adding test case.
sql/field.cc:
  Bug#15581: COALESCE function truncates mutli-byte TINYTEXT values
  BLOB variations have byte limits,
  unlike CHAR/VARCHAR which have number-of-character limits.
  It means tinyblob can store up to 255 bytes.
  All of them can be basic latin letters which use 1 byte
  per character.
  I.e. we can store up to 255 characters in a tinyblob column.
  When passing a tinyblob column as an argument into
  a function (for example COALESCE or CONCAT) we
  need to reserve 3*255 bytes in the case of utf-8.
  I.e. multiply length in bytes to mbcharlen for the
  character set.
2005-12-19 15:52:10 +04:00
unknown
25f396adc2 Merge serg@bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2005-12-18 13:31:43 +01:00
unknown
3cd1e9765c BUG#11336 - fulltext index corruption after repair_by_sort and mi_delete
for uca collation isalnum and strnncollsp don't agree on whether
0xC2A0 is a space (strnncollsp is right, isalnum is wrong).

they still don't, the bug was fixed by avoiding strnncollsp
2005-12-18 13:30:01 +01:00
unknown
52c0440085 Fixed BUG #12440: "Incorrect processing of time values containing
long fraction and/or large exponent part".


mysql-test/r/type_time.result:
  Fixed testcases results (bug #12440)
mysql-test/t/type_time.test:
  Added testcases for bug #12440
sql-common/my_time.c:
  Fixed bug #12440: "Incorrect processing of time values containing
   long fraction and/or large exponent part".
   Modified str_to_time(). Process properly fraction part containing
   more than 6 digits. Check for existence of exponent part which
   may result from %g formatting applied to time value specified as
   large real number.
2005-12-15 18:48:08 +03:00
unknown
c1d403cb09 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/local/home/marty/MySQL/mysql-4.1
2005-12-14 14:49:59 +01:00