An error occurred fetching the project authors.
- 01 Oct, 2008 1 commit
-
-
Mattias Jonsson authored
sql/ha_partition.cc: pre push fix for bug#38804 Found a missing 'if' for releasing the mutex
-
- 18 Sep, 2008 1 commit
-
-
Mattias Jonsson authored
and Bug#33555: Group By Query does not correctly aggregate partitions Backport of bug-33257 which is the same bug. read_range_*() calls was not passed to the partition handlers, but was translated to index_read/next family calls. Resulting in duplicates rows and wrong aggregations. mysql-test/r/partition_range.result: Bug#30573: Ordered range scan over partitioned tables returns some rows twice Updated result file mysql-test/t/partition_range.test: Bug#30573: Ordered range scan over partitioned tables returns some rows twice Re-enabled the test sql/ha_partition.cc: Bug#30573: Ordered range scan over partitioned tables returns some rows twice backport of bug-33257, correct handling of read_range_* calls, without converting them to index_read/next calls sql/ha_partition.h: Bug#30573: Ordered range scan over partitioned tables returns some rows twice backport of bug-33257, correct handling of read_range_* calls, without converting them to index_read/next calls
-
- 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).
-
- 20 Aug, 2008 1 commit
-
-
Mattias Jonsson authored
post push fix for bug#20129, test failed due to non existing source files. mysql-test/Makefile.am: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Test parts.partition_repair_myisam failed because the corrupted pre fabricated files was not included in the dist-file. mysql-test/suite/parts/r/partition_special_innodb.result: Bug#34604: hander::ha_rnd_end(): Assertion inited==RND failed updated result file mysql-test/suite/parts/t/partition_special_innodb-master.opt: Bug#34604: hander::ha_rnd_end(): Assertion inited==RND failed Added parameter to speed up the test. Set to 2 seconds to be working on slow machines. mysql-test/suite/parts/t/partition_special_innodb.test: Bug#34604: hander::ha_rnd_end(): Assertion inited==RND failed Added test for verifying the bug (without the patch in ha_partition.cc, this crashes a debug compiled server) sql/ha_partition.cc: Bug#34604: hander::ha_rnd_end(): Assertion inited==RND failed In some cases error was not properly propagated through ha_partition::rnd_next. Will now return the error code from the partitions rnd_next and update m_part_spec.start_part and m_last_part properly. This makes the inited state to be correct.
-
- 19 Aug, 2008 1 commit
-
-
Mattias Jonsson authored
Bug#35161 Fixed memory leak when failing to open a partition. Bug#20129 Added tests for verifying REPAIR PARTITION. mysql-test/std_data/parts/t1_will_crash#P#p1_first_1024.MYD: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working (see mysql-test/suite/parts/t/partition_repair_myisam.test Created by: CREATE TABLE t1_will_crash ( a VARCHAR(255), b INT, c LONGTEXT, PRIMARY KEY (a, b))ENGINE=MyISAM PARTITION BY HASH (b) PARTITIONS 7; INSERT INTO t1_will_crash VALUES ... and then head -c 1024 var/master-data/test/t1_will_crash#P#p1.MYD into this file. mysql-test/std_data/parts/t1_will_crash#P#p2.MYD: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working (see mysql-test/suite/parts/t/partition_repair_myisam.test) copy of file right after _mi_mark_file_changed in mi_write was done. mysql-test/std_data/parts/t1_will_crash#P#p2.MYI: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working (see mysql-test/suite/parts/t/partition_repair_myisam.test) copy of file right after _mi_mark_file_changed in mi_write was done. mysql-test/std_data/parts/t1_will_crash#P#p3.MYI: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working (see mysql-test/suite/parts/t/partition_repair_myisam.test) copy of file right after *share->write_record was done. mysql-test/std_data/parts/t1_will_crash#P#p4.MYI: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working (see mysql-test/suite/parts/t/partition_repair_myisam.test) copy of file right after flush_cached_blocks mysql-test/std_data/parts/t1_will_crash#P#p6.MYD: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working (see mysql-test/suite/parts/t/partition_repair_myisam.test) copy of file right after _mi_write_part_record in write_dynamic_record returned for the first time. mysql-test/std_data/parts/t1_will_crash#P#p6_2.MYD: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working (see mysql-test/suite/parts/t/partition_repair_myisam.test) copy of file right after _mi_write_part_record in write_dynamic_record returned for the second time. mysql-test/std_data/parts/t1_will_crash#P#p6_3.MYD: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working (see mysql-test/suite/parts/t/partition_repair_myisam.test) copy of file right after _mi_write_part_record in write_dynamic_record returned for the third time. (data file fully updated). mysql-test/suite/parts/r/partition_recover_myisam.result: Bug#35161 Renamed since it was a test of recover and to make repair free for use without --myisam-recover mysql-test/suite/parts/r/partition_repair_myisam.result: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working New result file for testing CHECK/REPAIR of partitioned tables mysql-test/suite/parts/t/partition_recover_myisam-master.opt: Bug#35161 Renamed since it was a test of recover and to make repair free for use without --myisam-recover mysql-test/suite/parts/t/partition_recover_myisam.test: Bug#35161 Renamed since it was a test of recover and to make repair free for use without --myisam-recover mysql-test/suite/parts/t/partition_repair_myisam.test: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working New test file for testing CHECK/REPAIR of partitioned tables sql/ha_partition.cc: Bug#35161 Fix of memory leak when open of partition failed.
-
- 15 Aug, 2008 1 commit
-
-
Chad MILLER authored
update accross partitions. It's not Innodb-specific bug. ha_partition::update_row() didn't set table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET when orig_timestamp_type == TIMESTAMP_AUTO_SET_ON_INSERT. So that a partition sets the timestamp field when a record is moved to a different partition. Fixed by doing '= TIMESTAMP_NO_AUTO_SET' unconditionally. Also ha_partition::write_row() is fixed in same way as now Field_timestamp::set() is called twice in SET_ON_INSERT case. (Chad queues this patch on demand by Trudy/Davi.) mysql-test/r/partition.result: Bug#38272 timestamps fields incorrectly defaulted on update accross partitions. test result mysql-test/t/partition.test: Bug#38272 timestamps fields incorrectly defaulted on update accross partitions. test case sql/ha_partition.cc: Bug#38272 timestamps fields incorrectly defaulted on update accross partitions. Do table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET unconditionally in ha_partition::update_row and ::write_row()
-
- 13 Aug, 2008 1 commit
-
-
Mattias Jonsson authored
Post push fix (compiler warning) sql/ha_partition.cc: Bug#37402: Mysql cant read partitioned table with capital letter in the name fix to prevent a compiler warning.
-
- 11 Aug, 2008 1 commit
-
-
Mattias Jonsson authored
partition is corrupt The main problem was that ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION took another code path (over mysql_alter_table instead of mysql_admin_table) which differs in two ways: 1) alter table opens the tables in a different way than admin tables do resulting in returning with error before it tried the command 2) alter table does not start to send any diagnostic rows to the client which the lower admin functions continue to use -> resulting in assertion crash The fix: Remapped ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION to use the same code path as ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE t. Adding check in mysql_admin_table to setup the partition list for which partitions that should be used. Partitioned tables will still not work with REPAIR TABLE/PARTITION USE_FRM, since that requires moving partitions to tables, REPAIR TABLE t USE_FRM, and check that the data still fulfills the partitioning function and then move the table back to being a partition. NOTE: I have removed the following functions from the handler interface: analyze_partitions, check_partitions, optimize_partitions, repair_partitions Since they are not longer needed. THIS ALTERS THE STORAGE ENGINE API mysql-test/r/handler_innodb.result: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Added a note result row. mysql-test/r/innodb.result: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Added a note result row. mysql-test/r/innodb_mysql.result: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Added a note result row. mysql-test/r/partition.result: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned tables. mysql-test/r/trigger-trans.result: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Added a note result row. mysql-test/suite/ndb/r/ndb_partition_key.result: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned tables. mysql-test/suite/ndb/t/ndb_partition_key.test: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned tables. mysql-test/suite/parts/inc/partition_alter4.inc: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned tables. mysql-test/suite/parts/r/partition_alter4_innodb.result: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned tables. mysql-test/suite/parts/r/partition_alter4_myisam.result: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned tables. mysql-test/suite/rpl/r/rpl_failed_optimize.result: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Added a note result row. mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Added a note result row. mysql-test/t/partition.test: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned tables. sql/ha_partition.cc: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Added a function for returning admin commands result rows Updated handle_opt_partitions to handle admin commands result rows, and some error filtering (as mysql_admin_table do). Removed the functions analyze/check/optimize/repair_partitions since they have no longer any use. sql/ha_partition.h: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Removed analyze/check/optimize/repair_partitions since they are no longer are needed. sql/handler.cc: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Removed analyze/check/optimize/repair_partitions since they are no longer are needed. sql/handler.h: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Removed analyze/check/optimize/repair_partitions since they are no longer are needed. sql/mysql_priv.h: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Added set_part_state for reuse of code in mysql_admin_table. (Originally fond in sql/sql_partition.cc:prep_alter_part_table) sql/protocol.cc: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Added one assert and a debug print. sql/sql_partition.cc: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Refactored code for setting up partition state, set_part_state, now used in both prep_alter_part_table and sql_table.cc:mysql_admin_table. Removed code for handling ANALYZE/CHECK/OPTIMIZE/REPAIR partitions, since it is now handled by mysql_admin_table. sql/sql_table.cc: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Added functionality in mysql_admin_table to work with partitioned tables. Fixed a possible assertion bug for HA_ADMIN_TRY_ALTER (If analyze would output a row, it fails since the row was already started). sql/sql_yacc.yy: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Remapped ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION to use the same code path as ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE instead of taking the ALTER TABLE path. Added reset of alter_info for ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE since it is now used by partitioned tables. storage/myisam/mi_check.c: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Changed warning message from "Found X parts Should be: Y parts" to "Found X key parts. Should be Y", since it could be confusing with partitioned tables.
-
- 10 Jul, 2008 1 commit
-
-
Mattias Jonsson authored
Problem was that ha_partition had HA_FILE_BASED flag set (since it uses a .par file), but after open it uses the first partitions flags, which results in different case handling for create and for open. Solution was to change the underlying partition name so it was consistent. (Only happens when lower_case_table_names = 2, i.e. Mac OS X and storage engines without HA_FILE_BASED, like InnoDB and Memory.) (Recommit after adding rename of check_lowercase_names to get_canonical_filename, and moved it from handler.h to mysql_priv.h) NOTE: if a mixed case name for a partitioned table was created when lower_case_table_name = 2 it should be renamed or dropped before using the updated version (See bug#37402 for more info) mysql-test/include/have_case_insensitive_file_system.inc: Bug#37402: Mysql cant read partitioned table with capital letter in the name Added include file. mysql-test/include/have_lowercase0.inc: Bug#37402: Mysql cant read partitioned table with capital letter in the name moved case insensitive file system to a new file, leaving only lower_case_table_names. mysql-test/include/have_lowercase2.inc: Bug#37402: Mysql cant read partitioned table with capital letter in the name Added include file. mysql-test/lib/mtr_report.pl: Bug#37402: Mysql cant read partitioned table with capital letter in the name Removed a duplicate row and suppressed warning about setting lower_case_table_names to 2 on case sensitive file systems. mysql-test/r/case_insensitive_file_system.require: Bug#37402: Mysql cant read partitioned table with capital letter in the name Added requirement file. mysql-test/r/lowercase0.require: Bug#37402: Mysql cant read partitioned table with capital letter in the name moved case insensitive file system to a new file, leaving only lower_case_table_names. mysql-test/suite/parts/inc/partition_mgm.inc: Bug#37402: Mysql cant read partitioned table with capital letter in the name New include file for testing partitioning management functions for different settings of lower_case_table_names. mysql-test/suite/parts/r/partition_mgm_lc0_archive.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/r/partition_mgm_lc0_memory.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/r/partition_mgm_lc1_archive.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/r/partition_mgm_lc1_memory.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/r/partition_mgm_lc2_archive.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/r/partition_mgm_lc2_memory.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result: Bug#37402: Mysql cant read partitioned table with capital letter in the name New result file. mysql-test/suite/parts/t/partition_mgm_lc0_archive.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/suite/parts/t/partition_mgm_lc0_innodb.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/suite/parts/t/partition_mgm_lc0_memory.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/suite/parts/t/partition_mgm_lc0_myisam.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/suite/parts/t/partition_mgm_lc1_archive-master.opt: Bug#37402: Mysql cant read partitioned table with capital letter in the name New opt file. mysql-test/suite/parts/t/partition_mgm_lc1_archive.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/suite/parts/t/partition_mgm_lc1_innodb-master.opt: Bug#37402: Mysql cant read partitioned table with capital letter in the name New opt file. mysql-test/suite/parts/t/partition_mgm_lc1_innodb.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/suite/parts/t/partition_mgm_lc1_memory-master.opt: Bug#37402: Mysql cant read partitioned table with capital letter in the name New opt file. mysql-test/suite/parts/t/partition_mgm_lc1_memory.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/suite/parts/t/partition_mgm_lc1_myisam-master.opt: Bug#37402: Mysql cant read partitioned table with capital letter in the name New opt file. mysql-test/suite/parts/t/partition_mgm_lc1_myisam.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/suite/parts/t/partition_mgm_lc1_ndb-master.opt: Bug#37402: Mysql cant read partitioned table with capital letter in the name New opt file. mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/suite/parts/t/partition_mgm_lc2_archive-master.opt: Bug#37402: Mysql cant read partitioned table with capital letter in the name New opt file. mysql-test/suite/parts/t/partition_mgm_lc2_archive.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/suite/parts/t/partition_mgm_lc2_innodb-master.opt: Bug#37402: Mysql cant read partitioned table with capital letter in the name New opt file. mysql-test/suite/parts/t/partition_mgm_lc2_innodb.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/suite/parts/t/partition_mgm_lc2_memory-master.opt: Bug#37402: Mysql cant read partitioned table with capital letter in the name New opt file. mysql-test/suite/parts/t/partition_mgm_lc2_memory.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/suite/parts/t/partition_mgm_lc2_myisam-master.opt: Bug#37402: Mysql cant read partitioned table with capital letter in the name New opt file. mysql-test/suite/parts/t/partition_mgm_lc2_myisam.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/suite/parts/t/partition_mgm_lc2_ndb-master.opt: Bug#37402: Mysql cant read partitioned table with capital letter in the name New opt file. mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name New test file. mysql-test/t/lowercase_table3.test: Bug#37402: Mysql cant read partitioned table with capital letter in the name Moved case sensitive file system to a specific inc-file instead of included in lowercase0.inc sql/ha_partition.cc: Bug#37402: Mysql cant read partitioned table with capital letter in the name Problem was that ha_partition had HA_FILE_BASED set (since it uses a .par file), but after open it uses the first partitions table_flags(), which results in different case handling for create and for open. Solution was to change the underlying partition name so it was consistent. (Only happens when lower_case_table_names = 2, i.e. Mac OS X) sql/handler.cc: Bug#37402: Mysql cant read partitioned table with capital letter in the name Renamed check_lowercase_names to get_canonical_filename, and exported it so that ha_partition.cc can use the function. sql/mysql_priv.h: Bug#37402: Mysql cant read partitioned table with capital letter in the name Renamed check_lowercase_names to get_canonical_filename, and exported it so that ha_partition.cc can use the function.
-
- 07 Jul, 2008 2 commits
-
-
Mattias Jonsson authored
problem was that ha_partition::records was not implemented, thus using the default handler::records, which is not correct if the engine does not support HA_STATS_RECORDS_IS_EXACT. Solution was to implement ha_partition::records as a wrapper around the underlying partitions records. The rows column in explain partitions will now include the total number of records in the partitioned table. (recommit after removing out-commented code)
-
Mattias Jonsson authored
Problem was that auto_repair, is_crashed and check_and_repair was not implemented in ha_partition. Solution, implemented them as loop over all partitions for is_crashed and check_and_repair, and using the first partition for auto_repair. (Recommit after fixing review comments) mysql-test/lib/mtr_report.pl: Bug#35161: --myisam-recover does not work for partitioned MyISAM tables Added filter for crashed tables, when testing auto repair mysql-test/std_data/corrupt_t1#P#p1.MYI: Bug#35161: --myisam-recover does not work for partitioned MyISAM tables Corrupt MYI file for testing auto repair mysql-test/std_data/corrupt_t1.MYI: Bug#35161: --myisam-recover does not work for partitioned MyISAM tables Corrupt MYI file for testing auto repair mysql-test/suite/parts/r/partition_repair_myisam.result: Bug#35161: --myisam-recover does not work for partitioned MyISAM tables Result file for testing auto repair of crashed myisam partitions mysql-test/suite/parts/t/partition_repair_myisam-master.opt: Bug#35161: --myisam-recover does not work for partitioned MyISAM tables opt file for testing auto repair of crashed myisam partitions mysql-test/suite/parts/t/partition_repair_myisam.test: Bug#35161: --myisam-recover does not work for partitioned MyISAM tables Test file for testing auto repair of crashed myisam partitions sql/ha_partition.cc: Bug#35161: --myisam-recover does not work for partitioned MyISAM tables Added auto_repair as returning the first partitions auto_repair Added is_crashed and check_and_repair as loop over all partitions sql/ha_partition.h: Bug#35161: --myisam-recover does not work for partitioned MyISAM tables Activating check_and_repair, auto_repair and is_crashed
-
- 17 Jun, 2008 1 commit
-
-
Mattias Jonsson authored
returns erroneous results Used the wrong function when fixing 30480 which lead to no stop on end_key resulting in duplicate results from index scan Includes test cases for the duplicates 37327 and 37329, Duplicate rows and bad performance/High Handler_read_next values Recommit after merge issues mysql-test/r/partition.result: Bug#35931 List partition MyISAM table returns erroneous results added test results. mysql-test/t/partition.test: Bug#35931 List partition MyISAM table returns erroneous results added test for 35931, 37327 and 37329. sql/ha_partition.cc: Bug#35931 List partition MyISAM table returns erroneous results HA_READ_ORDER is a index_flag, not a table_flag. Error made in 30480.
-
- 17 Mar, 2008 1 commit
-
-
unknown authored
into -engines tree. hander::table_share was not updated after changing table->s. sql/ha_partition.cc: Valgrind warning after merge -main -> -engines, after bug#32943 change_table_ptr can happen in a middle of alter table rename/drop/... partition the newly created partitions must get the updated table_share too. sql/sql_base.cc: Bug#32943 was missing a call to change_table_ptr, this was found by valgrind after a merge from -main to -engines.
-
- 24 Feb, 2008 1 commit
-
-
unknown authored
Test file fixes for bugs 20129, 31931 and 34225 mysql-test/suite/parts/r/partition_basic_symlink_innodb.result: Manual merge, new test case to be modified for Bug#20129 mysql-test/suite/parts/r/partition_basic_symlink_myisam.result: Manual merge, new test case to be modified for Bug#20129 mysql-test/suite/parts/r/partition_engine_innodb.result: Manual merge, fix for bug#31931 mysql-test/suite/parts/r/partition_engine_myisam.result: Manual merge, fix for bug#31931 mysql-test/suite/parts/t/disabled.def: These should work now since Bug#34225 is fixed sql/ha_partition.cc: Bug#20129: partition maintenance command not working with crashed tables Fix for compiler warnings.
-
- 11 Feb, 2008 1 commit
-
-
unknown authored
Problem was that it did not work with corrupted/crashed tables. Solution is to disable these commands until WL#4176 is completed mysql-test/r/partition.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/inc/partition_alter4.inc: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION copy-paste error, changed from REBUILT to REPAIR, as the heading says mysql-test/suite/parts/r/partition_alter1_innodb.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_alter1_myisam.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_alter2_innodb.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_alter2_myisam.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_basic_innodb.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_basic_myisam.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_engine_innodb.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_engine_myisam.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/t/disabled.def: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Disabled test since the tested feature is not longer supported mysql-test/t/partition.test: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION OPTIMIZE PARTITION is not longer supported, waiting for WL#4176 sql/ha_partition.cc: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Problem was that it did not work with corrupted/crashed tables. Solution is to disable these commands until WL#4176 is completed (returning HA_ADMIN_NOT_IMPLEMENTED and #ifdef'ed the non-reachable code)
-
- 20 Dec, 2007 1 commit
-
-
unknown authored
called from a SELECT doesn't cause ROLLBACK of state" Make private all class handler methods (PSEA API) that may modify data. Introduce and deploy public ha_* wrappers for these methods in all sql/. This necessary to keep track of all data modifications in sql/, which is in turn necessary to be able to optimize two-phase commit of those transactions that do not modify data. sql/ha_partition.cc: Class ha_partition is no longer a friend of class handler. Use the public handler interface (handler::ha_ methods) for partition operations. Remove unnecessary casts from char[] to const char *.ppзи выафвыаafa sql/handler.cc: Function ha_create_table() is no longer a friend of class handler. Use public handler::change_table_ptr() to access private members. This fixes a subtle bug (no test case in the test suite) when a deletion error occurs inside one partition of a partitioned engine. The old code would crash in handler::print_error() in this case. Implement the newly introduced public ha_* wrappers of the private virtual handler methods. sql/handler.h: Introduce ha_* wrappers to all class handler methods that may modify data. This is necessary to be able to keep track of data modifying operations of class handler and optimize read-only transactions. sql/item_sum.cc: delete_all_rows -> ha_delete_all_rows sql/sql_base.cc: Use the new public wrappers. sql/sql_delete.cc: delete_all_rows -> ha_delete_all_rows sql/sql_partition.cc: Use the new public wrappers. sql/sql_select.cc: delete_all_rows -> ha_delete_all_rows delete_table -> ha_delete_table disabe_indexes -> ha_disable_idnexes sql/sql_show.cc: delete_all_rows -> ha_delete_all_rows sql/sql_table.cc: Use the public wrappers for class handler DDL methods. All methods which may change handler data are now accessed via a public wrapper. sql/sql_union.cc: delete_all_rows -> ha_delete_all_rows {enable,disable}_indexes -> ha_{enable,disable}_indexes sql/sql_update.cc: bulk_update_row -> ha_bulk_update_row sql/unireg.cc: create_handler_files -> ha_create_handler_files
-
- 19 Dec, 2007 1 commit
-
-
unknown authored
that the entire server uses their public ha_* counterparts instead, since only then we can ensure proper tracing of these calls that is necessary for Bug#12713. A pre-requisite for Bug#12713 "Error in a stored function called from a SELECT doesn't cause ROLLBACK of statem" sql/ha_partition.cc: Use ha_write_row, ha_update_row, ha_delete_row instead of now-private write_row, update_row, delete_row. In future ha_* calls will contain more than just a call to the binary log, so it's essential they are used consistently everywhere in the server. Disable the undesired effect of double binary logging of changes to partitioned tables with tmp_disable_binlog. sql/handler.h: Make write_row, update_row, delete_row private. It's critical that the entire code base uses ha_write_row, ha_update_row, ha_delete_row instead -- in future, ha_* counterparts will have more common functionality than just a call to the binary log. sql/sql_select.cc: Use ha_write_row, ha_update_row, ha_delete_row instead of write_row, update_row, delete_row respectively. The change affects the join execution code that works with an intermediate internal temporary table. Do not disable binary logging, since it's unnecessary - temporary tables are not replicated by row level replication. sql/sql_table.cc: Use ha_write_row in copy_data_between_tables - the function that writes data from the original table to a temporary copy when executing ALTER TABLE. Do not disable binary logging since temporary tables are not replicated by row level replication anyway.
-
- 13 Dec, 2007 1 commit
-
-
unknown authored
mysql-test/r/partition_range.result: removed fix for bug#30573 mysql-test/suite/parts/r/rpl_partition.result: updated result file mysql-test/t/partition_range.test: removed test case for bug#30573 sql/ha_partition.cc: removed fix for bug#30573
-
- 12 Dec, 2007 1 commit
-
-
unknown authored
cause ROLLBACK of statement", part 1. Review fixes. Do not send OK/EOF packets to the client until we reached the end of the current statement. This is a consolidation, to keep the functionality that is shared by all SQL statements in one place in the server. Currently this functionality includes: - close_thread_tables() - log_slow_statement(). After this patch and the subsequent patch for Bug#12713, it shall also include: - ha_autocommit_or_rollback() - net_end_statement() - query_cache_end_of_result(). In future it may also include: - mysql_reset_thd_for_next_command(). include/mysql_com.h: Rename now unused members of NET: no_send_ok, no_send_error, report_error. These were server-specific variables related to the client/server protocol. They have been made obsolete by this patch. Previously the same members of NET were used to store the error message both on the client and on the server. The error message was stored in net.last_error (client: mysql->net.last_error, server: thd->net.last_error). The error code was stored in net.last_errno (client: mysql->net.last_errno, server: thd->net.last_errno). The server error code and message are now stored elsewhere (in the Diagnostics_area), thus NET members are no longer used by the server. Rename last_error to client_last_error, last_errno to client_last_errno to avoid potential bugs introduced by merges. include/mysql_h.ic: Update the ABI file to reflect a rename. Renames do not break the binary compatibility. libmysql/libmysql.c: Rename last_error to client_last_error, last_errno to client_last_errno. This is necessary to ensure no unnoticed bugs introduced by merged changesets. Remove net.report_error, net.no_send_ok, net.no_send_error. libmysql/manager.c: Rename net.last_errno to net.client_last_errno. libmysqld/lib_sql.cc: Rename net.last_errno to net.client_last_errno. Update the embedded implementation of the client-server protocol to reflect the refactoring of protocol.cc. libmysqld/libmysqld.c: Rename net.last_errno to net.client_last_errno. mysql-test/r/events.result: Update to reflect the change in mysql_rm_db(). Now we drop stored routines and events for a given database name only if there is a directory for this database name. ha_drop_database() and query_cache_invalidate() are called likewise. Previously we would attempt to drop routines/events even if database directory was not found (it worked, since routines and events are stored in tables). This fixes Bug 29958 "Weird message on DROP DATABASE if mysql.proc does not exist". The change was done because the previous code used to call send_ok() twice, which led to an assertion failure when asserts against it were added by this patch. mysql-test/r/grant.result: Fix the patch for Bug 16470, now FLUSH PRIVILEGES produces an error if mysql.procs_priv is missing. This fixes the assert that send_ok() must not called after send_error() (the original patch for Bug 16470 was prone to this). mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result: Produce a more detailed error message. mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result: Produce a more detailed error message. mysql-test/t/grant.test: Update the test, now FLUSH PRIVILEGES returns an error if mysql.procs_priv is missing. server-tools/instance-manager/mysql_connection.cc: Rename net.last_errno to net.client_last_errno. sql/ha_ndbcluster_binlog.cc: Add asserts. Use getters to access statement status information. Add a comment why run_query() is broken. Reset the diagnostics area in the end of run_query() to fulfill the invariant that the diagnostics_area is never assigned twice per statement (see the comment in the code when this can happen). We still do not clear thd->is_fatal_error and thd->is_slave_error, which may lead to bugs, I consider the whole affair as something to be dealt with separately. sql/ha_partition.cc: fatal_error() doesn't set an error by itself. Perhaps we should remove this method altogether and instead add a flag to my_error to set thd->is_fatal_error property. Meanwhile, this change is a part of inspection made to the entire source code with the goal to ensure that fatal_error() is always accompanied by my_error(). sql/item_func.cc: There is no net.last_error anymore. Remove the obsolete assignment. sql/log_event.cc: Use getters to access statement error status information. sql/log_event_old.cc: Use getters to access statement error status information. sql/mysqld.cc: Previously, if a continue handler for an error was found, my_message_sql() would not set an error in THD. Since the current statement must be aborted in any case, find_handler() had a hack to assign thd->net.report_error to 1. Remove this hack. Set an error in my_message_sql() even if the continue handler is found. The error will be cleared anyway when the handler is executed. This is one action among many in this patch to ensure the invariant that whenever thd->is_error() is TRUE, we have a message in thd->main_da.message(). sql/net_serv.cc: Use a full-blown my_error() in net_serv.cc to report an error, instead of just setting net->last_errno. This ensures the invariant that whenever thd->is_error() returns TRUE, we have a message in thd->main_da.message(). Remove initialization of removed NET members. sql/opt_range.cc: Use my_error() instead of just raising thd->net.report_error. This ensures the invariant that whenever thd->is_error() returns TRUE, there is a message in thd->main_da.message(). sql/opt_sum.cc: Move invocation of fatal_error() right next to the place where we set the error message. That makes it easier to track that whenever fatal_error() is called, there is a message in THD. sql/protocol.cc: Rename send_ok() and send_eof() to net_send_ok() and net_send_eof() respectively. These functions write directly to the network and are not for use anywhere outside the client/server protocol code. Remove the code that was responsible for cases when either there is no error code, or no error message, or both. Instead the calling code ensures that they are always present. Asserts are added to enforce the invariant. Instead of a direct access to thd->server_status and thd->total_warn_count use function parameters, since these from now on don't always come directly from THD. Introduce net_end_statement(), the single-entry-point replacement API for send_ok(), send_eof() and net_send_error(). Implement Protocol::end_partial_result_set to use in select_send::abort() when there is a continue handler. sql/protocol.h: Update declarations. sql/repl_failsafe.cc: Use getters to access statement status information in THD. Rename net.last_error to net.client_last_error. sql/rpl_record.cc: Set an error message in prepare_record() if there is no default value for the field -- later we do print this message to the client. sql/rpl_rli.cc: Use getters to access statement status information in THD. sql/slave.cc: In create_table_from_dump() (a common function that is used in LOAD MASTER TABLE SQL statement and COM_LOAD_MASTER_DATA), instead of hacks with no_send_ok, clear the diagnostics area when mysql_rm_table() succeeded. Update has_temporary_error() to work correctly when no error is set. This is the case when Incident_log_event is executed: it always returns an error but does not set an error message. Use getters to access error status information. sql/sp_head.cc: Instead of hacks with no_send_error, work through the diagnostics area interface to suppress sending of OK/ERROR packets to the client. Move query_cache_end_of_result before log_slow_statement(), similarly to how it's done in dispatch_command(). sql/sp_rcontext.cc: Remove hacks with assignment of thd->net.report_error, they are not necessary any more (see the changes in mysqld.cc). sql/sql_acl.cc: Use getters to access error status information in THD. sql/sql_base.cc: Access thd->main_da.sql_errno() only if there is an error. This fixes a bug when auto-discovery, that was effectively disabled under pre-locking. sql/sql_binlog.cc: Remove hacks with no_send_ok/no_send_error, they are not necessary anymore: the caller is responsible for network communication. sql/sql_cache.cc: Disable sending of OK/ERROR/EOF packet in the end of dispatch_command if the response has been served from the query cache. This raises the question whether we should store EOF packet in the query cache at all, or generate it anew for each statement (we should generate it anew), but this is to be addressed separately. sql/sql_class.cc: Implement class Diagnostics_area. Please see comments in sql_class.h for details. Fix a subtle coding mistake in select_send::send_data: when on slave, an error in Item::send() was ignored. The problem became visible due to asserts that the diagnostics area is never double assigned. Remove initialization of removed NET members. In select_send::abort() do not call select_send::send_eof(). This is not inheritance-safe. Even if a stored procedure continue handler is found, the current statement is aborted, not succeeded. Instead introduce a Protocol API to send the required response, Protocol::end_partial_result_set(). This simplifies implementation of select_send::send_eof(). No need to add more asserts that there is no error, there is an assert inside Diagnostics_area::set_ok_status() already. Leave no trace of no_send_* in the code. sql/sql_class.h: Declare class Diagnostics_area. Remove the hack with no_send_ok from Substatement_state. Provide inline implementations of send_ok/send_eof. Add commetns. sql/sql_connect.cc: Remove hacks with no_send_error. Since now an error in THD is always set if net->error, it's not necessary to check both net->error and thd->is_error() in the do_command loop. Use thd->main_da.message() instead of net->last_errno. Remove the hack with is_slave_error in sys_init_connect. Since now we do not reset the diagnostics area in net_send_error (it's reset at the beginning of the next statement), we can access it safely even after execute_init_command. sql/sql_db.cc: Update the code to satisfy the invariant that the diagnostics area is never assigned twice. Incidentally, this fixes Bug 29958 "Weird message on DROP DATABASE if mysql.proc does not exist". sql/sql_delete.cc: Change multi-delete to abort in abort(), as per select_send protocol. Fixes the merge error with the test for Bug 29136 sql/sql_derived.cc: Use getters to access error information. sql/sql_insert.cc: Use getters to access error information. sql-common/client.c: Rename last_error to client_last_error, last_errno to client_last_errno. sql/sql_parse.cc: Remove hacks with no_send_error. Deploy net_end_statement(). The story of COM_SHUTDOWN is interesting. Long story short, the server would become on its death's door, and only no_send_ok/no_send_error assigned by send_ok()/net_send_error() would hide its babbling from the client. First of all, COM_QUIT does not require a response. So, the comment saying "Let's send a response to possible COM_QUIT" is not only groundless (even mysqladmin shutdown/mysql_shutdown() doesn't send COM_QUIT after COM_SHUTDOWN), it's plainly incorrect. Secondly, besides this additional 'OK' packet to respond to a hypothetical COM_QUIT, there was the following code in dispatch_command(): if (thd->killed) thd->send_kill_message(); if (thd->is_error() net_send_error(thd); This worked out really funny for the thread through which COM_SHUTDOWN was delivered: we would get COM_SHUTDOWN, say okay, say okay again, kill everybody, get the kill signal ourselves, and then attempt to say "Server shutdown in progress" to the client that is very likely long gone. This all became visible when asserts were added that the Diagnostics_area is not assigned twice. Move query_cache_end_of_result() to the end of dispatch_command(), since net_send_eof() has been moved there. This is safe, query_cache_end_of_result() is a no-op if there is no started query in the cache. Consistently use select_send interface to call abort() or send_eof() depending on the operation result. Remove thd->fatal_error() from reset_master(), it was a no-op. in hacks with no_send_error woudl save us from complete breakage of the client/server protocol. Consistently use select_send::abort() whenever there is an error, and select_send::send_eof() in case of success. The issue became visible due to added asserts. sql/sql_partition.cc: Always set an error in THD whenever there is a call to fatal_error(). sql/sql_prepare.cc: Deploy class Diagnostics_area. Remove the unnecessary juggling with the protocol in Select_fetch_protocol_binary::send_eof(). EOF packet format is protocol-independent. sql/sql_select.cc: Call fatal_error() directly in opt_sum_query. Call my_error() whenever we call thd->fatal_error(). sql/sql_servers.cc: Use getters to access error information in THD. sql/sql_show.cc: Use getters to access error information in THD. Add comments. Call my_error() whenever we call fatal_error(). sql/sql_table.cc: Replace hacks with no_send_ok with the interface of the diagnostics area. Clear the error if ENOENT error in ha_delete_table(). sql/sql_update.cc: Introduce multi_update::abort(), which is the proper way to abort a multi-update. This fixes the merge conflict between this patch and the patch for Bug 29136. sql/table.cc: Use a getter to access error information in THD. sql/tztime.cc: Use a getter to access error information in THD.
-
- 06 Dec, 2007 1 commit
-
-
unknown authored
ha_partition::update_create_info() just calls update_create_info of a first partition, so only get the autoincrement maximum of the first partition, so SHOW CREATE TABLE can show small AUTO_INCREMENT parameters. Fixed by implementing ha_partition::update_create_info() in a way other handlers work. HA_ARCHIVE:stats.auto_increment handling made consistent with other engines mysql-test/r/archive.result: Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table). test result fixed mysql-test/r/partition.result: Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table). test result mysql-test/suite/rpl/r/rpl_innodb_bug28430.result: Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table). test result fixed mysql-test/t/partition.test: Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table). test added as rpl_innodb_bug28430 is INNOBASE specific while the bug is not sql/ha_partition.cc: Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table). ha_partition::update_create_info() implemented storage/archive/ha_archive.cc: Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table). ha_archive.stats.auto_increment now contains next (not last used) value of auto_increment to be consistent with other engines
-
- 03 Dec, 2007 1 commit
-
-
unknown authored
(also fixes the bugs: Bug#29320, Bug#29493 and Bug#30536) Problem: Partitioning did not handle unordered scans correctly for engines with unordered read order. Solution: do not stop scanning fi a recored is out of range, since there can be more records within the range afterwards. Note: this is the patch that fixes the bug, but since there are no storage engines shipped with mysql 5.1 (falcon comes in 6.0) there are no test cases (it is a separate patch that only goes into 6.0) sql/ha_partition.cc: Bug#30480: Falcon: searches fail if LIKE and key partition Problem was that partitioning did not handle unordered scans correctly for engines with unordered read order. Solution: do not stop if a recored is out of range, since it can come more records within the range afterwards
-
- 28 Nov, 2007 1 commit
-
-
unknown authored
The bug was that for ordered index scans, ha_partition::index_init() did not put index columns into table->read_set if the underlying storage engine did not have HA_PARTIAL_COLUMN_READ flag. This was causing assertion failure when handle_ordered_index_scan() tried to sort the records according to index order. Fixed by making ha_partition::index_init() put index columns into table->read_set for all ordered scans. mysql-test/r/partition.result: BUG#32772: partition crash 1: enum column - Testcase mysql-test/t/partition.test: BUG#32772: partition crash 1: enum column - Testcase sql/ha_partition.cc: BUG#32772: partition crash 1: enum column - Make ha_partition::index_init() include index columns in the read_set whenever an ordered scan is initialized, no matter if HA_PARTIAL_COLUMN_READ is set or not.
-
- 20 Nov, 2007 2 commits
-
-
unknown authored
Problem was for LINEAR HASH/KEY. Crashes because of wrong partition id returned when creating the new altered partitions. (because of wrong linear hash mask) Solution: Update the linear hash mask before using it for the new altered table. mysql-test/r/partition_hash.result: Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault test result mysql-test/t/partition_hash.test: Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentatition fault test case sql/ha_partition.cc: Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault Updating the linear hash mask before using it. sql/sql_partition.cc: Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault exporting the set_linear_hash_mask function (static -> non static) sql/sql_partition.h: Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault exporting the set_linear_hash_mask function (static -> non static)
-
unknown authored
The problem: ha_partition::read_range_first() could return a record that is outside of the scanned range. If that record happened to be in the next subsequent range, it would satisfy the WHERE and appear in the output twice. (we would get it the second time when scanning the next subsequent range) Fix: Made ha_partition::read_range_first() check if the returned recod is within the scanned range, like other read_range_first() implementations do. mysql-test/r/partition_range.result: BUG#30573: Ordered range scan over partitioned tables returns some rows twice - Testcase mysql-test/t/partition_range.test: BUG#30573: Ordered range scan over partitioned tables returns some rows twice - Testcase sql/ha_partition.cc: BUG#30573: Ordered range scan over partitioned tables returns some rows twice - Make ha_partition::read_range_first() check if the returned record is within the range.
-
- 12 Nov, 2007 1 commit
-
-
unknown authored
Partition handler fails updating tables with partitioning based on timestamp field, as it calculates the timestamp field AFTER it calculates the number of partition of a record. Fixed by adding timestamp_field->set_time() call and disabling such consequent calls mysql-test/r/partition.result: Bug #32067 Partitions: crash with timestamp column. test result mysql-test/t/partition.test: Bug #32067 Partitions: crash with timestamp column. test case sql/ha_partition.cc: Bug #32067 Partitions: crash with timestamp column. do timestamp_field->set_time() in the ha_partition::update_row()
-
- 09 Nov, 2007 1 commit
-
-
unknown authored
Problem: the table's INDEX and DATA DIR was taken directly from the table's first partition. This allowed rename attack similar to bug#32111 when ALTER TABLE REMOVE PARTITIONING Solution: Silently ignore the INDEX/DATA DIR for the table. (Like some other storage engines do). Partitioned tables do not support DATA/INDEX DIR on the table level, only on its partitions. mysql-test/r/partition_mgm.result: Bug#32091: Security breach via directory changes test result mysql-test/t/partition_mgm.test: Bug#32091: Security breach via directory changes test case sql/ha_partition.cc: Bug#32091: Security breach via directory changes Do not use the first partition's DATA/INDEX DIR as the table's DATA/INDEX DIR. (A partitioned table do not have support for DATA/ INDEX DIR, only its partitions do)
-
- 17 Oct, 2007 1 commit
-
-
unknown authored
table to partitioned Problem: Crashed because usage of an uninitialised mutex when auto_incrementing a partitioned temporary table Fix: Only locking (using the mutex) if not temporary table. mysql-test/r/partition.result: Bug #30878: Crashing when alter an auto_increment non partitioned table to partitioned test result mysql-test/t/partition.test: Bug #30878: Crashing when alter an auto_increment non partitioned table to partitioned testcase sql/ha_partition.cc: Bug #30878: Crashing when alter an auto_increment non partitioned table to partitioned If the table is a temporary table, the table_share->mutex is not initialised. Checking if not temporary table, then OK to lock (else no need to lock)
-
- 11 Oct, 2007 1 commit
-
-
unknown authored
- Reserver namespace and place in frm for TABLE_CHECKSUM and PAGE_CHECKSUM create options - Added syncing of directory when creating .frm files - Portability fixes - Added missing cast that could cause bugs - Code cleanups - Made some bit functions inline - Moved things out of myisam.h to my_handler.h to make them more accessable - Renamed some myisam variables and defines to make them more globaly usable (as they are used outside of MyISAM) - Fixed bugs in error conditions - Use compiler time asserts instead of run time - Fixed indentation HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP as the old name was wrong (Added a define for old value to ensure we don't break any old code) Added HA_EXTRA_PREPARE_FOR_RENAME as a signal for rename (before we used a DROP signal which is wrong) - Initialize error messages early to get better errors when mysqld or an engine fails to start - Fix windows bug that query_performance_frequency was not initialized if registry code failed - thread_stack -> my_thread_stack_size BitKeeper/etc/ignore: added libmysqld/scheduler.cc libmysqld/sql_connect.cc libmysqld/sql_tablespace.cc include/Makefile.am: Added my_bit.h include/m_string.h: Added bzero_if_purify() to simplify code include/my_base.h: Reserve options for the future Added HA_OPTION_NULL_FIELDS, HA_OPTION_PAGE_CHECKSUM, HA_CREATE_PAGE_CHECKSUM Added new error message HA_ERR_NEW_FILE Added optional new row type BLOCK_RECORD Renamed HA_EXTRA_PREPARE_FOR_DELETE to HA_EXTRA_PREPARE_FOR_DROP Added HA_EXTRA_PREARE_FOR_RENAME to inform handler we will do a rename (Added define to make things compatible until 6.0) Moved invalidator_by_filename form myisam.h include/my_dbug.h: Poirtablity fix include/my_global.h: Added helper macros STATIC_INLINE and MY_ERRPTR Added NEED_EXPLICIT_SYNC_DIR include/my_handler.h: Added missing casts Moved some constants and macros out from myisam.h to make these generally available Renamed mi_compare_text() to ha_compare_text() as this function is not myisam specific Renamed mi_portable_sizeof_char_ptr to portable_sizeof_char_ptr Added registering of handler messages for better error reporting during startup include/my_sys.h: Added my_sync_dir() and my_sync_dir_by_file() More comments Some indentation fixes Moved bit functions to my_bit.h Added prototype for crc32() include/myisam.h: Moved things from here to my_handler.h to make them more accessable libmysql/Makefile.shared: Added my_sync mysys/array.c: Fixed indentation and spelling errors Split set_dynamic() to two functions Added allocate_dynamic() as a new visiable function (no new code, only refactoring) mysys/mf_iocache.c: More DBUG mysys/mf_keycache.c: More explicite ASSERT Removed some casts Fixed indentation mysys/mf_tempfile.c: Fixed bug with possible dangling file descriptor mysys/my_atomic.c: Use compile time asserts instead of run time mysys/my_bit.c: Make most bit functions inline mysys/my_bitmap.c: Added my_bit.h mysys/my_compress.c: Fixed indentation mysys/my_create.c: Added my_sync_by_dir() mysys/my_delete.c: Added my_sync_by_dir() mysys/my_error.c: init_glob_errs() is now done in my_init() mysys/my_handler.c: mi_compare_text() -> ha_compare_text() as this is not MyISAM specific Added functions to initialize handler error messages Fixed indentation More clear usage of include files mysys/my_init.c: Added my_thread_stack_size to be used by other programs Ensure that global error messages are always initialized Fix windows bug that query_performance_frequency was not initialized if registry code failed mysys/my_open.c: More comments Removed duplicate code mysys/my_pread.c: Ensure that my_errno is set even if errno is 0 mysys/my_realloc.c: Added comment mysys/my_rename.c: Added syncing of directories mysys/my_symlink.c: Added my_sync_by_dir() mysys/my_sync.c: Added my_sync_dir() On recent Mac OS X, fcntl(F_FULLFSYNC) is recommended over fsync() (see "man fsync" on Mac OS X 10.3). my_sync_dir(): to sync a directory after a file creation/deletion/ renaming; can be called directly or via MY_SYNC_DIR in my_create/ my_delete/my_rename(). No-op except on Linux (see "man fsync" on Linux). my_sync_dir_from_file(): same as above, just more practical when the caller has a file name but no directory name ready. Should the #warning even be a #error? I mean do we want to release binaries which don't guarantee any durability? mysys/safemalloc.c: Added sf_malloc_report_allocated() (Debugging aid) sql/gen_lex_hash.cc: Remove inline for big function sql/ha_partition.cc: HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP prepare_for_delete -> prepare_for_rename() as this is the the time this function is called sql/ha_partition.h: prepare_for_delete -> prepare_for_rename() as this is the the time this function is called sql/handler.cc: ha_init_errors() is now called at startup before plugins This allows us to get better error messages sql/handler.h: Reserve enum value for Maria Add future proof enum for page checksums sql/item_func.cc: Include my_bit.h sql/lex.h: Added future proof CREATE table options sql/log.cc: Added comment sql/mysql_priv.h: thread_stack moved to mysys sql/mysqld.cc: thread_stack moved to mysys thread_stack -> my_thread_stack_size Initialize myisam key caches before plugins starts Initialize error to allow storage engine to give better error messages if init failes. Fixed indentation Group all MyISAM options together Added new status variable 'Opened_table_definitions' to allow one to monitor if table definition cache is too small Clarified some option help messages sql/opt_range.cc: Removed wrong usage of SAFE_MODE (this disabled key usage for UPDATES, which was never the intention) Removed print if total cost in a place where it didn't have any usable value sql/set_var.cc: thread_stack -> my_thread_stack sql/sql_class.cc: Intialize transaction object properly sql/sql_parse.cc: thread_stack -> my_thread_stack sql/sql_select.cc: Include my_bit.h mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr sql/sql_show.cc: Simplify handling of ha_choice variables Added future safe PAGE_CHECKSUM option Addid missing 'transactional=#' in information schema sql/sql_table.cc: HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_FORCE_REOPEN when doing reopen HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_RENAME when doing rename Removed not needed initialization sql/sql_test.cc: thread_stack -> my_thread_stack sql/sql_yacc.yy: Simplify handling of ha_choice variables Added future proof create table options TABLE_CHECKSUM=# & PAGE_CHECKSUM=# sql/table.cc: Save page_checksum in .frm sql/table.h: Added variable to hold create table option PAGE_CHECKSUM sql/unireg.cc: Added syncing of directories storage/myisam/ft_boolean_search.c: mi_compare_text() -> ha_compare_text() storage/myisam/ft_eval.c: mi_compare_text() -> ha_compare_text() storage/myisam/ft_nlq_search.c: mi_compare_text() -> ha_compare_text() storage/myisam/ft_parser.c: mi_compare_text() -> ha_compare_text() storage/myisam/ft_stopwords.c: mi_compare_text() -> ha_compare_text() storage/myisam/ft_test1.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/ft_update.c: mi_compare_text() -> ha_compare_text() storage/myisam/ha_myisam.cc: Include my_bit.h storage/myisam/mi_check.c: MI_MAX_POSSIBLE_KEY_BUFF -> HA_MAX_POSSIBLE_KEY_BUFF mi_compare_text() -> ha_compare_text() Added BLOCK_RECORD to avoid compiler warnings storage/myisam/mi_checksum.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_dynrec.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_extra.c: HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_packrec.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_range.c: mi_compare_text -> ha_compare_text storage/myisam/mi_test1.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_test2.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_unique.c: mi_compare_text() -> ha_compare_text() storage/myisam/mi_write.c: mi_compare_text() -> ha_compare_text() storage/myisam/myisamchk.c: Include my_bit.h storage/myisam/myisamdef.h: Moved store_key_length_inc to handler.h storage/myisam/myisampack.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/sp_test.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisammrg/ha_myisammrg.cc: HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP include/my_bit.h: New BitKeeper file ``include/my_bit.h''
-
- 04 Oct, 2007 1 commit
-
-
unknown authored
Two cases in ha_partition::extra() was missing (HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH) which only is currently used by NDB (which not uses ha_partition) mysql-test/r/partition.result: Added result for test of Bug #30484 mysql-test/t/partition.test: Added test for Bug #30484 sql/ha_partition.cc: Added HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH in ha_partition::extra to do nothing (Only currently used in NDB, which is not dependent of ha_partition)
-
- 13 Sep, 2007 1 commit
-
-
unknown authored
Issuing SELECT COUNT(*) against partitioned InnoDB table may cause server crash. Fixed that not all required fields were included into read_set. mysql-test/r/partition_innodb.result: A test case for BUG#30583. mysql-test/t/partition_innodb.test: A test case for BUG#30583. sql/ha_partition.cc: Ensure that all fields of current key are included into read_set, as partitioning requires them for sorting (see ha_partition::handle_ordered_index_scan).
-
- 09 Sep, 2007 1 commit
-
-
unknown authored
"Rows not deleted from innodb partitioned tables if --innodb_autoinc_lock_mode=0" Due to a previous bugfix which initializes a previously uninitialized variable, ha_partition::get_auto_increment() may fail to operate correctly when the storage engine reports that it is only reserving one value and one or more partitions have a different 'next-value'. Currently, only affects Innodb's new-style auto-increment code which reserves larger blocks of values and has less inter-thread contention. mysql-test/suite/rpl/r/rpl_innodb_bug28430.result: Fix results - previous results shows symptoms of Bug30919 sql/ha_partition.cc: Bug30919 ha_partition::write_row() Do not insert a row if a failure occurred while generating auto-increment value. ha_partition::get_auto_increment() If there is an empty 'intersection' of auto-increment values, perform a second pass before failing because partitions may have different auto-increment 'next-value' attributes. storage/innobase/handler/ha_innodb.cc: Bug30919 Only set *first_value if it is less than autoinc value. This allows a higher value to be hinted when operating as a partitioned table. mysql-test/suite/rpl/r/rpl_innodb_bug30919.result: New BitKeeper file ``mysql-test/suite/rpl/r/rpl_innodb_bug30919.result'' mysql-test/suite/rpl/t/rpl_innodb_bug30919-master.opt: New BitKeeper file ``mysql-test/suite/rpl/t/rpl_innodb_bug30919-master.opt'' mysql-test/suite/rpl/t/rpl_innodb_bug30919.test: New BitKeeper file ``mysql-test/suite/rpl/t/rpl_innodb_bug30919.test''
-
- 07 Sep, 2007 2 commits
-
-
unknown authored
In the ha_partition::position() we don't calculate the number of the partition of the record, but use m_last_part value instead, relying on that it's previously set by some other call like ::write_row(). Delete_rows_log_event::do_exec_row() calls find_and_fetch_row(), where we used position() + rnd_pos() call for the InnoDB-based PARTITION-ed table as there HA_PRIMARY_KEY_REQUIRED_FOR_POSITION enabled. fixed by introducing new handler::rnd_pos_by_record() method to be used for random record-based positioning sql/ha_partition.cc: Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format. ha_partition::rnd_pos_by_record() implemented sql/ha_partition.h: Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format. ha_partition::rnd_pos_by_record() declared sql/handler.h: Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format. handler::rnd_pos_by_record() introduced sql/log_event.cc: Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format. handler::rnd_pos_by_record used instead of position() + rnd_pos() call
-
unknown authored
Initiate static const outside class definition server-tools/instance-manager/listener.cc: Initiate static const outside class definition server-tools/instance-manager/listener.h: Initiate static const outside class definition sql/ha_partition.cc: Initiate static const outside class definition sql/ha_partition.h: Initiate static const outside class definition
-
- 28 Aug, 2007 1 commit
-
-
unknown authored
sql/ha_partition.cc: Post-merge fix (remove duplicate definition of ::column_bitmaps_signal) sql/mysqld.cc: Post-merge fix (cast away some compiler warnings in DBUG_PRINT, remove duplicate definition of OPT_KEEP_FILES_ON_CREATE).
-
- 27 Aug, 2007 1 commit
-
-
unknown authored
A local variable may be used uninitialized in ha_partition::get_auto_increment(). Initialize it properly. sql/ha_partition.cc: Initialize first_value_part in ha_partition::get_auto_increment() with *first_value before it's used in the underlying table handler. Thanks to Antony for digging up this fix.
-
- 24 Aug, 2007 1 commit
-
-
unknown authored
bug fixed partition_pruning.result: test fixed mysql-test/r/partition_pruning.result: test fixed sql/ha_partition.cc: bug fixed sql/ha_partition.h: bug fixed
-
- 23 Aug, 2007 1 commit
-
-
unknown authored
In the ha_partition::position() we didn't calculate the number of the partition of the record. We used m_last_part value instead, relying on that it is set in other place like previous call of a method like ::write_row(). In replication we don't call any of these befor position(). Delete_rows_log_event::do_exec_row calls find_and_fetch_row. In case of InnoDB-based PARTITION table, we have HA_PRIMARY_KEY_REQUIRED_FOR_POSITION enabled, so use position() / rnd_pos() calls to fetch the record. Fixed by adding partition_id calculation to the ha_partition::position() sql/ha_partition.h: Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format. column_bitmaps_signal interface added sql/ha_partition.cc: Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format. Calculate the number of the partition in ha_partition::position(). ha_partition::column_bitmaps_signal() implemented mysql-test/r/partition_pruning.result: Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format. test result fixed
-
- 13 Aug, 2007 1 commit
-
-
unknown authored
Faster thr_alarm() Added 'Opened_files' status variable to track calls to my_open() Don't give warnings when running mysql_install_db Added option --source-install to mysql_install_db I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems index_read() -> index_read_map() index_read_idx() -> index_read_idx_map() index_read_last() -> index_read_last_map() BUILD/compile-solaris-sparc-forte: Updated script to current Solaris installations Now we compile by default for 64 bits client/mysql.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) client/mysql_upgrade.c: Fixed compiler warning (on Forte) client/mysqladmin.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) client/mysqlcheck.c: Fixed compiler warning (on Forte) client/mysqldump.c: Fixed compiler warning (on Forte) client/mysqlslap.c: Fixed compiler warning (on Forte) client/mysqltest.c: Fixed compiler warning (on Forte) client/sql_string.cc: Avoid compiler warnings when using C function pointers in C++ configure.in: Added detection of mtmalloc and ieeefp.h extra/replace.c: Fixed compiler warning (on Forte) include/m_ctype.h: Added some typedef's to make it easy to use C function pointers in C++ include/my_sys.h: Added my_file_total_opened (counter for calls to my_open()) include/myisam.h: Fixed compiler warning (on Forte) libmysql/libmysql.c: Fixed compiler warning (on Forte) by adding casts and change types libmysql/manager.c: Fixed compiler warning (on Forte) by adding casts and change types mysql-test/r/ctype_cp932_binlog_stm.result: Updated positions (Needed because we didn't before correctly restore collation_database after running stored procedure mysys/my_fopen.c: Count number of opened files mysys/my_open.c: Count number of opened files mysys/my_static.c: Count number of opened files mysys/thr_alarm.c: Optimization to do less alarm() and pthread_sigmask() calls. Idea is to remember time for next pending alarm and not reschedule a new alarm if it's after the current one. Before we only did this if there was other pending alarms. We don't have to use pthread_sigmask() in case of 'USE_ONE_SIGNAL_HAND' as the alarm() signal will be blocked for the calling thread anyway and no other thread will have the alarm() signal enabled to call process_alarm() regex/regcomp.c: Fixed compiler warning (on Forte) by adding casts and change types scripts/mysql_install_db.sh: Added option --source-install to allow one to create a mysql database from the source tree without installing MySQL Don't give (unnecessary) warnings server-tools/instance-manager/angel.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) server-tools/instance-manager/thread_registry.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/event_db_repository.cc: index_read() -> index_read_map() sql/event_queue.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/field.cc: Fixed compiler warnings about hidden fields sql/ha_partition.cc: Fixed compiler warnings about hidden fields index_read() -> index_read_map() sql/ha_partition.h: index_read() -> index_read_map() sql/handler.cc: Added PAGE option to row types (to prepare for future) index_read() -> index_read_map() sql/handler.h: Added ROW_TYPE_PAGE (for future) Added flag to signal if table was to be created transactionally I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems index_read() -> index_read_map() index_read_idx() -> index_read_idx_map() index_read_last() -> index_read_last_map() sql/item.cc: Fixed indentation Renamed local variable to avoid hiding class variable sql/item_cmpfunc.cc: Renamed local variable to avoid hiding class variable sql/item_cmpfunc.h: Removed not used variable sql/item_func.cc: Renamed local variable to avoid hiding class variable sql/item_strfunc.cc: Moved functions from Item_strfunc.cc sql/item_strfunc.h: Move functions to item_strfunc.cc Use C function pointer type to avoid compiler warnings (with Forte) sql/item_subselect.cc: index_read() -> index_read_map() sql/item_xmlfunc.cc: Renamed local variable to avoid hiding class variable Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/key.cc: Fixed indentation sql/log.cc: Renamed local variable to avoid hiding class variable sql/log_event.cc: Removed call to my_time() when creating class instance of Log_event() as this may have static instances. (One can't call my_time() before my_init()) index_read() -> index_read_map() Renamed local variable to avoid hiding class variable sql/log_event_old.cc: Renamed local variable to avoid hiding class variable sql/mysql_priv.h: Made all create_backup_ctx() declarations identical. This lifted up a bug where wrong create_backup_ctx() was called in some cases. Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/mysqld.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) Fixed indentation Don't call end_thr_alarm() when calling unireg_abort() as unireg_abort() already calls end_thr_alarm() Added variable 'Opened_files' (number of calls to my_open() or my_fopen()) Don't print 'loose' warnings when using --bootstrap (to avoid warnings when running mysql_install_db) Fixed compiler warnings sql/opt_range.cc: index_read() -> index_read_map() sql/opt_sum.cc: index_read() -> index_read_map() sql/partition_info.cc: Renamed local variable to avoid hiding class variable sql/rpl_filter.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/set_var.cc: Renamed local variable to avoid hiding class variable Added 'process_key_cache_t' type to avoid compiler warning (on Forte) sql/set_var.h: Added 'process_key_cache_t' type to avoid compiler warning (on Forte) sql/sp.cc: More debugging index_read() -> index_read_map() sql/sp_cache.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/sp_head.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) Moved 'saved_creation_ctx' higher up to be able to free objects allocated by create_backup_ctx() sql/sql_acl.cc: index_read() -> index_read_map() sql/sql_class.cc: Renamed local variable to avoid hiding class variable Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/sql_class.h: Renamed local variable to avoid hiding class variable sql/sql_db.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/sql_delete.cc: Renamed local variable to avoid hiding class variable sql/sql_handler.cc: index_read() -> index_read_map() sql/sql_help.cc: index_read() -> index_read_map() sql/sql_insert.cc: index_read() -> index_read_map() Renamed local variable to avoid hiding class variable sql/sql_lex.cc: Renamed local variable to avoid hiding class variable sql/sql_plugin.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) index_read() -> index_read_map() Don't give warnings about not used plugins if we are using --warnings=0 sql/sql_select.cc: index_read() -> index_read_map() sql-common/client.c: Fixed compiler warning (on Forte) sql-common/my_time.c: Removed never accessed code Fixed compiler warning (on Forte) sql/sql_servers.cc: index_read() -> index_read_map() sql/sql_show.cc: Added TRANSACTIONAL to SHOW CREATE Fixed ROW_TYPE_PAGE sql/sql_string.cc: Avoid compiler warnings when using C function pointers in C++ sql/sql_table.cc: Set create_info->transactional if we used TRANSACTIONAL=1 sql/sql_udf.cc: index_read() -> index_read_map() sql/sql_yacc.yy: Added TRANSACTIONAL=0|1 to CREATE (for future) Added row type PAGE (was only partionally handled before) sql/strfunc.cc: Avoid compiler warnings when using C function pointers in C++ sql/table.cc: More DBUG statements Declare all create_backup_ctx() functions identically Remember if table was created with TRANSACTIONAL flag or not (future safe) Renamed local variable to avoid hiding class variable sql/table.h: Remember if table was created with TRANSACTIONAL=1 sql/tztime.cc: index_read() -> index_read_map() sql-common/pack.c: Fixed compiler warning (on Forte) storage/archive/archive_reader.c: Fixed compiler warning (on Forte) storage/archive/azio.c: Fixed compiler warning (on Forte) storage/blackhole/ha_blackhole.cc: index_read() -> index_read_map() storage/blackhole/ha_blackhole.h: index_read() -> index_read_map() storage/csv/ha_tina.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) storage/example/ha_example.cc: index_read() -> index_read_map() storage/example/ha_example.h: index_read() -> index_read_map() storage/heap/ha_heap.cc: index_read() -> index_read_map() storage/heap/ha_heap.h: index_read() -> index_read_map() storage/heap/hp_test1.c: Fixed compiler warning (on Forte) storage/heap/hp_test2.c: Fixed compiler warning (on Forte) storage/myisam/ft_boolean_search.c: Fixed compiler warning (on Forte) storage/myisam/ft_nlq_search.c: Fixed compiler warning (on Forte) storage/myisam/ft_parser.c: Fixed compiler warning (on Forte) storage/myisam/ft_stopwords.c: Fixed compiler warning (on Forte) storage/myisam/ha_myisam.cc: index_read() -> index_read_map() storage/myisam/ha_myisam.h: index_read() -> index_read_map() storage/myisam/mi_check.c: Fixed compiler warning (on Forte) storage/myisam/mi_delete.c: Fixed compiler warning (on Forte) storage/myisam/mi_dynrec.c: Fixed compiler warning (on Forte) storage/myisam/mi_extra.c: Fixed compiler warning (on Forte) storage/myisam/mi_key.c: Fixed compiler warning (on Forte) storage/myisam/mi_keycache.c: Fixed compiler warning (on Forte) storage/myisam/mi_locking.c: Fixed compiler warning (on Forte) storage/myisam/mi_log.c: Fixed compiler warning (on Forte) storage/myisam/mi_open.c: Fixed compiler warning (on Forte) storage/myisam/mi_packrec.c: Fixed compiler warning (on Forte) storage/myisam/mi_page.c: Fixed compiler warning (on Forte) storage/myisam/mi_rkey.c: Added comment storage/myisam/mi_search.c: Fixed compiler warning (on Forte) storage/myisam/mi_statrec.c: Fixed compiler warning (on Forte) storage/myisam/mi_test1.c: Fixed compiler warning (on Forte) storage/myisam/mi_test2.c: Fixed compiler warning (on Forte) storage/myisam/mi_test3.c: Fixed compiler warning (on Forte) storage/myisam/mi_update.c: Fixed compiler warning (on Forte) storage/myisam/mi_write.c: Fixed compiler warning (on Forte) storage/myisam/myisamdef.h: Fixed that file_read/file_write returns type size_t Changed some functions to use uchar * as argument/return value instead of char* This fixed some compiler warnings on Forte storage/myisam/myisamlog.c: Fixed compiler warning (on Forte) storage/myisam/myisampack.c: Fixed compiler warning (on Forte) storage/myisam/rt_test.c: Fixed compiler warning (on Forte) storage/myisam/sort.c: Fixed compiler warning (on Forte) by adding casts or changing variables to uchar* storage/myisam/sp_test.c: Fixed compiler warning (on Forte) by adding casts or changing variables to uchar* storage/myisammrg/ha_myisammrg.cc: index_read() -> index_read_map() storage/myisammrg/ha_myisammrg.h: index_read() -> index_read_map() storage/myisammrg/myrg_create.c: Fixed compiler warning (on Forte) by adding casts or changing variable types storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp: Tdummy -> align (as in other part of cluster code) storage/ndb/src/kernel/vm/DynArr256.cpp: Removed not used variable storage/ndb/src/ndbapi/Ndb.cpp: Removed not used variable strings/strtod.c: Include ieeefp.h to avoid compiler warning tests/bug25714.c: Fixed compiler warning tests/mysql_client_test.c: Remove not used variable Fixed indentation Removed never reached code Fixed compiler warning (on Forte) by adding casts or changing variable types vio/viosocket.c: Fixed compiler warning (on Forte) by adding casts or changing variable types
-
- 25 Jul, 2007 1 commit
-
-
unknown authored
Stopping mysql server could result in an entry in mysql error file: "InnoDB: Error: MySQL is freeing a thd". This happened because InnoDB assumes that the server will never call external_lock(F_UNLCK) in case external_lock(READ/WRITE) failed. Prior to this patch we haven't had strict definition whether external_lock(F_UNLCK) must be called in case external_lock(READ/WRITE) fails. This patch states that we never call external_lock(F_UNLCK) in case external_lock(READ/WRITE) fails. mysql-test/suite/binlog/t/disabled.def: Re-enabled binlog_innodb and binlog_killed tests. sql/ha_ndbcluster.cc: Restore handler state in case external_lock() failed. sql/ha_partition.cc: Do not call external_lock(F_UNLCK) in case external_lock(READ/WRITE) failed. sql/lock.cc: Do not call external_lock(F_UNLCK) in case external_lock(READ/WRITE) failed. storage/myisammrg/myrg_locking.c: Restore handler state in case external_lock() failed.
-
- 04 Jul, 2007 1 commit
-
-
unknown authored
causing update of a different column For efficiency some storage engines do not read a complete record for update, but only the columns required for selecting the rows. When updating a row of a partitioned table, modifying a column that is part of the partition or subpartition expression, then the row may need to move from one [sub]partition to another one. This is done by inserting the new row into the target [sub]partition and deleting the old row from the originating one. For the insert we need a complete record. If an above mentioned engine was used for a partitioned table, we did not have a complete record in update_row(). The implicitly executed write_row() got an incomplete record. This is solved by instructing the engine to read a complete record if one of the columns of the partition or subpartiton is to be updated. No testcase. This can be reproduced with Falcon only. The engines contained in standard 5.1 do always return complete records on update. sql/ha_partition.cc: Bug#26827 - table->read_set is set incorrectly, causing update of a different column Setting partition field bits in read_set if a writing operation is going on. This replaces the old function include_partition_fields_in_used_fields(). Setting all bits in read_set if write_set contains a column used in a partition or subpartition expression. Removed include_partition_fields_in_used_fields(). sql/ha_partition.h: Bug#26827 - table->read_set is set incorrectly, causing update of a different column Removed declaration of include_partition_fields_in_used_fields(). sql/partition_info.h: Bug#26827 - table->read_set is set incorrectly, causing update of a different column Added a bitmap to partition_info for a quick check of columns used in a partition or subpartition expression. sql/sql_partition.cc: Bug#26827 - table->read_set is set incorrectly, causing update of a different column Initializing the new bitmap with all columns used in a partition or subpartition expression.
-