An error occurred fetching the project authors.
- 20 Oct, 2010 1 commit
-
-
Sergei Golubchik authored
BUG#26447 prefer a clustered key for an index scan, as secondary index is always slower ... which was fixed to cause BUG#35850 queries take 50% longer ... and was reverted and BUG#39653 prefer a secondary index for an index scan, as clustered key is always slower ... which was fixed to cause BUG#55656 mysqldump takes six days instead of half an hour ... and was amended with a special case workaround sql/opt_range.cc: move get_index_only_read_time() into the handler class sql/sql_select.cc: use cost not an index length when choosing a cheaper index
-
- 31 Aug, 2010 1 commit
-
-
Igor Babaev authored
-
- 06 Aug, 2010 1 commit
-
-
Michael Widenius authored
Fixed compiler warnings client/mysqlslap.c: Fixed compiler warnings mysql-test/suite/maria/r/maria.result: Test case for LP#614265 mysql-test/suite/maria/t/maria.test: Test case for LP#614265 mysql-test/suite/pbxt/t/skip_name_resolve-master.opt: Ensure that we get restart before test (as test uses show processlist) sql/handler.cc: Added cloned marker if clone was called (for safety checks & debugging) sql/handler.h: Added cloned marker if clone was called (for safety checks & debugging) storage/maria/ha_maria.cc: In clone call, set file->trn if cloned file had this set. This is needed as maria_create_trn_for_mysql() and thus file->trn is never set for cloned table. Ensure that file->trn is properly reset after calls to repair/check/zerofill. Increment locked table count if file->trn is set (as we decrement this in the unlock call) tests/mysql_client_test.c: Fixed compiler warnings
-
- 23 Jul, 2010 1 commit
-
-
Sergei Golubchik authored
-
- 16 Jul, 2010 1 commit
-
-
Michael Widenius authored
The issue was that we didn't always check result of ha_rnd_init() which caused a problem for handlers that returned an error in this code. - Changed prototype of ha_rnd_init() to ensure that we get a compile warning if result is not checked. - Added ha_rnd_init_with_error() that prints error on failure. - Checked all usage of ha_rnd_init() and ensure we generate an error message on failures. - Changed init_read_record() to return 1 on failure. sql/create_options.cc: Fixed wrong printf sql/event_db_repository.cc: Check result from init_read_record() sql/events.cc: Check result from init_read_record() sql/filesort.cc: Check result from ha_rnd_init() sql/ha_partition.cc: Check result from ha_rnd_init() sql/ha_partition.h: Fixed compiler warning sql/handler.cc: Added ha_rnd_init_with_error() Check result from ha_rnd_init() sql/handler.h: Added ha_rnd_init_with_error() Changed prototype of ha_rnd_init() to ensure that we get a compile warning if result is not checked sql/item_subselect.cc: Check result from ha_rnd_init() sql/log.cc: Check result from ha_rnd_init() sql/log_event.cc: Check result from ha_rnd_init() sql/log_event_old.cc: Check result from ha_rnd_init() sql/mysql_priv.h: init_read_record() now returns error code on failure sql/opt_range.cc: Check result from ha_rnd_init() sql/records.cc: init_read_record() now returns error code on failure Check result from ha_rnd_init() sql/sql_acl.cc: Check result from init_read_record() sql/sql_cursor.cc: Print error if ha_rnd_init() fails sql/sql_delete.cc: Check result from init_read_record() sql/sql_help.cc: Check result from init_read_record() sql/sql_plugin.cc: Check result from init_read_record() sql/sql_select.cc: Check result from ha_rnd_init() Print error if ha_rnd_init() fails. sql/sql_servers.cc: Check result from init_read_record() sql/sql_table.cc: Check result from init_read_record() sql/sql_udf.cc: Check result from init_read_record() sql/sql_update.cc: Check result from init_read_record() storage/example/ha_example.cc: Don't return error on rnd_init() storage/ibmdb2i/ha_ibmdb2i.cc: Removed not relevant comment
-
- 09 Jul, 2010 1 commit
-
-
Mattias Jonsson authored
In bug-28430 HA_PRIMARY_KEY_REQUIRED_FOR_POSITION was disabled in the partitioning engine in the first patch, That bug was later fixed a second time, but that flag was not removed. No need to disable this flag, as it leads to bad choise in row replication. sql/ha_partition.h: Not disabling HA_PRIMARY_KEY_REQUIRED_FOR_POSITION flag. Updated comment (has nothing to do with hidden key. sql/handler.h: Updated comments to about HA_PRIMARY_KEY_REQUIRED_FOR_POSITION.
-
- 10 Jun, 2010 1 commit
-
-
Davi Arnaut authored
strict aliasing violations. One somewhat major source of strict-aliasing violations and related warnings is the SQL_LIST structure. For example, consider its member function `link_in_list` which takes a pointer to pointer of type T (any type) as a pointer to pointer to unsigned char. Dereferencing this pointer, which is done to reset the next field, violates strict-aliasing rules and might cause problems for surrounding code that uses the next field of the object being added to the list. The solution is to use templates to parametrize the SQL_LIST structure in order to deference the pointers with compatible types. As a side bonus, it becomes possible to remove quite a few casts related to acessing data members of SQL_LIST. sql/handler.h: Use the appropriate template type argument. sql/item.cc: Remove now-unnecessary cast. sql/item_subselect.cc: Remove now-unnecessary casts. sql/item_sum.cc: Use the appropriate template type argument. Remove now-unnecessary cast. sql/mysql_priv.h: Move SQL_LIST structure to sql_list.h Use the appropriate template type argument. sql/sp.cc: Remove now-unnecessary casts. sql/sql_delete.cc: Use the appropriate template type argument. Remove now-unnecessary casts. sql/sql_derived.cc: Remove now-unnecessary casts. sql/sql_lex.cc: Remove now-unnecessary casts. sql/sql_lex.h: SQL_LIST now takes a template type argument which must match the type of the elements of the list. Use forward declaration when the type is not available, it is used in pointers anyway. sql/sql_list.h: Rename SQL_LIST to SQL_I_List. The template parameter is the type of object that is stored in the list. sql/sql_olap.cc: Remove now-unnecessary casts. sql/sql_parse.cc: Remove now-unnecessary casts. sql/sql_prepare.cc: Remove now-unnecessary casts. sql/sql_select.cc: Remove now-unnecessary casts. sql/sql_show.cc: Remove now-unnecessary casts. sql/sql_table.cc: Remove now-unnecessary casts. sql/sql_trigger.cc: Remove now-unnecessary casts. sql/sql_union.cc: Remove now-unnecessary casts. sql/sql_update.cc: Remove now-unnecessary casts. sql/sql_view.cc: Remove now-unnecessary casts. sql/sql_yacc.yy: Remove now-unnecessary casts. storage/myisammrg/ha_myisammrg.cc: Remove now-unnecessary casts.
-
- 05 Jun, 2010 1 commit
-
-
Sergei Golubchik authored
* remove handler::index_read_last() * create handler::keyread_read_time() (was get_index_only_read_time() in opt_range.cc) * ha_show_status() allows engine's show_status() to fail * remove HTON_FLUSH_AFTER_RENAME * fix key_cmp_if_same() to work for floats and doubles * set table->status in the server, don't force engines to do it * increment status vars in the server, don't force engines to do it mysql-test/r/status_user.result: correct test results - innodb was wrongly counting internal index searches as handler_read_* calls. sql/ha_partition.cc: compensate for handler incrementing status counters - we want to count only calls to underlying engines sql/handler.h: inline methods moved to sql_class.h sql/key.cc: simplify the check sql/opt_range.cc: move get_index_only_read_time to the handler class sql/sp.cc: don't use a key that's stored in the record buffer - the engine can overwrite the buffer with anything, destroying the key sql/sql_class.h: inline handler methods that need to see THD and TABLE definitions sql/sql_select.cc: no ha_index_read_last_map anymore sql/sql_table.cc: remove HTON_FLUSH_AFTER_RENAME sql/table.cc: set HA_CAN_MEMCMP as appropriate sql/tztime.cc: don't use a key that's stored in the record buffer - the engine can overwrite the buffer with anything, destroying the key storage/myisam/ha_myisam.cc: engines don't need to update table->status or use ha_statistic_increment anymore storage/myisam/ha_myisam.h: index_read_last_map is no more
-
- 11 May, 2010 1 commit
-
-
Sergei Golubchik authored
to work when a table is partitioned
-
- 30 Apr, 2010 1 commit
-
-
Sergei Golubchik authored
consistency: don't use "index" and "key" interchangeably => rename "key" to "index" consistency: all option types are logical, besides ULL => rename ULL to NUMBER don't accept floats where integers are expected accept hexadecimal where integers are expected
-
- 14 Apr, 2010 1 commit
-
-
Sergey Vojtovich authored
to cleanup open connections It was possible to UNINSTALL storage engine plugin when binding between THD object and storage engine is still active (e.g. in the middle of transaction). To avoid unclean deactivation (uninstall) of storage engine plugin in the middle of transaction, additional storage engine plugin lock is acquired by thd_set_ha_data(). If ha_data is not null and storage engine plugin was not locked by thd_set_ha_data() in this connection before, storage engine plugin gets locked. If ha_data is null and storage engine plugin was locked by thd_set_ha_data() in this connection before, storage engine plugin lock gets released. If handlerton::close_connection() didn't reset ha_data, server does it immediately after calling handlerton::close_connection(). Note that this is just a framework fix, storage engines must switch to thd_set_ha_data() from thd_ha_data() if they want to see fit. include/mysql/plugin.h: As thd_{get|set}_ha_data() have some extra logic now, they must be implemented on server side. include/mysql/plugin.h.pp: As thd_{get|set}_ha_data() have some extra logic now, they must be implemented on server side. sql/handler.cc: Make sure ha_data is reset and ha_data lock is released. sql/handler.h: hton is not supposed to be updated by ha_lock_engine(), make it const. sql/sql_class.cc: As thd_{get|set}_ha_data() have some extra logic now, they must be implemented on server side. sql/sql_class.h: Added ha_data lock.
-
- 08 Apr, 2010 1 commit
-
-
Sergei Golubchik authored
Docs/sp-imp-spec.txt: New sql_mode added. include/my_base.h: Flag in frm of create options. libmysqld/CMakeLists.txt: New files added. libmysqld/Makefile.am: New files added. mysql-test/r/events_bugs.result: New sql_mode added. mysql-test/r/information_schema.result: New sql_mode added. mysql-test/r/sp.result: New sql_mode added. mysql-test/r/system_mysql_db.result: New sql_mode added. mysql-test/suite/funcs_1/r/is_columns_mysql.result: New sql_mode added. mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result: New sql_mode added. mysql-test/t/events_bugs.test: New sql_mode added. mysql-test/t/sp.test: New sql_mode added. scripts/mysql_system_tables.sql: New sql_mode added. scripts/mysql_system_tables_fix.sql: New sql_mode added. sql/CMakeLists.txt: New files added. sql/Makefile.am: New files added. sql/event_db_repository.cc: New sql_mode added. sql/field.cc: Create options support added. sql/field.h: Create options support added. sql/ha_partition.cc: Create options support added. sql/handler.cc: Create options support added. sql/handler.h: Create options support added. sql/log_event.h: New sql_mode added. sql/mysql_priv.h: New sql_mode added. sql/mysqld.cc: New sql_mode added. sql/share/errmsg.txt: New error messages added. sql/sp.cc: New sql_mode added. sql/sp_head.cc: Create options support added. sql/sql_class.cc: Create options support added. Debug added. sql/sql_class.h: Create options support added. sql/sql_insert.cc: my_safe_a* moved to mysqld_priv.h sql/sql_lex.h: Create options support added. sql/sql_parse.cc: Create options support added. sql/sql_show.cc: Create options support added. sql/sql_table.cc: Create options support added. sql/sql_view.cc: New sql_mode added. sql/sql_yacc.yy: Create options support added. sql/structs.h: Create options support added. sql/table.cc: Create options support added. sql/table.h: Create options support added. sql/unireg.cc: Create options support added. storage/example/ha_example.cc: Create options example. storage/example/ha_example.h: Create options example. storage/pbxt/src/discover_xt.cc: Create options support added.
-
- 25 Mar, 2010 1 commit
-
-
Michael Widenius authored
- Avoid full inline of mark_trx_read_write() for many functions - Avoid somewhat expensive tests for every write/update/delete row sql/handler.h: Adde ha_start_of_new_statement() to reset internal variables as part of the code in "open_table" that resets TABLE object for the new statement Faster mark_trx_read_write_part() sql/sql_base.cc: Don't manipulate table->file internal structs directly
-
- 16 Feb, 2010 1 commit
-
-
Igor Babaev authored
This is the base patch for the task.
-
- 17 Jan, 2010 1 commit
-
-
Sergey Petrunya authored
There are still test failures because of: - Wrong query results in outer join + semi join - EXPLAIN output differences
-
- 14 Jan, 2010 1 commit
-
-
Michael Widenius authored
Fix wrong cast of time() include/my_pthread.h: Safety fix that also removes compiler warnings sql/handler.h: Changed timestamp columns to be of type time_t storage/maria/ma_check.c: Removed wrong cast storage/maria/ma_create.c: Removed wrong cast storage/myisam/mi_check.c: Removed wrong cast storage/myisam/mi_create.c: Removed wrong cast storage/xtradb/handler/ha_innodb.cc: Removed compiler warning on windows
-
- 04 Jan, 2010 1 commit
-
-
unknown authored
Add DB_TYPE_AUTOASSIGN as a better name for DB_TYPE_UNKNOWN, which is what plugins should generally use.
-
- 01 Jan, 2010 1 commit
-
-
Sergey Petrunya authored
-
- 22 Dec, 2009 1 commit
-
-
Sergey Petrunya authored
- Make index condition pushdown be controlled by an @@optimizer_switch flag, not by @@engine_condition_pushdown - Make MRR buffer size be controlled by @@mrr_buffer_size, not by @@read_rnd_buffer_size - Move parts of code to separate files - Code cleanup - Add --sorted_result to some SELECTs in tests.
-
- 15 Dec, 2009 3 commits
-
-
Sergey Petrunya authored
WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface" WL#2475 "Batched range read functions for MyISAM/InnoDb" "Index condition pushdown for MyISAM/InnoDB" - Adjust test results (checked) - Code cleanup.
-
Sergey Petrunya authored
WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface" WL#2475 "Batched range read functions for MyISAM/InnoDb" "Index condition pushdown for MyISAM/InnoDB" - Fix valgrind failures
-
Sergey Petrunya authored
WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface" WL#2475 "Batched range read functions for MyISAM/InnoDb" "Index condition pushdown for MyISAM/InnoDB" Igor's fix from sp1r-igor@olga.mysql.com-20080330055902-07614: There could be observed the following problems: 1. EXPLAIN did not mention pushdown conditions from on expressions in the 'extra' column. As a result if a query had no where conditions pushed down to a table, but had on conditions pushed to this table the 'extra' column in the EXPLAIN for the table missed 'using where'. 2. Conditions for ref access were not eliminated from on expressions though such conditions were eliminated from the where condition.
-
- 19 Oct, 2009 1 commit
-
-
Michael Widenius authored
The original code comes, as far as I know, from Google (Mark Callaghan's team) with additional work from Percona, Ourdelta and Weldon Whipple. This code provides the same functionallity, but with a lot of changes to make it faster and better fit the MariaDB infrastucture. Added new status variables: - Com_show_client_statistics, Com_show_index_statistics, Com_show_table_statistics, Com_show_user_statistics - Access_denied_errors, Busy_time (clock time), Binlog_bytes_written, Cpu_time, Empty_queries, Rows_sent, Rows_read Added new variable / startup option 'userstat' to control if user statistics should be enabled or not Added my_getcputime(); Returns cpu time used by this thread. New FLUSH commands: - FLUSH SLOW QUERY LOG - FLUSH TABLE_STATISTICS - FLUSH INDEX_STATISTICS - FLUSH USER_STATISTICS - FLUSH CLIENT_STATISTICS New SHOW commands: - SHOW CLIENT_STATISTICS - SHOW USER_STATISTICS - SHOW TABLE_STATISTICS - SHOW INDEX_STATISTICS New Information schemas: - CLIENT_STATISTICS - USER_STATISTICS - INDEX_STATISTICS - TABLE_STATISTICS Added support for all new flush commands to mysqladmin Added handler::ha_... wrappers for all handler read calls to do statistics counting - Changed all code to use new ha_... calls - Count number of read rows, changed rows and rows read trough an index Added counting of number of bytes sent to binary log (status variable Binlog_bytes_written) Added counting of access denied errors (status variable Access_denied_erors) Bugs fixed: - Fixed bug in add_to_status() and add_diff_to_status() where longlong variables where threated as long - CLOCK_GETTIME was not propely working on Linuxm client/mysqladmin.cc: Added support for all new flush commmands and some common combinations: flush-slow-log flush-table-statistics flush-index-statistics flush-user-statistics flush-client-statistics flush-all-status flush-all-statistics configure.in: Added checking if clock_gettime needs the librt. (Fixes Bug #37639 clock_gettime is never used/enabled in Linux/Unix) include/my_sys.h: Added my_getcputime() include/mysql_com.h: Added LIST_PROCESS_HOST_LEN & new REFRESH target defines mysql-test/r/information_schema.result: New information schema tables added mysql-test/r/information_schema_all_engines.result: New information schema tables added mysql-test/r/information_schema_db.result: New information schema tables added mysql-test/r/log_slow.result: Added testing that flosh slow query logs is accepted mysql-test/r/status_user.result: Basic testing of user, client, table and index statistics mysql-test/t/log_slow.test: Added testing that flosh slow query logs is accepted mysql-test/t/status_user-master.opt: Ensure that we get a fresh restart before running status_user.test mysql-test/t/status_user.test: Basic testing of user, client, table and index statistics mysys/my_getsystime.c: Added my_getcputime() Returns cpu time used by this thread. sql/authors.h: Updated authors to have core and original MySQL developers first. sql/event_data_objects.cc: Updated call to mysql_reset_thd_for_next_command() sql/event_db_repository.cc: Changed to use new ha_... calls sql/filesort.cc: Changed to use new ha_... calls sql/ha_partition.cc: Changed to use new ha_... calls Fixed comment syntax sql/handler.cc: Changed to use new ha_... calls Reset table statistics Added code to update global table and index status Added counting of rows changed sql/handler.h: Added table and index statistics variables Added function reset_statistics() Added handler::ha_... wrappers for all handler read calls to do statistics counting Protected all normal read calls to ensure we use the new calls in the server. Made ha_partition a friend class so that partition code can call the old read functions sql/item_subselect.cc: Changed to use new ha_... calls sql/lex.h: Added keywords for new information schema tables and flush commands sql/log.cc: Added flush_slow_log() Added counting of number of bytes sent to binary log Removed not needed test of thd (It's used before, so it's safe to use) Added THD object to MYSQL_BIN_LOG::write_cache() to simplify statistics counting sql/log.h: Added new parameter to write_cache() Added flush_slow_log() functions. sql/log_event.cc: Updated call to mysql_reset_thd_for_next_command() Changed to use new ha_... calls sql/log_event_old.cc: Updated call to mysql_reset_thd_for_next_command() Changed to use new ha_... calls sql/mysql_priv.h: Updated call to mysql_reset_thd_for_next_command() Added new statistics functions and variables needed by these. sql/mysqld.cc: Added new statistics variables and structures to handle these Added new status variables: - Com_show_client_statistics, Com_show_index_statistics, Com_show_table_statistics, Com_show_user_statistics - Access_denied_errors, Busy_time (clock time), Binlog_bytes_written, Cpu_time, Empty_queries, Rows_set, Rows_read Added new option 'userstat' to control if user statistics should be enabled or not sql/opt_range.cc: Changed to use new ha_... calls sql/opt_range.h: Changed to use new ha_... calls sql/opt_sum.cc: Changed to use new ha_... calls sql/records.cc: Changed to use new ha_... calls sql/set_var.cc: Added variable 'userstat' sql/sp.cc: Changed to use new ha_... calls sql/sql_acl.cc: Changed to use new ha_... calls Added counting of access_denied_errors sql/sql_base.cc: Added call to statistics functions sql/sql_class.cc: Added usage of org_status_var, to store status variables at start of command Added functions THD::update_stats(), THD::update_all_stats() Fixed bug in add_to_status() and add_diff_to_status() where longlong variables where threated as long sql/sql_class.h: Added new status variables to status_var Moved variables that was not ulong in status_var last. Added variables to THD for storing temporary values during statistics counting sql/sql_connect.cc: Variables and functions to calculate user and client statistics Added counting of access_denied_errors and lost_connections sql/sql_cursor.cc: Changed to use new ha_... calls sql/sql_handler.cc: Changed to use new ha_... calls sql/sql_help.cc: Changed to use new ha_... calls sql/sql_insert.cc: Changed to use new ha_... calls sql/sql_lex.h: Added SQLCOM_SHOW_USER_STATS, SQLCOM_SHOW_TABLE_STATS, SQLCOM_SHOW_INDEX_STATS, SQLCOM_SHOW_CLIENT_STATS sql/sql_parse.cc: Added handling of: - SHOW CLIENT_STATISTICS - SHOW USER_STATISTICS - SHOW TABLE_STATISTICS - SHOW INDEX_STATISTICS Added handling of new FLUSH commands: - FLUSH SLOW QUERY LOGS - FLUSH TABLE_STATISTICS - FLUSH INDEX_STATISTICS - FLUSH USER_STATISTICS - FLUSH CLIENT_STATISTICS Added THD parameter to mysql_reset_thd_for_next_command() Added initialization and calls to user statistics functions Added increment of statistics variables empty_queries, rows_sent and access_denied_errors. Added counting of cpu time per query sql/sql_plugin.cc: Changed to use new ha_... calls sql/sql_prepare.cc: Updated call to mysql_reset_thd_for_next_command() sql/sql_select.cc: Changed to use new ha_... calls Indentation changes sql/sql_servers.cc: Changed to use new ha_... calls sql/sql_show.cc: Added counting of access denied errors Added function for new information schema tables: - CLIENT_STATISTICS - USER_STATISTICS - INDEX_STATISTICS - TABLE_STATISTICS Changed to use new ha_... calls sql/sql_table.cc: Changed to use new ha_... calls sql/sql_udf.cc: Changed to use new ha_... calls sql/sql_update.cc: Changed to use new ha_... calls sql/sql_yacc.yy: Add new show and flush commands sql/structs.h: Add name_length to KEY to avoid some strlen Added cache_name to KEY for fast storage of keyvalue in cache Added structs USER_STATS, TABLE_STATS, INDEX_STATS Added function prototypes for statistics functions sql/table.cc: Store db+table+index name into keyinfo->cache_name sql/table.h: Added new information schema tables sql/tztime.cc: Changed to use new ha_... calls
-
- 16 Oct, 2009 1 commit
-
-
Igor Babaev authored
The original patch has been ameliorated by Sanja and Igor.
-
- 12 Oct, 2009 1 commit
-
-
Kristofer Pettersson authored
removed if server_id changes When MySQL crashes (or a snapshot is taken which simulates a crash), then it is possible that internal XA transactions (used to sync the binary log and InnoDB) can be left in a PREPARED state, whereas they should be rolled back. This is done when the server_id changes before the restart occurs. This patch releases he restriction that the server_id should be consistent if the XID is to be considerred valid. The rollback phase should then be able to clean up all pending XA transactions.
-
- 18 Sep, 2009 1 commit
-
-
Georgi Kodinov authored
Despite copying the value of the old table's row type we don't always have to mark row type as being specified. Innodb uses this to check if it can do fast ALTER TABLE or not. Fixed by correctly flagging the presence of row_type only when it's actually changed. Added a test case for 39200.
-
- 12 Aug, 2009 2 commits
-
-
Konstantin Osipov authored
"CREATE TABLE TRANSACTIONAL PAGE_CHECKSUM ROW_FORMAT=PAGE accepted, does nothing". Put back stubs for members of structures that are shared between sql/ and pluggable storage engines. to not break ABI unnecessarily. To be NULL-merged into 5.4, where we do break the ABI already.
-
Konstantin Osipov authored
PAGE_CHECKSUM ROW_FORMAT=PAGE accepted, does nothing" Remove unused code that would lead to warnings when compiling sql_yacc.yy. sql/handler.h: Remove unused defines. sql/sql_yacc.yy: Remove unused grammar. sql/table.h: Remove unused TABLE members.
-
- 29 Jul, 2009 1 commit
-
-
Guilhem Bichot authored
those keywords do nothing in 5.1 (they are meant for future versions, for example featuring the Maria engine) so they are here removed from the syntax. Adding those keywords to future versions when needed is: - WL#5034 "Add TRANSACTIONA=0|1 and PAGE_CHECKSUM=0|1 clauses to CREATE TABLE" - WL#5037 "New ROW_FORMAT value for CREATE TABLE: PAGE" mysql-test/r/create.result: test that syntax is not accepted mysql-test/t/create.test: test that syntax is not accepted sql/handler.cc: remove ROW_FORMAT=PAGE sql/handler.h: Mark unused objects, but I don't remove them by fear of breaking any plugin which includes this file (see also table.h) sql/lex.h: removing syntax sql/sql_show.cc: removing output of noise keywords in SHOW CREATE TABLE and INFORMATION_SCHEMA.TABLES sql/sql_table.cc: removing TRANSACTIONAL sql/sql_yacc.yy: removing syntax sql/table.cc: removing TRANSACTIONAL, PAGE_CHECKSUM. Their place in the frm file is not reclaimed, for compatibility with older 5.1. sql/table.h: Mark unused objects, but I don't remove them by fear of breaking any plugin which includes this file (and there are several engines which use the content TABLE_SHARE and thus rely on a certain binary layout of this structure).
-
- 29 Jun, 2009 1 commit
-
-
Michael Widenius authored
- Added a handler call (prepare_index_scan()) to inform storage engines that an index scan is about to take place. - Extended the maximun key parts for an index from 16 to 32 - Extended MyISAM and Maria engines to support up to 32 parts Added checks for return value from ha_index_init() include/my_handler.h: Extended number of key parts for MyISAM and Maria from 16 to 32 include/my_pthread.h: Ensure we always have 256M of stack. (Required to be able to handle the current number of keys and key parts in MyISAM) mysql-test/r/create.result: Extended to test for 32 key parts mysql-test/r/myisam.result: Test that we can create 32 but not 33 key parts mysql-test/r/ps_1general.result: Length of ref is now 2048 as we can have more key parts mysql-test/r/ps_2myisam.result: Length of ref is now 2048 as we can have more key parts mysql-test/r/ps_3innodb.result: Length of ref is now 2048 as we can have more key parts mysql-test/r/ps_4heap.result: Length of ref is now 2048 as we can have more key parts mysql-test/r/ps_5merge.result: Length of ref is now 2048 as we can have more key parts mysql-test/suite/maria/r/maria.result: Max key length is now 1208 bytes mysql-test/suite/maria/r/maria3.result: Max key length is now 1208 bytes mysql-test/suite/maria/r/ps_maria.result: Max key length is now 1208 byte mysql-test/t/create.test: Extended to test for 32 key parts mysql-test/t/myisam.test: Test that we can create 32 but not 33 key parts sql/handler.cc: Check return value from ha_index_init() sql/handler.h: Added a handler call (prepare_index_scan()) to inform storage engines that an index scan is about to take place. sql/sql_select.cc: Checks all return values from ha_index_init() Call prepare_index_scan()) to inform storage engines that an index scan is about to take place. Fixed indentation sql/table.cc: Fixed wrong types for key_length (rest of code assumed this was 32 bit) sql/unireg.h: Extended the maximun key parts for an index from 16 to 32 storage/maria/ha_maria.cc: Don't allocate HA_CHECK on the stack in functions where we call repair() as HA_CHECK is HUGE and will overflow stack storage/myisam/ha_myisam.cc: Don't allocate HA_CHECK on the stack in functions where we call repair() as HA_CHECK is HUGE and will overflow stack storage/myisam/mi_check.c: Fixed wrong check if value overflow tests/mysql_client_test.c: Added fflush() to fix output in case of error Fixed wrong check of 'ref' length in EXPLAIN
-
- 10 Jun, 2009 1 commit
-
-
Vladislav Vaintroub authored
Remove custom DLL loader code from innodb plugin code, use symbols exported from mysqld. storage/innodb_plugin/handler/ha_innodb.cc: Remove a Win32 workaround for current_thd. The original problem that innodb plugin used value of TLS variable across DLL boundaries is solved in MySQL server (current_thd is a function not TLS variable now) storage/innodb_plugin/handler/handler0alter.cc: Remove custom delay loader storage/innodb_plugin/handler/handler0vars.h: Remove custom delay loader storage/innodb_plugin/handler/i_s.cc: Remove custom delay loader storage/innodb_plugin/handler/win_delay_loader.cc: Remove custom delay loader storage/innodb_plugin/plug.in: Remove commented out MYSQL_PLUGIN_STATIC, CMake would not parse that correctly
-
- 04 May, 2009 1 commit
-
-
Narayanan V authored
A backport of fix for "BUG40092 - Storage engine API uses time_t datatype". Starting from MSVC C++ 2005 (v8), the default size of time_t is changed from 32-bit to 64-bit. As the result, the binaries built with pre-v8 MSVC C++ do not work with the binaries (storage engine plugins) built with v8 or after (server crashes). Fixed storage engine API to use datatype with known size (ulong) instead of time_t. sql/handler.h: Bug#39802 On Windows, 32-bit time_t should be enforced Change create_time, check_time, update_time in the ha_statistics and PARTITION_INFO structures to ulong.
-
- 25 Nov, 2008 1 commit
-
-
Ramil Kalimullin authored
Problem: in 5.0 'check table for upgrade' doesn't detect incompatible collation changes made in 5.0.48. Fix: backport #39585 fix to 5.0 sql/handler.cc: Fix for bug#40984: backport fix from 39585 into 5.0 - backport of #39585 fix sql/handler.h: Fix for bug#40984: backport fix from 39585 into 5.0 - backport of #39585 fix
-
- 10 Nov, 2008 1 commit
-
-
Build Team authored
since Oct 1st
-
- 29 Oct, 2008 1 commit
-
-
Mattias Jonsson authored
Problem was that partitioning cached the table flags. These flags could change due to TRANSACTION LEVEL changes. Solution was to remove the cache and always return the table flags from the first partition (if the handler was initialized). mysql-test/r/partition_innodb_stmt.result: Bug#39084: Getting intermittent errors with statement-based binary logging New test result file. mysql-test/t/partition_innodb_stmt.test: Bug#39084: Getting intermittent errors with statement-based binary logging New test file. sql/ha_partition.cc: Bug#39084: Getting intermittent errors with statement-based binary logging Removed m_table_flags, and added m_handler_status. Added checks that all partitions have the same table flags. Moved some variable initializations. Updated some comments. Fixed typo initialise -> initialize Changed HA_EXTTA_NO_READCHECK to do nothing, since it is only used in ha_open, which is called for every partition in ::open anyway. sql/ha_partition.h: Bug#39084: Getting intermittent errors with statement-based binary logging Removed m_table_flags, and added m_handler_status. Always return the first partitions table flags, instead of using cached table flags. Added define of enabled/disabled partitioning table flags Fixed type initialise -> initialize Updated some comments. sql/handler.cc: Bug#39084: Getting intermittent errors with statement-based binary logging Fixed type initialise -> initialize. sql/handler.h: Bug#39084: Getting intermittent errors with statement-based binary logging Added comment to understand where the cached value is set.
-
- 08 Oct, 2008 2 commits
-
-
Ramil Kalimullin authored
upgrade from <=5.0.46 to >=5.0.48 Problem: 'check table .. for upgrade' doesn't detect incompatible collation changes made in 5.0.48. Fix: check for incompatible collation changes. sql/handler.cc: Fix for bug#39585: innodb and myisam corruption after binary upgrade from <=5.0.46 to >=5.0.48 - check for incompatible collation changes made in 5.0.48: bug #29461 latin7_general_ci latin7_general_cs latin7_estonian_cs latin2_hungarian_ci koi8u_general_ci cp1251_ukrainian_ci cp1250_general_ci bug #29499, bug #27562 ascii_general_ci
-
Mattias Jonsson authored
InnoDB Plugin locks table This is a pre fix update that does the change to the handler api. This is done since there are already changes in this version, so the real fix does not need to change the api. sql/handler.h: Bug#37453: Dropping/creating index on partitioned table with InnoDB Plugin locks table The check for which alter table flags a handler have is done through the handlerton, which will not work correctly for any partitioned table. It must be through the handler interface. To be able to fix this I have to add a virtual function to the handler class.
-
- 06 Oct, 2008 1 commit
-
-
Guilhem Bichot authored
"Trigger fired multiple times leads to gaps in auto_increment sequence". The bug was that if a trigger fired multiple times inside a top statement (for example top-statement is a multi-row INSERT, and trigger is ON INSERT), and that trigger inserted into an auto_increment column, then gaps could be observed in the auto_increment sequence, even if there were no other users of the database (no concurrency). It was wrong usage of THD::auto_inc_intervals_in_cur_stmt_for_binlog. Note that the fix changes "class handler", I'll tell the Storage Engine API team. mysql-test/r/trigger-trans.result: result; before the bugfix, the sequence was 1,2,4,6,8,10,12... mysql-test/t/trigger-trans.test: test for BUG#31612 sql/handler.cc: See revision comment of handler.h. As THD::auto_inc_intervals_in_cur_stmt_for_binlog is cumulative over all trigger invokations by the top statement, the second invokation of the trigger arrived in handler::update_auto_increment() with already one interval in THD::auto_inc_intervals_in_cur_stmt_for_binlog. The method thus believed it had already reserved one interval for that invokation, thus reserved a twice larger interval (heuristic when we don't know how large the interval should be: we grow by powers of two). InnoDB thus increased its internal per-table auto_increment counter by 2 while only one row was to be inserted. Hence a gap in the sequence. The fix is to use the new handler::auto_inc_intervals_count. Note that the trigger's statement knows how many rows it is going to insert, but provides estimation_rows_to_insert == 0 (see comments in sql_insert.cc why triggers don't call handler::ha_start_bulk_insert()). * removing white space at end of line * we don't need to maintain THD::auto_inc_intervals_in_cur_stmt_for_binlog if no binlogging or if row-based binlogging. Using auto_inc_intervals_count in the heuristic makes the heuristic independent of binary logging, which is good. sql/handler.h: THD::auto_inc_intervals_in_cur_stmt_for_binlog served - for binlogging - as a heuristic when we have no estimation of how many records the statement will insert. But the first goal needs to be cumulative over all statements which form a binlog event, while the second one needs to be attached to each statement. THD::auto_inc_intervals_in_cur_stmt_for_binlog is cumulative, leading to BUG#31612. So we introduce handler::auto_inc_intervals_count for the second goal. See the revision comment of handler.cc. A smaller issue was that, even when the binlog event was only one statement (no triggers, no stored functions), THD::auto_inc_intervals_in_cur_stmt.nb_elements() could be lower than the number of reserved intervals (fooling the heuristic), because its append() method collapses two contiguous intervals in one. Note that as auto_inc_intervals_count is in class 'handler' and not in class 'THD', it does not need to be handled in THD::reset|restore_sub_statement_state(). sql/log.cc: Comment is wrong: if auto_increment is second, in handler::update_auto_increment() 'append' is false and so auto_inc_intervals_in_cur_stmt_for_binlog is empty, we do not come here. sql/sql_class.h: comment
-
- 04 Oct, 2008 1 commit
-
-
Mattias Jonsson authored
InnoDB Plugin locks table The fast/on-line add/drop index handler calls was not implemented whithin the partitioning. This implements it in the partitioning handler. Since this is only used by the not included InnoDB plugin, there is no test case. (Have tested it manually with the plugin, and it does not allow unique indexes not including partitioning function, or removal of pk, which in innodb generates a new pk, which is not in the partitioning function.) NOTE: This introduces a new handler method, and because of that changes the storage engine api. (One cannot use a handlerton to see the capabilities of a table's handler if it is partitioned. So I added a wrapper function in the handler that defaults to the handlerton function, which the partitioning handler overrides. sql/ha_partition.cc: Bug#37453: Dropping/creating index on partitioned table with InnoDB Plugin locks table Added support for fast/on-line add/drop index. Implemented alter_table_flags as bit-or of the partitioned hton and the first partitions alter_table_flags. It is only to forward the calls for the other functions: check_if_incompatible_data add_index prepare_drop_index final_drop_index to all parts handler sql/ha_partition.h: Bug#37453: Dropping/creating index on partitioned table with InnoDB Plugin locks table Added support for fast/on-line add/drop index. sql/handler.h: Bug#37453: Dropping/creating index on partitioned table with InnoDB Plugin locks table Added the function on handler level, defaulting to use the handlerton function, but a handler can override it. Needed for partitioned tables. NOTE: Change of storage engine api. sql/sql_partition.cc: Bug#37453: Dropping/creating index on partitioned table with InnoDB Plugin locks table Using the new handler function, instead of the handlerton function. This works better with the partitioning handler. sql/sql_table.cc: Bug#37453: Dropping/creating index on partitioned table with InnoDB Plugin locks table Using the new handler function, instead of the handlerton function. This works better with the partitioning handler. Also using new process info for 'manage keys' (kind of fix for bug-37550).
-
- 08 Sep, 2008 1 commit
-
-
Mattias Jonsson authored
Problem was a mutex added in bug n 27405 for solving a problem with auto_increment in partitioned innodb tables. (in ha_partition::write_row over partitions file->ha_write_row) Solution is to use the patch for bug#33479, which refines the usage of mutexes for auto_increment. Backport of bug-33479 from 6.0: Bug-33479: auto_increment failures in partitioning Several problems with auto_increment in partitioning (with MyISAM, InnoDB. Locking issues, not handling multi-row INSERTs properly etc.) Changed the auto_increment handling for partitioning: Added a ha_data variable in table_share for storage engine specific data such as auto_increment value handling in partitioning, also see WL 4305 and using the ha_data->mutex to lock around read + update. The idea is this: Store the table's reserved auto_increment value in the TABLE_SHARE and use a mutex to, lock it for reading and updating it and unlocking it, in one block. Only accessing all partitions when it is not initialized. Also allow reservations of ranges, and if no one has done a reservation afterwards, lower the reservation to what was actually used after the statement is done (via release_auto_increment from WL 3146). The lock is kept from the first reservation if it is statement based replication and a multi-row INSERT statement where the number of candidate rows to insert is not known in advance (like INSERT SELECT, LOAD DATA, unlike INSERT VALUES (row1), (row2),,(rowN)). This should also lead to better concurrancy (no need to have a mutex protection around write_row in all cases) and work with any local storage engine. mysql-test/suite/parts/inc/partition_auto_increment.inc: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: auto_increment failures in partitioning Test source file for testing auto_increment mysql-test/suite/parts/r/partition_auto_increment_archive.result: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: auto_increment failures in partitioning result file for testing auto_increment mysql-test/suite/parts/r/partition_auto_increment_blackhole.result: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: auto_increment failures in partitioning result file for testing auto_increment mysql-test/suite/parts/r/partition_auto_increment_innodb.result: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: auto_increment failures in partitioning result file for testing auto_increment mysql-test/suite/parts/r/partition_auto_increment_memory.result: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: auto_increment failures in partitioning result file for testing auto_increment mysql-test/suite/parts/r/partition_auto_increment_myisam.result: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: auto_increment failures in partitioning result file for testing auto_increment mysql-test/suite/parts/r/partition_auto_increment_ndb.result: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: auto_increment failures in partitioning result file for testing auto_increment mysql-test/suite/parts/t/partition_auto_increment_archive.test: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: auto_increment failures in partitioning test file for testing auto_increment mysql-test/suite/parts/t/partition_auto_increment_blackhole.test: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: auto_increment failures in partitioning test file for testing auto_increment mysql-test/suite/parts/t/partition_auto_increment_innodb.test: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: auto_increment failures in partitioning test file for testing auto_increment mysql-test/suite/parts/t/partition_auto_increment_memory.test: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: auto_increment failures in partitioning test file for testing auto_increment mysql-test/suite/parts/t/partition_auto_increment_myisam.test: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: auto_increment failures in partitioning test file for testing auto_increment mysql-test/suite/parts/t/partition_auto_increment_ndb.test: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: auto_increment failures in partitioning test file for testing auto_increment sql/ha_partition.cc: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: Failures using auto_increment and partitioning Changed ha_partition::get_auto_increment from file->get_auto_increment to file->info(HA_AUTO_STATUS), since it is works better with InnoDB (InnoDB can have issues with partitioning and auto_increment, where get_auto_increment sometimes can return a non updated value.) Using the new table_share->ha_data for keeping the auto_increment value, shared by all instances of the same table. It is read+updated when holding a auto_increment specific mutex. Also added release_auto_increment to decrease gaps if possible. And a lock for multi-row INSERT statements where the number of candidate rows to insert is not known in advance (like INSERT SELECT, LOAD DATA; Unlike INSERT INTO (row1),(row2),,(rowN)). Fixed a small bug, copied++ to (*copied)++ and the same for deleted. Changed from current_thd, to ha_thd() sql/ha_partition.h: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: Failures using auto_increment and partitioning Added a new struct HA_DATA_PARTITION to be used in table_share->ha_data Added a private function to set auto_increment values if needed Removed the restore_auto_increment (the hander version is better) Added lock/unlock functions for auto_increment handling. Changed copied/deleted to const. sql/handler.h: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: auto_increment failures in partitioning Added const for changed_partitions Added comments about SQLCOM_TRUNCATE for delete_all_rows sql/table.h: Bug#38804: Query deadlock causes all tables to be inaccessible. Backporting from 6.0 of: Bug-33479: Failures using auto_increment and partitioning Added a variable in table_share: ha_data for storage of storage engine specific data (such as auto_increment handling in partitioning).
-