mariadb/mysql-test/suite/sys_vars/r
Gleb Shchepa 06142cd545 Bug #42778: delete order by null global variable causes
assertion .\filesort.cc, line 797

A query with the "ORDER BY @@some_system_variable" clause,
where @@some_system_variable is NULL, causes assertion
failure in the filesort procedures.

The reason of the failure is in the value of
Item_func_get_system_var::maybe_null: it was unconditionally
set to false even if the value of a variable was NULL.


mysql-test/r/variables.result:
  Added test case for bug #42778.
mysql-test/suite/sys_vars/r/innodb_data_home_dir_basic.result:
  Updated test case for bug #42778:
  system variables were NOT NULL, now they are nullable.
mysql-test/suite/sys_vars/r/innodb_flush_method_basic.result:
  Updated test case for bug #42778:
  system variables were NOT NULL, now they are nullable.
mysql-test/suite/sys_vars/r/rpl_init_slave_func.result:
  Updated test case for bug #42778:
  system variables were NOT NULL, now they are nullable.
mysql-test/suite/sys_vars/r/ssl_capath_basic.result:
  Updated test case for bug #42778:
  system variables were NOT NULL, now they are nullable.
mysql-test/suite/sys_vars/r/ssl_cipher_basic.result:
  Updated test case for bug #42778:
  system variables were NOT NULL, now they are nullable.
mysql-test/suite/sys_vars/t/innodb_data_home_dir_basic.test:
  Updated test case for bug #42778:
  system variables were NOT NULL, now they are nullable.
mysql-test/suite/sys_vars/t/innodb_flush_method_basic.test:
  Updated test case for bug #42778:
  system variables were NOT NULL, now they are nullable.
mysql-test/suite/sys_vars/t/ssl_capath_basic.test:
  Updated test case for bug #42778:
  system variables were NOT NULL, now they are nullable.
mysql-test/suite/sys_vars/t/ssl_cipher_basic.test:
  Updated test case for bug #42778:
  system variables were NOT NULL, now they are nullable.
mysql-test/t/variables.test:
  Added test case for bug #42778.
sql/item.cc:
  Bug #42778: delete order by null global variable causes
              assertion .\filesort.cc, line 797
  
  The longlong_from_string_with_check function has been modified
  to skip unwanted warnings: now it uses the THD::no_errors
  flag to suppress warnings.
  The Item_func_get_system_var::update_null_value method
  sets the no_error flag.
sql/item_func.cc:
  Bug #42778: delete order by null global variable causes
              assertion .\filesort.cc, line 797
  
  1. The Item_func_get_system_var::fix_length_and_dec method
     has been modified to make system variables truly nullable.
  
  2. The Item_func_get_system_var::update_null_value method
     method has been overloaded with a simple wrapper (like
     Item_field::update_null_value) to suppress unwanted warnings
     from Item_func_get_system_var::val_int() calls on non-numeric
     variable values: the Item_func_get_system_var::update_null_value
     method sets and restores THD::no_errors flag for a nested
     call of the longlong_from_string_with_check function.
sql/item_func.h:
  Bug #42778: delete order by null global variable causes
              assertion .\filesort.cc, line 797
  
  The Item_func_get_system_var::update_null_value method
  method has been overloaded.
2009-05-22 01:22:46 +05:00
..
auto_commit_basic.result
auto_increment_increment_basic.result
auto_increment_increment_func.result
auto_increment_offset_basic.result
auto_increment_offset_func.result
autocommit_func.result
automatic_sp_privileges_basic.result
automatic_sp_privileges_func.result
basedir_basic.result
big_tables_basic.result
binlog_cache_size_basic_32.result
binlog_cache_size_basic_64.result
binlog_format_basic.result
bulk_insert_buffer_size_basic_32.result
bulk_insert_buffer_size_basic_64.result
character_set_client_basic.result
character_set_client_func.result
character_set_connection_basic.result
character_set_connection_func.result
character_set_database_basic.result
character_set_database_func.result
character_set_filesystem_basic.result
character_set_results_basic.result
character_set_results_func.result
character_set_server_basic.result
character_set_server_func.result
character_set_system_basic.result
collation_connection_basic.result
collation_connection_func.result
collation_database_basic.result
collation_database_func.result
collation_server_basic.result
collation_server_func.result
completion_type_basic.result
completion_type_func.result
concurrent_insert_basic.result
concurrent_insert_func.result
connect_timeout_basic.result
datadir_basic.result
default_week_format_basic.result
default_week_format_func.result
delay_key_write_basic.result
delay_key_write_func.result
delayed_insert_limit_basic_32.result
delayed_insert_limit_basic_64.result
delayed_insert_limit_func.result
delayed_insert_timeout_basic.result
delayed_queue_size_basic_32.result
delayed_queue_size_basic_64.result
div_precision_increment_basic.result
div_precision_increment_func.result
engine_condition_pushdown_basic.result
error_count_basic.result
event_scheduler_basic.result
expire_logs_days_basic.result
flush_basic.result
foreign_key_checks_basic.result
foreign_key_checks_func.result
ft_boolean_syntax_basic.result
ft_boolean_syntax_func.result
general_log_basic.result
general_log_file_basic.result
general_log_file_func.result
general_log_func.result
group_concat_max_len_basic.result
group_concat_max_len_func.result
have_compress_basic.result
have_crypt_basic.result
have_csv_basic.result
have_dynamic_loading_basic.result
have_geometry_basic.result
have_innodb_basic.result
have_ndbcluster_basic.result
have_openssl_basic.result
have_partitioning_basic.result
have_query_cache_basic.result
have_rtree_keys_basic.result
have_ssl_basic.result
have_symlink_basic.result
hostname_basic.result
identity_basic.result
identity_func.result
init_connect_basic.result
init_slave_basic.result
innodb_additional_mem_pool_size_basic.result
innodb_autoextend_increment_basic.result
innodb_autoinc_lock_mode_basic.result
innodb_autoinc_lock_mode_func.result
innodb_buffer_pool_size_basic.result
innodb_checksums_basic.result
innodb_commit_concurrency_basic.result
innodb_concurrency_tickets_basic_32.result
innodb_concurrency_tickets_basic_64.result
innodb_data_file_path_basic.result
innodb_data_home_dir_basic.result
innodb_doublewrite_basic.result
innodb_fast_shutdown_basic.result
innodb_file_io_threads_basic.result
innodb_file_per_table_basic.result
innodb_flush_log_at_trx_commit_basic.result
innodb_flush_method_basic.result
innodb_force_recovery_basic.result
innodb_lock_wait_timeout_basic.result
innodb_locks_unsafe_for_binlog_basic.result
innodb_log_buffer_size_basic.result
innodb_log_file_size_basic.result
innodb_log_files_in_group_basic.result
innodb_log_group_home_dir_basic.result
innodb_max_dirty_pages_pct_basic.result
innodb_max_dirty_pages_pct_func.result
innodb_max_purge_lag_basic_32.result
innodb_max_purge_lag_basic_64.result
innodb_mirrored_log_groups_basic.result
innodb_open_files_basic.result
innodb_rollback_on_timeout_basic.result
innodb_support_xa_basic.result
innodb_support_xa_func.result
innodb_sync_spin_loops_basic_32.result
innodb_sync_spin_loops_basic_64.result
innodb_table_locks_basic.result
innodb_table_locks_func.result
innodb_thread_concurrency_basic.result
innodb_thread_sleep_delay_basic.result
insert_id_basic.result
insert_id_func.result
interactive_timeout_basic.result
interactive_timeout_func.result
join_buffer_size_basic_32.result
join_buffer_size_basic_64.result
keep_files_on_create_basic.result
key_buffer_size_basic_32.result
key_buffer_size_basic_64.result
key_buffer_size_func.result
key_cache_age_threshold_basic_32.result
key_cache_age_threshold_basic_64.result
key_cache_block_size_basic_32.result
key_cache_block_size_basic_64.result
key_cache_division_limit_basic_32.result
key_cache_division_limit_basic_64.result
last_insert_id_func.result
lc_time_names_basic.result
lc_time_names_func.result
license_basic.result
local_infile_basic.result
local_infile_func.result
log_basic.result
log_bin_trust_function_creators_basic.result
log_bin_trust_function_creators_func.result
log_bin_trust_routine_creators_basic.result
log_output_basic.result
log_output_func.result
log_queries_not_using_indexes_basic.result
log_warnings_basic_32.result
log_warnings_basic_64.result
long_query_time_basic.result
low_priority_updates_basic.result
max_allowed_packet_basic.result
max_allowed_packet_func.result
max_binlog_cache_size_basic_32.result
max_binlog_cache_size_basic_64.result
max_binlog_cache_size_func.result
max_binlog_size_basic.result
max_connect_errors_basic_32.result
max_connect_errors_basic_64.result
max_connections_basic.result
max_delayed_threads_basic.result
max_error_count_basic.result
max_heap_table_size_basic_32.result
max_heap_table_size_basic_64.result
max_insert_delayed_threads_basic.result
max_join_size_func.result
max_length_for_sort_data_basic.result
max_prepared_stmt_count_basic.result
max_prepared_stmt_count_func.result
max_relay_log_size_basic.result
max_seeks_for_key_basic_32.result
max_seeks_for_key_basic_64.result
max_seeks_for_key_func.result
max_sort_length_basic.result
max_sort_length_func.result
max_sp_recursion_depth_basic.result
max_sp_recursion_depth_func.result
max_tmp_tables_basic_32.result
max_tmp_tables_basic_64.result
max_user_connections_basic.result
max_user_connections_func.result
max_write_lock_count_basic_32.result
max_write_lock_count_basic_64.result
min_examined_row_limit_basic_32.result
min_examined_row_limit_basic_64.result
multi_range_count_basic_32.result
multi_range_count_basic_64.result
myisam_data_pointer_size_basic.result
myisam_data_pointer_size_func.result
myisam_max_sort_file_size_basic_32.result
myisam_max_sort_file_size_basic_64.result
myisam_repair_threads_basic_32.result
myisam_repair_threads_basic_64.result
myisam_sort_buffer_size_basic.result
myisam_sort_buffer_size_basic_32.result
myisam_sort_buffer_size_basic_64.result
myisam_stats_method_basic.result
myisam_stats_method_func.result
myisam_use_mmap_basic.result
ndb_log_update_as_write_basic.result
ndb_log_updated_only_basic.result
net_buffer_length_basic.result
net_read_timeout_basic.result
net_retry_count_basic_32.result
net_retry_count_basic_64.result
net_write_timeout_basic.result
new_basic.result
old_passwords_basic.result
old_passwords_func.result
optimizer_prune_level_basic.result
optimizer_search_depth_basic.result
preload_buffer_size_basic.result
query_alloc_block_size_basic_32.result
query_alloc_block_size_basic_64.result
query_cache_limit_basic_32.result
query_cache_limit_basic_64.result
query_cache_limit_func.result
query_cache_min_res_unit_basic_32.result
query_cache_min_res_unit_basic_64.result
query_cache_size_basic_32.result
query_cache_size_basic_64.result
query_cache_type_basic.result
query_cache_type_func.result
query_cache_wlock_invalidate_basic.result
query_cache_wlock_invalidate_func.result
query_prealloc_size_basic_32.result
query_prealloc_size_basic_64.result
query_prealloc_size_func.result
range_alloc_block_size_basic_32.result
range_alloc_block_size_basic_64.result
read_buffer_size_basic.result
read_only_basic.result
read_only_func.result
read_rnd_buffer_size_basic.result
relay_log_purge_basic.result
rpl_init_slave_func.result
rpl_max_binlog_size_func.result
rpl_recovery_rank_basic_32.result
rpl_recovery_rank_basic_64.result
secure_auth_basic.result
secure_auth_func.result
server_id_basic_32.result
server_id_basic_64.result
slave_allow_batching_basic.result
slave_compressed_protocol_basic.result
slave_exec_mode_basic.result
slave_net_timeout_basic.result
slave_transaction_retries_basic_32.result
slave_transaction_retries_basic_64.result
slow_launch_time_basic.result
slow_launch_time_func.result
slow_query_log_basic.result
slow_query_log_file_basic.result
slow_query_log_file_func.result
slow_query_log_func.result
sort_buffer_size_basic_32.result
sort_buffer_size_basic_64.result
sql_auto_is_null_basic.result
sql_big_selects_basic.result
sql_big_selects_func.result
sql_big_tables_basic.result
sql_big_tables_func.result
sql_buffer_result_basic.result
sql_buffer_result_func.result
sql_log_bin_basic.result
sql_log_off_basic.result
sql_log_off_func.result
sql_low_priority_updates_basic.result
sql_low_priority_updates_func.result
sql_max_join_size_func.result
sql_mode_basic.result
sql_mode_func.result
sql_notes_basic.result
sql_notes_func.result
sql_quote_show_create_basic.result
sql_quote_show_create_func.result
sql_safe_updates_basic.result
sql_safe_updates_func.result
sql_select_limit_func.result
sql_slave_skip_counter_basic.result
sql_warnings_basic.result
sql_warnings_func.result
ssl_ca_basic.result
ssl_capath_basic.result
ssl_cert_basic.result
ssl_cipher_basic.result
ssl_key_basic.result
storage_engine_basic.result
sync_binlog_basic_32.result
sync_binlog_basic_64.result
sync_frm_basic.result
system_time_zone_basic.result
table_definition_cache_basic.result
table_lock_wait_timeout_basic.result
table_open_cache_basic.result
thread_cache_size_func.result
thread_handling_basic.result
time_zone_basic.result
time_zone_func.result
timed_mutexes_basic.result
timestamp_basic_32.result
timestamp_basic_64.result
timestamp_func.result
timestamp_sysdate_is_now_func.result
tmp_table_size_basic.result
tmpdir_basic.result
transaction_alloc_block_size_basic_32.result
transaction_alloc_block_size_basic_64.result
transaction_prealloc_size_basic_32.result
transaction_prealloc_size_basic_64.result
tx_isolation_basic.result
tx_isolation_func.result
unique_checks_basic.result
updatable_views_with_limit_basic.result
updatable_views_with_limit_func.result
version_basic.result
version_comment_basic.result
version_compile_machine_basic.result
version_compile_os_basic.result
wait_timeout_basic_32.result
wait_timeout_basic_64.result
wait_timeout_func.result
warning_count_basic.result