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.
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.
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.
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.
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
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.
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
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
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.
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.
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
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
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.
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
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
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''
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).
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.
- 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''
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
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.
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.
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)
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).
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
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.
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)
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''
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
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.
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''
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
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.
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.
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.
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).
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)
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
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.."
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()
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.
- 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 ""
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.
- 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
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.
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.
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
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.