A string buffers which were included in the 'view' data structure
were allocated on the stack, causing an invalid pointer when used
after the function returned.
The fix: use copy of values for view->md5 & view->queries
mysql-test/r/view.result:
test result
mysql-test/t/view.test:
test case
sql/sql_view.cc:
A string buffers which were included in the 'view' data structure
were allocated on the stack, causing an invalid pointer when used
after the function returned.
The fix: use copy of values for view->md5 & view->queries
The convert_constant_item function converts a constant to integer using
field for condition like 'field = a_constant'. When the convert_constant_item
is called for a subquery the outer select is already being executed, so
convert_constant_item saves field's value to prevent its corruption.
For EXPLAIN field's value isn't initialized thus when convert_constant_item
tries to restore saved value it fails assertion.
Now the convert_constant_item doesn't save/restore field's value
for EXPLAIN.
mysql-test/r/explain.result:
Added a test case for the bug#37870.
mysql-test/t/explain.test:
Added a test case for the bug#37870.
sql/item_cmpfunc.cc:
Bug#37870: Usage of uninitialized value caused failed assertion.
Now the convert_constant_item doesn't save/restore field's value
for EXPLAIN.
The abi_check target instroduced as part of WL#4380 verifies
changes to mysql.h. mysql.h in turn includes mysql_version.h.
mysql_version.h is a file that is generated during the configure
phase. We must ensure that mysql_version.h is cleaned only during
distclean and not during clean.
include/Makefile.am:
This file contains the following changes
1) Moves the cleaning of mysql_version.h from the clean
phase to the distclean phase.
2) Removes mysql_version.h.in from noinst_HEADERS, this
entry was reduntant since by virtue of inclusion of
mysql_version.h mysql_version.h.in is already included.
mysql-test/r/partition_windows.result:
Update warning number due to new errors appearing earlier
in the list.
mysql-test/r/windows.result:
Update warning number due to new errors appearing earlier
in the list.
mysql-test/r/partition_not_windows.result:
Update warning number due to new errors appearing earlier
in the list.
mysql-test/r/partition_symlink.result:
Update warning number due to new errors appearing earlier
in the list.
mysql-test/r/symlink.result:
Update warning number due to new errors appearing earlier
in the list.
Problem: mysqld doesn't detect that enum data must be reinserted performing
'ALTER TABLE' in some cases.
Fix: reinsert data altering an enum field if enum values are changed.
mysql-test/r/alter_table.result:
Fix for bug#23113: Different behavior on altering ENUM fields between 5.0 and 5.1
- test result.
mysql-test/t/alter_table.test:
Fix for bug#23113: Different behavior on altering ENUM fields between 5.0 and 5.1
- test case.
sql/field.cc:
Fix for bug#23113: Different behavior on altering ENUM fields between 5.0 and 5.1
- Field_enum::is_equal() introduced, which is called to detect that a field
is changing by 'ALTER TABLE'.
sql/field.h:
Fix for bug#23113: Different behavior on altering ENUM fields between 5.0 and 5.1
- Field_enum::is_equal() introduced, which is called to detect that a field
is changing by 'ALTER TABLE'.
- Make send_row_on_empty_set() return FALSE when simplify_cond() has found out
that HAVING is always FALSE
re-committing to put the fix into 5.0 and 5.1
mysql-test/r/group_by.result:
BUG#38072: Wrong result: HAVING not observed in a query with aggregate
- Testcase
mysql-test/t/group_by.test:
BUG#38072: Wrong result: HAVING not observed in a query with aggregate
- Testcase
sql/sql_select.h:
BUG#38072: Wrong result: HAVING not observed in a query with aggregate
- Make send_row_on_empty_set() return FALSE when simplify_cond() has found out
that HAVING is always FALSE
breaks auto increment
The auto_increment value was not initialized if
the first statement after opening a table was
an 'UPDATE'.
solution was to check initialize if it was not,
before trying to increase it in update.
mysql-test/suite/parts/inc/partition_auto_increment.inc:
Bug#40176: update as first partitioning statement
breaks auto increment
Added tests for verifying the bug and show some more
auto_increment flaws
mysql-test/suite/parts/r/partition_auto_increment_archive.result:
Bug#40176: update as first partitioning statement
breaks auto increment
Updated test results, due to added tests
mysql-test/suite/parts/r/partition_auto_increment_blackhole.result:
Bug#40176: update as first partitioning statement
breaks auto increment
Updated test results, due to added tests
mysql-test/suite/parts/r/partition_auto_increment_innodb.result:
Bug#40176: update as first partitioning statement
breaks auto increment
Updated test results, due to added tests
mysql-test/suite/parts/r/partition_auto_increment_memory.result:
Bug#40176: update as first partitioning statement
breaks auto increment
Updated test results, due to added tests
mysql-test/suite/parts/r/partition_auto_increment_myisam.result:
Bug#40176: update as first partitioning statement
breaks auto increment
Updated test results, due to added tests
mysql-test/suite/parts/r/partition_auto_increment_ndb.result:
Bug#40176: update as first partitioning statement
breaks auto increment
Updated test results, due to added tests
sql/ha_partition.cc:
Bug#40176: update as first partitioning statement
breaks auto increment
make sure that the auto_increment value is initialized
before updating it.
(missed initializing in mysql_update_row).
sql/ha_partition.h:
Bug#40176: update as first partitioning statement
breaks auto increment
Assert that it is initialized, before updating
the auto_increment value
Visual Studio 2008 Express edition does not include message compiler mc.exe
It is not possible to build MySQL server if only VC2008 Express is installed,
because we use mc.exe to generate event log messages.
This patch removes the mc.exe dependency. Generated files message.h,
message.rc and MSG00001.bin are checked into source code repository.
Instructions on how to add or change messages are added to messages.mc
Added test case to check the default value of @@binlog_format.
mysql-test/t/binlog_format_basic.test:
Added test case to verify the default binlog_format: it should be
STATEMENT in 5.1 and MIXED in 6.0.
The problem was that the server did not robustly handle a
unilateral roll back issued by the Resource Manager (RM)
due to a resource deadlock within the transaction branch.
By not acknowledging the roll back, the server (TM) would
eventually corrupt the XA transaction state and crash.
The solution is to mark the transaction as rollback-only
if the RM indicates that it rolled back its branch of the
transaction.
mysql-test/r/xa.result:
Add test case result for Bug#28323
mysql-test/t/xa.test:
Add test case for Bug#28323
sql/handler.cc:
Reset XID only at the end of the global transaction.
sql/share/errmsg.txt:
Add new error codes.
sql/sql_class.h:
Remember the error reported by the Resource Manager.
sql/sql_parse.cc:
Rollback the transaction if the Resource Manager reported
a error and rolled back its branch of the transaction.
The problem was that the server did not robustly handle a
unilateral roll back issued by the Resource Manager (RM)
due to a resource deadlock within the transaction branch.
By not acknowledging the roll back, the server (TM) would
eventually corrupt the XA transaction state and crash.
The solution is to mark the transaction as rollback-only
if the RM indicates that it rolled back its branch of the
transaction.
mysql-test/r/xa.result:
Add test case result for Bug#28323
mysql-test/t/xa.test:
Add test case for Bug#28323
sql/handler.cc:
Reset XID only at the end of the global transaction.
sql/share/errmsg.txt:
Add new error codes.
sql/sql_class.h:
Remember the error reported by the Resource Manager.
sql/sql_parse.cc:
Rollback the transaction if the Resource Manager reported
a error and rolled back its branch of the transaction.
Debug builds of MySQL 5.1, 6.0 with Sun Studio 12 broke because of
use of gcc specific feature.
The fix is to replace __FUNCTION__ with the corresponding character string
In certain situations, a scan of the table will return the error
code HA_ERR_RECORD_DELETED, and this error code is not
correctly caught in the Rows_log_event::find_row() function, which
causes an error to be returned for this case.
This patch fixes the problem by adding code to either ignore the
record and continuing with the next one, the the event of a table
scan, or change the error code to HA_ERR_KEY_NOT_FOUND, in the event
that a key lookup is attempted.
fails after the first time
Two separate problems :
1. When flattening joins the linked list used for name resolution
(next_name_resolution_table) was not updated.
Fixed by updating the pointers when extending the table list
2. The items created by expanding a * (star) as a column reference
were marked as fixed, but no cached table was assigned to them
(unlike what Item_field::fix_fields does).
Fixed by assigning a cached table (so the re-preparation is done
faster).
Note that the fix for #2 hides the fix for #1 in most cases
(except when a table reference cannot be cached).
mysql-test/r/sp.result:
Bug #33811: test case
mysql-test/t/sp.test:
Bug #33811: test case
sql/sql_base.cc:
Bug #33811: cache the table for Item_fields created by expanding '*'
sql/sql_select.cc:
Bug #33811: maintain a correct name resolution chain when
flattening joins.
collation change made in 5.1.24-rc
Problem: 'CHECK TABLE ... FOR UPGRADE' did not check for
incompatible collation changes made in MySQL 5.1.24-rc.
Fix: add the check.
sql/handler.cc:
- check for incompatible collation changes made in 5.1.24-rc:
bug #27877:
utf8_general_ci
ucs2_general_ci