The relay log may not be open for some reason (e.g. disk error) after rotation,
and using it causes the slave crash.
Fix: check we have it open before access, return error otherwise.
sql/slave.cc:
Fix for bug #10798: If relay log fails to rotate, slave will crash after
- check if the relay log is open before any access.
Having broken .frm, particulary number of field names does
not match number of fields, causes server crash.
Refuse to open a table if number of field names in a table
is not equal to number of fields in a table.
No test case, since it requires broken .frm file.
sql/table.cc:
Refuse to open a table if number of field names in a table
is not equal to number of fields in a table.
- Result file was not properly committed.
- Update result file to match the new test case.
mysql-test/r/myisam.result:
Bug#17498 failed to put data file in custom directory use "data directory" option
- Update result file to match the new test case.
mysql-test/r/myisam.result:
Fix results file - a test was moved from the .test file, but the results were not updated.
mysql-test/r/symlink.result:
echo End of 4.1 tests while I'm here
mysql-test/t/myisam.test:
echo End of 4.1 tests while I'm here
mysql-test/t/symlink.test:
echo End of 4.1 tests while I'm here
The Docs team has two new manpages for the "server" RPM: "my_print_defaults" and "mysql_tzinfo_to_sql".
support-files/mysql.spec.sh:
The Docs team has two new manpages for the "server" RPM: "my_print_defaults" and "mysql_tzinfo_to_sql".
- When this bug was corrected it changed the behavior
for data/index directory in the myisam test case.
- This patch moves the OS depending tests to a non-windows
test file.
mysql-test/r/myisam.result:
moved test from myisam to symlink; new result file
mysql-test/r/symlink.result:
moved test from myisam to symlink; new result file
mysql-test/t/myisam.test:
moved test from myisam to symlink
mysql-test/t/symlink.test:
moved test from myisam to symlink
and no WHERE condition were applied for any subquery without tables.
mysql-test/r/subselect.result:
Added a test case for bug #24670.
mysql-test/t/subselect.test:
Added a test case for bug #24670.
sql/item_subselect.cc:
Fixed bug #24670: optimizations that are legal only for subqueries without tables
and no WHERE condition were applied for any subquery without tables.
Removed an assertion that caused an abort for subqueries without tables and no
WHERE condition.
Blocked substitution of a single-row subquery without tables for the constant
row from its select list when the subquery contained a WHERE condition.
This optimization is valid only for subquries without tables with no conditions.
Any subquery without tables with WHERE clause returns NULL if the WHERE condition
is FALSE. Erroneously it was always considered as non-nullable that could trigger
another optimization concerning IS NULL predicates which is applicable only for
non-nullable expressions and ultimately led to a wrong result returned by the outer
query.
Added a proper implementation of the virtual method may_be_null for class
subselect_single_select_engine.
sql/item_subselect.h:
Fixed bug #24670: optimizations that are legal only for subqueries without tables
and no WHERE condition were applied for any subquery without tables.
Made method may_by_null for class subselect_engine vvirtual.
- Add printout in safe_connect indicating that mysqltest is in a loop waiting for
connection to mysqld. Will be printed when --verbose is passed as argument to
mysqltest
client/mysqltest.c:
Bug#20225 mysqltest runs in an endless loop when trying to start rpl_sys test suite
- Add printout in safe_connect indicating that mysqltest is in a loop waiting for
connection to mysqld
- test* targets are identical (as much as possible) to 5.0 & 5.1 versions
- use @PERL@ ./mysql-test-run.pl, instead of depending on /usr/bin/perl location
- PHONY: target includes all test targets
Makefile.am:
- test* targets are identical (as much as possible) to 5.0 & 5.1 versions
- use @PERL@ ./mysql-test-run.pl, instead of depending on /usr/bin/perl location
- PHONY: target includes all test targets
mysql-test/t/kill.test:
Move the connect of second connection to just before the query to be killed are sent.
This introduces less variance since the connect time is not included in the delay
we want between send of query and kill.
- Use "mysql_field_count" to determine if there is a need to
call "mysql_store_result"
client/mysqltest.c:
Only call 'mysql_store_result' if 'mysql_field_count' is greater than 0
indicating that this query has a result set. This change is mainly since
if mysql_store_result fails the value returned by mysql_field_count will be reset.
- Thanks to Vasil Dimov for the patch!
client/mysqltest.c:
Use my_snprintf to protect against exceeding size of buff
Since variable name and valu might not be null terminated it's necessary to
provide the length of the format specifiers.
Bug#4968 "Stored procedure crash if cursor opened on altered table"
Bug#19733 "Repeated alter, or repeated create/drop, fails"
Bug#19182 "CREATE TABLE bar (m INT) SELECT n FROM foo; doesn't work from
stored procedure."
Bug#6895 "Prepared Statements: ALTER TABLE DROP COLUMN does nothing"
Bug#22060 "ALTER TABLE x AUTO_INCREMENT=y in SP crashes server"
Test cases for bugs 4968, 19733, 6895 will be added in 5.0.
Re-execution of CREATE DATABASE, CREATE TABLE and ALTER TABLE
statements in stored routines or as prepared statements caused
incorrect results (and crashes in versions prior to 5.0.25).
In 5.1 the problem occured only for CREATE DATABASE, CREATE TABLE
SELECT and CREATE TABLE with INDEX/DATA DIRECTOY options).
The problem of bugs 4968, 19733, 19282 and 6895 was that functions
mysql_prepare_table, mysql_create_table and mysql_alter_table were not
re-execution friendly: during their operation they used to modify contents
of LEX (members create_info, alter_info, key_list, create_list),
thus making the LEX unusable for the next execution.
In particular, these functions removed processed columns and keys from
create_list, key_list and drop_list. Search the code in sql_table.cc
for drop_it.remove() and similar patterns to find evidence.
The fix is to supply to these functions a usable copy of each of the
above structures at every re-execution of an SQL statement.
To simplify memory management, LEX::key_list and LEX::create_list
were added to LEX::alter_info, a fresh copy of which is created for
every execution.
The problem of crashing bug 22060 stemmed from the fact that the above
metnioned functions were not only modifying HA_CREATE_INFO structure in
LEX, but also were changing it to point to areas in volatile memory of
the execution memory root.
The patch solves this problem by creating and using an on-stack
copy of HA_CREATE_INFO (note that code in 5.1 already creates and
uses a copy of this structure in mysql_create_table()/alter_table(),
but this approach didn't work well for CREATE TABLE SELECT statement).
mysql-test/r/ps.result:
Update test results (Bug#19182, Bug#22060)
mysql-test/t/ps.test:
Add a test case for Bug#19182, Bug#22060 (4.1-only parts)
sql/mysql_priv.h:
LEX::key_list and LEX::create_list were moved to LEX::alter_info.
Update declarations to use LEX::alter_info instead of these two
members.
sql/sql_class.h:
Replace pair<columns, keys> with an instance of Alter_info in
select_create constructor. We create a new copy of Alter_info
each time we re-execute SELECT .. CREATE prepared statement.
sql/sql_insert.cc:
Adjust to a new signature of create_table_from_items.
sql/sql_lex.cc:
Implement Alter_info::Alter_info that would make a "deep" copy
of all definition lists (keys, columns).
sql/sql_lex.h:
Move key_list and create_list to class Alter_info. Implement
Alter_info::Alter_info that can be used with PS and SP.
sql/sql_list.h:
Implement a copy constructor of class List that makes a deep copy
of all list nodes.
sql/sql_parse.cc:
Adjust to new signatures of mysql_create_table, mysql_alter_table,
select_create. Functions mysql_create_index and mysql_drop_index has
become identical after initialization of alter_info was moved to the
parser, and were merged. Flag enable_slow_log was not updated for
SQLCOM_DROP_INDEX, which is a bug. Just like CREATE INDEX, DROP INDEX
is currently done via complete table rebuild and is rightfully a slow
administrative statement.
sql/sql_show.cc:
Adjust mysqld_show_create_db to a new signature.
sql/sql_table.cc:
Adjust mysql_alter_table, mysql_recreate_table, mysql_create_table,
mysql_prepare_table to new signatures.
sql/sql_yacc.yy:
LEX::key_list and LEX::create_list moved to class Alter_info
- Using DATA/INDEX DIRECTORY option on Windows put data/index file into
default directory because the OS doesn't support readlink().
- The procedure for changing data/index file directory is
different under Windows.
- With this fix we report a warning if DATA/INDEX option is used,
but OS doesn't support readlink().
mysql-test/r/windows.result:
- updated result file.
mysql-test/t/windows.test:
- Added test case to verify we get warnings if we specify DATA/INDEX
DIRECTORY on a platform which doesn't support readlink().
sql/sql_parse.cc:
- Added warnings if DATA/INDEX DIRECTORY option is used but not supported
by the target platform.
table
ROW_FORMAT option is lost during CREATE/DROP INDEX.
This fix forces CREATE/DROP INDEX to retain ROW_FORMAT by instructing
mysql_alter_table() that ROW_FORMAT is not used during creating/dropping
indexes.
mysql-test/r/alter_table.result:
A test case for bug#23404.
mysql-test/t/alter_table.test:
A test case for bug#23404.
sql/sql_parse.cc:
CREATE/DROP INDEX must not change ROW_FORMAT. Setting create_info.row_type
to ROW_TYPE_NOT_USED informs mysql_alter_table that ROW_FORMAT was not
used during alteration, and thus must be retained.
scripts/Makefile.am:
pass --sysconfdir to scripts
scripts/mysqlaccess.sh:
use --sysconfdir instead of hardcoded /etc
scripts/mysqld_multi.sh:
use --sysconfdir instead of hardcoded /etc