- 01 Jul, 2011 4 commits
-
-
Michael Widenius authored
Added progress reporting for alter table, LOAD DATA INFILE and for aria tables: check table, repair table, analyze table. - The client gets a progress report message that triggers a callback function if requested with mysql_options(MYSQL_PROGRESS_CALLBACK, function) - Added Progress field last to 'show processlist' - Stage, Max_stage and Progress field added to information_schema.progresslist - The 'mysql' client by defaults enables progress reports when the output is a tty. - Added progress_report_time time variable to configure how often progress reports is sent to client Added read only system variable 'in_transaction' which is 1 if we have executed a BEGIN statement. client/client_priv.h: Added OPT_REPORT_PROGRESS client/mysql.cc: Added option --progress-reports (on by default if not batch mode) Progress reports is written to stdout for long running commands include/Makefile.am: Added mysql/service_progress_report.h include/myisamchk.h: Added variables to be able to do progress reporting in Aria and later in MyISAM include/mysql.h: Added new mysql_options() parameter: MYSQL_PROGRESS_CALLBACK include/mysql.h.pp: Added new mysql_options() parameter: MYSQL_PROGRESS_CALLBACK include/mysql/plugin.h: Added functions for reporting progress. include/mysql/plugin_auth.h.pp: Added functions for reporting progress. include/mysql_com.h: Added CLIENT_PROGRESS mysql_real_connect() flag. include/sql_common.h: Added callback function for reporting progress mysql-test/r/old-mode.result: Ensure that SHOW PROGRESSLIST doesn't have the Progress column in old mode. mysql-test/suite/funcs_1/datadict/datadict_priv.inc: Added new column mysql-test/suite/funcs_1/datadict/processlist_priv.inc: Test all new PROCESSLIST columns mysql-test/suite/funcs_1/r/is_columns_is.result: Updated results mysql-test/suite/funcs_1/r/is_columns_is_embedded.result: Updated results mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result: Updated results mysql-test/suite/funcs_1/r/is_tables_is_embedded.result: Updated results mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result: Updated results mysql-test/suite/funcs_1/r/processlist_priv_ps.result: Updated results mysql-test/suite/funcs_1/r/processlist_val_no_prot.result: Updated results mysql-test/suite/funcs_1/r/processlist_val_ps.result: Updated results mysql-test/suite/pbxt/r/pbxt_locking.result: Updated results mysql-test/suite/pbxt/r/skip_name_resolve.result: Updated results mysql-test/t/old-mode.test: Ensure that SHOW PROGRESSLIST doesn't have the Progress column in old mode. plugin/handler_socket/handlersocket/Makefile.am: Added -lmysqlservices scripts/mytop.sh: Made 'State' field width dynamic. Added 'Progress' to process list display. sql-common/client.c: Added handling of progress messages. Removed check_license() function. sql/mysql_priv.h: Added opt_progress_report_time sql/mysqld.cc: Added progress_report_time time variable to configure how often progress reports is sent to client sql/protocol.cc: Added net_send_progress_packet() sql/protocol.h: New prototypes sql/set_var.cc: Added variables progress_report_time and in_transaction sql/sql_acl.cc: Safety fix: Made client_capabilities ulonglong sql/sql_class.cc: Added interface functions for progress reporting sql/sql_class.h: Added varibles in THD for progress reporting. Added CF_REPORT_PROGRESS sql/sql_load.cc: Added progress reporting for LOAD DATA INFILE sql/sql_parse.cc: Added CF_REPORT_PROGRESS for top level commands for which it's safe to send progress reports to client sql/sql_show.cc: Added Progress field last to 'show processlist' Stage, Max_stage and Progress field added to information_schema.progresslist sql/sql_table.cc: Added progress reporting for ALTER TABLE Added THD as argument to copy_data_between_tables() storage/maria/ha_maria.cc: Added progress reporting for check table, repair table, analyze table Fixed a bug in start_bulk_insert() that caused alter table to always run with all keys enabled. storage/maria/ma_check.c: Added progress reporting Remember old state before starting repair. This removes some warnings from optimize_table if create-with-sort fails. storage/maria/ma_check_standalone.h: Added dummy reporting function for standalone Aria programs. storage/maria/ma_sort.c: Added progress reporting storage/maria/maria_chk.c: Updated version storage/maria/maria_def.h: Added new prototypes tests/mysql_client_test.c: Added test case for progress reporting
-
Michael Widenius authored
mysql-test/suite/pbxt/r/status.result: Updated result file from change in old commit
-
Sergei Golubchik authored
an active transaction. fixed a bug - not clearing "in transaction" status on set @@autocommit=1
-
Sergei Golubchik authored
-
- 28 Jun, 2011 3 commits
-
-
Sergey Petrunya authored
BUG#751484: Valgrind warning / sporadic crash in evaluate_join_record sql_select.cc:14099 with semijoin - Added testcase. The bug is most likely fixed by MWL#90 code.
-
Igor Babaev authored
-
Igor Babaev authored
The function create_view_field in some cases incorrectly set the maybe_null flag for the returned items.
-
- 27 Jun, 2011 9 commits
-
-
Michael Widenius authored
-
Michael Widenius authored
-
Sergey Petrunya authored
-
Michael Widenius authored
Added mytop to distribution (with some small trivial changes to make it workg good also for MariaDB) scripts/CMakeLists.txt: Added mytop scripts/Makefile.am: Added mytop scripts/make_binary_distribution.sh: Added mytop scripts/make_win_bin_dist: Added mytop scripts/mytop.sh: Added mytop (with some small trivial changes to make it workg good also for MariaDB) support-files/mysql.spec.sh: Added mytop
-
Michael Widenius authored
Split status variable Rows_read to Rows_read and Rows_tmp_read so that one can see how much real data is read. Same was done with with Handler_update and Handler_write. Fixed bug in MEMORY tables where some variables was counted twice. Added new internal handler call 'ha_close()' to have one place to gather statistics. Fixed bug where thd->open_options was set to wrong value when doing admin_recreate_table() mysql-test/r/status.result: Updated test results and added new tests mysql-test/r/status_user.result: Udated test results mysql-test/t/status.test: Added new test for temporary table status variables sql/ha_partition.cc: Changed to call ha_close() instead of close() sql/handler.cc: Added internal_tmp_table variable for easy checking of temporary tables. Added new internal handler call 'ha_close()' to have one place to gather statistics. Gather statistics for internal temporary tables. sql/handler.h: Added handler variables internal_tmp_table, rows_tmp_read. Split function update_index_statistics() to two. Added ha_update_tmp_row() for faster tmp table handling with more statistics. sql/item_sum.cc: ha_write_row() -> ha_write_tmp_row() sql/multi_range_read.cc: close() -> ha_close() sql/mysqld.cc: New status variables: Rows_tmp_read, Handler_tmp_update and Handler_tmp_write sql/opt_range.cc: close() -> ha_close() sql/sql_base.cc: close() -> ha_close() sql/sql_class.cc: Added handling of rows_tmp_read sql/sql_class.h: Added new satistics variables. rows_read++ -> update_rows_read() to be able to correctly count reads to internal temp tables. Added handler::ha_update_tmp_row() sql/sql_connect.cc: Added comment sql/sql_expression_cache.cc: ha_write_row() -> ha_write_tmp_row() sql/sql_select.cc: close() -> ha_close() ha_update_row() -> ha_update_tmp_row() sql/sql_show.cc: ha_write_row() -> ha_write_tmp_row() sql/sql_table.cc: Fixed bug where thd->open_options was set to wrong value when doing admin_recreate_table() sql/sql_union.cc: ha_write_row() -> ha_write_tmp_row() sql/sql_update.cc: ha_write_row() -> ha_write_tmp_row() sql/table.cc: close() -> ha_close() storage/heap/ha_heap.cc: Removed double counting of statistic variables. close -> ha_close() to get tmp table statistics. storage/maria/ha_maria.cc: close -> ha_close() to get tmp table statistics.
-
Michael Widenius authored
-
Michael Widenius authored
-
Michael Widenius authored
-
Igor Babaev authored
Ensured valid calculations of the estimates stored in JOIN_TAB::used_fieldlength.
-
- 25 Jun, 2011 3 commits
-
-
Igor Babaev authored
Made mergeable views and mergeable derived tables transparent for the MIN/MAX optimization.
-
Igor Babaev authored
fixed by the patch for LP bug 798621.
-
Igor Babaev authored
The following were missing in the patch for mwl106: - KEY_PART_INFO::fieldnr were not set for generated keys to access tmp tables storing the rows of materialized derived tables/views - TABLE_SHARE::column_bitmap_size was not set for tmp tables storing the rows of materialized derived tables/views. These could cause crashes or memory overwrite.
-
- 24 Jun, 2011 9 commits
-
-
Igor Babaev authored
If a view/derived table is non-mergeable then the definition of the tmp table to store the rows for it is created at the prepare stage. In this case if the view definition uses outer joins and a view column belongs to an inner table of one of them then the column should be considered as nullable independently on nullability of the underlying column. If the underlying column happens to be defined as non-nullable then the function create_tmp_field_from_item rather than the function create_tmp_field_from_field should be employed to create the definition of the interesting column in the tmp table.
-
Sergey Petrunya authored
(testcase for #798597 now crashes)
-
Michael Widenius authored
-
Michael Widenius authored
-
Michael Widenius authored
Fixed several errors in Aria discovered by test case for lp:727869 ma_pagecache.c:2103: find_block: Assertion `block->rlocks == 0 - Fixed assert in transaction log handler when aria_check was run on block-record table that was much bigger than expected. - Fixed warnings about wrong mutex order between bitmap and intern_lock - Fixed error in bitmap that could cause two rows to use same block for a block record. - Fixed wrong test that could cause error if last page for a bitmap was used by a blob. - Fixed several bugs in pagecache for the case where pagecase had very few blocks and there was a lot of threads competing to get the blocks (very unlikely case). mysql-test/suite/maria/r/maria-recovery3.result: Updated results sql/mysqld.cc: Allow mi_check() to send information messages for log file storage/maria/ma_bitmap.c: Fixed problem with wrong mutex order when bitmap was the first page that was flushed out of page cache - Fixed by introducing _ma_bitmap_mark_file_changed() that marks file changed without a bitmap lock. - Fixed one case in _ma_change_bitmap_page() where we didn't mark the bitmap changed. This could cause to rows to reuse same block if this was the only change to the bitmap. - Split _ma_bitmap_get_page_bits() in two parts to not take a bitmap lock when we already have it - Fixed bug in _ma_bitmap_set_full_page_bits() that caused an error if last page for a bitmap was used by a blob storage/maria/ma_check.c: Better handling of wrong file length. Fixed bug when we tried to write to transaction log when it was not opened (happened when block record file was bigger than expected) storage/maria/ma_pagecache.c: Fixed several bugs in pagecache for the case where pagecase had very few blocks and there was a lot of threads competing to get the blocks: - In link_block() mark a block given to another thread with PCBLOCK_REASSIGNED to ensure that no other threads can start re-using the block before the thread that requsted a block. - In free_block(), don't reset status for a block that is in re-assign by link_block() (we don't want to loose the PCBLOCK_REASSIGNED flag). - Added call to wait_for_flush() when we got a new block in find_block() to ensure that we don't use a block that is beeing flushed by another thread. - Moved setting of hits_left and last_hit_time in find_block() to where we assign the block. Code cleanup and making code uniform: - Changed a lot of KEYCACHE_DBUG_PRINT to use DBUG_PRINT - Streamlined all reporting of 'signal' and 'wait' between threads to be identical. - Use thread name instead of thread number (for each match against --debug) - Added more DBUG_ENTER, DBUG_PRINT and DBUG_ASSERT() - Added more comments storage/myisam/ha_myisam.cc: Only print information about that we make a backup if we are really making a backup. storage/myisam/mi_check.c: Inform mysqld that we are creating a backup of the data file (for inclusion in error log).
-
Michael Widenius authored
-
Michael Widenius authored
- Fixed error when writing a blob to the last page on the bitmap. - Marked bitmap changed in once case that could cause two rows to use the same blob page.
-
Michael Widenius authored
mysql-test/r/join.result: Test case for LP:798597 mysql-test/t/join.test: Test case for LP:798597 sql/sql_select.cc: In simplify_joins we reset table->maybe_null for outer join tables that can't ever be NULL. This caused a conflict between the previously calculated items and the group_buffer against the fields in the temporary table that are created as not null thanks to the optimization. The fix is to correct the group by items to also be not_null so that they match the used fields and keys.
-
Igor Babaev authored
The function setup_tables should handle table_list elements for semijoin materialized tables in a special way when executing a prepared statement for the second time.
-
- 23 Jun, 2011 1 commit
-
-
Igor Babaev authored
The function simple_pred did not take into account that a multiple equality could include ref items (more exactly items of the class Item_direct_view_ref). It caused crashes for queries over derived tables or views if the min/max optimization could be applied to these queries.
-
- 22 Jun, 2011 2 commits
-
-
Igor Babaev authored
-
Igor Babaev authored
The patch for bugs 717577 and 724942 has missed to make adjustments for the call item_equal->add_const(const_item, orig_field_item) in the function check_simple_equality that builds multiple equality for a field and a constant. As a result, when this field happens to be a view field and the corresponding Item_field object F is wrapped in an Item_direct_view_ref object R the object F is placed in the multiple equality instead of the object R. A substitution of an equal item for F potentially can cause very serious problems and in some cases can lead to crashes of the server.
-
- 21 Jun, 2011 4 commits
-
-
unknown authored
Removed forgotten EXPLAIN EXTENDED from the test file.
-
Sergei Golubchik authored
initialize plugins earlier, to support, for example, non-MyISAM mysql.plugin table.
-
unknown authored
Automerged with 5.3.
-
unknown authored
- Added regression test with queries over the WORLD database. - Discovered and fixed several bugs in the related cost calculation functionality both in the semijoin and non-semijon subquery code. - Added DBUG printing of the cost variables used to decide between IN-EXISTS and MATERIALIZATION.
-
- 17 Jun, 2011 3 commits
-
-
Vladislav Vaintroub authored
-
Sergey Petrunya authored
-
Vladislav Vaintroub authored
Define USE_MARIA_FOR_TMP_TABLES preprocessor constant by default if Aria engine is compiled in. Use CMake variable WITH_ARIA_TMP_TABLES to control the temp table engine setting.
-
- 16 Jun, 2011 1 commit
-
-
Igor Babaev authored
-
- 15 Jun, 2011 1 commit
-
-
Sergei Golubchik authored
-