summaryrefslogtreecommitdiff
path: root/mysql-test
Commit message (Collapse)AuthorAgeFilesLines
* Post-push fixes after wrong merge from 5.1->rep+2->rep+3.Sven Sandberg2009-12-143-47/+1945
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The test was written before BUG#45827 was fixed. The test contained code that assumed the wrong behavior, pre-BUG#45827. Then, the fix for BUG#45827 was merged from 5.1-rep+2 to 5.1-rep+3. Since the test case assumed the wrong behavior, it failed. This should have been fixed by making the test assume the correct behavior, but was fixed by updating the result file to assert failure. Fix 1: fix the test to assume correct behavior (post-BUG#45827), update result file. Fix 2: make test fail with 'die' instead of 'exit' when wrong behavior is detected. Thus, the test cannot be silenced with a wrong result file in case the behavior will change again. mysql-test/extra/rpl_tests/create_recursive_construct.inc: Replaced 'exit' by 'die' to avoid similar mysql-test/suite/binlog/r/binlog_unsafe.result: Updated result file. mysql-test/suite/binlog/t/binlog_unsafe.test: Since BUG#45827 is now fixed, we need to update the test case in two places where it expects the wrong result because of BUG#45827.
* merge mysql-5.1-rep+2 --> mysql-5.1-rep+3Alfranio Correia2009-12-143-0/+240
|\
| * WL#5142 FLUSH LOGS should take optional arguments for which log(s) to flushunknown2009-12-033-0/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for flushing individual logs, so that the user can selectively flush a subset of the server logs. Flush of individual logs is done according to the following syntax: FLUSH <log_category> LOGS; The syntax is extended so that the user is able to flush a subset of logs: FLUSH [log_category LOGS,]; where log_category is one of: SLOW ERROR BINARY ENGINE GENERAL RELAY. mysql-test/suite/rpl/r/rpl_flush_logs.result: Test result for WL#5142. mysql-test/suite/rpl/t/rpl_flush_logs.test: Added the test file to verify if the 'flush individual log' statement works fine. sql/log.cc: Added the two functions to flush slow and general log. sql/sql_parse.cc: Added code to flush specified logs against the option. sql/sql_yacc.yy: Added code to parse the 'flush * log' statement syntax and set its option to Lex->type.
* | merging 5.1->rep+2->rep+3Andrei Elkin2009-12-0212-1826/+83
|\ \ | |/
* | mergin 5.1 -> rep+2 -> rep+3. create_table_from_dump issue will be merged on ↵Andrei Elkin2009-11-30230-1885/+3882
|\ \ | |/ | | | | the next step
| * merging from 5.1 to rep+2 starting at gca(5.1, next-mr) == ↵Andrei Elkin2009-11-30102-681/+3144
| |\ | | | | | | | | | build@mysql.com-20091104182209-iui387z35159aoyw
| | * mergeGeorgi Kodinov2009-11-041-0/+1
| | |\
| | | * Disabled the rpl_killed_ddl test in 5.0 because of bug #45520Georgi Kodinov2009-11-041-0/+1
| | | |
| | * | A fix and a test case for Konstantin Osipov2009-11-032-0/+460
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#41756 "Strange error messages about locks from InnoDB". In JT_EQ_REF (join_read_key()) access method, don't try to unlock rows in the handler, unless certain that a) they were locked b) they are not used. Unlocking of rows is done by the logic of the nested join loop, and is unaware of the possible caching that the access method may have. This could lead to double unlocking, when a row was unlocked first after reading into the cache, and then when taken from cache, as well as to unlocking of rows which were actually used (but taken from cache). Delegate part of the unlocking logic to the access method, and in JT_EQ_REF count how many times a record was actually used in the join. Unlock it only if it's usage count is 0. Implemented review comments. mysql-test/r/innodb_lock_wait_timeout_1.result: Update results (Bug41756). mysql-test/t/innodb_lock_wait_timeout_1.test: Add a test case (Bug#41756). sql/item_subselect.cc: Complete struct READ_RECORD initialization with a new member to unlock records. sql/records.cc: Extend READ_RECORD API with a method to unlock read records. sql/sql_select.cc: In JT_EQ_REF (join_read_key()) access method, don't try to unlock rows in the handler, unless certain that a) they were locked b) they are not used. sql/sql_select.h: Add members to TABLE_REF to count TABLE_REF buffer usage count. sql/structs.h: Update declarations.
| | | * A fix and a test case forKonstantin Osipov2009-11-033-0/+432
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#41756 "Strange error messages about locks from InnoDB". In JT_EQ_REF (join_read_key()) access method, don't try to unlock rows in the handler, unless certain that a) they were locked b) they are not used. Unlocking of rows is done by the logic of the nested join loop, and is unaware of the possible caching that the access method may have. This could lead to double unlocking, when a row was unlocked first after reading into the cache, and then when taken from cache, as well as to unlocking of rows which were actually used (but taken from cache). Delegate part of the unlocking logic to the access method, and in JT_EQ_REF count how many times a record was actually used in the join. Unlock it only if it's usage count is 0. Implemented review comments. mysql-test/r/bug41756.result: Add result file (Bug#41756) mysql-test/t/bug41756-master.opt: Use --innodb-locks-unsafe-for-binlog, as in 5.0 just using read_committed isolation is not sufficient to reproduce the bug. mysql-test/t/bug41756.test: Add a test file (Bug#41756) sql/item_subselect.cc: Complete struct READ_RECORD initialization with a new member to unlock records. sql/records.cc: Extend READ_RECORD API with a method to unlock read records. sql/sql_select.cc: In JT_EQ_REF (join_read_key()) access method, don't try to unlock rows in the handler, unless certain that a) they were locked b) they are not used. sql/sql_select.h: Add members to TABLE_REF to count TABLE_REF buffer usage count. sql/structs.h: Update declarations.
| | * | Merge bug#47867 to 5.1-bugteamMagnus Blåudd2009-11-031-3/+0
| | |\ \
| | | * | Bug#47867 compiler warning _WIN32_WINNT macro redefinitionMagnus Blåudd2009-10-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | - Remove the conflicting macro definitions since we define a higher value directly in the cmake files.
| | * | | automergeKristofer Pettersson2009-11-0396-694/+2425
| | |\ \ \
| | | * \ \ Merge of innodb-zip-ss6129 snapshot.Sergey Vojtovich2009-11-035-84/+83
| | | |\ \ \
| | | | * | | Clean-up after applying innodb-zip-ss6129 snapshot:Sergey Vojtovich2009-11-032-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - re-enabled main.innodb_bug44369; - re-enabled main.innodb_bug47777; - re-enabled innodb.innodb_information_schema.
| | | | * | | Applying InnoDB plugin snashot Sergey Vojtovich2009-11-031-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detailed revision comments: r6101 | jyang | 2009-10-23 11:45:50 +0300 (Fri, 23 Oct 2009) | 7 lines branches/zip: Update test result with the WARN_LEVEL_ERROR to WARN_LEVEL_WARN change. This is the same result as submitted in rb://172 review, which approved by Sunny Bains and Marko.
| | | | * | | Applying InnoDB plugin snashot Sergey Vojtovich2009-11-032-46/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detailed revision comments: r6100 | jyang | 2009-10-22 06:51:07 +0300 (Thu, 22 Oct 2009) | 6 lines branches/zip: As a request from mysql, WARN_LEVEL_ERROR cannot be used for push_warning_* call any more. Switch to WARN_LEVEL_WARN. Bug #47233. rb://172 approved by Sunny Bains and Marko.
| | | | * | | Applying InnoDB plugin snashot Sergey Vojtovich2009-11-031-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detailed revision comments: r6095 | vasil | 2009-10-19 16:04:59 +0300 (Mon, 19 Oct 2009) | 7 lines branches/zip: Fix Bug#47808 innodb_information_schema.test fails when run under valgrind by using the wait_until_rows_count macro that loops until the number of rows becomes 14 instead of sleep 0.1, which is obviously very fragile.
| | | * | | | Bug#48177 - SELECTs with NOT IN subqueries containing NULL Jorgen Loland2009-11-032-0/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | values return too many records WHERE clauses with "outer_value_list NOT IN subselect" were handled incorrectly if the outer value list contained multiple items where at least one of these could be NULL. The first outer record with NULL value was handled correctly, but if a second record with NULL value existed, the optimizer would choose to reuse the result it got on the last execution of the subselect. This is incorrect if the outer value list has multiple items. The fix is to make Item_in_optimizer::val_int (in item_cmpfunc.cc) reuse the result of the latest execution for NULL values only if all values in the outer_value_list are NULL. mysql-test/r/subselect3.result: Added test for BUG#48177 mysql-test/t/subselect3.test: Added test for BUG#48177 sql/item_cmpfunc.cc: Make Item_in_optimizer::val_int (in item_cmpfunc.cc) reuse the result of the latest execution for NULL values only if all values in the outer_value_list are NULL.
| | | * | | | Manual Mergeunknown2009-11-033-0/+12
| | | |\ \ \ \ | | | | | |_|/ | | | | |/| |
| | | | * | | BUG#48216 Replication fails on all slaves after upgrade to 5.0.86 on masterunknown2009-11-032-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a sessione is closed, all temporary tables of the session are automatically dropped and are binlogged. But it will be binlogged with wrong database names when the length of the temporary tables' database names are greater than the length of the current database name or the current database is not set. Query_log_event's db_len is forgot to set when Query_log_event's db is set. This patch wrote code to set db_len immediately after db has set.
| | | | * | | Automerge.Alexey Kopytov2009-10-302-0/+35
| | | | |\ \ \
| | | * | | | | Bug#48370: Absolutely wrong calculations with GROUP BY and decimal fields ↵Davi Arnaut2009-11-022-346/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when using IF Bug#45261: Crash, stored procedure + decimal Revert fix for Bug#45261 due to unforeseen bugs.
| | | * | | | | Merge innodb-5.1-ss6129 to mysql-5.1-bugteam.Sergey Vojtovich2009-11-0312-14/+415
| | | |\ \ \ \ \ | | | | | |_|/ / | | | | |/| | |
| | | | * | | | Clean-ups after applying InnoDB snapshot 5.1-ss6129:Sergey Vojtovich2009-11-034-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - disabled main.innodb_bug47777.test with InnoDB plugin until fix for plugin is applied. - disabled main.innodb-autoinc.test (failing) - re-enabled main.innodb_bug39438.test - added error message suppression to innodb_bug39438, as requested by InnoDB/Oracle - reverted change to main.innodb_bug34300 as plugin specific.
| | | | * | | | Applying InnoDB snashot 5.1-ss6129Sergey Vojtovich2009-11-022-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detailed revision comments: r6127 | vasil | 2009-10-30 11:18:25 +0200 (Fri, 30 Oct 2009) | 18 lines branches/5.1: Backport c6121 from branches/zip: ------------------------------------------------------------------------ r6121 | sunny | 2009-10-30 01:42:11 +0200 (Fri, 30 Oct 2009) | 7 lines Changed paths: M /branches/zip/mysql-test/innodb-autoinc.result branches/zip: This test has been problematic for sometime now. The underlying bug is that the data dictionaries get out of sync. In the AUTOINC code we try and apply salve to the symptoms. In the past MySQL made some unrelated change and the dictionaries stopped getting out of sync and this test started to fail. Now, it seems they have reverted that changed and the test is passing again. I suspect this is not he last time that this test will change. ------------------------------------------------------------------------
| | | | * | | | Applying InnoDB snashot 5.1-ss6129Sergey Vojtovich2009-11-024-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detailed revision comments: r6122 | jyang | 2009-10-30 05:18:38 +0200 (Fri, 30 Oct 2009) | 7 lines branches/5.1: Chnage WARN_LEVEL_ERROR to WARN_LEVEL_WARN for push_warning_printf() call in innodb. Fix Bug#47233: Innodb calls push_warning(MYSQL_ERROR::WARN_LEVEL_ERROR) rb://170 approved by Marko.
| | | | * | | | Applying InnoDB snashot 5.1-ss6129Sergey Vojtovich2009-11-022-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detailed revision comments: r6052 | sunny | 2009-10-12 07:09:56 +0300 (Mon, 12 Oct 2009) | 4 lines branches/5.1: Reset the statement level autoinc counter on ROLLBACK. Fix the test results too. rb://164 r6053 | sunny | 2009-10-12 07:37:49 +0300 (Mon, 12 Oct 2009) | 6 lines branches/5.1: Copy the maximum AUTOINC value from the old table to the new table when MySQL does a CREATE INDEX ON T. This is required because MySQL does a table copy, rename and drops the old table. Fix Bug#47125: auto_increment start value is ignored if an index is created and engine=innodb rb://168
| | | | * | | | Applying InnoDB snashot 5.1-ss6129Sergey Vojtovich2009-11-022-0/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detailed revision comments: r6051 | sunny | 2009-10-12 07:05:00 +0300 (Mon, 12 Oct 2009) | 6 lines branches/5.1: Ignore negative values supplied by the user when calculating the next value to store in dict_table_t. Setting autoincrement columns top negative values is undefined behavior and this change should bring the behavior of InnoDB closer to what users expect. Added several tests to check. rb://162
| | | | * | | | Applying InnoDB snashot 5.1-ss6129Sergey Vojtovich2009-11-022-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detailed revision comments: r6045 | jyang | 2009-10-08 02:27:08 +0300 (Thu, 08 Oct 2009) | 7 lines branches/5.1: Fix bug #47777. Treat the Geometry data same as Binary BLOB in ha_innobase::store_key_val_for_row(), since the Geometry data is stored as Binary BLOB in Innodb. Review: rb://180 approved by Marko Makela.
| | | * | | | | mergeVladislav Vaintroub2009-11-03106-213/+3160
| | | |\ \ \ \ \
| | | | * \ \ \ \ Auto-merging mysql-5.1-bugteam-gca into mysql-5.1-bugteam latest.Luis Soares2009-11-022-0/+90
| | | | |\ \ \ \ \ | | | | | |/ / / / | | | | |/| | | |
| | | | | * | | | Auto-merging bzr bundle from bug report in mysql-5.1-bugteam-gcaLuis Soares2009-11-022-0/+90
| | | | | |\ \ \ \
| | | | | | * | | | BUG#48297: Schema name is ignored when LOAD DATA is written into Luis Soares2009-10-272-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | binlog, replication aborts In SBR or MBR, the schema name is not being written to the binlog when executing a LOAD DATA statement. This becomes a problem when the current database (lets call it db1) is different from the table's schema (lets call it db2). For instance, take the following statements: use db1; load data local infile 'infile.txt' into table db2.t Should this statement be logged without t's schema (db2), when replaying it, one can get db1.t populated instead of db2.t (if db1.t exists). On the other hand, if there is no db1.t at all, replication will stop. We fix this by always logging the table (in load file) with fully qualified name when its schema is different from the current database or when no default database was selected.
| | | | * | | | | | Bug#47925: regression of range optimizer and date comparison in 5.1.39!Martin Hansson2009-11-022-0/+276
| | | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a query was using a DATE or DATETIME value formatted using any other separator characters beside hyphen '-', a query with a greater-or-equal '>=' condition matching only the greatest value in an indexed column, the result was empty if index range scan was employed. The range optimizer got a new feature between 5.1.38 and 5.1.39 that changes a greater-or-equal condition to a greater-than if the value matching that in the query was not present in the table. But the value comparison function compared the dates as strings instead of dates. The bug was fixed by splitting the function get_date_from_str in two: One part that parses and does error checking. This function is now visible outside the module. The old get_date_from_str now calls the new function. mysql-test/r/range.result: Bug#47925: Test result mysql-test/t/range.test: Bug#47925: Test case sql/item.cc: Bug#47925: Fix + some edit on the comments sql/item.h: Bug#47925: Changed function signature sql/item_cmpfunc.cc: Bug#47925: Split function in two sql/item_cmpfunc.h: Bug#47925: Declaration of new function sql/opt_range.cc: Bug#47925: Added THD to function call sql/time.cc: Bug#47925: Added microsecond comparison
| | | | * | | | | auto-mergeTatiana A. Nurnberg2009-11-0234-120/+720
| | | | |\ \ \ \ \
| | | | | * \ \ \ \ BUG#42829: manually merged approved bzr bundle from bug report.Luis Soares2009-11-013-0/+133
| | | | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts ========= Text conflict in sql/sql_class.cc 1 conflicts encountered.
| | | | | | * | | | | BUG#42829: binlogging enabled for all schemas regardless ofLuis Soares2009-09-243-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | binlog-db-db / binlog-ignore-db InnoDB will return an error if statement based replication is used along with transaction isolation level READ-COMMITTED (or weaker), even if the statement in question is filtered out according to the binlog-do-db rules set. In this case, an error should not be printed. This patch addresses this issue by extending the existing check in external_lock to take into account the filter rules before deciding to print an error. Furthermore, it also changes decide_logging_format to take into consideration whether the statement is filtered out from binlog before decision is made. sql/sql_base.cc: Changed the check on decide_logging_format to take into account whether statement is filtered or not in SBR. sql/sql_class.cc: Added the thd_binlog_filter_ok to INNODB_COMPATIBILITY_HOOKS set. storage/innobase/handler/ha_innodb.cc: Extended check in external_lock to take into consideration the filtering when deciding to throw an error. storage/innobase/handler/ha_innodb.h: Added declaration of new hook. storage/innodb_plugin/handler/ha_innodb.cc: Extended check in external_lock to take into consideration the filtering when deciding to throw an error. storage/innodb_plugin/handler/ha_innodb.h: Added declaration of new hook.
| | | | | * | | | | | Merge fix for BUG#43171.Sergey Vojtovich2009-10-312-0/+87
| | | | | |\ \ \ \ \ \
| | | | | | * | | | | | BUG#43171 - Assertion failed: thd->transaction.xid_state.xid.is_null()Sergey Vojtovich2009-10-282-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XA START may cause assertion failure/server crash when it is called after unilateral roll back issued by the Resource Manager (both in regular transaction and after XA transaction). The problem was that rm_error variable wasn't set/reset properly. mysql-test/r/xa.result: A test case for BUG#43171. mysql-test/t/xa.test: A test case for BUG#43171. sql/handler.cc: Setting rm_error when we're out of XA transaction has no special meaning. But it blocks reset of thd->transaction.xid structure later. sql/sql_parse.cc: Reset rm_error before we enter ha_rollback(), so thd->transaction.xid strucure is reinitialized.
| | | | | * | | | | | | Automerge.Alexey Kopytov2009-10-302-0/+35
| | | | | |\ \ \ \ \ \ \
| | | | | | * \ \ \ \ \ \ Automerge.Alexey Kopytov2009-10-302-0/+35
| | | | | | |\ \ \ \ \ \ \ | | | | | | | | |_|_|_|/ / | | | | | | | |/| | | | |
| | | | | | | * | | | | | Bug #48131: crash group by with rollup, distinct, filesort,Alexey Kopytov2009-10-302-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with temporary tables There were two problems the test case from this bug was triggering: 1. JOIN::rollup_init() was supposed to wrap all constant Items into another object for queries with the WITH ROLLUP modifier to ensure they are never considered as constants and therefore are written into temporary tables if the optimizer chooses to employ them for DISTINCT/GROUP BY handling. However, JOIN::rollup_init() was called before make_join_statistics(), so Items corresponding to fields in const tables could not be handled as intended, which was causing all kinds of problems later in the query execution. In particular, create_tmp_table() assumed all constant items except "hidden" ones to be removed earlier by remove_const() which led to improperly initialized Field objects for the temporary table being created. This is what was causing crashes and valgrind errors in storage engines. 2. Even when the above problem had been fixed, the query from the test case produced incorrect results due to some DISTINCT/GROUP BY optimizations being performed by the optimizer that are inapplicable in the WITH ROLLUP case. Fixed by disabling inapplicable DISTINCT/GROUP BY optimizations when the WITH ROLLUP modifier is present, and splitting the const-wrapping part of JOIN::rollup_init() into a separate method which is now invoked after make_join_statistics() when the const tables are already known. mysql-test/r/olap.result: Added a test case for bug #48131. mysql-test/t/olap.test: Added a test case for bug #48131. sql/sql_select.cc: 1. Disabled inapplicable DISTINCT/GROUP BY optimizations when the WITH ROLLUP modifier is present. 2. Split the const-wrapping part of JOIN::rollup_init() into a separate method. sql/sql_select.h: Added rollup_process_const_fields() declaration.
| | | | | * | | | | | | | mergeGeorgi Kodinov2009-10-302-0/+29
| | | | | |\ \ \ \ \ \ \ \ | | | | | | | |_|_|_|_|/ / | | | | | | |/| | | | | |
| | | | | | * | | | | | | Bug #48291 : crash with row() operator,select into @var, and Georgi Kodinov2009-10-302-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subquery returning multiple rows Error handling was missing when handling subqueires in WHERE and when assigning a SELECT result to a @variable. This caused crash(es). Fixed by adding error handling code to both the WHERE condition evaluation and to assignment to an @variable.
| | | | | * | | | | | | | mergeGeorgi Kodinov2009-10-304-100/+86
| | | | | |\ \ \ \ \ \ \ \ | | | | | | |/ / / / / / /
| | | | | | * | | | | | | Bug #48293: crash with procedure analyse, view with > 10 columns,Georgi Kodinov2009-10-304-100/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | having clause... The fix for bug 46184 was not very complete. It was not covering views using temporary tables and multiple tables in a FROM clause. Fixed by reverting the fix for 46184 and making a more general check that is checking at the right execution stage and for all of the non-supported cases. Now PROCEDURE ANALYZE on non-top level SELECT is also forbidden. Updated the analyse.test and subselect.test accordingly.
| | | | | * | | | | | | | mergeGeorgi Kodinov2009-10-302-0/+108
| | | | | |\ \ \ \ \ \ \ \ | | | | | | |/ / / / / / /
| | | | | | * | | | | | | Bug #42116 : Mysql crash on specific queryGeorgi Kodinov2009-10-292-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Queries with nested outer joins may lead to crashes or bad results because an internal data structure is not handled correctly. The optimizer uses bitmaps of nested JOINs to determine if certain table can be placed at a certain place in the JOIN order. It does maintain a bitmap describing in which JOINs last placed table is nested. When it puts a table it makes sure the bit of every JOIN that contains the table in question is set (because JOINs can be nested). It does that by recursively setting the bit for the next enclosing JOIN when this is the first table in the JOIN and recursively resetting the bit if it's the last table in the JOIN. When it removes a table from the join order it should do the opposite : recursively unset the bit if it's the only remaining table in this join and and recursively set the bit if it's removing the last table of a JOIN. There was an error in how the bits was set for the upper levels : when removing a table it was setting the bit for all the enclosing nested JOINs even if there were more tables left in the current JOIN (which practically means that the upper nested JOINs were not affected). Fixed by stopping the recursion at the relevant level. mysql-test/r/join.result: Bug #42116: test case mysql-test/t/join.test: Bug #42116: test case sql/sql_select.cc: Bug #41116: don't go up and set the bits if more tables in at the current JOIN level
| | | | | * | | | | | | | Bug #46828 rpl_get_master_version_and_clock fails on PB-2unknown2009-10-293-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'rpl_get_master_version_and_clock' test verifies if the slave I/O thread tries to reconnect to master when it tries to get the values of the UNIX_TIMESTAMP, SERVER_ID from master under network disconnection. So the master server is restarted for making the transient network disconnection. Restarting master server can bring two problems as following: 1. The time out error is encountered sporadically. The slave I/O thread tries to reconnect master ten times, which is set in my.cnf. So in the test framework sporadically the slave I/O thread really stoped when it can't reconnect to master in the ten times successfully before the master starts, then the time out error will be encountered while waiting for the slave to start. 2. These warnings and errors are produced in server log file when the slave I/O thread tries to get the values of the UNIX_TIMESTAMP, SERVER_ID from master under the transient network disconnection. To fix problem 1, increase the master retry count to sixty times, so that the slave I/O thread has enough time to reconnect master successfully. To fix problem 2, suppress these warnings and errors by mtr suppression, because they are expected. mysql-test/suite/rpl/t/rpl_get_master_version_and_clock-slave.opt: Added the *.opt file for increasing master retry count to sixty times. mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test: Added mtr suppression for suppressing warnings and errors in server log file.