column is used for ORDER BY
Problem: filesort isn't meant for null length sort data
(e.g. char(0)), that leads to a server crash.
Fix: disregard sort order if sort data record length is 0 (nothing
to sort).
mysql-test/r/select.result:
Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL
column is used for ORDER BY
- test result.
mysql-test/t/select.test:
Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL
column is used for ORDER BY
- test case.
sql/filesort.cc:
Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL
column is used for ORDER BY
- assert added as filesort cannot handle null length sort data.
sql/sql_select.cc:
Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL
column is used for ORDER BY
- don't sort null length data e.g. in case of ORDER BY CHAR(0).
- Added tests for innodb and semisync plugin
- Modified existing tests to include variable values in I_S tables
- Updated the all_vars test to include optional checkes for INNODB and semisync plugin
if loaded
mysql-test/suite/sys_vars/r/innodb_adaptive_flushing_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_change_buffering_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_file_format_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_file_format_check_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_io_capacity_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_old_blocks_pct_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_old_blocks_time_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_read_ahead_threshold_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_read_io_threads_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_stats_on_metadata_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_stats_sample_pages_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_strict_mode_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/innodb_use_sys_malloc_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_version_basic.result:
New result file
mysql-test/suite/sys_vars/r/innodb_write_io_threads_basic.result:
New result file
mysql-test/suite/sys_vars/r/last_insert_id_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/lc_messages_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/log_slow_queries_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/lower_case_file_system_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/lower_case_table_names_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/max_join_size_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/old_alter_table_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/optimizer_switch_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/profiling_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/profiling_history_size_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/pseudo_thread_id_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/rand_seed1_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/rand_seed2_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/relay_log_recovery_basic.result:
Updated result file
mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result:
New result file
mysql-test/suite/sys_vars/r/rpl_semi_sync_master_timeout_basic.result:
New result file
mysql-test/suite/sys_vars/r/rpl_semi_sync_master_trace_level_basic.result:
New result file
mysql-test/suite/sys_vars/r/rpl_semi_sync_master_wait_no_slave_basic.result:
New result file
mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result:
New result file
mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_trace_level_basic.result:
New result file
mysql-test/suite/sys_vars/r/sql_log_update_basic.result:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/r/sql_select_limit_basic.result:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/r/thread_cache_size_basic.result:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/all_vars-master.opt:
Added opt file for all_vars.test
mysql-test/suite/sys_vars/t/all_vars.test:
Modified test to check for semisync plugin and innodb
mysql-test/suite/sys_vars/t/innodb_adaptive_flushing_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_change_buffering_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_file_format_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_io_capacity_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_old_blocks_pct_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_old_blocks_time_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_read_ahead_threshold_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_read_io_threads_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_replication_delay_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_spin_wait_delay_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_stats_on_metadata_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_stats_sample_pages_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_strict_mode_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_thread_sleep_delay_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_use_sys_malloc_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_version_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/innodb_write_io_threads_basic.test:
Added test for innodb variable
mysql-test/suite/sys_vars/t/last_insert_id_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/lc_messages_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/log_slow_queries_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/lower_case_file_system_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/lower_case_table_names_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/max_join_size_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/old_alter_table_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/optimizer_switch_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/profiling_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/profiling_history_size_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/pseudo_thread_id_basic.test:
Added check for variable values in I_S tables and check for session variable
being numeric
mysql-test/suite/sys_vars/t/rand_seed1_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/rand_seed2_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/relay_log_recovery_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_basic-master.opt:
Added option file for semisync variable test
mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_basic.test:
Added test file for semisync variable
mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_basic-master.opt:
Added option file for semisync variable test
mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_basic.test:
Added test file for semisync variable
mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_basic-master.opt:
Added option file for semisync variable test
mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_basic.test:
Added test file for semisync variable
mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_basic-master.opt:
Added option file for semisync variable test
mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_basic.test:
Added test file for semisync variable
mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_basic-master.opt:
Added option file for semisync variable test
mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_basic.test:
Added test file for semisync variable
mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_basic-master.opt:
Added option file for semisync variable test
mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_basic.test:
Added test file for semisync variable
mysql-test/suite/sys_vars/t/sql_log_update_basic.test:
Added check for variable values in I_S tables and check for ON/OFF value changes
mysql-test/suite/sys_vars/t/sql_max_join_size_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/sql_select_limit_basic.test:
Added check for variable values in I_S tables
mysql-test/suite/sys_vars/t/thread_cache_size_basic.test:
Added check for variable values in I_S tables
- main.outfile_loaddata @solaris due to Bug#46895
- main.signal_demo3 @solaris due to Bug#47791
- main.sp @solaris due to Bug#47791
- rpl.rpl_slave_load_remove_tmpfile @windows due to Bug#50474
in multitable delete/subquery
SQL_BUFFER_RESULT should not have an effect on non-SELECT
statements according to our documentation.
Fixed by not passing it through to multi-table DELETE (similarly
to how it's done for multi-table UPDATE).
Rename method as to not hide a base.
Reorder attributes initialization.
Remove unused variable.
Rework code to silence a warning due to assignment used as truth value.
sql/item_strfunc.cc:
Rename method as to not hide a base.
sql/item_strfunc.h:
Rename method as to not hide a base.
sql/log_event.cc:
Reorder attributes initialization.
sql/rpl_injector.cc:
Rework code to silence a warning due to assignment used as truth value.
sql/rpl_record.cc:
Remove unused variable.
sql/sql_db.cc:
Rework code to silence a warning due to assignment used as truth value.
sql/sql_parse.cc:
Rework code to silence a warning due to assignment used as truth value.
sql/sql_table.cc:
Rework code to silence a warning due to assignment used as truth value.
=========================================================
revision-id: joro@sun.com-20100118155046-v6hvlyfmitcyep8p
committer: Georgi Kodinov <joro@sun.com>
branch nick: B45989-5.1-bugteam
timestamp: Mon 2010-01-18 17:50:46 +0200
message:
Bug #45989 take 2 : memory leak after explain encounters an
error in the query.
Fixes a leak after materializing a GROUP BY subquery to a
temp table when the subquery has a blob column in the SELECT
list.
Fixed by correctly destructing temporary buffers after doing
the conversion.
=========================================================
WL#5182 is a follow-up to WL#5154, deprecating a few more options
and system variables.
client/client_priv.h:
The warning message has been changed to not include
a specific version number in the text.
client/mysql.cc:
--no-tee is deprecated
client/mysqldump.c:
--all is deprecated
-a now points to create-options
mysql-test/r/mysqlbinlog.result:
Warning text changed
mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result:
Warning text changed
sql/mysql_priv.h:
The warning message has been changed to not include
a specific version number in the text.
sql/mysqld.cc:
--use-symbolic-links is deprecated
-s now points to --symbolic-links
--warnings is deprecated
-W now points to --log-warnings
myisam_max_extra_sort_file_size is deprecated
record_buffer is deprecated
--log-update is deprecated
--sql-bin-update-same is deprecated
--skip-locking is deprecated
--skip-symlink is deprecated
--enable-locking is deprecated
--delay-key-write-for-all-tables is deprecated
printstack() being present
When Bug#47391 was fixed, no assumption was made that support
for Solaris 8 was needed. Solaris 8 lacks printstack(), and
the build breaks because of this.
This patch adds a test for the presence of printstack() to
configure.in for 5.0, and uses HAVE_PRINTSTACK to make
decisions rather than the __sun define.
The 'rpl_get_master_version_and_clock' test verifies if the slave I/O
thread tries to reconnect to master when it tries to get the values of
the UNIX_TIMESTAMP, SERVER_ID from master under network disconnection.
So the master server is restarted for making the transient network
disconnection, during the period the COM_REGISTER_SLAVE failures are
produced in server log file when the slave I/O thread tries to
register on master.
To fix the problem, suppress COM_REGISTER_SLAVE failures in server log
file by mtr suppression, because they are expected.
mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result:
Removed mtr.add_suppression("Get master clock failed with error: ")
and mtr.add_suppression("Get master SERVER_ID failed with error: ").
Because they are suppressed globally.
MySQL's hash functions MD5 and SHA relied on the somewhat slow
sprintf function to convert the digests to hex representations.
This patch replaces the sprintf with a specific and inline hex
conversion function.
Patch contributed by Jan Steemann.
sql/item_strfunc.cc:
Add a hex conversion function.
Bug #45856 can't switch from binlog_format=row to mix with open tmp tbl
If binlog_format=MIXED, there are open temporary tables, an unsafe statement
is executed, and the user issues 'SET @@session.binlog_format = STATEMENT',
then subsequent DML statements will be written in row format despite
binlog_format=STATEMENT. Because the binlog format can't be reset to
statement based by 'reset_current_stmt_binlog_row_based' function.
If binlog_format=ROW, there are open temporary tables, and an unsafe statement
is executed, then the statement 'SET @@session.binlog_format = MIXED' generates
the error:
"Cannot switch out of the row-based binary log format when the session has open
temporary tables"
However, it is safe to switch to MIXED mode because events in row format are allowed.
To fix the above two problems, generate ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR
and forbid switching from MIXED or ROW to STATEMENT when there are open temp
tables and we are logging in row format. There is no error in any other case.
mysql-test/suite/binlog/r/binlog_format_switch_in_tmp_table.result:
Test result for bug#45855 and bug#45856.
mysql-test/suite/binlog/t/binlog_format_switch_in_tmp_table.test:
Added test file to verify if the program will generate
ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR error and forbid
switching from MIXED or ROW to STATEMENT when there are
open temp tables and we are logging in row format. There
is no error in any other case.
Before this fix, opening a configuration file located under "~" failed.
To evaluate the "~" path, home_dir needs to be initialized.
The 'home_dir' variable was initialized too late in my_init().
This fix:
- moved the home_dir initialization from my_init() to my_basic_init(),
using getenv("HOME"))
- moved the initialization of my_umask / my_umask_dir also to
my_basic_init(), to have all the my_umask / my_umask_dir init code in the
same place.
The second part is not strictly required, but makes the code more
maintainable.
Tested the fix manually.
No MTR tests added, because MTR should not access or modify the $HOME
directory of the user running tests.