Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Download | Release Notes | Changelog |Overview of 5.3
Release date: 30 Jan 2013
For the highlights of this release, see the release notes.
The revision number links will take you to the revision's page on Launchpad. On Launchpad you can view more details of the revision and view diffs of the code modified in that revision.
Revision #3621 [merge] Mon 2013-01-28 09:12:23 +0100
5.2 merge
Mon 2013-01-28 09:10:01 +0100
compilation error with -Wuninitialized -Werror
[merge] Fri 2013-01-25 17:22:21 +0100
5.1 merge
Fri 2013-01-25 14:29:46 +0100
- Server crashes on normal shutdown in closefrm after executing a query from MyISAM table
Sat 2013-01-26 22:33:18 +0100
Wrong result (missing row) on a DISTINCT query with the same subquery in the SELECT list and GROUP BY
fix remove_dup_with_hash_index() and remove_dup_with_compare() to take NULLs into account
Fri 2013-01-25 16:56:57 +0200
The problem was that expression with field after transformation (on the first execution) reached by fix_fields() (via reference) before row which it belongs to (on the second execution) and fix_field for row did not follow usual protocol for Items with argument (first check that the item fixed then call fix_fields).
Item_row::fix_field fixed.
[merge] Fri 2013-01-25 10:20:45 +0100
5.2 merge
Fri 2013-01-25 10:19:35 +0100
Replace deprecated SET OPTION syntax in mysqldump
[merge] Mon 2013-01-21 21:29:19 -0800
Merge 5.2->5.3
[merge] Mon 2013-01-21 15:23:40 -0800
Merge 5.1->5.2
Wed 2013-01-16 21:07:26 +0200
fix.
The problem was that maybe_null of Item_row and its componetes was unsynced after update_used_tables() (and so pushed_cond_guards was not initialized but then requested).
Fix updates Item_row::maybe_null on update_used_tables().
Thu 2013-01-17 16:08:05 +0200
Optimizer difference between MySQL and MariaDB with stored functions in WHERE clause of UPDATE or DELETE statements
Analysis The reason for the less efficient plan was result of a prior design decision - to limit the eveluation of constant expressions during optimization to only non-expensive ones. With this approach all stored procedures were considered expensive, and were not evaluated during optimization. As a result, SPs didn't participate in range optimization, which resulted in a plan with table scan rather than index range scan.
Thu 2013-01-17 13:53:15 +0200
backport of: Don't reset maybe_null in update_used_tables(); This breaks ROLLUP This fixed failing test in group_by.test
Wed 2013-01-16 15:11:13 +0200
fix.
Subquery turned into constant too late to be excluded from grouping list so test for constant added to the create_temp_table().
Fri 2013-01-11 20:26:34 -0800
Fixed bug . The bug could lead to a wrong estimate of the number of expected rows in the output of the EXPLAIN commands for queries with GROUP BY. This could be observed in the test case for LP bug 934348.
Fri 2013-01-11 12:44:21 +0100
: Make sure strmov symbol is exported by client library on Linux (even if the server and libraries itself use stpcpy instead of it)
It is a workaround that allows myodbc built by certain distributions' (CentOS,Fedora) to peacefully coexist with mariadb client libraries. The problem is that MyODBC in these distros needs strmov() to be exported by mysql client shared library, or else myodbc fails to load.
[merge] Thu 2013-01-10 15:40:21 +0100
5.2->5.3 merge
[merge] Thu 2013-01-10 13:54:04 +0100
5.1 merge
Tue 2013-01-08 21:23:03 +0100
FROM_DAYS() returns different result in MariaDB comparing to MySQL: NULL vs 0000-00-00
fixed a regression, introduced while fixing
Fri 2012-12-28 14:41:46 +0200
& & : Wrong result (extra rows) with ALL subquery from a MERGE view.
The problem was in the lost ability to be null for the table of a left join if it is a view/derived table.
It hapenned because setup_table_map(), was called earlier then we merged the view or derived.
Wed 2012-12-19 15:56:57 +0200
: Assertion `example' failed in Item_cache::is_expensive_processor with a 2-level IN subquery
Analysis: The following call stack shows that it is possible to set Item_cache::value_cached, and the relevant value without setting Item_cache::example.
#0 Item_cache_temporal::store_packed at item.cc:8395 #1 get_datetime_value at item_cmpfunc.cc:915 #2 resolve_const_item at item.cc:7987 #3 propagate_cond_constants at sql_select.cc:12264 #4 propagate_cond_constants at sql_select.cc:12227 #5 optimize_cond at sql_select.cc:13026 #6 JOIN::optimize at sql_select.cc:1016 #7 st_select_lex::optimize_unflattened_subqueries at sql_lex.cc:3161 #8 JOIN::optimize_unflattened_subqueries at opt_subselect.cc:4880 #9 JOIN::optimize at sql_select.cc:1554
Wed 2012-12-05 21:06:00 +0200
fix.
Fixed algorithm of detecting of first real table in view/subquery-in-the-FROM-clase.
don't write a key value into the record buffer - a key length can be larger then the record length.
Revision #2643.153.37 Fri 2013-01-25 12:26:35 +0100
MDEV-759 Bug #998340 - Valgrind complains on simple selects containing expression DAY(FROM_UNIXTIME(-1))
check item->null_value before using the result of item->val_int()
mysqldump.c: s/SET OPTION/SET/ (OPTION was, hm, optional since 3.21, so there's no need to use SET OPTION even in the old compatibility modes)
Revision #2732.57.49 Fri 2013-01-25 09:41:26 +0100
MDEV-3909 remote user enumeration (CVE-2012-5615)
instead of returning Access denied on the incorrect user name, emulate the complete failed logic procedure, possibly with the change plugin packet.
Revision #2732.57.48 Fri 2013-01-25 00:20:53 +0100
report "using password: YES/NO" correctly for the COM_CHANGE_USER failures
Revision #2732.57.47 Fri 2013-01-25 00:17:39 +0100
MDEV-3915 COM_CHANGE_USER allows fast password brute-forcing (CVE-2012-5627)
allow only three failed change_user per connection. successful change_user do NOT reset the counter
Revision #2643.153.36 [merge] Mon 2013-01-21 13:48:34 -0800
Merge.
Revision #2643.155.1 Mon 2013-01-21 11:47:45 -0800
Fixed bug MDEV-4063 (bug #56927). This bug could result in returning 0 for the expressions of the form <aggregate_function>(distinct field) when the system variable max_heap_table_size was set to a small enough number. It happened because the method Unique::walk() did not support the case when more than one pass was needed to merge the trees of distinct values saved in an external file.
Backported a fix in grant_lowercase.test from .
Revision #2643.153.35 Mon 2013-01-21 10:52:39 +0100
MDEV-4029 SELECT on information_schema using a subquery locks up the information_schema table due to incorrect mutexes handling
Early evaluation of subqueries in the WHERE conditions on I_S.*_STATUS tables, otherwise the subquery on this same table will try to acquire LOCK_status twice.
Revision #2732.57.45 Sat 2013-01-19 23:40:53 -0800
Corrected the test case for bug MDEV-3938.
Revision #2732.57.44 Wed 2013-01-16 11:17:58 -0800
Corrected the fix for bug MDEV-3938.
Revision #2732.57.43 Tue 2013-01-15 16:46:27 -0800
Fixed bug MDEV-3938. The original patch with the implementation of virtual columns did not support INSERT DELAYED into tables with virtual columns. This patch fixes the problem.
Revision #2643.153.34 [merge] Wed 2013-01-09 23:51:51 +0100
mysql-5.1.67 merge
Revision #2643.153.33 Tue 2012-12-04 17:08:02 +0100
proactive s/strmov/strnmov/ in sql_acl.cc and related test cases
Revision #2732.57.41 [merge] Fri 2012-12-21 15:19:08 +0100
merge
Revision #2643.153.32 Fri 2012-12-21 15:17:26 +0100
Support VS2012. Exclude compiler-defined symbols from being exported by mysqld.exe
Revision #2732.57.40 [merge] Fri 2012-12-21 14:04:25 +0100
merge
Revision #2643.153.31 Thu 2012-12-06 00:37:06 +0100
MDEV-3918: myisamchk bogus error for files larger than 4GB.
The failure is caused by failing stat() call . C Runtime function stat() uses old struct with 32bit st_size member, and since Visual Studio 2010 , it returns an error on st_size overflow (i.e on files larger than 4GB)
Fix replaces stat() by my_stat(), the later is backed by 64bit-able stat64().
Revision #2732.57.39 Tue 2012-12-11 09:50:48 +0100
one-byte overflow with old passwords
Revision #2732.57.38 Mon 2012-11-26 13:33:24 +0100
Fix broken feedback plugin after MDEV-712.
Link feedback plugin with yassl libraries, if with-ssl=bundled is used, since mysqld does not export SSL symbols anymore.
Revision #2732.57.37 Fri 2012-11-23 13:50:46 +0100
MDEV-712 - Bug #1024239 - Mysqlclient exports the same symbols as openssl
Compile yassl and taocrypt using -fvisibility=hidden, when possible. This prevent symbols from being exported.
Revision #2732.57.36 [merge] Thu 2012-11-22 18:29:53 +0100
merge 5.1
Revision #2643.153.30 Thu 2012-11-22 18:27:02 +0100
Feedback plugin now recognizes Windows 8 / Windows Server 2012.
Fixed by propagating new maybe_null flag during Item::update_used_tables().
Change in join_outer.test and join_outer_jcl6.test appeared because IS NULL reported no used tables (i.e. constant) for argument which could not be NULL and new maybe_null flag was propagated for IS NULL argument (Item_field) because table the Item_field belonged to changed its maybe_null status.
The fix is to set Item_cache_temporal::example even when the value is set directly by Item_cache_temporal::store_packed. This makes the Item_cache_temporal object consistent.
MariaDB 5.3 Changelog Series
Download | Release Notes | Changelog |Overview of 5.3
Release date: 29 Nov 2012
For the highlights of this release, see the release notes.
The revision number links will take you to the revision's page on Launchpad. On Launchpad you can view more details of the revision and view diffs of the code modified in that revision.
Revision #3605 Fri 2012-11-23 13:11:31 +0100
bump the version to 5.3.11
[merge] Thu 2012-11-22 10:30:39 -0800
Merge
Wed 2012-11-21 21:55:04 -0800
Fixed LP bug #1002146 (bug ). If the setting of system variables does not allow to use join buffer for a join query with GROUP BY <f1,...> / ORDER BY <f1,...> then filesort is not needed if the first joined table is scanned in the order compatible with order specified by the list <f1,...>.
Sat 2012-11-17 16:50:15 +0100
- Unexpected warnings "Encountered illegal value '' when converting to DECIMAL" on a query with aggregate functions and GROUP BY
[merge] Tue 2012-11-20 13:57:49 +0100
Merge ->5.3
[merge] Tue 2012-11-20 13:40:13 +0100
Merge ->5.2.
Mon 2012-11-19 18:17:46 +0200
Adjust unstable test case.
Mon 2012-11-19 15:38:27 +0200
Reproducible sub select join crash on 5.3.8 and 5.3.9
Revision #2643.153.29 Tue 2012-11-20 13:28:53 +0100
MDEV-3861: assertions in TC_LOG_MMAP.
Revision #2643.153.28 Mon 2012-11-19 11:18:40 +0100
potential crash in the feedback plugin
Revision #2643.153.27 Sat 2012-11-17 19:04:13 +0100
MDEV-3850 too early pthread_mutex_unlock in TC_LOG_MMAP::log_xid
Revision #2643.153.26 Mon 2012-11-12 19:56:51 +0100
followup fixes for MySQL Bug #13889741: HANDLE_FATAL_SIGNAL IN DB_ENTER | HANDLE_FATAL_SIGNAL IN STRNLEN
Revision #2643.153.25 Sat 2012-11-10 20:36:18 +0100
MDEV-3849 - 1 bytes stack overwrite in normalize_dirname().
Revision #2643.153.24 Fri 2012-11-09 20:15:23 +0100
add a test case for MySQL Bug #13889741: HANDLE_FATAL_SIGNAL IN DB_ENTER | HANDLE_FATAL_SIGNAL IN STRNLEN
Revision #2732.57.34 Fri 2012-11-09 23:51:51 -0800
Fixed bug MDEV-3845. If triggers are used for an insert/update/delete statement than the values of all virtual columns must be computed as any of them may be used by the triggers.
Download |Release Notes |Changelog |Overview of 5.3
Release date: 4 May 2012
For the highlights of this release, see the release notes.
The revision number links will take you to the revision's page on Launchpad. On Launchpad you can view more details of the revision and view diffs of the code modified in that revision.
Revision #3516 Wed 2012-05-02 22:02:17 +0200
update the version number
Thu 2012-05-03 13:14:40 +0500
Fix for failing gis-precise on Windows.
[merge] Wed 2012-05-02 22:02:06 +0200
5.2 merge
Wed 2012-05-02 22:00:31 +0200
update the result file
Wed 2012-05-02 15:23:49 +0200
implement Item_singlerow_subselect::get_date() to avoid unnecessary date->string->date conversion
Wed 2012-05-02 15:22:47 +0200
- Server crashes in get_datetime_value
Create an Item_cache based on item's cmp_type, not result_type in subselect_engine.
Use result_field in Item_cache_temporal::cache_value(), just like all other Item_cache*::cache_value() do.
[merge] Wed 2012-05-02 17:04:28 +0200
merge
Wed 2012-05-02 16:53:02 +0200
: Wrong result with LAST_DAY('0000-00-00 00:00:00') IS NULL in WHERE condition
Sun 2012-04-29 18:08:11 +0500
ST_BUFFER fails with the negative D.
Points and lines should disappear if we got negative D.
To make it work properly inside the GEOMETRYCOLLECTION, we add the empty operation there.
Thu 2012-04-26 19:21:37 +0200
- Assertion `0' failed in my_message_sql on UPDATE IGNORE, or unknown error on release build
Don't send_error at the end of mysql_multi_update() if select failed.
The error, if there was any, was already sent by mysql_select
Fri 2012-04-27 12:59:17 +0300
Fix ,
Analysis:
The reason for the wrong result is the interaction between constant optimization (in this case 1-row table) and subquery optimization.
[merge] Mon 2012-04-23 20:37:44 +0200
merge
Fri 2012-04-20 21:09:16 +0200
- incompatibility in frm in case of VIEWs with non-default ALGORITHM option.
Mon 2012-04-23 09:45:27 +0200
Install headers required to build external storage plugins
install all private headers in mysql/private/
Thu 2012-04-19 09:16:30 +0300
fixed.
Fixed incorrect type casting which made all fields (except very first) changes to materialized table incorrect.
Saved list of view/derived table used items after expanding '*'.
Thu 2012-04-19 05:37:16 +0400
: Wrong result (extra rows) with derived_with_keys+loosescan+semijoin=ON, materialization=OFF
Part#2: Don't try to construct a LooseScan access on indexes that do not guarantee index-ordered reads.
Thu 2012-04-19 04:50:32 +0400
BUG#978479: Wrong result (extra rows) with derived_with_keys+loosescan+semijoin=ON, materialization=OFF
Part#1: make EXPLAIN's plan match the one by actual execution:
Item_subselect::used_tables() should return the same value irrespectively of whether we're running an EXPLAIN or a SELECT.
[merge] Mon 2012-04-16 23:35:38 +0200
merge
[merge] Mon 2012-04-16 23:32:50 +0200
merge
[merge] Mon 2012-04-16 17:41:43 +0200
merge
[merge] Mon 2012-04-16 15:38:53 +0200
merge
Revision #2732.53.36 Wed 2012-05-02 18:11:02 +0200
MDEV-214 Bug #967242 Wrong result with JOIN, AND in ON condition, multi-part key, GROUP BY, subquery and OR in WHERE
The problem was in the code (update_const_equal_items()) which marked index parts constant independently of the place where the equality was used. In the test suite it marked t2_1.c part constant despite the fact that it connected by OR with other expression.
Solution is to mark constant only top equalities connected with AND.
Revision #2732.53.35 [merge] Wed 2012-05-02 17:06:30 +0200
5.1 merge
Revision #2643.153.5 Tue 2012-04-24 17:29:03 +0200
Bug #986120 Problem installing mariadb 5 on solaris 10
remove a redundant line in Makefile.am
Fix is to set maybe_null flag for Item_func_last_day.
Revision #2732.53.33 Wed 2012-04-25 15:30:19 +0200
MDEV233 - Support Wix3.6 for MSI
Revision #2732.53.32 Wed 2012-04-18 20:04:50 +0200
Bug #982664 there are few broken clients that lie about their capabilities (for example, one of them sets client capabilities by copying server capabilities)
We cannot fix them - let's tolerate them
Bug #986977 Assertion `!cur_p->event' failed in Gcalc_scan_iterator::arrange_event(int, int).
The double->inernal coord conversion produced -0 (minus zero) on some data.
That minus-zero produces invalid comparison results when compared agains plus-zero.
So we fixed the gcalc_set_double() to avoid it.
per-file comments:
mysql-test/r/gis-precise.result
result updated.
mysql-test/t/gis-precise.test
tests for and added.
sql/gcalc_slicescan.cc
. The gcalc_set_double fixed to not produce minus-zero.
sql/item_geofunc.cc
. Add the NOOP for the disappearing features.
First the outer query is optimized, and 'make_join_statistics' finds that table t2 has one row, reads that row, and marks the whole table as constant. This also means that all fields of t2 are constant.
Next, we optimize the subquery in the end of the outer 'make_join_statistics'. The field 'f2' is considered constant, with value '3'. The subquery predicate is rewritten as the constant TRUE.
The outer query execution detects early that the whole query result is empty and calls 'return_zero_rows'. Since the query is with implicit grouping, we have to produce one row with special values for the aggregates (depending on each aggregate function), and NULL values for all non-aggregate fields. This function calls 'no_rows_in_result' to set each aggregate function to the default value when it aggregates over an empty result, and then calls 'send_data', which in turn evaluates each Item in the SELECT list.
When evaluation reaches the subquery predicate, it executes the subquery with field 'f2' having a constant value '3', and the subquery produces the incorrect result '7'.
Solution:
Implement Item::no_rows_in_result for all subquery predicates. In order to make this work, it is also needed to make all val_* methods of all subquery predicates respect the Item_subselect::forced_const flag. Otherwise subqueries are executed anyways, and override the default value set by no_rows_in_result with whatever result is produced from the subquery evaluation.
As part of derived tables redesign, values for VIEW_ALGORITHM_MERGE and VIEW_ALGORITHM_TMPTABLE have changed from (former values 1 rsp 2 , new values 5 rsp 9).
This lead to the problem that views, created with version 5.2 or earlier would not work in all situations (e.g "SHOW CREATE VIEW"), or with mysqldump.
The fix is to restore backward compatibility for the from file, and convert algorithm={1,2} in the frm to {5,9} when reading .frm from disk, and store backward compatible values when writing from to disk.
Also allow processing correct processing for "invalid" .frms created with MariaDB 5.3/5.5 GA releases (where algorithm stored in memory matched the one stored in frm).
Revision #2732.56.3 Mon 2012-04-16 23:31:33 +0200
fix compiler warnings
Revision #2732.56.2 Mon 2012-04-16 23:31:02 +0200
backport a change from 5.5 to remove thread sleeps from Innodb assertions on Windows.
This can result in bad deadlocks (e.g loader lock), seen in latest crash reports.
Revision #2732.56.1 Mon 2012-04-16 15:28:33 +0200
fixes Bug #983047
MDEV-221 - Properly escape command line when starting mysql_install_db since password characters can contain quotes or spaces.
The proper quoting method for command line arguments used here was extracted from everyone-quotes-arguments-the-wrong-way.aspx
Additionally, mysql_install_db.exe now passes root password to "mysqld.exe --bootstrap"
in hexadecimal form, to handle potential special chars inside password string literal.
| |Changelog |
Release date: 13 Nov 2012
For the highlights of this release, see the .
The revision number links will take you to the revision's page on Launchpad. On Launchpad you can view more details of the revision and view diffs of the code modified in that revision.
Sat 2012-11-10 00:10:06 +0200
| |Changelog |
Release date: 02 Oct 2012
For the highlights of this release, see the .
The revision number links will take you to the revision's page on Launchpad. On Launchpad you can view more details of the revision and view diffs of the code modified in that revision.
Mon 2012-10-01 15:42:49 +0200
Revision #3598 Sat 2012-11-10 00:04:44 +0200
adjusted test result
Revision #3597 Fri 2012-11-09 15:27:13 +0200
adjust openssl_1 test as in 5.2 (no idea why this didn't merge)
Revision #3596 Fri 2012-11-09 13:07:32 +0200
MDEV-3810 fix.
The problem is that memory alocated by copy_andor_structure() well be freed, but if level of SELECT_LEX it will be excluded (in case of merge derived tables and view) then sl->where/having will not be updated here but still can be accessed (so it will be access to freed memory).
(patch by Sanja)
Revision #3595 [merge] Fri 2012-11-09 13:05:05 +0200
merge from 5.2
Revision #2732.57.33 Fri 2012-11-09 12:49:12 +0200
Disable PBXT on Windows to match all other platforms.
Revision #3594 [merge] Fri 2012-11-09 12:54:48 +0200
merge test case adjustments from 5.2
Revision #2732.57.32 Fri 2012-11-09 11:56:27 +0200
Removed the dependency on PBXT from tests information_schema_all_engines, and is_columns_is.
Made information_schema_all_engines stable by adding "sorted_result".
Revision #3593 [merge] Fri 2012-11-09 10:47:33 +0200
Merge from 5.2
Revision #2732.57.31 Thu 2012-11-08 23:18:56 +0100
Fix mis-merge.
Revision #3592 [merge] Fri 2012-11-09 10:11:20 +0200
Merge MariaDB 5.1.66 -> 5.2 -> 5.3
Revision #2732.57.30 [merge] Thu 2012-11-08 22:26:05 +0200
Merged and adjusted test cases from 5.1 after the merge with 5.1.
Wed 2012-11-07 17:48:02 +0200
Updated test results after the mysql 5.1 merge.
[merge] Thu 2012-11-08 15:24:35 +0200
Merge -> 5.2.12
[merge] Tue 2012-11-06 11:52:55 +0200
Merge MySQL 5.1.66 -> MariaDB 5.1.65
Fri 2012-11-02 08:21:03 +0100
Update result file now we no longer build PBXT.
Revision #3591 [merge] Fri 2012-11-02 15:59:16 -0700
Merge.
Revision #3588.2.1 Thu 2012-11-01 14:54:33 -0700
Fixed bug MDEV-585 (LP bug #637962)
If, when executing a query with ORDER BY col LIMIT n, the optimizer chose an index-merge scan to access the table containing col while there existed an index defined over col then optimizer did not consider the possibility of using an alternative range scan by this index to avoid filesort. This could cause a performance degradation if the optimizer flag index_merge was set up to 'on'.
Revision #3590 [merge] Fri 2012-11-02 15:35:09 +0400
Merge: bzr ignore sql-bench/test-table-elimination
Revision #3588.1.1 Fri 2012-11-02 15:31:54 +0400
bzr ignore sql-bench/test-table-elimination
Revision #3589 [merge] Thu 2012-11-01 21:36:31 +0200
Merge 5.2 -> 5.3
Revision #2732.57.27 [merge] Thu 2012-11-01 15:44:34 +0200
Merge 5.1 -> 5.2
Wed 2012-10-31 23:49:51 +0200
Fixed , - Valgrind error ha_maria::check_if_incompatible_data on
Wed 2012-10-31 23:22:32 +0200
Fixed , - Aria unit tests fail at ma_test2
Thu 2012-11-01 00:06:09 +0200
Fix of non-deterministic results.
Wed 2012-10-31 23:04:53 +0200
Do not build pbxt.
Tue 2012-10-09 17:36:02 +0300
fix (MySQL fix accepted)
Sun 2012-10-14 19:29:31 +0300
: Merged mysql fix of the & MySQL Bug#13651009.
Empty result after reading const tables now works for subqueries.
Tue 2012-10-02 12:53:20 +0300
fixed : Wrong result for a hash index look-up if the index is unique and the key is NULL
Check ability of index to be NULL as it made in MyISAM. UNIQUE with NULL could have several NULL entries so we have to continue even if ve have found a row.
Revision #3588 Wed 2012-10-31 09:34:25 +0400
Revision #3587 Wed 2012-10-10 22:42:50 +0300
Fix of MDEV-3799.
Find left table in right join (which turned to left join by reordering tables in join list but phisical order of tables of SELECT left as it was).
Revision #3586 Wed 2012-10-10 09:21:22 +0400
Backport of: olav.sandstaa@oracle.com-20120516074923-vd0dhp183vqcp2ql
.. into MariaDB 5.3
Revision #3585 Fri 2012-10-05 12:26:55 +0300
Fix of MDEV-589.
The problem was in incorrect detection of merged views in tem_direct_view_ref::used_tables() .
Revision #3584 Mon 2012-10-01 19:04:17 -0700
Added the reported test case for LP bug #823237 (a duplicate of bug #823189).
Revision #3582 Sat 2012-09-29 22:44:13 -0700
Fixed Bug #1058071 (MDEV-564).
In some rare cases when the value of the system variable join_buffer_size was set to a number less than 256 the function JOIN_CACHE::set_constants determined the size of an offset in the join buffer equal to 1 though the minimal join buffer required more than 256 bytes. This could cause a crash of the server when records from the join buffer were read.
Revision #3581 Fri 2012-09-28 09:54:43 +0200
Fix compiler warnings that breaks build (-Werror).
Revision #3580 [merge] Thu 2012-09-27 15:02:17 +0200
merge
Revision #2732.57.21 [merge] Thu 2012-09-27 12:59:23 +0200
Merge from 5.1
Thu 2012-09-27 12:25:45 +0200
Fix incorrect assembler in Taocrypt which causes crashes on i386 with certain GCC versions/options
[merge] Wed 2012-09-26 18:49:38 +0200
merge
Wed 2012-09-26 11:59:49 +0200
always force the language in mysql_install_db
Tue 2012-09-25 20:23:01 +0200
a simple pam user mapper module
[merge] Wed 2012-09-26 18:29:49 +0200
Merge from 5.1.
Wed 2012-09-26 15:30:08 +0200
Fix some failures in 5.1 Buildbot:
Revision #3579 Thu 2012-09-27 13:18:07 +0500
MDEV-495 backport --ignore-db-dir
The feature was backported from MySQL 5.6.
Some code was added to make commands as
SELECT * FROM ignored_db.t1;
CALL ignored_db.proc();
USE ignored_db;
to take that option into account.
per-file comments:
mysql-test/r/ignore_db_dirs_basic.result
test result added.
mysql-test/t/ignore_db_dirs_basic-master.opt
per-file comments:
sql/mysql_priv.h
backport --ignore-db-dir
interface for db_name_is_in_ignore_list() added.
Revision #3578 [merge] Mon 2012-09-24 17:29:26 +0200
merge
Revision #2732.57.17 [merge] Mon 2012-09-24 13:57:45 +0200
merge
Mon 2012-09-24 11:33:41 +0200
mysql_install_db doesn't work with blanks in either basedir or datadir path
Revision #3577 Thu 2012-09-20 12:48:59 +0300
MDEV-521 fix.
After pullout item during single row subselect transformation it should be fixed properly.
Revision #3576 [merge] Mon 2012-09-17 11:13:46 +0300
Merged the fix for Bug #1009187, MDEV-373.
Performed some refactoring and simplification that was enabled and required by the merge.
Revision #2732.57.16 Fri 2012-09-14 11:26:01 +0300
Fix , ,
Analysis:
The queries in question use the [unique | index]_subquery execution methods. These methods reuse the ref keys constructed by create_ref_for_key(). The way create_ref_for_key() works is that it doesn't store in ref.key_copy[] store_key elements that represent constants. In particular it doesn't store the store_key for NULL constants.
The execution of [unique | index]_subquery calls subselect_uniquesubquery_engine::copy_ref_key, which in addition to copy the left IN argument into a index lookup key, is supposed to detect if the left IN argument contains NULLs. Since the store_key for the NULL constant is not copied into the key array, the null is not detected, and execution erroneously proceeds as if it should look for a complete match.
Solution:
The solution (unlike MySQL) is to reuse already computed information about NULL presence. Item_in_optimizer::val_int already finds out if the left IN operand contains NULLs. The fix propagates this to the execution methods subselect_[unique | index]subquery_engine::exec so it knows if there were NULL values independent of the presence of keys.
In addition the patch siplifies copy_ref_key() and the logic that hanldes the case of NULLs in the left IN operand.
Revision #3575 Fri 2012-09-07 09:39:51 +0300
Fix of MDEV-511.
As far as we reopen tables so TABLE become invalid we should remove the pointer on cleanup().
Revision #3574 Wed 2012-09-05 23:23:58 +0300
MDEV-486 Bug #1010116 fix.
Link view/derived table fields to a real table to check turning the table record to null row.
Item_direct_view_ref wrapper now checks if table is turned to null row.
Revision #3573 Fri 2012-08-31 19:50:45 +0500
Bug #1043845 st_distance() results are incorrect depending on variable order.
Autointersections of an object were treated as nodes, so the wrong result.
per-file comments:
mysql-test/r/gis.result
st_distance() results are incorrect depending on variable order.
test result updated.
mysql-test/t/gis.test
st_distance() results are incorrect depending on variable order.
test case added.
sql/item.cc
small fix to make compilers happy.
sql/item_geofunc.cc
st_distance() results are incorrect depending on variable order.
Skip intersection points when calculate distance.
Revision #3572 Fri 2012-08-31 12:01:52 +0200
compilation warning
Revision #3571 Thu 2012-08-30 10:53:49 +0200
MDEV-381: fdatasync() does not correctly flush growing binlog file.
When we append data to the binlog file, we use fdatasync() to ensure the data gets to disk so that crash recovery can work.
Unfortunately there seems to be a bug in ext3/ext4 on linux, so that fdatasync() does not correctly sync all data when the size of a file is increased. This causes crash recovery to not work correctly (it loses transactions from the binlog).
As a work-around, use fsync() for the binlog, not fdatasync(). Since we are increasing the file size, (correct) fdatasync() will most likely not be faster than fsync() on any file system, and fsync() does work correctly on ext3/ext4. This avoids the need to try to detect if we are running on buggy ext3/ext4.
Revision #3570 Thu 2012-08-30 09:05:27 +0200
MDEV-437 Microseconds: In time functions precision is calculated modulo 256
store the precision in uint, not uint8
Revision #3569 Wed 2012-08-29 18:36:57 +0200
MDEV-438 Microseconds: Precision is ignored in CURRENT_TIMESTAMP(N) when it is given as a default column value
The syntax for specifying precision in the DEFAULT clause is unintentional and unsupported.
Don't allow it anymore.
Revision #3568 Wed 2012-08-29 17:55:59 +0200
MDEV-454 Addition of a time interval reduces the resulting value
Field_newdate::get_date should refuse to return a date with zeros when TIME_NO_ZERO_IN_DATE is set, not when TIME_FUZZY_DATE is unset
Item_func_to_days and Item_date_add_interval can only work with valid dates, no zeros allowed.
Revision #3567 Wed 2012-08-29 10:59:51 +0200
MDEV-456 An out-of-range datetime value (with a 5-digit year) can be created and cause troubles
fix Item_func_add_time::get_date() to generate valid dates.
Move the validity check inside get_date_from_daynr() instead of relying on callers
(5 that had it, and 2 that did not, but should've)
Revision #3566 Wed 2012-08-29 11:35:42 +0300
MDEV-492: fixed incorrect error check.
Revision #3565 Tue 2012-08-28 13:51:01 +0400
Fix bugs in BatchedKeyAccess that show up when working with a storage engine in HA_MRR_NO_ASSOCIATION mode.
(there is no testcase because we don't ship any such engines currently)
Fix for Bug#12667154 SAME QUERY EXEC AS WHERE SUBQ GIVES DIFFERENT
RESULTS ON IN() & NOT IN() COMP #3
.
This bug causes a wrong result in mysql-trunk when ICP is used
and bad performance in mysql-5.5 and mysql-trunk.
.
Using the query from bug report to explain what happens and causes
the wrong result from the query when ICP is enabled:
.
1. The t3 table contains four records. The outer query will read
these and for each of these it will execute the subquery.
.
2. Before the first execution of the subquery it will be optimized. In
this case the important is what happens to the first table t1:
-make_join_select() will call the range optimizer which decides
that t1 should be accessed using a range scan on the k1 index
It creates a QUICK_RANGE_SELECT object for this.
-As the last part of optimization the ICP code pushes the
condition down to the storage engine for table t1 on the k1 index.
.
This produces the following information in the explain for this table:
.
2 DEPENDENT SUBQUERY t1 range k1 k1 5 NULL 3 Using index condition; Using filesort
.
Note the use of filesort.
.
3. The first execution of the subquery does (among other things) due
to the need for sorting:
a. Call create_sort_index() which again will call find_all_keys():
b. find_all_keys() will read the required keys for all qualifying
rows from the storage engine. To do this it checks if it has a
quick-select for the table. It will use the quick-select for
reading records. In this case it will read four records from the
storage engine (based on the range criteria). The storage engine
will evaluate the pushed index condition for each record.
c. At the end of create_sort_index() there is code that cleans up a
lot of stuff on the join tab. One of the things that is cleaned
is the select object. The result of this is that the
quick-select object created in make_join_select is deleted.
.
4. The second execution of the subquery does the same as the first but
the result is different:
a. Call create_sort_index() which again will call find_all_keys()
(same as for the first execution)
b. find_all_keys() will read the keys from the storage engine. To
do this it checks if it has a quick-select for the table. Now
there is NO quick-select object(!) (since it was deleted in
step 3c). So find_all_keys defaults to read the table using a
table scan instead. So instead of reading the four relevant records
in the range it reads the entire table (6 records). It then
evaluates the table's condition (and here it goes wrong). Since
the entire condition has been pushed down to the storage engine
using ICP all 6 records qualify. (Note that the storage engine
will not evaluate the pushed index condition in this case since
it was pushed for the k1 index and now we do a table scan
without any index being used).
The result is that here we return six qualifying key values
instead of four due to not evaluating the table's condition.
c. As above.
.
5. The two last execution of the subquery will also produce wrong results
for the same reason.
.
Summary: The problem occurs due to all but the first executions of the
subquery is done as a table scan without evaluating the table's
condition (which is pushed to the storage engine on a different
index). This is caused by the create_sort_index() function deleting
the quick-select object that should have been used for executing the
subquery as a range scan.
.
Note that this bug in addition to causing wrong results also can
result in bad performance due to executing the subquery using a table
scan instead of a range scan. This is an issue in MySQL 5.5.
.
The fix for this problem is to avoid that the Quick-select-object that
the optimizer created is deleted when create_sort_index() is doing
clean-up of the join-tab. This will ensure that the quick-select
object and the corresponding pushed index condition will be available
and used by all following executions of the subquery.Revision #2643.153.21 [merge] Thu 2012-11-01 16:20:09 +0100
Merge XtraDB from Percona-Server 5.1.66-rel14.1 into MariaDB 5.1.
Revision #0.6.48 Thu 2012-11-01 15:16:42 +0100
Updated with changes from Percona Server 5.1.66-rel14.1 tarball.
Fix some warnings in newer GCC (-Werror ...).
Fix wrong STACK_DIRECTION detected by configure due to compiler inlining.
options for the test,
actually the set of --ignore-db-dir lines.
mysql-test/t/ignore_db_dirs_basic.test
test for the feature.
Same test from 5.6 was taken as a basis,
then tests for SELECT, CALL etc were added.
sql/mysqld.cc
MDEV-495 backport --ignore-db-dir
--ignore-db-dir handling.
sql/set_var.cc
MDEV-495 backport --ignore-db-dir
the @@ignore_db_dirs variable added.
sql/sql_show.cc
MDEV-495 backport --ignore-db-dir
check if the directory is ignored.
sql/sql_show.h
MDEV-495 backport --ignore-db-dir
interface added for opt_ignored_db_dirs.
sql/table.cc
MDEV-495 backport --ignore-db-dir
check if the directory is ignored.
| |Changelog |
Release date: 29 Feb 2012
For the highlights of this release, see the .
The revision number links will take you to the revision's page on Launchpad. On Launchpad you can view more details of the revision and view diffs of the code modified in that revision.
Tue 2012-02-28 15:41:55 +0100
make sure that stored routines are evaluated (that is, de facto - cached) in convert_const_to_int(). revert the fix for Bug #806943 because it cannot be repeated anymore. add few tests for convert_const_to_int()
Revision #3449 [merge] Tue 2012-02-28 15:04:31 +0100
merge
Revision #2732.53.10 [merge] Tue 2012-02-28 13:50:30 +0200
Automatic merge
Tue 2012-02-28 13:39:02 +0200
Fixed "Assertion `page->size <= share->max_index_block_size'"
The issue was that Aria allowed too long keys to be created (so that the internal buffer was not big enough to hold the whole key).
Key lengths is now limited to HA_MAX_KEY_LENGTH (1000), as for MyISAM.
Revision #3448 [merge] Sun 2012-02-26 03:13:33 -0800
Merge.
Revision #3446.1.2 [merge] Sun 2012-02-26 02:42:45 -0800
Merge 5.2->5.3
Sat 2012-02-25 17:10:07 -0800
Fixed LP bug #939866.
The field key_cache_mem_size of the KEY_CACHE structure must be initialized in the function init_key_cache() and updated in the function resize_key_cache().
Sat 2012-02-25 09:03:06 +0200
Fix of (also and )
Cause of the bug is uninitialized items before evaluation HAVING clasue in case of empty result.
Sun 2012-02-26 00:19:07 -0800
Rolled back the patch for bug 791761.
A better fix for this bug will be pulled from mariadb-5.2.
Revision #3447 Sun 2012-02-26 11:44:52 +0400
Bump the version number.
Revision #3446 [merge] Fri 2012-02-24 18:35:58 -0800
Merge.
Revision #3439.2.1 Fri 2012-02-24 16:50:22 -0800
Fixed Bug #939009.
The result of materialization of the right part of an IN subquery predicate is placed into a temporary table. Each row of the materialized table is distinct. A unique key over all fields of the temporary table is defined and created. It allows to perform key look-ups into the table. The table created for a materialized subquery can be accessed by key as any other table. The function best_access-path search for the best access to join a table to a given partial join. With some where conditions this function considers a possibility of a ref_or_null access. If such access employs the unique key on the temporary table then when estimating the cost this access the function tries to use the array rec_per_key. Yet, such array is not built for this unique key. This causes a crash of the server.
Rows returned by the subquery that contain nulls don't have to be placed into temporary table, as they cannot be match any row produced by the left part of the subquery predicate. So all fields of the temporary table can be defined as non-nullable. In this case any ref_or_null access to the temporary table does not make any sense and it does not make sense to estimate such an access.
The fix makes sure that the temporary table for a materialized IN subquery is defined with columns that are all non-nullable. The also ensures that any row with nulls returned by the subquery is not placed into the temporary table.
Revision #3445 Sat 2012-02-25 01:42:28 +0400
Update test results.
Revision #3444 Fri 2012-02-24 22:42:37 +0400
Bug #938131: Subquery materialization is not used in CREATE TABLE SELECT
Enable subquery materialization for CREATE TABLE ... SELECT.
Revision #3443 [merge] Fri 2012-02-24 20:07:12 +0400
Merge 5.2->5.3
Revision #2732.53.7 [merge] Fri 2012-02-24 17:21:44 +0200
Automatic merge
Fri 2012-02-24 17:01:47 +0200
Fix for : MariaDB crashes on a select with long varchar and blob fields
Problem was a crash in internal temporary (Maria) files when row length exceeded 65535
Wed 2012-02-22 00:10:39 -0800
Back-ported the fix and test cases for and from the mysql-5.6 code line.
Revision #3442 [merge] Fri 2012-02-24 17:13:04 +0400
Merge fix for Bug #934597
Revision #3439.1.1 Fri 2012-02-24 17:09:13 +0400
Bug #934597: Assertion `! is_set()' failed in Diagnostics_area::set_ok_status(THD...
After the exec_const_cond->val_int() call, check for error and return. (if we don't do it, we will eventually hit an error when trying to set status OK in the diagnostics area, which already has an error status).
Revision #3441 Fri 2012-02-24 12:34:47 +0200
Removed const declarations to get rid of compiler warnings. The changes are similar to what is done in innobase in MySQL 5.5
Revision #3440 [merge] Thu 2012-02-23 17:00:10 +0200
Automatic merge
Revision #3434.1.2 Thu 2012-02-23 16:51:58 +0200
Fixes for make_binary_distribution and mysql_config for OpenSuse 12.1
Thu 2012-02-23 16:43:35 +0200
Fixed , "Assertion open_tables == 0 ... " in THD::restore_backup_open_tables_state.
This also fixes a (not likely) crashing bug when forcing a thread that was doing a table lock to re-open it's files, for example by creating a trigger.
Revision #3439 Wed 2012-02-22 17:38:24 +0400
Don't run test for BUG#933412 with embedded server, as it requires concurrent query
execution which mtr --embedded does not support
Revision #3438 Wed 2012-02-22 17:11:33 +0400
Sort counters by their names (otherwise, the order of SHOW STATUS output is sometimes sorted and sometimes not)
Revision #3437 Wed 2012-02-22 16:48:29 +0400
Added back MRR counters. The new names are: Handler_mrr_init, Handler_mrr_key_refills, Handler_mrr_rowid_refills.
Revision #3436 Wed 2012-02-22 10:38:28 +0200
Changed names of statistic variables and counting matches instaed of rejected rows.
Revision #3435 Tue 2012-02-21 21:18:41 +0100
Bug #923429 Crash in decimal_cmp on using UNIX_TIMESTAMP with a wrongly formatted timestamp
UNIX_TIMESTAMP() can be null, and returns null for invalid values
Revision #3434 [merge] Tue 2012-02-21 18:00:23 +0200
Merge with 5.2
Revision #2732.53.5 [merge] Tue 2012-02-21 17:48:15 +0200
Automatic merge with 5.1
Tue 2012-02-21 14:17:33 +0200
Fixed suppression expression.
Revision #3433 Tue 2012-02-21 17:58:43 +0200
Fixed that 'make distcheck' works with automake 1.11.11
Fixed compiler warnings found by buildbot
Revision #3432 Mon 2012-02-20 21:30:23 +0100
fix for "relocation R_X86_64_PC32 against `handler_index_cond_check' can not be used when making a shared object; recompile with -fPIC" don't use visibility=hidden for external functions
Revision #3431 [merge] Tue 2012-02-21 09:43:36 +0200
Automatic merge
Revision #3429.1.4 [merge] Tue 2012-02-21 09:37:56 +0200
Automatic merge
Tue 2012-02-21 09:35:46 +0200
Fixed wrong test case
[merge] Tue 2012-02-21 09:36:48 +0200
Automatic merge
[merge] Tue 2012-02-21 01:55:12 +0200
Merge with 5.1
[merge] Tue 2012-02-21 01:58:50 +0200
Merge with
[merge] Mon 2012-02-20 17:58:00 +0200
Merge with 5.1
Mon 2012-02-20 17:59:42 +0200
Fixed issue found by buildbot
Revision #3430 Mon 2012-02-20 20:38:05 +0400
Bug #933412: Server crashes in _mi_put_key_in_record on KILL QUERY with ICP, STRAIGHT_JOIN
In mi_rkey(), do correct handling of case where mi_yield_and_check_if_killed() detects that the thread was killed (all other similar functions in MyISAM/Aria have slightly different code and do not have this problem).
Also fixed assignment in DBUG_ASSERT
this is 2nd variant of the fix:
make .result file smaller
run KILLable statements in a separate connection, otherwise we could end up trying to KILL the final "DROP TABLE" statement
Revision #3429 [merge] Mon 2012-02-20 15:34:50 +0400
Merge
Revision #3419.1.1 Mon 2012-02-20 15:30:54 +0400
Bug #933407: Valgrind warnings in mark_as_null_row with materialization+semijoin, STRAIGHT_JOIN, impossible WHERE
In return_zero_rows(), don't call mark_as_null_row() for semi-join materialized tables, because 1) they may have been already freed, and 2)there is no real need to call mark_as_null_row() for them.
Revision #3428 Sat 2012-02-18 19:11:57 -0800
Fixed Bug #934348.
This bug is the result of an incomplete/inconsistent change introduced into 5.3 code when the cond_equal parameter were added to the function optimize_cond.
The change was made during a merge from 5.2 in October 2010.
The bug could affect only queries with HAVING.
Revision #3427 Sat 2012-02-18 16:06:38 -0800
Fixed Bug #934342.
An outer join query with a semi-join subquery could return a wrong result if the optimizer chose to materialize the subquery.
It happened because when substituting for the best field into a ref item
used to build access keys not all COND_EQUAL objects that could be employed
at substitution were checked.
Also refined some code in the function check_join_cache_usage to make it safer.
Revision #3426 Fri 2012-02-17 13:27:41 +0100
Remove engine-specific (but identical) icp callbacks. create one reusable common icp callback in the handler.cc.
It can also increment status counters, without making the engine dependent on the exact THD layout (that is different in embedded).
Revision #3425 Thu 2012-02-16 20:13:28 -0800
Fixed Bug #928352.
This bug led to wrong values of the use_count fields in some SEL_ARG trees that triggered complains on the server side when executing the test case for LP bug 800184 if a debug build of the server was used.
This was the result of the incomplete fix for Bug #800184.
To complete it the following corrections had to be made:
the copy constructor for SEL_TREE must call the new function incr_refs_all() instead of the function incr_refs(), because references to next key parts from any SEL_ARG tree belonging to the list of the first key part has to be adjusted.
the method and_sel_tree of the class SEL_IMERGE must use the copy constructor of the SEL_TREE class to make a copy of its second argument before it ANDs it with any SEL_TREE tree from the processed SEL_IMERGE object.
Revision #3424 Thu 2012-02-16 20:15:57 +0400
Backport of:
Revision #3423 Thu 2012-02-16 18:56:10 +0400
Added comments
Revision #3422 Thu 2012-02-16 08:49:10 +0200
Counters for Index Condition Pushdown added (MDEV-130).
timestamp: Thu 2011-12-01 15:12:10 +0100
Fix for Bug#13430436 PERFORMANCE DEGRADATION IN SYSBENCH ON INNODB DUE TO ICP
.
When running sysbench on InnoDB there is a performance degradation due
to index condition pushdown (ICP). Several of the queries in sysbench
have a WHERE condition that the optimizer uses for executing these
queries as range scans. The upper and lower limit of the range scan
will ensure that the WHERE condition is fulfilled. Still, the WHERE
condition is part of the queries' condition and if ICP is enabled the
condition will be pushed down to InnoDB as an index condition.
.
Due to the range scan's upper and lower limits ensure that the WHERE
condition is fulfilled, the pushed index condition will not filter out
any records. As a result the use of ICP for these queries results in a
performance overhead for sysbench. This overhead comes from using
resources for determining the part of the condition that can be pushed
down to InnoDB and overhead in InnoDB for executing the pushed index
condition.
.
With the default configuration for sysbench the range scans will use
the primary key. This is a clustered index in InnoDB. Using ICP on a
clustered index provides the lowest performance benefit since the
entire record is part of the clustered index and in InnoDB it has the
highest relative overhead for executing the pushed index condition.
.
The fix for removing the overhead ICP introduces when running sysbench
is to disable use of ICP when the index used by the query is a
clustered index.
.
When WL#6061 is implemented this change should be re-evaluated.Revision #2643.143.75 [merge] Tue 2012-02-21 01:51:55 +0200
Automatic merge
Revision #2643.151.1 Tue 2012-02-21 01:44:50 +0200
More general handling of memory loss in dlclose (backported from 5.2)
Fixed supression in mysql-test-run so it also works on windows.
Revision #2732.53.2 [merge] Tue 2012-02-21 01:49:14 +0200
Automatic merge
Revision #2732.46.76 Tue 2012-02-21 01:46:51 +0200
Added missing signal values to signal_handler.cc
Revision #2732.53.1 [merge] Mon 2012-02-20 18:46:22 +0100
merge
Revision #2643.143.74 Mon 2012-02-20 18:07:38 +0100
Fix compilation on Windows, and various Windows related mistakes introduced by "safe exception patch".
Remove misleading comments suggesting about signal() Windows, the routine here is part of a exception handler, and sig parameter is an exception code.
Revision #2643.143.73 Mon 2012-02-20 17:56:47 +0200
Fixed compiler warnings
Revision #2732.46.74 [merge] Mon 2012-02-20 17:49:21 +0200
Merge with MariaDB 5.1 and MySQL 5.1.61
Revision #2643.143.72 [merge] Mon 2012-02-20 16:23:18 +0200
Merge with MYSQL 5.1.61
Fixed README with link to source
Merged InnoDB change to XtraDB
[
merge] Sat 2012-02-11 16:42:46 +0100
merge
Wed 2012-01-25 11:34:43 +0100
mtr runs only "big" tests, if --big-test is repeated twice
Wed 2012-01-04 20:10:15 +0100
report innodb_file_per_table, innodb_flush_log_at_trx_commit, innodb_flush_method
Mon 2012-02-20 14:03:44 +0200
Fixed "MariaDB consistently crashes in collect_tables on Aria checkpoint execution" This happend when you have more than 1024 open Aria tables during checkpoint.
Revision #2732.46.72 Thu 2012-02-16 16:06:49 -0800
Fixed Bug #933117.
The bug was fixed with the code back-ported from the patch for LP bug 800184 pushed into mariadb-5.3.
Download |Release Notes |Changelog |Overview of 5.3
Release date: 14 Oct 2011
For the highlights of this release, see the release notes.
The revision number links will take you to the revision's page on Launchpad. On Launchpad you can view more details of the revision and view diffs of the code modified in that revision.
Revision #3231 Thu 2011-10-13 00:15:51 +0400
Remove garbage comment
Wed 2011-10-12 21:40:56 +0400
: Crash in add_ref_to_table_cond() when grouping by a PK
Testcase
Wed 2011-10-12 21:38:40 +0400
Code cleanup: move variable into branch that uses it
Wed 2011-10-12 14:01:01 +0200
fix a compilation failure for perl Net::HandlerSocket module
[merge] Wed 2011-10-12 12:45:35 +0200
merge
[merge] Wed 2011-10-12 12:30:55 +0200
merge
Wed 2011-10-12 14:23:42 +0400
Fix compile error: ‘cond_copy’ may be used uninitialized in this function.
Wed 2011-10-12 13:19:37 +0400
: Wrong result with semijoin + materialization + firstmatch + multipart key
Make advance_sj_state() not to attempt building duplicate removal strategies when we're doing optimization of an SJM-nest.
Wed 2011-10-12 02:04:03 +0400
Update subselect_sj{,2}_mat.result with changes that were lost when they were deleted and re-created.
Tue 2011-10-11 23:38:26 +0200
Restore files accidentally deleted in previous merge.
[merge] Tue 2011-10-11 23:52:23 +0400
Merge: fix subselect_sj2*.test: add missing DROP TABLE statement
Tue 2011-10-11 23:48:50 +0400
Fix testcases from the previous push: add missing DROP TABLE statement
Tue 2011-10-11 21:43:43 +0200
when freeing a possibly NULL pointer under safemalloc - use MY_ALLOW_ZERO_PTR
[merge] Tue 2011-10-11 20:20:19 +0200
merge
[merge] Tue 2011-10-11 20:18:46 +0200
merge
[merge] Tue 2011-10-11 21:57:57 +0400
Merge fix for BUG#869012
Tue 2011-10-11 21:34:00 +0400
: Wrong result with semijoin + materialization + AND in WHERE
[merge] Tue 2011-10-11 12:55:42 +0200
merge
[merge] Mon 2011-10-10 19:34:37 +0200
merge
Tue 2011-10-11 02:36:08 -0700
Fixed .
This bug is a consequence of the fix in the function add_ref_to_table_cond for that turned out to be not quite correct: it tried to AND the same generated condition with two different other conditions.
This patch creates a copy of the generated condition if the condition needs to be ANDed with two different items.
[merge] Mon 2011-10-10 23:34:32 +0300
Merge
Wed 2011-10-05 18:18:00 +0300
Making subquery cache on by default.
Mon 2011-10-10 15:38:11 +0200
remove unnecessary define
Thu 2011-09-29 20:12:57 +0200
make sure that cast(... as date) returns a valid date, as specified by the caller.
make Item::send() request a date according to the current SQL mode limitations.
[merge] Thu 2011-10-06 01:21:15 +0400
Merge fix for BUG#860580
Thu 2011-10-06 01:11:08 +0400
: Sporadic crash / valgrind warning in register_field_in_read_map() with semijoin
[merge] Wed 2011-10-05 16:56:17 +0300
Automatic merge with 5.2
[merge] Wed 2011-10-05 16:53:35 +0300
Automatic merge with 5.1
[merge] Wed 2011-10-05 16:15:30 +0300
Automatic merge
Wed 2011-10-05 15:59:49 +0300
Fixed "Periodic aria checkpoints prevent power management"
Tue 2011-10-04 23:57:46 +0300
Fix
Analysis:
The cause of the bug was that the method subselect_rowid_merge_engine::partial_match() was not designed for re-execution within the same query. Specifically, it didn't cleanup the bitmap of matching keys after completion.
Tue 2011-10-04 12:00:55 -0700
Made the result test of a test case platform independent
(correction for the previous patch).
Tue 2011-10-04 08:45:01 -0700
Made the result test of a test case platform independent.
Mon 2011-10-03 21:36:18 -0700
Fixed a bad merge.
Changed a test case to make its result set platform independent.
[merge] Mon 2011-10-03 15:50:42 -0700
Merge.
Fri 2011-09-30 21:53:59 -0700
The previous correction of the cost estimate to access a joined table in the function best_access_path revealed another bug: currently table scans on NULL keys used for NOT IN subqueries cannot work together with employment of join caches for inner tables of these subqueries. Otherwise the result can be wrong as it could be seen with the result of the test case constructed for bug #37894 in the file subselect3_jcl6.result.
[merge] Tue 2011-10-04 02:24:04 +0400
Merge
Tue 2011-10-04 02:20:06 +0400
Fix buildbot failure in previous fix ():
Mon 2011-10-03 22:48:15 +0300
Fix
Analysis:
The cause of the bug was the changed meaning of subselect_partial_match_engine::has_covering_null_row. Previously it meant that there is row with NULLs in all nullable fields of the materialized subquery table. Later it was changed to mean a row with NULLs in all fields of this table.
[merge] Sat 2011-10-01 00:56:42 +0400
Merge
Sat 2011-10-01 00:55:57 +0400
: Assertion `fixed == 1' failed in Item_func_eq::val_int() with semijoin + materialization
[merge] Sat 2011-10-01 00:20:01 +0400
Merge
Sat 2011-10-01 00:10:03 +0400
: Crash in create_ref_for_key with semijoin + materialization
[merge] Thu 2011-09-29 17:07:43 +0400
Merge
Thu 2011-09-29 17:03:12 +0400
: Assertion `keypart_map' failed in mi_rkey with semijoin
Thu 2011-09-29 12:58:20 +0200
Fix test suite:
on Windows, kill can and almost always will return client error 2013 ("Lost connection...") on the killed connection,
On the server side, if connection is "sleeping" KILL will close the socket, thus socket error on client is expected.
Wed 2011-09-28 17:20:43 +0300
Fix .
Analysis:
The crash is a result of the same cause as all similar bugs (, , , ,). The general pattern is that some optimization requires the evaluation of some condition (e.g. the WHERE clause), and this condition contains a subquery, such that the subquery itself requires a temporary table for its execution. During the subquery execution the original tables in the FROM clause are replaced by the temporary table needed for the final GROUP or ORDER operation. All this happens during optimization of the outer query. Later when EXPLAIN is run for the subquery, explain attempts to print the name of the tables in the FROM clause, but it finds there a temporary table without a corresponding TABLE_LIST object. The attempt to print the name of a NULL table list results in a crash.
[merge] Wed 2011-09-28 13:01:47 +0400
Merge
Wed 2011-09-28 12:58:01 +0400
: Second crash with get_fanout_with_deps() with semijoin + materialization
Tue 2011-09-27 17:40:04 +0300
Fixed test case that changed when max_user_connections was made signed. Threat ER_CONNECTION_KILLED same as ER_SERVER_SHUTDOWN in replication (to get rid of a possible warning in error log)
[merge] Mon 2011-09-26 23:54:00 +0300
Automatic merge
Mon 2011-09-26 20:26:47 +0300
Allow one to block an account by using GRANT max_user_connections = -1
[merge] Mon 2011-09-26 14:15:04 +0400
Merge
Mon 2011-09-26 13:56:09 +0400
: Wrong result with semijoin + loosescan + comma join
Sat 2011-09-24 14:45:49 +0200
portability fix: use SOCKET_SIZE_TYPE in the handlersocket plugin
Fri 2011-09-23 12:00:52 +0200
fix typo: binlog_annotate_rows_events -> binlog_annotate_row_events
[merge] Fri 2011-09-23 01:30:44 +0400
Merge
Fri 2011-09-23 01:25:08 +0400
: Wrong result with semijoin + "Impossible where"
Thu 2011-09-22 11:04:00 +0200
portability fix: avoid anonymous structs and unions in C
Thu 2011-09-22 01:55:17 +0400
Fix after previous cset: update test results
[merge] Tue 2011-09-20 20:43:57 +0400
Merge
Tue 2011-09-20 20:40:07 +0400
: Wrong result with second execution of prepared statement with semijoin + view
[merge] Sat 2011-09-17 23:58:36 +0400
Merge
Sat 2011-09-17 23:53:50 +0400
LPBUG849717: Crash in Item_func::fix_fields on second execution of a prepared statement with semijoin
[merge] Fri 2011-09-16 18:26:20 +0200
merge
Fri 2011-09-16 18:15:04 +0200
Fix path lookup for singtool
[merge] Thu 2011-09-15 17:25:37 +0300
Merge with 5.2
Thu 2011-09-15 16:56:06 +0300
Fixed race condition that could cause diff to fail.
branch nick: maria-5.3 Thu 2011-09-15 16:36:43 +0300
Removed duplicate test
[merge] Wed 2011-09-14 12:43:29 +0400
Merge
Tue 2011-09-13 23:45:02 +0400
: Wrong result with jkl = 7, BKA, ICP in maria-5.3 + compound index
[merge] branch nick: maria-5.3 Sat 2011-09-10 18:01:27 +0300
Merge with 5.2
[merge] Sat 2011-09-10 09:37:55 +0300
Automatic merge
Download |Release Notes |Changelog |Overview of 5.3
Release date: 9 Apr 2012
For the highlights of this release, see the release notes.
The revision number links will take you to the revision's page on Launchpad. On Launchpad you can view more details of the revision and view diffs of the code modified in that revision.
Revision #3500 Sat 2012-04-07 17:27:00 -0700
Fixed properly.
The previous patch for the bug (that erroneously identified the bug as bug 972973 in its comment) was incorrect.
It turned out that the code that triggered the abort complain reported for the bug was not needed at all.
Sat 2012-04-07 02:29:04 -0700
Fixed .
When the function free_tmp_table deletes the handler object for a temporary table the field TABLE::file for this table should be set to NULL. Otherwise an assertion failure may occur.
[merge] Fri 2012-04-06 16:40:39 -0700
Merge.
Fri 2012-04-06 15:08:09 -0700
Fixed .
Fri 2012-04-06 13:18:12 +0300
Unused method removed.
[merge] Fri 2012-04-06 14:24:00 +0500
merging.
[merge] Fri 2012-04-06 13:51:42 +0500
merging.
[merge] Thu 2012-04-05 23:07:18 +0200
merge
[merge] Thu 2012-04-05 12:01:52 +0200
merge
Thu 2012-04-05 23:32:57 +0300
Fix of .
When a view/derived table is converted from merged to materialized the items from the used_item lists are substituted for items referring to the fields of the result of the materialization. The problem appeared with queries employing natural joins. Since the resolution of a natural join was performed only once the used_item list formed at the second execution of the query lacked the references to the fields that were used only in the equality predicates generated for the natural join.
Wed 2012-04-04 21:35:34 +0400
Make test results stable.
[merge] Wed 2012-04-04 14:19:46 +0300
Merge with 5.2
Fixed additional changed pbxt test cases
[merge] Wed 2012-04-04 13:50:24 +0300
[merge] Wed 2012-04-04 12:37:46 +0400
Merge
Wed 2012-04-04 12:26:36 +0400
: better comments and function names.
[merge] Wed 2012-04-04 01:00:23 +0300
Merge with 5.2
[merge] Wed 2012-04-04 00:33:02 +0300
Merge with 5.1
Tue 2012-04-03 15:42:26 +0300
Don't disable core on signal just becasue platform doesn't handle stack traces
[merge] Mon 2012-04-02 17:54:33 +0200
merge
Mon 2012-04-02 11:29:28 +0200
SET PASSWORD in 5.2 does not update user's auth plugin
[merge] Mon 2012-04-02 12:27:15 +0300
automatic merge
Mon 2012-04-02 11:45:07 +0300
Fixed "[PATCH] plugin boolean result"
[merge] Fri 2012-03-30 16:13:41 +0200
merge
[merge] Fri 2012-03-30 16:12:21 +0200
merge
[merge] Fri 2012-03-30 13:54:33 +0300
Merge from 5.2
[merge] Fri 2012-03-30 13:51:16 +0300
Automatic merge
[merge] Fri 2012-03-30 08:49:57 +0200
merge
[merge] Thu 2012-03-29 21:15:30 +0200
merge
Thu 2012-03-29 16:32:35 +0200
remove race conditions from the test
Thu 2012-03-29 21:58:40 +0200
Add missing include (fixes compile failure with gcc 4.7).
[merge] Wed 2012-03-28 13:58:14 +0300
Automatic merge
[merge] Wed 2012-03-28 13:49:07 +0300
Merge with 5.1
Tue 2012-03-27 16:06:00 +0300
Added feature request from "Feature request - prevent truncating query in mytop"
Added feature request 'reading of my.cnf files' to mytop
Thanks to Jean Weisbuch for the patch/suggestion.
Tue 2012-03-27 14:43:26 +0400
: Server crashes in embedding_sjm on a simple 1-table select with AND and OR
This is a regession introduced by fix for
The problem was that there were scenarios where check_simple_equality() would create an Item_equal object but would not call item_equal->set_context_field() on it.
[merge] Mon 2012-03-26 21:38:24 +0400
Merge
Mon 2012-03-26 21:34:24 +0400
: Wrong result (missing rows) with semijoin+firstmatch, IN/ANY subquery
Mon 2012-03-26 16:06:42 +0300
Bug fix for "auto_increment_offset != 1 + innodb_autoinc_lock_mode=1 => bulk inserts fail"
Patch and test case by Patryk Pomykalski
Mon 2012-03-26 15:05:50 +0300
Sorted some test results that can be different on different machines
Mon 2012-03-26 13:29:45 +0300
Fixed "Assertion `lock_type != TL_UNLOCK && (lock_type == TL_IGNORE || file->lock.type == TL_UNLOCK)' failed in ha_maria::store_lock with DML, triggers, views"
[merge] Mon 2012-03-26 13:52:55 +0400
Merge
Mon 2012-03-26 13:47:00 +0400
: Wrong result (missing rows) with semijoin+materialization, IN subquery, InnoDB, TEMPTABLE view
Mon 2012-03-26 11:46:01 +0300
Increased version number
Sun 2012-03-25 18:31:35 +0400
: Assertion `0' failed in QUICK_INDEX_SORT_SELECT::need_sorted_output()
The problem was that
we've picked a LooseScan that used full index scan (tab->type==JT_ALL) on certain index.
Sat 2012-03-24 17:08:59 +0100
Improve filesort performance for small sorts: Don't write pointers to records that we will never use.
Fri 2012-03-23 18:22:39 +0200
Speedup:
Don't call update_virtual_fields() if table->vfield is not set
Don't prealloc memory for in open_tables() as this is very seldom used.
Fri 2012-03-23 18:18:16 +0200
Fixes "JOIN constructors takes a long time in 5.3"
Remove all references of MAX_TABLES from JOIN struct and make these dynamic
Updated Join_plan_state to allocate just as many elements as it's needed
Fri 2012-03-23 18:11:29 +0200
Speedups:
Optimize away calls to hp_rec_hashnr() by cashing hash
Try to get more rows / block (to minimize overhead of HP_PTRS) in HEAP tables.
Thu 2012-03-22 19:56:17 -0700
Fixed .
If the first component of a ref key happened to be a constant appeared after constant row substitution then no store_key element should be created for such a component. Yet create_ref_for_key() erroneously could create such an element that caused construction of invalid ref keys and wrong results for some joins.
[merge] Thu 2012-03-22 13:23:55 +0100
Automerge.
Thu 2012-03-22 13:21:15 +0100
Backport some simple performance patches from 5.5.
[merge] Wed 2012-03-21 19:15:29 +0100
merge
[merge] Wed 2012-03-21 18:30:34 +0100
merge
Wed 2012-03-21 10:59:20 +0100
SHOW TABLES was unnecessary opening .frm files
mark the corresponding I_S table as OPTIMIZE_I_S_TABLE, to let the I_S optimizer figure out whether files need to be opened, and don't open the tables unless I_S optimizer says so.
[merge] Wed 2012-03-21 11:18:20 +0400
Merge
Sun 2012-03-18 23:58:20 +0400
: Server crashes on 2nd execution of PS in find_field_in_tables with semijoin+materialization
Tue 2012-03-20 17:03:28 -0700
Fixed .
This bug in the constructor SEL_IMERGE::SEL_IMERGE could cause huge excessive memory requests.
Mon 2012-03-19 01:04:55 +0400
: Server crashes in Item_field::fix_after_pullout on INSERT .. SELECT
Take into account that there may exist Item_field objects with context==NULL.
[merge] Wed 2012-03-14 13:58:18 +0200
Merge 5.2->5.3
Wed 2012-03-14 12:09:03 +0200
test suite for LP bug#694450
[merge] Tue 2012-03-13 13:49:18 -0700
Merge.
Tue 2012-03-13 13:34:20 -0700
Fixed .
Tue 2012-03-13 16:38:43 +0200
Fixed bug "Archive table corruption crashing MariaDB signal 11"
Added 'from_end' as extra parameter to Field::unpack() to detect wrong from data.
Change ha_archive::unpack_row() to detect wrong field lengths.
[merge] Mon 2012-03-12 18:21:14 +0400
Merge
[merge] Mon 2012-03-12 18:08:40 +0400
Merge
Mon 2012-03-12 18:20:30 +0400
Better comments
[merge] Mon 2012-03-05 22:33:46 -0800
Merge.
Mon 2012-03-05 20:32:28 -0800
Fixed .
[merge] Mon 2012-03-05 22:00:24 +0200
Automatic merge
Mon 2012-03-05 21:59:00 +0200
Ensure that we mark all processed tables as 'properly closed'.
Mon 2012-03-05 15:48:12 +0200
Fix for
Problem is that subquery execution can't be called during prepare/optimize phase.
Also small fix for subquery test suite.
Sun 2012-03-04 22:38:17 -0800
Fixed .
This bug in the function JOIN::drop_unused_derived_keys() could leave the internal structures for a materialized derived table in an inconsistent state. This led to a not quite correct EXPLAIN output when no additional key had been created to access the table.
It also may lead to more serious consequences: so, the test case added with this fix caused a crash in mariadb-5.5.20.
Wed 2012-02-29 23:28:16 -0800
Fixed .
This bug appeared after the patch for that in the function merge_key_fields forgot to reset a proper value for the val field in the result of the merge operation of the key field created for a regular key access and the key field created to look for a NULL key.
Adjusted the results of the test case for bug 939009 that actually were incorrect.
Revision #2732.46.9 Wed 2011-10-12 12:07:14 +0200
Add option to enable feedback plugin to the MSI installer.
Revision #3218.1.1 [merge] Tue 2011-10-11 20:17:44 +0200
merge
Revision #2732.46.8 [merge] Tue 2011-10-11 20:16:11 +0200
merge
Tue 2011-10-11 20:13:57 +0200
remove unconditional SAFEMALLOC/SAFEMUTEX from debug flags
in make_join_select(), use the correct condition to check whether the current table is a SJM nest (the previous condition used to be correct before, but then sj-materialization temp table creation was moved to happen before make_join_select was called)
Revision #2643.143.39 Mon 2011-10-10 17:59:26 +0200
add a missing definition
Revision #2732.46.6 Sat 2011-10-08 19:00:00 +0200
fix feedback plugin for 5.2
[merge] Fri 2011-10-07 00:18:30 +0200
merge with 5.1
Thu 2011-10-06 23:40:19 +0200
sort results in tests to make them stable
Thu 2011-10-06 23:39:44 +0200
Thu 2011-10-06 16:56:59 +0300
Fixed that when using a trigger mysql.proc is now accessed
Cleanup: Changed procedure type from a int/char to an enum for easier to manage and debug code.
The problem:
in an uncorrelated subquery, JOIN execution code may make irreversible cleanups after it has been executed (because the subquery won't be executed again). In particular, JTBM nests and their injected IN-equalities will be invalidated (the materialized table will be dropped and TABLE structure freed).
Solution:
don't walk into Item_subselect if represents an uncorrelated subselect that has already been executed. The idea is that the subselect will not be executed again (calling Item_subselect_xxx::val_int() will fetch the cached value), so it should not matter what is inside the subselect.
Revision #2643.143.35 Wed 2011-10-05 16:37:05 +0300
Fix for issue found in buildbot where mysqld.*.err files was missing
Added suppression message for valgrind failure found on OpenSuSE 11.1
Now the aria_log_control_file and log file is not touched if aria files are not written to.
merge] Fri 2011-09-16 18:30:46 +0200
merge
The test query requires double execution of the IN predicate because it first checks the predicate as a constant condition. The second execution during regular execution used the bitmap of matching keys produced by the first execution instead of starting with a clean one.
Solution:
Cleanup the bitmap of matching keys at the end of the partial matching procedure.
Revision #3190.2.1 Fri 2011-09-30 18:55:02 -0700
Fixed a cost estimation bug introduced into in the function best_access_path of the 5.3 code line after a merge with 5.2 on 2010-10-28 in order not to allow the cost to access a joined table to be equal to 0 ever.
Expanded data sets for many test cases to get the same execution plans as before.
convert_subq_to_jtbm() should always restore the used arena.
At the same time there was a shortcut in subselect_rowid_merge_engine::partial_match() that detected a special case where:
there is no match in any of the columns with NULLs, and
there is no NULL-only row that covers all columns with NULLs.
With the change in the meaning of has_covering_null_row, the condition that detected this special case was incomplete.
This resulted in an incorrect FALSE, when the result was a partial match.
Solution:
Expand the condition that detected the special case with the correct test for the existence of a row with NULL values in all columns that contain NULLs (a kind of parially covering NULL-row).
convert_subq_to_jtbm() didn't check that subuqery optimization was successful. If it wasn't (in this example because of @@max_join_size violation), it would proceed further and eventually crash when trying to execute the un-optimized subquery.
The problem was that JOIN::save/restore_query_plan() did not save/restore parts of the query plan that are located inside SJ_MATERIALIZATION_INFO structures. This could cause parts of one plan to be used with another, which led get_best_combination() to constructing non-sensical join plans (and crash). Fixed by saving/restoring SJM parts of the query plans.
check_and_do_in_subquery_rewrites() will not set SUBS_MATERIALIZATION flag when it records that the subquery predicate is to be converted into semi-join. If convert_join_subqueries_to_semijoins() later decides not to convert to semi-join, let it set SUBS_MATERIALIZATION flag, if appropriate.
are_tables_local() failed to recognize the fact that OUTER_REF_TABLE_BIT is ok for SJ-Materialization. This caused zero-length ref access to be constructed, which led to an assert.
Solution:
This patch extends the fix to bug Bug #702301, and dissalows constant substitution of aggregate functions if the filter condition used to check MIN/MAX keys is an expensive condition.
Make get_post_group_estimate() take into account semi-join materialization nests.
One can set @@global.max_user_connections to -1 to block anyone, except SUPER user, to login.
If max_user_connection is 0, one can't change it without a restart (needed to get user connections counting to work correctly)
Revision #3191.1.2 Fri 2011-09-23 13:55:01 +0300
Fixed issue with slow query logging where examined rows where wrong
Reset 'examined_rows_count' in union to not count same rows twice
Revision #3191.1.1 Fri 2011-09-23 01:13:38 +0300
Added new options to KILL. New syntax is KILL [HARD|SOFT] [CONNECTION|QUERY] [ID | USER user_name]
If USER is given, all threads for that user is signaled
If SOFT is used then the KILL will not be sent to the handler. This can be used to not interrupt critical things in the handler like 'REPAIR'.
Internally added more kill signals. This gives us more information of why a query/connection was killed.
KILL_SERVER is used when server is going down. In this case the users gets ER_SHUTDOWN as the reason connection was killed.
Changed signals to number in correct order, which makes it easier to test how the signal should affect the code.
New error message ER_CONNECTION_KILLED if connection was killed by 'KILL CONNECTION'. Before we got error ER_SHUTDOWN.
Changed names of not used parameters KILL_QUERY & KILL_CONNCTION to mysql_kill() to not conflict with defines in the server
Fix wrong loop bounds in setup_semijoin_dups_elimination()
Provide fix_after_pullout() function for Item_in_optimizer and other Item_XXX classes (basically, all of them that have eval_not_null_tables, which means they have special rules for calculating not_null_tables_cache value)
The problem was that Item_direct_view_ref and its embedded Item_field were getting incorrect value of item->used_tables() after fix_fields() in the second and subsequent EXECUTE.
Made relevant fixes in Item_field::fix_fields() and find_field_in_tables(), so that the Item_field gets the correct attributes.
If convert_join_subqueries_to_semijoins() decides to wrap Item_in_subselect in Item_in_optimizer, it should do so in prep_on_expr/prep_where, too, as long as they are present.
There seems to be two possibilities of how we arrive in this function:
prep_on_expr/prep_where==NULL, and will be set later by simplify_joins()
prep_on_expr/prep_where!=NULL, and it is a copy_and_or_structure()-made copy of on_expr/where. the latter can happen for some (but not all!) nested joins. This bug was that we didn't handle this case.
Revision #2732.44.35 Fri 2011-09-16 18:14:19 +0200
Fix compile warning
(Code taken from 5.5)
Revision #2732.44.33 Thu 2011-09-15 10:36:17 +0300
Fixed test to be repeatable
Revision #2732.44.32 Wed 2011-09-14 12:48:08 +0300
Reset variable to not access it uninitialized
Revision #2732.44.31 Tue 2011-09-13 18:46:47 +0300
Increased version number
Give proper error to client on shutdown.
Mrr_ordered_index_reader::interrupt_read() and resume_read() should save/restore not just index lookup tuple, but entire index tuple.
Key parts that are not used for index lookup can be still used in pushed index condition. Failure to save/restore will cause the index condition to be evaluated over the wrong values.
Revision #2732.45.2 Fri 2011-09-09 19:44:07 +0300
Fixed that automatic killing of delayed insert thread (in flush, alter table etc) will not abort auto-repair of MyISAM table.
Give more information when finding an error in a MyISAM table.
When killing system thread, use KILL_SYSTEM_THREAD instead of KILL_CONNECTION to make it easier to ignore the signal in sensitive context (like auto-repair)
Added new kill level: KILL_SERVER that will in the future to be used to signal killed by shutdown.
Add more warnings about killed connections when warning level > 3
Revision #2732.45.1 Fri 2011-09-02 12:41:20 +0300
Fixed Bug #814238 "safe_mutex issues must be assertions in debug binary"
Added --debug-assert-on-error variable which, if set, will cause safe_mutex to assert if it founds an error.
Revision #2732.44.29 Thu 2011-09-08 16:57:46 +0300
Bug #813418 fix.
The problem was that optimization code did not take into account later feature when instad of NOT before BETWEEN it has negated flag into the Item_func_between inherited from Item_func_neg_opt. So optimizer tried process NOT BETWEEN as BETWEEN.
The patch just switches off the optimisation for NOT BETWEEN as it was before when NOT function was really used.
This bug happened because the function find_field_in_view formed autogenerated names of view columns without a possibility to roll them back. In some situation it could cause memory misuses reported by valgrind or even crashes.
Revision #2643.153.4 Fri 2012-04-06 13:31:33 +0500
MDEV-80 Memory engine table full at much less than max_heap_table_size with btree index.
RB-tree index in the MEMORY table fails if it grews over 4G.
That happened because the old_allocated variable in hp_rb_write_key() had the uint type. Changed with the 'size_t' type to be same as the 'rb_tree.allocated'.
per-file comments:
storage/heap/hp_write.c
Memory engine table full at much less than max_heap_table_size with btree index. uint->size_t for the 'old_allocated'.
Revision #2643.153.3 [merge] Thu 2012-04-05 10:49:38 +0200
mysql-5.1.62 merge
Revision #2643.153.2 Wed 2012-04-04 15:41:50 +0200
MDEV-212 sporadic main.connect failures in 5.3
don't cast implicitly an int to a char, when a boolean value is desired.
Merge with 5.1
Revision #2643.153.1 [merge] Wed 2012-04-04 13:38:19 +0300
Merge in deleted fixes
Revision #2643.152.2 Wed 2012-04-04 13:20:06 +0300
Fixed test cases that changed as part of fixing bugs with record count and partitioning
Revision #3488.1.1 [merge] Mon 2012-04-02 21:47:31 +0400
Merge
Revision #3479.1.1 Mon 2012-04-02 21:41:54 +0400
Bug #913030: Optimizer chooses a suboptimal excution plan for Q18 from DBT-3
When doing join optimization, pre-sort the tables so that they mimic the execution order we've had with 'semijoin=off'.
That way, we will not get regressions when there are two query plans (the old and the new) that have indentical costs but different execution times (because of factors that the optimizer was not able to take into account).
Revision #2643.152.1 Wed 2012-04-04 00:14:07 +0300
Fixed Bug #970528 "Server crashes in my_strnncollsp_simple on LEFT JOIN with CSV table, TEXT field"
The main problem was a bug in CSV where it provided wrong statistics (it claimed the table was empty when it wasn't)
I also fixed wrong freeing of blob's in the CSV handler. (Any call to handler::read_first_row() on a CSV table with blobs would fail)
Thanks to Maarten Vanraes for the patch
Revision #3485.1.1 Fri 2012-03-30 16:00:10 +0300
Compatibility fixes by U Orsini
Revision #2643.143.86 Fri 2012-03-30 16:09:57 +0200
MDEV-205 don't install libevent headers
Revision #2643.143.85 Fri 2012-03-30 13:42:52 +0300
Fixed Bug #967914 "CHECK TABLE persistently reports table corruption after removing Aria logs"
Fixed that repair removes the 'table is moved' mark.
Revision #2643.143.84 Thu 2012-03-29 18:06:08 +0200
fix the test case for windows: replace_result \\ /
Revision #2643.143.83 Thu 2012-03-29 16:36:06 +0200
make the code compile again
Revision #2643.143.82 Wed 2012-03-28 13:22:21 +0300
Fixed Bug #944422 "mysql_upgrade destroys Maria tables?"
The issue was that check/optimize/anaylze did not zerofill the table before they started to work on it.
Added one more element to not often used function handler::auto_repair() to allow handler to decide when to auto repair.
The fix was to add the missing calls.
The problem was with execution strategy for cases where FirstMatch's inner tables were interleaved with outer-uncorrelated tables.
I was unable to find any cases where such join orders would be practically useful, so fixed it by disabling them.
Fix equality propagation to work with SJM nests and OR clauses (full descirption of problem and solution in the comment in the patch)
The second commit with post-review fixes)
there was also a quick select (tab->quick!=NULL), that used other indexes.
some old code assumes that (tab->type==JT_ALL && tab->quick) -> means that the quick select should be used, which is not true.
Fixed by discarding the quick select as soon as we know we're using LooseScan without using the quick select.
Revision #2643.143.81 Wed 2012-03-21 18:22:02 +0100
Bug #933959 Assertion `0' failed in net_end_statement(THD*) on concurrent SELECT FROM I_S.INNODB_SYS_INDEXES and ALTER TABLE
Workaround: report a generic error if an I_S plugin failed silently.
Revision #2643.143.80 Thu 2012-03-15 15:06:06 +0100
Fix access to uninitialized variable in innodb error message in case WriteFile() fails.
Revision #2643.143.79 Wed 2012-03-14 21:16:24 +0100
restore my_safe_printf_stderr for "crash-safe sigsegv handler"
use vsnprintf()
use write() on windows, not WriteFile or fwrite()
localtime_r is still a problem
The problem was that convert_subq_to_jtbm() attached the semi-join TABLE_LIST object into the wrong list: they used to attach it to the end of parent_lex->leaf_tables.head()->next_local->...->next_local.
This was apparently inccorect, as one can construct an example where JTBM nest is attached to a table that is inside some mergeable VIEW, which breaks (causes crash) for name resolution on the subsequent statement re-execution.
Solution: Attach to the "right" list. The "wording" was copied from st_select_lex::handle_derived.
Revision #2732.53.18 [merge] Mon 2012-03-12 12:15:55 +0100
merge
Revision #2643.143.78 Mon 2012-03-12 11:31:40 +0100
Bug #953714: Fix formatting of the crash messages in signal/exception handler
Revision #2732.53.17 Mon 2012-03-12 12:14:04 +0100
Bug #952607: Do not show MySQL services preinstalled by Dell in the upgrade wizard
Revision #2732.53.16 Fri 2012-03-09 15:37:16 -0800
Fixed Bug #930814.
This bug was introduced into mariadb 5.2 in the December 2010 with the patch that added a new engine property: the ability to support virtual columns.
As a result of this bug the information from frm files for tables that contained virtual columns did not appear in the information schema tables.
Revision #2732.53.15 Fri 2012-03-09 14:28:02 +0200
Added test case for Bug #905782 "Assertion pageno < ((1ULL) <<` 40)' failed at ma_pagecache.c:3438: pagecache_read or table corruption on INSERT into a ucs2 table"
The orignal bug has been fixed earlier
Revision #2732.53.14 Fri 2012-03-09 14:06:17 +0200
Added ucs2 test moved from maria3.test. (MDEV-167)
Revision #2732.53.13 Thu 2012-03-08 22:33:01 -0800
Fixed Bug #884175.
If in the where clause of the a query some comparison conditions on the field under a MIN/MAX aggregate function contained constants whose sizes exceeded the size of the field then the query could return a wrong result when the optimizer had chosen to apply the MIN/MAX optimization.
With such conditions the MIN/MAX optimization still could be applied, yet it would require a more thorough analysis of the keys built to find the value of MIN/MAX aggregate functions with index look-ups.
The current patch just prohibits using the MIN/MAX optimization in this situation.
Revision #2732.53.12 [merge] Tue 2012-03-06 01:48:38 +0100
merge
Revision #2732.55.1 Tue 2012-03-06 01:46:32 +0100
Bug #947631: Uninstall wipes HeidiSQL settings, even if HeidiSQL is installed prior to MariaDB
Fixed detection of installed HeidiSQL in the machine, prevent installing own copy if HeidiSQL is already installed.
On deinstallation, do not remove settings if official HeidiSQL is detected.
Revision #2732.53.11 Thu 2012-03-01 09:27:42 +0200
Return original checksum value inside the test.
Move ucs2 test in separate file (MDEV-167).
Do not call, directly or indirectly, SQL_SELECT::test_quick_select() for derived materialized tables / views when optimizing joins referring to these tables / views to get cost estimates of materialization. The current code does not create B-tree indexes for materialized derived tables / views. So now it's not possible to get any estimates for ranges conditions over the results of the materialization.
The function mysql_derived_create() must take into account the fact that array of the KEY structures specifying the keys over a derived table / view may be moved after the optimization phase if the derived table / view is materialized.
Replication code changed to detect wrong field information in events.
Revision #3450.1.1 Mon 2012-03-12 17:41:22 +0400
Bug #952297: Server crashes on 2nd execution of PS in Field::is_null with semijoin+materialization
The bug would show up
when using PS (so that we get re-execution)
the left_expr of the subquery is a reference to viewname.column_name, so that it crashes when one tries to use it without having called fix_fields for it.
when using SJ-Materialization, which makes use of sj_subq_pred->left_expr expression
The fix is to have setup_conds() fix sj_subq_pred->left_expr for semi-join nests it finds.
The function create_hj_key_for_table() that builds the descriptor of the hash join key to access a table of a materialized subquery must ignore any equi-join predicate depending on the tables not belonging to the subquery.
This is needed as last log entry may be a DDL that is not processed and then a table may be left in 'not properly closed state' even if information is correct in it.
Revision #3442.1.1 Tue 2012-02-28 23:18:52 +0200
Fixed Bug #925377 "Querying myisam table metadata while 'alter table..enable keys' is running may corrupt the table"
Fixed wrong mutex order bug in Aria when flush_log_for_bitmap() was called when table is not yet marked for change.
Download |Release Notes |Changelog (page:12 3 456 ) |Overview of 5.3
Release date: 26 July 2011
Revision #3000 [merge] Thu 2011-05-19 20:03:33 -0700
Merge
[merge] Thu 2011-05-19 20:01:43 -0700
Merged the fix for into 5.3.
Thu 2011-05-19 18:28:38 -0700
Fixed
[
merge] Fri 2011-05-20 01:41:07 +0200
merge
[merge] Thu 2011-05-19 19:23:06 +0300
Automatic merge
Thu 2011-05-19 18:14:02 +0300
Updated comments as part of code review
Thu 2011-05-19 08:45:06 +0300
PBXT test fix.
[merge] Wed 2011-05-18 23:03:46 +0300
automatic merge
Wed 2011-05-18 16:27:19 +0300
Rewritten patch of percona - switching query cache on and off, removing comments.
[merge] Wed 2011-05-18 15:31:20 +0200
automerge
Wed 2011-05-18 15:22:56 +0200
merge some fixes for rpl_corruption.test from MySQL 5.6.
[merge] Wed 2011-05-18 15:19:18 +0200
automerge
Wed 2011-05-18 12:28:17 +0200
Fix compile warning.
Wed 2011-05-18 00:47:56 +0300
Removed some alias warnings
Fixed alias bug when compiling with gcc 4.2.4 that caused subselect.test to fail
Mon 2011-05-16 16:21:09 +0300
fix dynco test on Windows, really now (from Wlad)
Mon 2011-05-16 16:13:34 +0300
Fix of compiler errors.
[merge] Mon 2011-05-16 15:16:48 +0300
Automatic merge
[merge] Mon 2011-05-16 15:07:04 +0300
Merge with 5.3 main
Fri 2011-05-13 18:27:43 +0300
Directories with .dylib files added to DYLD_LOIBRARY_PATH to allow plugins to use them.
Thu 2011-05-12 18:01:36 +0300
Fix library build on mac (prevent handlersocket.so loading failure if it called from build directory)
[merge] Thu 2011-05-12 01:02:55 +0300
Automatic merge with
[merge] Wed 2011-05-11 08:52:16 +0100
Merge fix for
[merge] Wed 2011-05-11 08:28:11 +0200
automerge
Wed 2011-05-11 08:16:49 +0200
Fix race in testcase innodb_plugin.group_commit_no_optimize_thread
[merge] Tue 2011-05-10 18:28:05 +0300
- Automatic merge with 5.3
Thu 2011-05-05 15:24:28 +0300
Fix
Sun 2011-05-08 13:26:07 +0300
Fixed compiler warnings
[merge] Sat 2011-05-07 15:48:45 +0200
Merge into main .
[merge] Thu 2011-05-05 16:35:02 +0200
: Merge bugfix from 5.2 to 5.3 codebase + really fix version from which mariadb supports binlog checksums.
Wed 2011-05-04 18:08:44 -0700
Fixed . If the value of the flag cond_false of an Item_equal object is true then the print method must return the string '0'.
Wed 2011-05-04 11:23:29 -0700
Fixed : The third parameter in the call of make_cond_for_table() that built the pushed condition containing only outer references was incorrect. This condition appeared for the first time in the patch fixing .
Tue 2011-05-03 17:11:45 -0700
Fixed : The bug was introduced by the patch that fixed .
Mon 2011-05-02 13:02:36 +0200
Shoot in the dark - try to fight build environment based on cygwin, where presumably neither TMP nor TEMP environment variable are set.
Mon 2011-05-02 13:25:53 +0300 (no message)
[merge] Fri 2011-04-29 19:20:46 -0700
Merge
Wed 2011-04-27 15:29:46 -0700
Fixed : The function test_quick_select by mistake did not update the value of table->quick_condition_rows for index intersection scans though the specification explicitly required to do so from any table access plan once the plan provided a better upper bound for the number of rows selected from the table. It resulted in a bogus, usually very big number saved as the cost of the table access. This, in its turn, in many cases forced the optimizer to make a bad choice of the execution plan for join queries.
Thu 2011-04-28 19:56:10 +0300
Added ALTER ONLINE TABLE, which will give an error if the change can't be done 'instantly' (without a table copy)
Thu 2011-04-28 18:02:26 +0300
Added option "AND DISABLE CHECKPOINT" to "FLUSH TABLES WITH READ LOCK"
This makes it possible to do safe multi volume snapshots as long as one snapshots the volume with the transaction logs last.
[merge] Tue 2011-04-26 21:11:06 -0700
Merge
Tue 2011-04-26 19:58:41 -0700
Fixed , :
Wed 2011-04-20 15:30:21 -0700
Fixed . In some cases the field max_part_no of the SEL_ARG structure was not initialized. That triggered a Valgrind complain.
Tue 2011-04-19 14:34:40 +0200
Handlersocket does not load
-fimplicit-termplates must be in CXXFLAGS not in handlersocket_la_CXXFLAGS. otehrwise automake puts it in the command line too early to override global -fno-implicit-templates
[merge] Thu 2011-04-14 13:25:18 +0200
Merge test case fix from -rpl into 5.3.
Thu 2011-04-14 13:23:02 +0200
Fix race in testcase innodb_plugin.group_commit
Tue 2011-04-12 15:06:09 +0200
Missing PBXT result file updates after previous patch.
[
merge] Sun 2011-04-10 23:00:08 -0700
merge
[merge] Fri 2011-04-08 09:39:33 +0200
Merge various replication-related patches into :
Group commit
Enhancements for START TRANSACTION WITH CONSISTENT SNAPSHOT
[merge] Fri 2011-04-08 02:54:01 +0200
merge
[
merge] Fri 2011-04-08 02:51:56 +0200
Fri 2011-04-08 02:12:03 +0400
: Wrong results for a subquery with 'semijoin=on'
Let advance_sj_state() save the value of JOIN::cur_dups_producing_tables in POSITION::prefix_dups_producing_tables, and restore_sj_state() restore it.
[merge] Mon 2011-04-04 12:38:08 +0400
Merge: Make EXPLAIN better at displaying MRR/BKA
Mon 2011-04-04 12:32:52 +0400
Amend the previous cset:
[merge] Sun 2011-04-03 21:03:31 +0200
null merge
Fri 2011-04-01 12:04:59 +0300
Fixed compiler warnings
[merge] Thu 2011-03-31 18:35:57 +0300
Automatic merge
Thu 2011-03-31 18:30:05 +0300
Fixed unlikely reference to freed memory in item->print().
[merge] Wed 2011-03-30 23:34:48 +0200
merge
[merge] Wed 2011-03-30 00:48:35 +0300
Merge the fix for .
Mon 2011-03-28 12:55:36 +0300
Fix
[
merge] Tue 2011-03-29 22:43:35 +0200
merge
Tue 2011-03-29 20:56:54 +0200
Suppress ANALYZE_TABLE output, to be consistent with rest of the test case
Tue 2011-03-29 20:37:30 +0200
Fix formatting error message (invalid table name) in handler tests.
[merge] Mon 2011-03-28 17:19:40 +0200
null merge
[
merge] Mon 2011-03-28 17:13:41 +0200
merge
[
merge] Mon 2011-03-28 12:57:52 +0200
merge
[
merge] Mon 2011-03-28 02:04:43 +0200
merge
[
merge] Mon 2011-03-28 01:10:55 +0200
merge
[
merge] Sat 2011-03-26 00:15:33 +0100
merge
Fri 2011-03-25 16:33:17 +0300
: Update test results in pbxt test suite
[merge] Fri 2011-03-25 12:47:44 +0300
Merge in fix for
Fri 2011-03-25 12:43:32 +0300
Wrong result with OR + NOT NULL in maria-5.3
Thu 2011-03-24 16:34:06 +0200
Fix
Analysis:
A query with implicit grouping is one with aggregate functions and no GROUP BY clause. MariaDB inherits from MySQL an SQL extenstion that allows mixing aggregate functions with non-aggregate fields. If a query with such mixed select clause produces an empty result set, the meaning of aggregate functions is well defined - either NULL (MIN, MAX, etc.), or 0 (count(*)). However the non-aggregated fields must also have some value, and the only reasonable value in the case of empty result is NULL.
Changelog — page: 3
Download |Release Notes |Changelog (page:1 2 3456 ) |Overview of 5.3
Release date: 26 July 2011
Revision #3069 Wed 2011-06-29 16:05:16 -0700
Fixed Bug #803410. Due to this bug in the function generate_derived_keys_for_table some key definitions to access materialized derived tables or materialized views were constructed with invalid info for their key parts. This could make the server crash when it optimized queries using materialized derived tables or materialized views.
[merge] Tue 2011-06-28 19:56:30 -0700
Merge.
Tue 2011-06-28 18:31:54 -0700
Fixed . This crashing bug could manifest itself at execution of join queries over materialized derived tables with IN subquery predicates in the where clause. If for such a query the optimizer chose to use duplicate weed-out with duplicates in a materialized derived table and chose to employ join cache the execution could cause a crash of the server. It happened because the JOIN_CACHE::init method assumed that the value of TABLE::file::ref is set at the moment when the method was called for the employed join cache. It's true for regular tables, but it's not true for materialized derived tables that are filled now at the first access to them, i.e. after the JOIN_CACHE::init has done its job.
Tue 2011-06-28 15:48:44 +0300
Fixed
Analysis:
The failed assert ensured that the choice of subquery strategy is performed only for queries with at least one table. If there is a LIMIT 0 clause all tables are removed, and the subquery is neither optimized, nor executed during actual optimization. However, if the query is EXPLAIN-ed, the EXPLAIN execution path doesn't remove the query tables if there is a LIMIT 0 clause. As a result, the subquery optimization code is called, which violates the ASSERT condition.
Tue 2011-06-28 11:11:26 +0400
: Valgrind warning / sporadic crash in evaluate_join_record sql_select.cc:14099 with semijoin
Added testcase. The bug is most likely fixed by code.
[merge] Mon 2011-06-27 23:36:20 -0700
Merge
Mon 2011-06-27 23:07:46 -0700
Fixed . The function create_view_field in some cases incorrectly set the maybe_null flag for the returned items.
[merge] Tue 2011-06-28 00:18:42 +0300
Automatic merge
[merge] Tue 2011-06-28 00:13:22 +0300
Automatic merge
Mon 2011-06-27 23:38:56 +0400
Added TODO comments
Sun 2011-06-26 21:55:32 -0700
Fixed . Ensured valid calculations of the estimates stored in JOIN_TAB::used_fieldlength.
Sat 2011-06-25 14:02:27 -0700
Fixed . Made mergeable views and mergeable derived tables transparent for the MIN/MAX optimization.
Fri 2011-06-24 21:18:20 -0700
Added test cases for and fixed by the patch for .
Fri 2011-06-24 18:42:14 -0700
Fixed . The following were missing in the patch for mwl106:
KEY_PART_INFO::fieldnr were not set for generated keys to access tmp tables storing the rows of materialized derived tables/views
TABLE_SHARE::column_bitmap_size was not set for tmp tables storing the rows of materialized derived tables/views.
Fri 2011-06-24 14:38:53 -0700
Fixed . If a view/derived table is non-mergeable then the definition of the tmp table to store the rows for it is created at the prepare stage. In this case if the view definition uses outer joins and a view column belongs to an inner table of one of them then the column should be considered as nullable independently on nullability of the underlying column. If the underlying column happens to be defined as non-nullable then the function create_tmp_field_from_item rather than the function create_tmp_field_from_field should be employed to create the definition of the interesting column in the tmp table.
[merge] Fri 2011-06-24 21:43:31 +0400
Merge 5.2 -> 5.3 (testcase for now crashes)
Thu 2011-06-23 22:12:22 -0700
Fixed a valgrind problem. The function setup_tables should handle table_list elements for semijoin materialized tables in a special way when executing a prepared statement for the second time.
Thu 2011-06-23 14:48:45 -0700
Fixed . The function simple_pred did not take into account that a multiple equality could include ref items (more exactly items of the class Item_direct_view_ref). It caused crashes for queries over derived tables or views if the min/max optimization could be applied to these queries.
[merge] Tue 2011-06-21 18:17:28 -0700
Merge
Tue 2011-06-21 18:00:58 -0700
Fixed .
Tue 2011-06-21 23:01:01 +0300
Removed forgotten EXPLAIN EXTENDED from the test file.
[merge] Tue 2011-06-21 16:00:41 +0300
Automerged with 5.3.
Tue 2011-06-21 15:50:07 +0300
Fri 2011-06-17 23:00:26 +0200
- fix missing alpha/beta etc in MSI and ZIP package names.
[merge] Fri 2011-06-17 17:45:41 +0400
Merge fix for .
Wed 2011-06-15 18:37:01 +0400
: Crash in hp_movelink with Aria engine and subqueries -In do_sj_dups_weedout(), set nulls_ptr to point to NULL bytes (and not to length bytes) of the DuplicateWeedout column.
[merge] Wed 2011-06-15 21:48:38 -0700
Merge of mwl #106 into 5.3.
Thu 2011-06-09 12:43:28 -0700
Fixed .
Wed 2011-06-15 17:40:18 +0400
: Update .result file
Wed 2011-06-15 16:02:32 +0400
: partition.test produces valgrind errors in 5.3-based branches
Testcase
Wed 2011-06-15 15:32:24 +0400
: InnoDB: Error: row_search_for_mysql() is called without ha_innobase::external_lock() in maria-5.3
Testcase
Wed 2011-06-15 13:43:04 +0400
Assertion `!table->file || table->file->inited == handler::NONE' failed with subquery
Add testcase
Tue 2011-06-14 18:45:14 +0200
fix for cast of negative numbers to datetime
Sun 2011-06-12 11:28:22 +0200
a couple of fixes for pbxt tests
Tue 2011-06-14 15:21:54 +0200
Another attempt at fixing the rare random failures of rpl_corruption
The previous patch partially fixed things by waiting for the old dump thread on the master to exit before injecting the DBUG error. This prevents the error injection going to the wrong thread.
However, there is still the problem that the old dump thread may never exit, causing the wait to time out. This happens if the dump thread manages to write all events down the socket before the socket is closed by the slave. The master dump thread only checks for slave gone when writing a new event, so if no new events are generated, old dump threads can hang around forever on the master after the slave disconnects.
Mon 2011-06-13 12:41:19 +0400
Remove redundant code that is a result of a wrong merge. (Changeset sp1r-igor@olga.mysql.com-20070526173301-38848 moved this loop from one place to another, then the merge of sp1r-gshchepa/uchum@gleb.loc-20070527192244-26330 have kept both copies).
Sun 2011-06-12 00:35:53 +0400
In make_join_select():
move attempt to evaluate join->exec_const_cond() out of the "Extract constant part of each ON expression" loop (it got there by mistake when merging).
[merge] Sat 2011-06-11 12:04:42 +0300
Merge with Sergei's tree to get in latest microsecond patches and also fixes to innodb_plugin.
Fri 2011-06-10 21:15:13 +0200
more buildbot fixes
Sat 2011-06-11 11:41:46 +0300
Fixed build failures with maria3.test and widows build
[merge] Sat 2011-06-11 11:09:17 +0300
Merge with main 5.3
[merge] Fri 2011-06-10 12:09:21 +0300
Merge with 5.2
Fri 2011-06-10 12:45:43 +0400
: does not trigger with non-comma joins
Add a testcase (the bug has already been fixed)
Fri 2011-06-10 12:36:06 +0400
[No BUG#] end_tab_idx==-1 passed as parameter to JOIN::get_partial_cost_and_fanout()
Handle the case when the subquery's join is degenerate and so has zero tables.
Thu 2011-06-09 21:39:31 +0300
Removed depricated --maria-options from mysqld.
Thu 2011-06-09 13:35:01 +0300
Fixed compile failure when we don't use system zlib
Fixed crash when setting query_cache_type to 0.
Thu 2011-06-09 11:13:03 +0300
Fixed build failure on OpenSolaris
Tue 2011-06-07 14:19:49 +0300
Upgraded to latest handlersocket code. This fixed "Assertion `next_insert_id == 0' failed with handlersocket"
Tue 2011-06-07 10:54:37 +0300
Fixed that mysqld --no-defaults --help --verbose doesn't give a lot of irrelevant error messages.
Tue 2011-06-07 10:29:08 +0300
Fixed strict alias problem by replacing = with memcpy()
Mon 2011-06-06 15:50:46 -0700
Fixed . The code that added semi-join transformations missed checking the state of the fixed flag for the items built with the and_items function before calls of the fix_fields method. This could lead to an abort failure when the first argument of and_items() happened to be NULL.
[merge] Mon 2011-06-06 19:37:33 +0300
Merge with 5.2 to get bug fixes for thr_lock
Mon 2011-06-06 17:25:01 +0300
Fixed that SHOW COLUMNS for a virtual persistent column shows 'PERSISTENT' instead of 'VIRTUAL' Strict mode now gives error if one tries to update a virtual column.
Fri 2011-06-03 21:45:24 +0400
Buildbot fixes:
make sp.test work both with and without query_cache (attempt 2)
fix compile warning in make_sort_key(), as directed by SergeiG
Fri 2011-06-03 15:06:13 +0200
Fixed compiler warning in central header file mysql_priv.h.
Fri 2011-06-03 13:42:02 +0400
More changes from optimizer_use_mrr to optimizer_switch
Fri 2011-06-03 11:32:21 +0400
Buildbot fixes: don't use @@optimizer_use_mrr, it has been moved into @@optimizer_switch
Fri 2011-06-03 10:49:50 +0400
Buildbot fixes: let mysql-test/t/sp.test set @@query_cache_size only if the server has query cache.
[merge] Fri 2011-06-03 09:38:59 +0400
Merge
Fri 2011-06-03 00:25:58 +0400
Change optimizer_use_mrr=auto|disable|force to be optimizer_switch flags mrr=on|off and mrr_cost_based=on|off.
[merge] Thu 2011-06-02 17:33:08 -0700
Merge
Tue 2011-05-31 09:39:35 -0700
Corrected the previous patch concerning elimination of SQL_SELECT::original_cond.
[merge] Thu 2011-06-02 23:52:36 +0400
Merge fix for .
Thu 2011-06-02 23:48:33 +0400
: Valgrind complains on a join query with two IN subqueries
Thu 2011-06-02 16:46:47 +0400
Change suite/rpl/t/rpl_row_basic_11bugs.test to require query cache.
[merge] Tue 2011-05-31 12:16:02 +0200
automerge
Tue 2011-05-31 12:14:21 +0200
Attempt to fix rpl.rpl_corruption failure seen in Buildbot on Windows.
Mon 2011-05-30 11:19:40 +0400
Remove compiler warning
Remove garbage comments
[merge] Mon 2011-05-30 10:51:41 +0400
Merge 5.3-main ->
Sun 2011-05-29 20:48:14 -0700
Eliminated the member original_cond from the class SQL_SELECT introduced at the latest merge 5.1->5.2->5.3. It is basically not needed since if SQL_SELECT::pre_idx_push_select_cond is not NULL then SQL_SELECT::original_cond would point to the same condition as SQL_SELECT::pre_idx_push_select_cond. Otherwise SQL_SELECT::original_cond would be equal to SQL_SELECT::cond.
Sat 2011-05-28 22:07:56 -0700
Fixed the abort failure of a test case from vcol.vcol_misc. The fix blocks execution of any constant sub-expressions of the defining expressions for virtual columns when context analysis if these expressions is performed.
Fixed a compiler warning.
Sat 2011-05-28 19:28:39 +0200
Fix gcc warning.
Sat 2011-05-28 16:57:58 +0200
Fix compile errors and warnings and test errors introduced by microseconds push.
Also, change windows timespec definition to be Unix-ish - simplifies handling a lot.
[merge] Sat 2011-05-28 06:00:22 +0300
Automatic merge
[merge] Sat 2011-05-28 05:58:16 +0300
automatic merge with 5.3
[
merge] Fri 2011-05-27 19:05:35 +0200
merge
[merge] Mon 2011-05-23 11:54:26 +0300
automatic merge with 5.3
Mon 2011-05-23 10:56:05 +0300
: Address review feedback (by Sergey Petrunia)
Sat 2011-05-21 22:23:14 +0200
Fix comp_errr crash ( fprintf crashes wheb uninitialized string is passed)
Sat 2011-05-21 00:46:18 +0300
Changed MariaDB error numbers to start from 1900 to not conflict with MySQL error numbers
Fri 2011-05-20 19:52:24 +0400
Fix a comment (unmatched '{' and '}' screw up jumping in advanced editors)
Fri 2011-05-20 19:08:55 +0400
Stabilize a testcase after fix for , part 2
Fri 2011-05-20 14:15:22 +0400
Stabilize a testcase after fix for
[merge] Fri 2011-05-20 10:13:02 +0400
Merge fix for
Fri 2011-05-20 01:05:06 +0400
: Wrong result with semijoin + nested subqueries in maria-5.3
Changelog — page: 2
Download |Release Notes |Changelog (page:1234 5 6 ) |Overview of 5.3
Release date: 26 July 2011
Revision #2880 Sat 2011-01-15 23:39:51 -0800
Corrected test case for Bug #698882 to make it platform independent
[merge] Sat 2011-01-15 12:42:32 -0800
Merge
Sat 2011-01-15 11:14:36 -0800
Fixed .
[merge] Fri 2011-01-14 23:53:27 -0800
Merge
Fri 2011-01-14 22:55:56 -0800
Ported the fix for / .
[merge] Fri 2011-01-14 13:07:50 +0300
Merge backported subquery bugfixes/testcases into
Fri 2011-01-14 00:47:03 +0300
Backport testcase for: - Server crash with a simple multi-table update
Backport the testcase (the fix itself was included with the subquery optimizations backport)
Wed 2011-01-12 15:00:10 +0300
: Result differences on query re-execution
Cause: handler::in_range_check_pushed_down was not reset when a command would call handler->idx_cond_push() without later calling handler->index_end().
Fix: reset the variable in handler->reset(), too (like we do with other Index Condition Pushdown members).
Wed 2011-01-05 15:03:30 -0800
Fixed . When stored in a key buffer any varchar field has a length prefix that always takes 2 bytes.
Wed 2010-12-29 18:14:03 -0800
Corrected the test case for Added a test case for - a duplicate of
[merge] Wed 2010-12-29 13:45:38 -0800
Merge.
Wed 2010-12-29 11:00:22 -0800
Fixed The bug was the result of a bad merge maria-5.2-wl21 -> 5.3.
Sun 2010-12-26 16:31:03 -0800
Fixed One of the hash functions employed by the BNLH join algorithm calculates the value of hash index for key value utilizing every byte of the key buffer. To make this calculation valid one has to ensure that for any key value unused bytes of the buffer are filled with a certain filler. We choose 0 as a filler for these bytes.
Added an optional boolean parameter with_zerofill to the function key_copy. If the value of the parameter is TRUE all unused bytes of the key buffer is filled with 0.
[merge] Sat 2010-12-25 18:54:14 -0800
Merge
Fri 2010-12-24 14:36:35 -0800
Fixed
[merge] Fri 2010-12-24 16:24:20 -0800
Merge
Wed 2010-12-22 00:37:35 -0800
Fixed Lifted the limitation that hash join could not be used over varchar fields with non-binary collation.
Wed 2010-12-22 02:26:35 +0300
Fix compile error on Windows: instead of round(X) use floor(X+0.5)
[merge] Tue 2010-12-21 14:40:23 +0300
-125 DS-MRR improvements
Merge with 5.3-main
Mon 2010-12-20 14:40:12 +0300
Tue 2010-12-14 14:08:05 +0200
Fix
Analysis:
The assert failed because st_select_lex::print() was called for subqueries as follows:
Sat 2010-12-11 12:50:39 -0800
Fixed compiler warnings.
[merge] Fri 2010-12-10 23:23:34 -0800
Merge.
Fri 2010-11-19 11:03:03 -0800
Got the declarations related to the class JOIN_CACHE, its derivatives and companions out of sql_select.h into a separate file sql_join_cache.h.
Wed 2010-12-08 16:16:32 +0200
Fixed test results for windows builds
Fixed compiler warning
[merge] Tue 2010-12-07 00:15:27 +0100
merge
Mon 2010-12-06 20:44:17 +0300
Post-merge fixes: fix compile failure in buildbot
[
merge] Mon 2010-12-06 13:40:52 +0100
merge
[merge] Mon 2010-12-06 10:25:44 +0200
Merge with 5.1-release.
Fixed problem with oqgraph and 'make dist'
Note that after this merge we have a problem show in join_outer where we examine too many rows in one specific case (related to ).
Tue 2010-11-30 01:27:14 +0200
Fixed some compiler warnings found when compiling for windows.
Changed rows_read and rows_sent status variables to be longlong (to avoid compiler warnings)
Mon 2010-11-29 23:58:18 +0100
Use three digits after the decimal point for better resolution and comparability of results.
Mon 2010-11-29 22:02:33 +0200
Fix logical expression according to operation priority (also MS visual studio compiler warnings).
[merge] Mon 2010-11-29 13:50:56 +0200
Auto-merge fix for
Thu 2010-11-25 11:43:23 +0200
Fix
Sun 2010-11-28 15:02:12 +0200
Disable warning that comes 'occasionable' depending on if HAVING is executed or not.
[merge] Sun 2010-11-28 14:38:59 +0200
Automatic merge
Sat 2010-11-27 17:29:52 +0200
Added TRASH() to table->record[0] to find out if we access not initialzed data.
Thu 2010-11-25 00:34:50 +0200
Fix
Analysis:
The send_data method of the result sink class used to collect data statistics about materialized subqueries incorrectly assumed that duplicate rows are removed prior to calling send_data. As a result the collected statistics was wrong, which resulted in an incorrect maximal number of keys in the Ordered_key buffer.
Tue 2010-11-23 12:35:37 +0200
Fix for : Adding bit field support for heap tables.
[merge] Thu 2010-11-11 14:35:26 +0200
Merge in
Tue 2010-11-02 21:13:53 +0300
: RQG: sql_select.cc:5385: bool greedy_search... : Assertion `join->best_read
[merge] Tue 2010-11-09 19:40:02 -0800
Merge
Mon 2010-11-08 20:36:32 -0800
Fixed .
Tue 2010-11-09 13:13:56 +0200
Fixed Incorrect processing of NULL result in Item_cache fixed.
Tue 2010-11-09 09:52:22 +0200
Fix buildbot failure introduced by the previous push
Mon 2010-11-08 23:25:12 +0200
Fix buildbot failures caused by two previous pushes.
Mon 2010-11-08 20:51:31 +0300
Fix buildbot errors: rec_per_key_part can be 0 if re-opening
Mon 2010-11-08 19:06:26 +0300
[Patch from Monty] Fix stack-overrun crash in subselect_notembedded.test
Make mi_open() use less stack space
[merge] Fri 2010-11-05 12:37:51 +0200
Automerge with 5.2
Fri 2010-11-05 11:54:42 +0200
Fixed usage of wrong variable in case of errors
[merge] Tue 2010-11-02 16:08:02 -0700
Merge
[merge] Tue 2010-11-02 10:12:21 -0700
Merge
Tue 2010-11-02 16:04:39 -0700
Removed empty lines.
[merge] Tue 2010-11-02 10:48:55 +0100
merge
Tue 2010-11-02 10:47:36 +0100
fix windows embedded
Tue 2010-11-02 11:03:33 +0200
Fixed wrong queue_replace(), which caused timeout failure in pbxt.flush_read_lock_kill
Fixed compiler warnings.
Fri 2010-10-29 18:59:39 -0700
Fixed .
The bug could cause wrong results for queries over Maria tables when index condition pushdown was used.
[merge] Thu 2010-10-28 19:04:23 +0200
5.2 merge
Wed 2010-10-27 16:28:19 +0300
Fixed
The set of Ordered keys of a rowid merge engine is dense. Thus when we decide not to create a key for a column that has only NULLs, this column shouldn't be counted.
Notice that the caller has already precomputed the correct total number of keys that should be created.
Wed 2010-10-27 12:35:15 +0300
Fixed
Post-review fix - avoid re-evaluation of the having clause when it evaluates to true.
Wed 2010-10-27 06:03:59 +0300
Type of the variables fixed.
Tue 2010-10-26 14:55:42 +0300
Fixed
The cause for this bug is that still processes derived tables (subqueries in the FROM clause) by fully executing them during the parse phase. This will be remedied by once merged into the main 5.3.
The assert statement is triggered when MATERIALIZATION is ON for EXPLAIN EXTENDED for derived tables with an IN subquery as follows:
Changelog — page: 5
disable feedback plugin by default. Now on windows too.
Revision #2643.143.36 [merge] Thu 2011-10-06 21:42:43 +0200
merge the feedback tree
Revision #2643.147.8 Thu 2011-10-06 20:55:38 +0200
Implement uname() on Windows.
Also, fix code to get physical memory size.
[merge] Thu 2011-10-06 18:48:16 +0200
merge with feedback-plugin
and disable feedback plugin by default, if it's compiled in.
Thu 2011-10-06 18:24:00 +0200
Wed 2011-10-05 20:16:42 +0200
fix fulltext_plugin.test on windows
Tue 2011-10-04 16:51:39 +0200
tests for feedback plugin,
bugfix: garbage in PLUGIN_VAR_STR variables when INSTALL'ing a plugin
[merge] Tue 2011-10-04 16:03:10 +0200
merge feedback plugin
Tue 2011-10-04 15:48:39 +0200
fix for static plugins in mariadb.
Tue 2011-10-04 15:41:52 +0200
support for plugins on windows
Tue 2011-10-04 15:07:55 +0200
my_gethwaddr() on Solaris and Windows
Tue 2011-10-04 15:01:26 +0200
remove redundant declarations
Fields belonging to views in general cannot be substituted for equal items, in particular for constants, because all references to a view field refer to the same Item_field object while they could be used in different OR parts of the where condition and belong to different equivalence classes (to different Item_equals). That's why substitution for equal items in any context is allowed only in place of Item_direct_view_ref objects, but not in place of Item_fields these objects refer to. Due to some erroneous code in the patch for Bug #717577 substitution for view fields were allowed in some context.This could lead
The fix prohibits substitution of view fields for equal items in any context.
The patch also changes slightly the compile method for the Item_func class. Now if the analyze method returns NULL in his parameter the compile method is not called for the arguments of the function at all. A similar change was made for the Item_ref class.
Revision #2992.2.3 Thu 2011-05-19 16:37:57 +0300
Fix based on suggestion by Zardosht Kasheff and Richard Prohaska) for making all clustered indexes equal in test_if_skip_sort_order()
Revision #2992.2.2 Wed 2011-05-18 19:26:30 +0300
Original idea from Zardosht Kasheff to add HA_CLUSTERED_INDEX
Added a lot of code comments
Updated get_best_ror_intersec() to prefer index scan on not clustered keys before clustered keys.
Use HA_CLUSTERED_INDEX to define if one should use HA_MRR_INDEX_ONLY
For test of using index or filesort to resolve ORDER BY, use HA_CLUSTERED_INDEX flag instead of primary_key_is_clustered()
Use HA_TABLE_SCAN_ON_INDEX instead of primary_key_is_clustered() to decide if ALTER TABLE ... ORDER BY will have any effect.
Revision #2992.2.1 Wed 2011-05-18 13:36:12 +0300
Added HA_ERR_DISK_FULL handler error
Original code by Zardosht Kasheff
Revision #2982.2.5 [merge] Mon 2011-05-16 14:05:45 +0300
Merge with 5.2
Revision #2982.2.4 Mon 2011-05-16 12:16:08 +0300
Added more asserts to find out how maria.maria-big could have failed in buildbot.
Revision #2982.2.3 Fri 2011-05-13 15:40:14 +0300
Fixed test differences on windows
Revision #2982.2.2 [merge] Thu 2011-05-12 14:30:34 +0300
Merge with dynamic column code
Revision #2982.2.1 [merge] Tue 2011-05-10 18:17:43 +0300
Merge with MariaDB 5.2
The problem was that connection con5, which is supposed to be the leader for the third group, could if timing was bad end up as participant in the second group, causing the test to fail.
Fixed by ensuring that group 2 is running before starting the transaction for group 3.
Analysis: The method st_select_lex::optimize_unflattened_subqueries() incorrectly propagated to each subquery the complete select_options flag set for the whole query. Among other flags in select_options, this propagated incorrectly the STRAIGHT_JOIN flag from the upper query to the subquery.
Solution: During EXPLAIN set only the SELECT_DESCRIBE bit in the select_options of the subquery.
Revision #2979.1.2 Thu 2011-05-05 01:35:03 +0300
Adjusted test results after merge.
Revision #2979.1.1 [merge] Thu 2011-05-05 00:35:21 +0300
Merge with main 5.3
Revision #2977.1.2 [merge] Wed 2011-05-04 15:44:29 +0200
MWL#180: merge fixes from 5.2-rpl + forgot to adjust revision from which checksums are supported when merging into 5.3-based tree.
Revision #2977.1.1 [merge] Tue 2011-05-03 14:44:25 +0200
Merge MWL#180, binlog checksum backport, into MariaDB 5.3-based tree.
Both these two bugs happened due to the following problem. When a view column is referenced in the query an Item_direct_view_ref object is created that is refers to the Item_field for the column. All references to the same view column refer to the same Item_field. Different references can belong to different AND/OR levels and, as a result, can be included in different Item_equal object. These Item_equal objects may include different constant objects. If these constant objects are substituted for the Item_field created for a view column we have a conflict situation when the second substitution annuls the first substitution. This leads to wrong result sets returned by the query. Bug #724942 demonstrates such an erroneous behaviour.
Test case of the Bug #717577 produces wrong result sets because best equal fields of the multiple equalities built for different OR levels of the WHERE condition differs. The subsitution for the best equal field in the second OR branch overwrites the substitution made for the first branch.
To avoid such conflicts we have to substitute for the references to the view columns rather than for the underlying field items. To make such substitutions possible we have to include into multiple equalities references to view columns rather than field items created for such columns.
This patch modifies the Item_equal class to include references to view columns into multiple equality objects. It also performs a clean up of the class methods and adds more comments. The methods of the Item_direct_view_ref class that assist substitutions for references to view columns has been also added by this patch.
The problem was that connection con5, which is supposed to be the leader for the third group, could if timing was bad end up as participant in the second group, causing the test to fail.
Fixed by ensuring that group 2 is running before starting the transaction for group 3.
MWL#47 Annotate_rows_log_event
MWL#163 innodb_release_locks_early
Percona patch enhancing row-based replication for tables with no primary key
Revision #2732.26.18 Thu 2011-04-07 17:21:22 +0200
Fix merge error.
Revision #2732.26.17 Thu 2011-04-07 13:55:18 +0200
MWL#116: After-review fixes.
Also implement the InnoDB changes for group commit into innodb_plugin.
Revision #2732.26.16 Thu 2011-04-07 12:41:49 +0200
Change lock release to assert in XtraDB commit_ordered(); we never want to hold the latch across the 2-phase commit, and it is already released at start of prepare (if not before).
Rename trx->active_trans to active_flag; since we changed the semantics of the field, renaming should help prevent silent merge errors.
Revision #2732.26.15 Mon 2011-04-04 21:56:19 +0200
After-merge fixes.
Revision #2732.26.14 [merge] Mon 2011-04-04 15:18:43 +0200
Merge --binlog_optimize_thread_scheduling into mariadb-5.2-rpl.
Revision #2732.26.13 [merge] Fri 2011-04-01 15:07:10 +0200
Merge MariaDB 5.2.5 release into MariaDB-5.2-rpl.
Revision #2732.26.12 [merge] Fri 2011-04-01 10:25:45 +0200
Merge MWL#136 after-review fixes into mariadb-5.2-rpl
Revision #2732.26.11 [merge] Thu 2011-03-31 15:32:04 +0200
Merge MWL#116 after-review fixes.
Revision #2732.26.10 [merge] Mon 2011-01-31 15:40:58 +0100
Merge MWL#116, PBXT part into mariadb-5.2-rpl
This makes PBXT implement the commit_ordered() method, so that cross-engine START TRANSACTION WITH CONSISTENT SNAPSHOT works actually consistent with XtraDB.
Also mark the version number to show this is the -rpl feature preview.
Revision #2732.26.9 [merge] Thu 2011-01-27 20:08:00 +0100
Merge missing result file update for Bug #697174 fix.
Revision #2732.26.8 [merge] Thu 2011-01-27 16:54:49 +0100
Merge fix for Bug #697174
Revision #2732.26.7 Thu 2011-01-27 15:56:44 +0100
After-merge fixes for MWL#47 (which causes changes in binlog positions in .result files).
Also fix one incorrect printf() format.
Revision #2732.26.6 [merge] Thu 2011-01-27 15:56:00 +0100
automerge
Revision #2732.26.5 [merge] Wed 2011-01-26 15:35:03 +0100
Merge three Percona patches into mariadb-5.2-rpl:
MWL#47, allowing to annotate row-based binlog events with the SQL test of the originating query (eg. in mysqlbinlog output).
row_based_replication_without_primary_key.patch, providing more intelligent selection of index to use on slave when applying row-based binlog events for tables with no primary key.
Make mysqlbinlog omit redundant use around BEGIN/SAVEPOINT/COMMIT/ROLLBACK in 5.0 binlogs.
Revision #2732.26.4 Wed 2011-01-26 14:52:39 +0100
Fix wrong printf() format.
Revision #2732.26.3 [merge] Sat 2010-12-25 18:28:24 +0100
Merge MWL#163 into mariadb-5.2-rpl
Revision #2732.26.2 [merge] Sat 2010-12-25 16:14:50 +0100
Merge MWL#136 into mariadb-5.2-rpl
Revision #2732.26.1 [merge] Sat 2010-12-25 15:42:33 +0100
Merge MWL#116 into mariadb-5.2-rpl.
merge
Make EXPLAIN better at displaying MRR/BKA:
Update all .result files
Extra comments
Revision #2948.1.1 Sat 2011-04-02 14:04:45 +0400
Make EXPLAIN better at displaying MRR/BKA:
"Using MRR" is no longer shown with range access.
Instead, both range and BKA accesses will show one of the following:
= "Rowid-ordered scan"
= "Key-ordered scan"
= "Key-ordered Rowid-ordered scan"
depending on whether DS-MRR implementation will do scan keys in order, rowids in order, or both.
The patch also introduces a way for other storage engines/MRR implementations to pass information to EXPLAIN output about the properties of employed MRR scans.
Revision #2958.1.2 Thu 2011-03-31 16:26:51 +0300
Fixed all BUILD scripts to use g++ instead of gcc for linking
Fixed memory leak from HEAP tables that was not deleted properly
Revision #2958.1.1 Wed 2011-03-30 12:15:58 +0300
Fixes to get more information about random bind failure in pushbuild for windows hosts.
Analysis:
There are two code paths through which JOIN::exec may produce an all-NULL row for an empty result set. One goes via the function return_zero_rows(), when query processing detectes early that the where clause is false, the other one is via do_select() in the case of join execution.
In the case of do_select(), the problem was that the executioner didn't set TABLE::null_row to 1. As result when sending the only result row, the evaluation of each field didn't detect that all non-aggregated fields are NULL, because Field::is_null returned true, after checking that field->table->null_row was false.
Given that the each non-aggregated field was not considered NULL, select_result::send_data sent whatever was in the buffer of each field. However, since there was no actual data in the field buffer, send_data() accessed and sent whatever junk was in the field's data buffer.
Solution:
Similar to the analogous case in return_zero_rows() mark all tables that their current row is NULL before sending the artificailly created NULL row.
Address review feedback: introduce NO_REF_PART symbolic name, better comments
Revision #2932.1.1 Sat 2011-03-05 12:56:22 +0300
Bug #727667 Wrong result with OR + NOT NULL in maria-5.3
put the code that sets HA_NULL_PART bit back
Fix test_if_ref/part_of_refkey() so that
NULL-ability of lookup columns does not prevent the equality from being removed (we now have early/late NULLs filtering which will filter out NULL values)
equality is not removed if it is ref_or_null access, and the value of the lookup column can alternate between the lookup value and NULL.
The cause of the many wrong results was that if a field is declared as non-nullable (e.g. because it is a PK or NOT NULL), the semantic analysis and the optimization phases treat this field as non-nullable, and generate all related query plan elements based on this assumption.
Later during execution, these incorrectly configured/generated query plan elements result in a wrong result because the selected fields are not null due to the not-null assumption during optimization.
Solution:
Detect before the context analysys phase that a query uses implicit grouping with mixed aggregates/non-aggregates, and set all fields as nullable. The parser already walks the SELECT clause, and already sets Item::with_sum_func for Items that reference aggreagate functions. The patch adds a symmetric Item::with_field so that all Items that reference an Item_field are marked during their construction at parse time in the same way as with aggregate function use.
To fix this problem for any ROWID field of materialized derived table the procedure that copies fields from record buffers into the employed join buffer first checks whether the value of TABLE::file::ref has been set for the table, and if it's not so the procedure sets this value.
Solution:
Transform the assert into a condition, and if the outer query has no tables assume that there will be at most one subquery execution.
There is potentially a better solution by reengineering the EXPLAIN/optimize code, so that subquery optimization is not done if not needed. Such a solution would be a lot bigger and more complex than a bug fix.
Revision #3061.1.4 Mon 2011-06-27 19:30:05 +0300
Added mytop to distribution (with some small trivial changes to make it workg good also for MariaDB)
Revision #3061.1.3 Mon 2011-06-27 19:07:24 +0300
New status variables: Rows_tmp_read, Handler_tmp_update and Handler_tmp_write Split status variable Rows_read to Rows_read and Rows_tmp_read so that one can see how much real data is read. Same was done with Handler_update and Handler_write. Fixed bug in MEMORY tables where some variables was counted twice. Added new internal handler call 'ha_close()' to have one place to gather statistics. Fixed bug where thd->open_options was set to wrong value when doing admin_recreate_table()
Revision #3061.1.2 Mon 2011-06-27 12:51:13 +0300
Updated version tag to beta
Revision #3061.1.1 [merge] Mon 2011-06-27 12:48:53 +0300
Automatic merge
Revision #3039.1.2 Mon 2011-06-27 12:45:03 +0300
Added reading of client-server my.cnf tag
Mon 2011-06-13 14:07:44 +0300
Added test case to show that we get a warning from CHECK TABLE if we force auto_increment value to 0
These could cause crashes or memory overwrite.
The patch for Bug #717577 and Bug #724942 has missed to make adjustments for the call item_equal->add_const(const_item, orig_field_item) in the function check_simple_equality that builds multiple equality for a field and a constant. As a result, when this field happens to be a view field and the corresponding Item_field object F is wrapped in an Item_direct_view_ref object R the object F is placed in the multiple equality instead of the object R. A substitution of an equal item for F potentially can cause very serious problems and in some cases can lead to crashes of the server.
Added regression test with queries over the WORLD database.
Discovered and fixed several bugs in the related cost calculation functionality both in the semijoin and non-semijon subquery code.
Added DBUG printing of the cost variables used to decide between IN-EXISTS and MATERIALIZATION.
The function generate_derived_keys did not take into account the fact that the last element in the array of keyuses could be just a barrier element. In some cases it could lead to a crash of the server.
Also fixed a couple of other bugs in generate_derived_keys: the inner loop in the body of if this function did not change the cycle variables properly.
Revision #3025.1.4 Thu 2011-06-09 00:13:00 -0700
Fixed Bug #794038. INSERT/UPDATE/DELETE statement that used a temptable view v1 could lead to a crash if v1 was defined as a select from a mergeable view v2 that selected rows from a temptable view v3.
When INSERT/UPDATE/DELETE uses a view that is not updatable then field translation for the view should be created before the prepare phase.
Revision #3025.1.3 Mon 2011-06-06 12:19:35 -0700
Fixed Bug #793436
When looking for the execution plan of a derived table to be materialized JOIN::optimize finds out that all joined tables of the derived table contain not more than one row then the derived table should be maretialized at the optimization stage.
Added a test case for the bug.
Adjusted results in other test cases.
Revision #3025.1.2 Sun 2011-06-05 21:54:25 -0700
Added two new flags for the optimizer switch:
'derived_merge':
if the flag is off then all derived tables are materialized
if the flag is on then mergeable derived tables are merged
'derived_with_keys':
if the flag is off then no keys are created for derived tables
if the flag is on then for any derived table a key to access the derived table may be created.
Now by default both flags are on. Later the default values for the flags will be off to comply with the current behaviour of mysql-5.1.
Uncommented previously commented out test case from parts.partition_repair_myisam after having added an explicit requirement to materialize the derived table used in the test case.
Revision #3025.1.1 [merge] Sat 2011-06-04 19:56:06 -0700
Fix by explicitly killing the old dump thread if it is still around.
Revision #3027.1.5 Fri 2011-06-10 15:42:55 +0200
various fixes for buildbot failures
Revision #3027.1.4 Fri 2011-06-10 10:14:20 +0200
change test_if_equality_guarantees_uniqueness() from an ad hoc set of limitations to a correct rule
Revision #3027.1.3 Thu 2011-06-09 18:06:29 +0200
small optimization in Field_time_hires.
Fix Field_time_hires::reset()
Revision #3027.1.2 Thu 2011-06-09 17:23:39 +0200
bugfixes:
microsecond(TIME)
alter table datetime<->datetime(6)
max(TIME), mix(TIME)
Revision #3027.1.1 [merge] Tue 2011-06-07 18:13:02 +0200
merge with 5.1-micro
Revision #2502.1147.48 Mon 2011-06-06 20:28:15 +0200
revert a suggested "optimization" that introduced a bug
compilation error in mysys/my_getsystime.c fixed
some redundant code removed
sec_to_time, time_to_sec, from_unixtime, unix_timestamp, @@timestamp now use decimal, not double for numbers with a fractional part.
purge_master_logs_before_date() fixed
many bugs in corner cases fixed
Thu 2011-05-26 19:16:10 +0200
innodb compatibility fix
Thu 2011-05-26 18:11:26 +0200
fix for double or decimal to datetime conversion
Corrected the code from the patch for Bug #702322.
Don't attempt to construct FirstMatch access method if we've just figured three lines above that it can't be used (because join prefix doesn't have the needed tables), and so have set pos->first_firstmatch_table= MAX_TABLES
Attempts to analyze join->positions[MAX_TABLES] caused valgrind warnings
There is a potential race when we stop the slave. It may take some time for the master to detect that the slave connection is closed (eg. if scheduling delays the TCP RSET packet or whatever). Since we inject only a single corrupt binlog event, we may be unfortunate enough to inject it on the wrong connection, to a slave io thread that's already stopped.
Fix by waiting for the old dump thread on the master to go away before injecting the corrupt event.
Revision #3006.1.3 [merge] Sat 2011-05-28 05:17:24 +0300
automatic merge with 5.2
Revision #3006.1.2 [merge] Sat 2011-05-28 05:11:32 +0300
Merge with 5.1-microseconds
A lot of small fixes and new test cases.
Revision #3006.1.1 Mon 2011-05-23 15:14:54 +0300
Fixed errors found in buildbot
Revision #2991.1.2 Wed 2011-05-18 01:23:22 +0300
Revision #2991.1.1 [merge] Tue 2011-05-17 14:56:02 +0300
MWL#89 - automatic merge with 5.3
in advance_sj_state(), remember join->cur_dups_producing_tables in pos->prefix_dups_producing_tables before we modify it, so that restore_prev_sj_state() restores cur_dups_producing_tables in all cases.
Updated test results in subselect_sj2[_jcl6].result (the original EXPLAIN was invalid there)
Fixed a bug in the template function that sorts the elements of a list using the bubble sort algorithm. The bug caused poor performance of the function. Also added an optimization that skips comparison with the most heavy elements that has been already properly placed in the list.
Made the comparison of the fields belonging to the same Item_equal more granular: fields belonging to the same table are also ordered according to some rules.
An assertion failure was triggered for a 6-way join query that used two join buffers.
The failure happened because every call of JOIN_CACHE::join_matching_records saved and restored status of all tables that were accessed before the table join_tab. It must do it only for those of them that follow the last table using a join buffer.
Revision #2869.2.4 Fri 2011-01-14 00:15:44 +0300
Testcase Backport: MySQL Bug #48093: 6.0 Server not processing equivalent IN clauses properly
Revision #2869.2.3 Thu 2011-01-13 23:47:15 +0300
Backport testcase for:
mybug #45092: join buffer contains two blob columns one of which is used in the key employed to access the joined table
Revision #2869.2.2 Thu 2011-01-13 19:25:31 +0300
Backport of (see below) + temporary measures to make SJ-Materialization work with join buffering. *
Date: Mon, 01 Nov 2010 15:15:25 -0000<>
3272 Roy Lyseng 2010-11-01
: Optimizer generates invalid semijoin materialization plan
When MaterializeScan semijoin strategy was used and there were one or more outer dependent tables before the semijoin tables, the scan over the materialized table was not properly reset for each row of the prefix outer tables.
Example: suppose we have a join order:
ot1 SJ-Mat-Scan(it2 it3) ot4
Notice that this is called a MaterializeScan, even though there is an outer table ahead of the materialized tables. Usually a MaterializeScan has the outer tables after the materialized table, but this is a special (but legal) case with outer dependent tables both before and after the materialized table.
For each qualifying row from ot1, a new scan over the materialized table must be set up. The code failed to do that, so all scans after the first one returned zero rows from the materialized table.
Revision #2869.2.1 Sat 2010-12-25 16:23:16 +0300 MySQL Bug #46680: Assertion failed in file item_subselect.cc, line 305 crashing on HAVING subquery
Revision #2870.1.2 [merge] Tue 2010-12-28 12:25:33 -0800
Merge
Revision #2870.1.1 [merge] Mon 2010-12-27 14:22:05 -0800
Merge
In some cases the function make_cond_for_index() was mistaken when detecting index only pushdown conditions for a table: a pushdown condition that was not index only could be marked as such.
It happened because the procedure erroneously used the markers for index only conditions that remained from the calls of this function that extracted the index conditions for other tables.
Fixed by erasing index only markers as soon as they are need anymore.
Bug #670417: Diverging results in maria-5.3-mwl128-dsmrr-cpk with join buffer
Fixes for the second fix: take into account case where we don't need to save/restore the scan.
Revision #2866.1.9 Sun 2010-12-19 13:56:12 +0300
Bug #670417: Diverging results in maria-5.3-mwl128-dsmrr-cpk with join buffer
Switch from "Disable identical key handling optimization when
IndexConditionPushdown is used" approach
To
an approach where we save/restore index tuple and so can use index condition pushdown.
Revision #2866.1.8 Fri 2010-12-17 14:58:08 +0300
Fix a compiler warning on sparc32
Revision #2866.1.7 Fri 2010-12-17 13:06:21 +0300
Small code cleanups
Revision #2866.1.6 Thu 2010-12-16 23:43:52 +0300
Better comments
Revision #2866.1.5 Thu 2010-12-16 23:37:26 +0300
MWL#121-125 DS-MRR improvements
Address Monty's review feedback, portion 3
Revision #2866.1.4 Thu 2010-12-16 21:18:35 +0300
MWL#121-125 DS-MRR improvements
Address Monty's review feedback, portion 2
Revision #2866.1.3 Wed 2010-12-15 10:45:08 +0300
Fix compiler warning
Better warnings
Revision #2866.1.2 Mon 2010-12-13 20:01:32 +0300
MWL#121-125 DS-MRR improvements
Address review feedback: change return type of RANGE_SEQ_IF::next()
Revision #2866.1.1 [merge] Mon 2010-12-13 13:42:40 +0300
Merge DS-MRR/CPK improvements into 5.3-main
Item_subselect::print() -> subselect_single_select_engine::print() -> st_select_lex::print()
It was Item_subselect::fix_fields() that set the thd by calling set_thd(), so when this print() was called before fix_fields(), subselect_engine::thd was NULL.
Solution:
The patch makes all constructors of all subselect_engine classes to take a THD parameter. The default subselect_single_select_engine engine is created early during parse time, in the Item_subselect::init call, so we pass the correct THD object already at this point.
Revision #2850.1.10 Fri 2010-11-19 07:38:02 -0800
Fixed Bug #675922.
The bug happened when BKA join algorithm used an incremental buffer and some of the fields over which access keys were constructed
were allocated in the previous join buffers
were non-nullable
belonged to inner tables of outer joins.
For such fields an offset to the field value in the record is saved in the postfix of the record, and a zero offset indicates that the value is null. Before the key using the field value is constructed the value is read into the corresponding field of the record buffer and the null bit is set for the field if the offset is 0. However if the field is non-nullable the table->null_row must be set to 1 for null values and to 0 for non-null values to ensure proper reading of the value from the record buffer.
Revision #2850.1.9 Fri 2010-11-19 06:20:28 -0800
Fixed Bug #660963.
The condition that was supposed to check whether a join table is an inner table of a nested outer join or semi-join was not quite correct in the code of the function check_join_cache_usage.
That's why some queries with nested outer joins triggered an assertion failure.
Encapsulated this condition in the new method called JOIN_TAB::is_nested_inner and provided a proper code for it.
Also corrected a bug in the code of check_join_cache_usage() that caused a downgrade of not first join buffers of the level 5 and 7 to level 4 and 6 correspondingly.
Revision #2850.1.8 Mon 2010-11-15 21:07:32 -0800
Fixed Bug #675516.
When pushing the condition for a table in the function JOIN_TAB::make_scan_filter the optimizer must not push conditions from WHERE if the table is some inner table of an outer join..
Revision #2850.1.7 Sun 2010-11-14 23:38:25 -0800
Fixed Bug #675095.
The condition over outer tables extracted from the on expression for a outer join must be ANDed to the condition pushed to the first inner table of this outer join only.
Nested outer joins cannot use flat join buffers. So if join_cache_level is set to 1 then any join algorithm employing join buffers cannot be used for nested outer joins.
Revision #2850.1.6 Sat 2010-11-13 07:47:43 -0800
Fixed Bug #674423.
The patch that introduced the new enumeration type Match_flag for the values of match flags in the records put into join buffers missed the necessary modifications in JOIN_CACHE::set_match_flag_if_none.
This could cause wrong results for outer joins with on expressions only over outer tables.
Revision #2850.1.5 [merge] Sat 2010-11-13 06:35:54 -0800
Merge
Revision #2850.1.4 Fri 2010-11-12 16:53:20 -0800
Corrected the fix for Bug #672551.
Revision #2850.1.3 [merge] Thu 2010-11-11 16:59:08 -0800
Merge
Revision #2850.1.2 [merge] Thu 2010-11-11 16:38:55 -0800
Merge
Revision #2850.1.1 [merge] Wed 2010-11-10 14:34:37 -0800
Merge
This will be fixed when MWL#128 is merged into 5.3.
Fix MySQL Bug #52344 - Subquery materialization: Assertion if subquery in on-clause of outer join
Original fix and comments from Oysten, adjusted for the different subquery optimization in MariaDB.
Problem: If tables of an outer join are constant tables, the associated on-clause will be evaluated in the optimization phase. If the on-clause contains a query that is to be executed with subquery materialization, this will not work since the infrastructure for such execution is not yet set up.
Solution: Do not evaluate on-clause in optimization phase if is_expensive() returns true for this clause. This is how the problem is currently avoided for where-clauses. This works because, Item_in_subselect::is_expensive_processor returns true if query is to be executed with subquery materialization.
In addition, after MWL#89, in MariaDB if the IN-EXISTS strategy is chosen, the in-to-exists predicates are insterted after join_read_const_table() is called, resulting in evaluation of the subquery without the in-to-exists predicates.
Changed Cached_item_field not copy data for fields with NULL value
In key_copy() and key_restore() don't copy data for fields with NULL value
Fixed code to avoid valgrind warnings
Use c_ptr_safe instead of c_ptr()
Removed "QQ" from comments (QQ was ment to be used for internal comments that should be removed before pushing) Fixed wrong alias used (from previous patch)
Revision #2851.1.3 [merge] Sat 2010-11-27 17:23:48 +0200
Automatic merge with 5.3 (support of BIT keys in heap)
Revision #2851.1.2 Wed 2010-11-24 00:08:48 +0200
Code cleanup to get fewer reallocs() during execution.
Changed TABLE->alias to String to get fewer reallocs when alias are used.
Preallocate some buffers
Changed some String->c_ptr() -> String->ptr() when \0 is not needed.
Fixed wrong usage of String->ptr() when we need a \0 terminated string.
Use my_strtod() instead of my_atof() to avoid having to add \0 to string.
c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
zr
Revision #2851.1.1 [merge] Tue 2010-11-16 19:52:44 +0200
Merge to get make String reallocation faster
Solution:
Try to insert each row into the materialized temp table before collecting statistics, and if the insertion results in a duplicate row, do not count the current row.
Make optimize_wo_join_buffering() handle cases where position->records_read=0 (this happens for outer joins that have constant tables inside them). The number of 0 is not correct (should be 1 because outer join will produce at least a NULL-complemented record) but for now we just make it work with incorrect number.
The pushdown condition for the sorted table in a query can be complemented by the conditions from HAVING. This transformation is done in JOIN::exec pretty late after the original pushdown condition have been saved in the field pre_idx_push_select_cond for the sorted table. So this field must be updated after the inclusion of the condition from HAVING.
Revision #2838.1.1 Tue 2010-11-02 10:07:46 -0700
Fixed Bug #669420.
This bug in the MRR code for Maria engine caused wrong results when MRR was used to scan ranges for each record.
Added test cases for Bug #669420 and Bug #669423 (as a duplicate of Bug #669420).
Revision #2837.1.1 [merge] Tue 2010-11-02 10:12:29 +0100
merge w/ 5.2
mysql_parse calls JOIN::exec for the derived table as if it is regular execution (not explain).
When materialization is ON, this call goes all the way to subselect_hash_sj_engine::exec, which creates a partial match engine because of NULL presence.
In order to proceed with normal execution, the hash_sj engine substitutes itself with the created partial match engine.
After the parse phase it turns out that this execution was part of EXPLAIN EXTENDED, which in turn calls Item_cond::print -> ... -> Item_subselect::print, which calls engine->print(). Since subselect_hash_sj_engine::exec substituted the current Item_subselect engine with a partial match engine, eventually we call its ::print() method. However the partial match engines are designed only for execution, hence there is no implementation of this print() method.
The fix temporarily removes the assert, until this code is merged with MWL#106.
Download |Release Notes |Changelog |Overview of 5.3
Release date: 15 Feb 2012
For the highlights of this release, see the release notes.
The revision number links will take you to the revision's page on Launchpad. On Launchpad you can view more details of the revision and view diffs of the code modified in that revision.
Revision #3421 Tue 2012-02-14 16:52:56 +0200
Fix for causes 1093 error on Drupal
Problem was that now we can merge derived table (subquery in the FROM clause).
Fix: in case of detected conflict and presence of derived table "over" the table which cased the conflict - try materialization strategy.
Tue 2012-02-14 16:04:06 +0400
Review and push crashsafe GIS keys.
tests for RTree keys recovery.
[merge] Tue 2012-02-14 14:13:10 +0400
Merge fix for
Tue 2012-02-14 13:58:57 +0400
: Query containing IN subquery with OR in the where clause returns a wrong result
Mon 2012-02-13 23:46:57 -0800
Fixed .
If the flag 'optimize_join_buffer_size' is set to 'off' and the value of the system variable 'join_buffer_size' is greater than the value of the system variable 'join_buffer_space_limit' than no join cache can be employed to join tables of the executed query.
A bug in the function JOIN_CACHE::alloc_buffer allowed to use join buffer even in this case while another bug in the function revise_cache_usage could cause a crash of the server in this case if the chosen execution plan for the query contained outer join or semi-join operation.
Mon 2012-02-13 17:14:10 +0100
When we fail during slave thread initialisation, keep mi->run_lock locked until we have finished clean up.
Previously, the code released the lock without marking that the thread was running. This allowed a new slave thread to start while the old one was still in the middle of cleaning up, causing assertions and probably general mayhem.
[merge] Sun 2012-02-12 23:03:36 +0100
merge
Sun 2012-02-12 23:02:56 +0100
Use newly released HeidiSQL 7.0 in the MSI installer
[merge] Sat 2012-02-11 15:00:15 +0100
merge
[merge] Sat 2012-02-11 14:57:44 +0100
Fix for , - broken SSL connectivity for some connectors
[merge] Fri 2012-02-10 22:09:57 +0100
Merge fix for : Race condition in kill_threads_for_user().
[merge] Fri 2012-02-10 21:20:32 +0100
Merge fix for : Race condition in kill_threads_for_user().
[merge] Fri 2012-02-10 22:56:34 +0200
Automatic merge
Fri 2012-02-10 22:53:46 +0200
Fixed that prepared statements are properly igored (if possible) by query cache.
Thu 2012-02-09 23:35:26 +0200
Test case for
The bug itself is fixed by the patch for
Fri 2012-02-03 12:49:17 -0800
Made mrr related counters temporarily invisible until we agree upon their names.
Fri 2012-02-03 16:56:12 +0200
Fixed typos in Query Cache.
[merge] Fri 2012-02-03 13:32:29 +0200
Merge with 5.2
Fri 2012-02-03 12:24:55 +0200
Fixed DELETE issues of view over view over table.
Fri 2012-02-03 13:01:05 +0200
Moving to 5.3 + fixing INSERT of multi-table view.
Fri 2012-02-03 00:46:34 -0800
Back-ported the fix for bug #12831587 from mysql-5.6 code line.
The comment for the fix commit says:
Due to the changes required by ICP we first copy a row from the InnoDB format to the MySQL row buffer and then copy it to the pre-fetch queue. This was done for the non-ICP code path too. This change removes the double copy for the latter.
Thu 2012-02-02 22:22:27 -0800
Applied the patch from mysql-5.6 code line that fixed a significant performance drop for high concurrency bechmarks (bug #11765850
).
Here's the comment of the patch commit:
The bug is that the InnoDB pre-fetch cache was not being used in row_search_for_mysql(). Secondly the changeset that planted the bug also introduced some inefficient code. It would read an extra row, convert it to MySQL row format (for ICP==off), copy the row to the pre-fetch cache row buffer, then check for cache overflow and dequeue the row that was pushed if there was a possibility of a cache overflow.
[merge] Wed 2012-02-01 17:48:45 -0800
Merge.
[merge] Wed 2012-02-01 15:48:02 -0800
Merge 5.2->5.3 in preparation for the release of mariadb-5.3.4-rc.
Wed 2012-02-01 17:09:49 +0200
fix for
Problem was in try to check/use Item_direct_ref of derived view when we have to use real Item_field under it.
Tue 2012-01-31 21:12:26 +0100
sort status variables alphabetically in mysqld.cc
Mon 2012-01-30 20:34:47 +0400
: Loosescan reports different result than other semijoin methods
If LooseScan is used with quick select, require that quick select produces data in key order (this disables use of MRR, which can return data in arbitrary order).
[merge] Mon 2012-01-30 17:38:14 +0400
Merge fix for
Fri 2012-01-27 17:35:26 +0400
: Assertion `0' failed at item_cmpfunc.cc:5899: Item* Item_equal::get_first(JOIN_TAB*, Item*)
Sat 2012-01-28 01:12:45 -0800
Fixed
Applied the fix for bug #12546542 from the mysql-5.6 code line:
JOIN_CACHE::join_records forgot to reset JOIN_TAB::first_unmatched in some cases.
[merge] Fri 2012-01-27 19:23:08 -0800
Merge.
Fri 2012-01-27 19:01:26 -0800
Back-ported test cases for of mysql-5.6 code line. The bug could not be reproduced in the latest release of mariadb-5.3 as it was fixed by Sergey Petrunia when working on the problems concerning outer joins within in subqueries converted to semi-joins.
Fri 2012-01-27 17:51:40 +0400
Make testcase stable by adding --sorted_result for SHOW STATUS commands.
Thu 2012-01-26 14:20:34 +0400
Fix compile failure when built without query cache:
define QUERY_CACHE_DB_LENGTH_SIZE 0, just like it is done
with QUERY_CACHE_FLAGS_SIZE.
Thu 2012-01-26 12:22:02 +0400
Sort counters by name (will this make them show in the same order on all platforms?)
Wed 2012-01-25 22:05:20 +0400
: Wrong result (missing rows) with firstmatch+BNL, IN subquery, ...
Disable use of join cache when we're using FirstMatch strategy, and the join order is such that subquery's inner tables are interleaved with outer. Join buffering code is incapable of handling such join orders.
The testcase requires use of @@debug_optimizer_prefer_join_prefix to hit the bug, but I'm pushing it anyway (including the mention of the variable in .test file), so that it can be found and enabled when/if we get something comparable in the main tree.
[merge] Wed 2012-01-25 18:36:57 +0400
Merge
Wed 2012-01-25 18:33:57 +0400
: Wrong result (extra rows) with loosescan and IN subquery
Mon 2012-01-23 15:14:13 +0200
Fixed creating limit for exists subquery.
Sun 2012-01-22 12:54:30 -0800
Back-ported test cases for , , , from subquery_sj of mysql-5.6 code line. The bugs could not be reproduced in the latest release of mariadb-5.3 as they were fixed either when the code of subquery optimization was back-ported from mysql-6.0 or later when some other bugs were fixed.
Sat 2012-01-21 20:58:23 -0800
Back-ported test cases for , , , from subquery_sj of mysql-5.6 code line. The bugs could not be reproduced in the latest release of mariadb-5.3 as they were fixed either when the code of subquery optimization was back-ported from mysql-6.0 or later when some other bugs were fixed.
Fri 2012-01-20 02:11:53 +0400
: Wrong result (missing rows) with join_cache_hashed+materialization+semijoin=on
equality substitution code was geared towards processing WHERE/ON clauses. that is, it assumed that it was doing substitions on the code that
wasn't attached to any particular join_tab yet
Thu 2012-01-19 23:44:43 +0400
: Wrong result (missing rows) with semijoin=on, firstmatch=on, ...
setup_semijoin_dups_elimination() would incorrectly set join_tab->do_firstmatch when the join order had outer tables interleaved with inner.
Thu 2012-01-19 13:46:59 +0100
Fix compiler warning on Windows.
[merge] Wed 2012-01-18 15:28:13 -0800
Merge
[merge] Wed 2012-01-18 14:19:28 -0800
Merge
Wed 2012-01-18 14:52:56 +0100
multi-delete should ignore semi-join internal temp tables, when looking for tables to delete from
[merge] Wed 2012-01-18 14:52:38 +0100
more problems found by PVS Studio
[merge] Mon 2011-11-14 00:21:22 +0100
5.2->5.3 merge
Wed 2012-01-18 12:53:50 +0200
Adjust test results after Monty's push of the new handler counter Handler_read_rnd_deleted.
Tue 2012-01-17 15:16:00 +0200
Removed unused code merged from 5.2. In 5.3 we fix this problem by checking if we put max/min group function without GROUP BY artificially in case of MODE_ONLY_FULL_GROUP_BY sql mode.
Fri 2012-01-13 14:35:49 +0200
Added Handler_read_rnd_deleted, number of deleted rows found with ha_read_rnd_first.
Wed 2012-01-11 10:35:16 +0200
Fix the comment.
Tue 2012-01-10 23:26:00 +0200
Fix for Wrong result with subquery in select list, EXISTS, constant MyISAM/Aria table.
Problem: When building the condition for JOIN::outer_ref_cond the optimizer forgot to take into account that this condition could depend on constant tables as well.
[merge] Tue 2012-01-10 18:20:56 +0400
Merge fix for
Sun 2012-01-08 14:43:14 +0400
: Crash in do_copy_not_null with semijoin=ON, firstmatch=ON, aggregate ...
Mon 2012-01-09 13:49:47 +0200
Fixed that --sorted-result in mysql-test-run also works for exec
Sun 2012-01-08 21:14:07 +0100
- possible deadlock in XtraDB async io subsystem on Windows.
Split IO threads into ones that handle only read completion and ones that handle only write completion, as it was originally done, but got lost with "completion port" patch. The reason we need to have dedicated read and dedicated write threads is that read completion routine can block waiting for write io to complete, and in rare cases where all io threads are handling async reads, it can deadlock.
Mon 2012-01-02 20:06:36 -0800
Fixed
The patch for erroneously removed a call of engine->set_thd() from Item_subselect::fix_fields().
Fri 2011-12-30 22:19:05 +0100
Make test results stable.
Fri 2011-12-30 20:22:52 +0100
Update version in configure.in (was forgotten in 5.3.3 release).
Fri 2011-12-30 11:34:29 +0100
Continuation of the efforts in previous cset.
Thu 2011-12-29 22:29:02 +0100
Make test results stable (they weren't, because filesort() used to read from a heap temptable, which uses pointers to records (that is, byte* pointers) as rowids.
This meant that for rows with the same sort key value, the order was determined by memory layout.
Wed 2011-12-28 12:12:48 +0400
Update test results.
[merge] Wed 2011-12-28 03:37:34 +0400
Merge
Tue 2011-12-20 00:55:32 +0400
: Incorrect result with outer join and full text match
Sun 2011-12-25 18:03:03 -0800
Changed a test case from join_cache.test to make it platform independent.
Sat 2011-12-24 08:55:10 -0800
Back-ported the patch of the mysql-5.6 code line that fixed several defects in the greedy optimization:
The greedy optimizer calculated the 'compare-cost' (CPU-cost) for iterating over the partial plan result at each level in the query plan as 'record_count / (double) TIME_FOR_COMPARE'
This cost was only used locally for 'best' calculation at each level, and not accumulated into the total cost for the query plan.
This fix added the 'CPU-cost' of processing 'current_record_count' records at each level to 'current_read_time' before it is used as 'accumulated cost' argument to recursive best_extension_by_limited_search() calls. This ensured that the cost of a huge join-fanout early in the QEP was correctly reflected in the cost of the final QEP.
To get identical cost for a 'best' optimized query and a straight_join with the same join order, the same change was also applied to optimize_straight_join() and get_partial_join_cost() 1. Furthermore to get equal cost for 'best' optimized query and a straight_join the new code substrcated the same '0.001' in optimize_straight_join() as it had been already done in best_extension_by_limited_search() 1. When best_extension_by_limited_search() aggregated the 'best' plan a plan was 'best' by the check :
'if ((search_depth == 1) || (current_read_time < join->best_read))'
The term '(search_depth == 1' incorrectly caused a new best plan to be collected whenever the specified 'search_depth' was reached - even if this partial query plan was more expensive than what we had already found.
Download |Release Notes |Changelog (page:123 4 56 ) |Overview of 5.3
Release date: 26 July 2011
Revision #2945 [merge] Tue 2011-03-15 12:30:48 -0700
Merge.
Thu 2011-03-03 18:24:41 -0800
Fixed : The bug was a result of the fix for that turned out to be not quite correct. A problem appeared with HAVING conditions containing more than one predicate. If a query with an ORDER BY clause uses such HAVING condition and the required order can be obtained with a range/index scan then the HAVING condition has to be pushed into two different formulas (items). To be able to do it we have to create a copy of the ANDOR structure of the pushed condition.
[merge] Sun 2011-03-13 16:57:05 +0000
Merge in the fix for , and a corrected fix for , after Monty's review.
Sun 2011-03-13 15:03:26 +0000
Fix ,
[merge] Sun 2011-03-13 03:50:14 -0700
Merge
Mon 2011-03-07 22:09:21 -0800
Fixed : If join condition is of the form <t2.key>=<t1.no_key> then the server performs no index look-ups when looking for matching rows of t2 for the rows from t1 with t1.no_key=NULL. It happens because the function add_not_null_conds() injects an additional condition of the form IS NOT NULL(<t1.no_key>) into the WHERE condition. However if the join condition was of the form <t.key>=<outer_ref> no additional null rejecting predicate was generated. This could lead to extra records in the result set if the value of <outer_ref> happened to be NULL.
Sat 2011-03-12 16:18:02 +0000
Fix wrong use of compiler flag causing the build to fail in handlersocket.
[merge] Sat 2011-03-12 05:14:10 -0800
Merge.
Sat 2011-03-12 00:49:03 -0800
Fixed LP bugs / : Do not reset the value of the item_equal field in the Item_field object once it has been set.
[
merge] Fri 2011-03-11 16:08:26 +0100
merge
[
merge] Fri 2011-03-11 15:47:15 +0100
merge
[merge] Fri 2011-03-11 15:20:24 +0100
merge
Wed 2011-03-09 17:55:00 +0200
Added item.real_type() for easy access to the underlaying types for Item_ref and Item_cache_wrapper() This allows us to simplify and speed up some tests and also remove get_cached_item()
[merge] Wed 2011-03-09 15:47:59 +0200
Merge with 5.2
Wed 2011-03-09 00:51:22 +0200
Added define to get rid of compiler warnings on system without DLOPEN
Tue 2011-03-08 23:23:44 +0200
Fix
Analysis:
The assert failed because the execution code for partial matching is designed with the assumption that NULLs on the left side are detected as early as possible, and a NULL result is returned before any lookups are performed at all.
[merge] Fri 2011-03-04 18:54:30 +0300
Merge in MRR interface fixes.
Fri 2011-03-04 12:06:03 +0300
MRR interface: change range_info's type from char* to range_id_t typedef. The goals are:
Fri 2011-03-04 12:14:46 +0300
Make testcase pass on systems with lower_case_table_names=2.
Generally, we should use only small letters for table names
but here it's easier to fix with one --replace.
[merge] Fri 2011-03-04 01:30:25 +0300
Merge fix for
Wed 2011-03-02 23:08:13 +0300
: Assertion multi_range_read.cc:908: int DsMrr_impl::dsmrr_init
[merge] Fri 2011-03-04 01:28:02 +0300
Merge .
Fri 2011-03-04 00:54:10 +0300
: Wrong result with join_cache_level=6 optimizer_use_mrr = force (incremental, BKA join)
Thu 2011-03-03 23:48:31 +0200
Fix
Analysis:
The reason for the crash was that the inner subquery was executed via a scan on a final temporary table applied after all other operations. This final operation is implemented by changing the contents of the JOIN object of the subquery to represent a table scan over the temp table. At the same time query optimization of the outer subquery required evaluation of the inner subquery, which happened before the actual EXPLAIN. The evaluation left the JOIN object of the inner subquery in the changed state, where it represented a table scan over a temp table, and EXPLAIN crashed because the temp table is not associated with any table reference (TABLE_LIST object). The reason the JOIN was not restored was because its saving/restoration was controlled by the join->select_lex->uncacheable flag, which was not set in the case of materialization.
[merge] Tue 2011-03-01 10:22:22 +0300
Merge fix for
Tue 2011-03-01 00:29:59 +0300
: Crash in JOIN::optimize in maria-5.3
Mon 2011-02-28 17:27:41 -0800
Moved the test case for into a new test file.
Sun 2011-02-27 22:37:46 -0800
Fixed : The bug in the function print_keyuse() caused crashes if hash join could be used. It happened because the function ignored the fact that KEYUSE structures could be created for hash joins as well.
[merge] Sun 2011-02-27 10:14:11 -0800
Merge.
Sun 2011-02-27 09:35:14 -0800
Minor corrections.
[merge] Sun 2011-02-27 00:21:45 -0800
Merge
Thu 2011-02-24 10:36:32 -0800
Made a newly added EXPLAIN platform independent.
Sat 2011-02-26 23:09:58 +0300
Fix buildbot failure in fix of
[merge] Fri 2011-02-25 21:45:21 +0300
Merge of fix for
Fri 2011-02-25 21:43:57 +0300
: Crash in get_constant_key_infix with EXISTS ( SELECT .. DISTINCT )
[merge] Fri 2011-02-25 20:32:18 +0200
automatic merge
Fri 2011-02-25 20:15:27 +0200
Fixed compiler warnings
Thu 2011-02-24 23:32:00 +0300
: innodb_mysql.test fails with --embedded-server
Don't access THD::killed directly from ha_innodb.cc. This is forbidden because THD has different membership (and so, different member offsets) in regular and embedded server. Access must be done through thd_killed() function.
Wed 2011-02-23 14:46:16 +0200
Fixed build issues
Linking now with g++ instead of gcc with 'compile-dist' to solve problems with handlersocket/client
Fixed bug in heap tables when doing handler read next-prev over last row
Wed 2011-02-23 02:06:58 +0200
Fixed compiler warnings and some test failures found by buildbot
[merge] Tue 2011-02-22 11:30:51 +0200
Merge with main
[merge] Tue 2011-02-22 11:15:47 +0200
Merge in new handler and handlersocket code into 5.3 main
Mon 2011-02-21 20:17:26 +0100
:Fixed dependency to prevent occasional situations where bison runs in parallel with the same input and output files
Mon 2011-02-21 14:23:44 +0100
Fix remaining 5.2 buildbot problems:
Cherrypick (PBXT crashes in debug/x64)
Fix unixism (rm -rf) in the test suite_timeout
Sat 2011-02-19 15:21:50 +0100
add newline at the end of file
Sat 2011-02-19 15:16:31 +0100
Fix remaining windows (32 bit) warnings.
Sat 2011-02-19 13:43:01 +0100
Fixed high-impact Windows 64bit warnings (at least 4000 of them)
Sat 2011-02-19 02:42:08 +0100
Fixed DBUG_PRINT formatting (compile error on Linux with -Werror)
Fri 2011-02-18 23:31:01 +0100
Fix numerous warnings introduced in the last pushes on Windows
Fri 2011-02-18 22:38:22 +0100
Linker error, missing extern "C" for mi_killed.
Fix is to move extern "C" at the start of header file.
[merge] Fri 2011-02-18 21:45:32 +0200
Merge with bugfix
Fri 2011-02-18 17:43:59 +0200
Fix for "Index Condition Pushdown can make a thread hold MyISAM locks as well as be unKILLable for long time"
Sat 2011-02-12 18:43:22 +0100
Workaround CMake bug Huge static libraries like libmysqld might not build if /MACHINE flag is missing for librarian with the correct processor architecture.
Fix is to add /MACHINE flag for x64 builds
Sat 2011-02-12 17:44:01 +0100
Fix test suite - adjust result files
Sat 2011-02-12 17:17:19 +0100
Fix : sel_arg_range_seq_next loops in optimized compilation/VS2010
When is compiler with VS2010, several tests would enter infinite loop in sel_arg_range_seq_next(). The reason is compiler backend bug. This bug is not present in either VS2008 or VS2010 SP1 RC.
Workaround is to compile this function without most aggresive optimization flag (-Og ) using #pragma optimize ("g", {on|off}) for this version of MSVC compiler.
Sat 2011-02-12 15:43:24 +0100
Fix Aria engine build
add forgotten source file
[merge] Fri 2011-02-11 13:27:35 +0300
Merge: : "Range checked for each record" is not used if condition refers to outside of subquery
Thu 2011-02-10 11:36:43 +0300
: "Range checked for each record" is not used if condition refers to outside of subquery
[merge] Wed 2011-02-09 11:22:26 -0800
Merge
Fri 2011-02-04 19:06:35 -0800
Introduced optimizer switch flag 'optimize_join_buffer_size'.
Tue 2011-02-08 19:17:12 -0800
Backported test case for .
[merge] Mon 2011-02-07 15:19:03 -0800
Merge
Sat 2011-02-05 20:57:03 -0800
Fixed that caused a crash on the tree for with the test case added by this patch.
Tue 2011-02-01 14:19:58 +0100
Fix compile errors:
declaration in the middle of the block in C file.
round() is only available in C99.
Mon 2011-01-31 19:33:32 -0800
Back-ported the patch for from mysql-5.6 code line.
The patch fixed the following optimizer defect: when performing substitution for best equal fields into where conditions to be able to do their evaluations as soon as possible the optimizer skipped conditions over views. That could lead to suboptimal execution of queries that used views.
Slightly changed the test case to demonstrate the performance improvements if this fix.
[merge] Fri 2011-01-28 18:54:30 -0800
Merge
Mon 2011-01-24 14:54:50 -0800
Post-second-review fixes for the patch that added the code allowing to use hash join over equi-join conditions without supporting indexes.
Thu 2011-01-27 21:23:02 -0800
Fixed .
This bug could manifest itself when hash join over a varchar column with NULL values in some rows was used. It happened because the function key_buf_cmp erroneously returned FALSE when one of the joined key fields was null while the second was not.
Also fixed two other bugs in the functions key_hashnr and key_buf_cmp that could possibly lead to wrong results for some queries that used hash join over several columns with nulls.
Wed 2011-01-26 20:45:23 -0800
Fixed .
This was another bug in the patch for . The new code from this patch did not ensured that substitutions of fields for best equal fields were performed on all AND-OR levels. As a result substitutions for best fields in some predicates that had been used by the range optimizer were not actually performed while range plans could employ these substitutions. This could lead to inconsistent data structures and ultimately to a crash.
Wed 2011-01-26 11:30:29 -0800
Fixed .
The bug was in the code of the patch fixing .
With improper casting the method store_key_field::change_source_field was called for the elements of the array TABLE_REF::key_copy that were either of a different type or not allocated at all. This caused crashes in some queries.
Sat 2011-01-22 23:45:52 -0800
Fixed typo that caused printing 'range' instead of 'index_merge' as the type of sort_intersect scans.
Fri 2011-01-21 09:56:55 +0200
Fix of reverting changes in depend_on list.
Fri 2011-01-14 21:51:55 +0100
issue an informative error message for a common Aria problem when opening a table (incorrect block size)
Fri 2011-01-14 21:02:51 +0100
compilation failures caused by adding new row format to Aria
Fri 2011-01-14 12:05:46 +0100
Optimize use of SEARCH_SAVE_BUFF in Aria (less not-needed copies of key pages)
Fri 2011-01-14 12:03:41 +0100
use bulk insert and repair by sort for unique keys in Aria and MyISAM in create_internal_tmp_table_from_heap()
(safe, as duplicates are impossible).
This gives a HUGE speed boost!
Fri 2011-01-14 11:58:45 +0100
Added ha_write_tmp_row() for slightly faster write_row for internal temp tables.
This will also enable us in the future to collect statistics for writes to internal tmp tables.
Fri 2011-01-14 11:54:39 +0100
Added support for NO_RECORD record format (don't store any row data) for Aria.
This makes the keys smaller (no row pointer) and gives us proper errors if we use the table wrongly.
Fri 2011-01-14 11:43:42 +0100
use normal unique (HA_NOSAME) keys for expression cache temptables, not "uniques", that are hash-based keys.
Fri 2011-01-14 11:37:23 +0100
Added to Aria better hash for packed numeric data for unique handling.
This was needed as the old code caused us to have LOTS of duplicate hash values when used by optimizer.
Fri 2011-01-14 11:34:41 +0100
compare "Copying to tmp table" proc_info as a pointer, not as a string
Fri 2011-01-14 11:31:09 +0100
Removed some old comments.
[merge] Tue 2011-01-18 00:26:04 +0300
Merge 5.3-subquery-bugfixing -> 5.3
Mon 2011-01-17 15:09:30 +0300
Enable testcase for
Changelog — page: 4
add #define WITH_FEEDBACK_PLUGIN
send "startup" message 5 minutes after startup, not immediately
Revision #0.13.2 Mon 2011-10-03 08:43:01 +0200
don't use https url by default, if ssl is not available
Revision #0.13.1 Sat 2011-10-01 21:23:01 +0200
initial checkin
Make equality propagation work correctly when done inside the OR branches
merge] Sat 2012-02-11 15:05:07 +0100
merge
Revision #2643.150.3 Sat 2012-02-11 03:25:49 +0100
fixes bug(s): Bug #930145
A recent change in the server protocol code broke SSL connection for some client libraries.
Protocol documentation (MySQL_Internals_ClientServer_Protocol) says that initial packet sent by client if client wants SSL, consists of client capability flags only (4 bytes or 2 bytes edependent on protocol versionl).
Some clients happen to send more in the initial SSL packet (C client, Python connector), while others (Java, .NET) follow the docs and send only client capability flags.
A change that broke Java client was a newly introduced check that frst client packet has 32 or more bytes. This is generally wrong, if client capability flags contains CLIENT_SSL.
Also, fixed the code such that read max client packet size and charset in the first packet prior to SSL handshake. With SSL, clients do not have to send this info, they can only send client flags.
This is now fixed such that max packet size and charset are not read prior to SSL handshake, in case of SSL they are read from the "complete" client authentication packet after SSL initialization.
Revision #3381.2.1 Fri 2012-02-10 21:19:12 +0100
Bug #910817: Race condition in kill_threads_for_user()
The code was accessing a pointer in a mem_root that might be freed by another concurrent thread. Fix by moving the access to be done while the LOCK_thd_data is held, preventing the memory from being freed too early.
Revision #2732.46.68 Fri 2012-02-03 10:31:30 +0200
Added 5.2 test result delimiter
Revision #2732.46.67 Fri 2012-02-03 10:28:23 +0200
Fix check of view updatability in case of underlying view changes its updatability.
For single table update/insert added deep check of single tables (single_table_updatable()). For multi-table view insert added additional check of target table (check_view_single_update).
Multi-update was correct.
Test suite for all cases added.
Revision #2732.46.66 Mon 2012-01-23 11:43:28 +0100
Revision #2732.46.65 Fri 2012-01-20 23:54:43 -0800
Fixed Bug #919427.
The function subselect_uniquesubquery_engine::copy_ref_key has to take into account that when EXPLAIN is processed the array of store_key object created for any TABLE_REF may contain elements for constant items. These items should be ignored by thefunction.
Revision #2732.46.64 Thu 2012-01-12 20:13:41 +0100
Bug #901693 dialog.c:perform_dialog treats every password prompt as first
Revision #2732.46.63 Thu 2012-01-12 20:13:22 +0100
Bug #893522 more problems found by PVS Studio
Revision #2732.46.62 Thu 2012-01-12 20:12:46 +0100
openpam compatibility
Revision #2732.46.61 Thu 2012-01-12 20:12:14 +0100
fixes for get_password():
on windows: don't hang when there's no console, that is, _getch() returns -1.
on windows: _getch() returns an int, not char. to distinguish between (char)255 and (int)-1
everywhere. isspace(pos[-1]) == ' ' never worked, isspace() returns a boolean, not a char. the never-worked loop was removed to preserve the existing behavior.
Revision #2732.46.60 Fri 2011-12-30 13:57:03 +0100
plugin renamed socket_peercred -> unix_socket.
test added.
Revision #2732.46.59 Thu 2011-12-29 22:52:13 +0100
on windows: don't link all plugins with mysqld, only do it for storage engines.
Revision #2732.46.58 Sat 2012-01-14 00:02:02 -0800
Back-ported the test case for bug #12616253 from mariadb-5.3 that was actually a duplicate of Bug #888456 fixed in mariadb-5.2.
Revision #2732.46.57 Fri 2012-01-13 19:00:50 -0800
Back-ported the fix and the test case for MySQL Bug #50257 from mariadb-5.3 code line.
Adjusted results for a few test cases.
Revision #2732.46.56 Fri 2012-01-13 12:23:19 -0800
Back-ported the test cases for bug #12763207 from mysql-5.6 code line into 5.2
Completed the fix for this bug.
Note: in 5.3 the affected 'if' statement in Item_in_subselect::single_value_transformer() starting with the condition (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY) should be removed altogether. The change from table.cc is not needed either.
This is because in 5.3
min/max transformation for subqueries are done at the optimization phase
evaluation of the expensive subqueries is done at the execution phase.
Added an EXPLAIN EXTENDED to the test case for bug #12329653.
Revision #2732.46.55 Tue 2012-01-10 19:26:47 +0100
MDEV-50 : Fix default compilation comment
Revision #2732.46.54 Tue 2012-01-10 19:23:00 +0100
Fix MDEV-49 : version_compile_machine server variable is 'unknown' for x64 builds
Revision #2732.46.53 Sun 2012-01-08 20:29:05 +0200
Fixed compiler and test failures found by buildbot
Revision #2732.46.52 [merge] Sat 2012-01-07 14:59:03 +0200
Merge
Revision #2732.51.1 Sat 2012-01-07 10:23:46 +0200
Fixed wrong merge
Revision #2732.46.51 Thu 2012-01-05 11:06:52 +0200
Fix of Bug #793589 Wrong result with double ORDER BY Problem was in caching 'eq_ref' dependency between calls of remove_const() for ORDER BY and GROUP BY lists.
Revision #2732.46.50 [merge] Wed 2012-01-04 17:22:06 +0200
Merge with 5.1
Revision #2643.143.68 Thu 2011-12-29 21:55:17 -0800
Fixed Bug #848652.
The cause of this bug was the same as for fixed for 5.3.
Wed 2011-12-21 13:23:15 +0200
Fixes "Server started with skip-aria crashes on an attempt to connect to it"
Revision #2732.46.49 Mon 2012-01-02 23:52:31 +0100
Fix embedded/windows tests- move COND_manager and LOCK_manager to sql_manager.cc, to prevent race condition that results into accessing already destroyed critical section
Revision #2732.46.48 Thu 2011-12-29 15:09:20 -0800
Fixed Bug #806057.
A table expression with a natural join or a USING clause is transformed into an equivalent expression with equi-join ON conditions. If a reference to a virtual column happened to occur only in these generated equi-join conditions then it was not erroneously marked in the TABLE::vcol_set bitmap. This could lead to wrong results for queries containing natural join expressions or USING clauses.
Revision #2732.46.47 Wed 2011-12-28 18:47:01 -0800
Fixed Bug #777654.
The method Item_sum_num::fix_fields() calculated the value of the flag Item_sum_num::maybe_null in some cases incorrectly.
Revision #2732.46.46 Tue 2011-12-27 19:13:53 -0800
Fixed Bug #879860.
The MIN/MAX optimization cannot be applied to a subquery if its WHERE clause contains a conjunctive condition depending on an outer reference.
Revision #2732.46.45 Tue 2011-12-27 13:19:13 -0800
Fixed Bug #904345.
The MIN/MAX optimizer code from the function opt_sum_query erroneously did not take into account conjunctive conditions that did not depend on any table, yet were not identified as constant items. These could be items containing rand() or PS/SP parameters. These items are supposed to be evaluated at the execution phase. That's why if such conditions can be extracted from the WHERE condition the MIN/MAX optimization is not applied as currently it is always done at the optimization phase.
(In 5.3 expensive subqueries are also evaluated only at the execution phase. So, if a constant condition with such subquery can be extracted from the WHERE clause the MIN/MAX optimization should not be applied in 5.3.)
IF an IN/ALL/SOME predicate with a constant left part is transformed into an EXISTS subquery the resulting subquery should not be considered uncacheable if the right part of the predicate is not uncacheable.
Backported the function dbug_print_item() from 5.3. The function is used only for debugging.
Revision #2732.46.44 [merge] Fri 2011-12-23 15:02:57 +0100
merge
Revision #2732.50.1 Thu 2011-12-22 15:50:33 +0100
Bug #906638 : Fixes to build oqgraph with boost 1.48
dijkstra_shortest_paths() needs a Graph as first parameter, in case of reverse_graph we now need to use its m_g member
use boost::tuples::tie() on all places where <<code.>tie()<</code>> was used . Reason -
fix the build with Visual Studio 10 SP1 (which includes std:tr1:tie, thus creating ambiguity)
Revision #2732.46.43 Thu 2011-12-22 11:07:04 +0100
compilation warning - unused variable
Revision #2732.46.42 Wed 2011-12-21 12:45:53 +0200
Supression condition made wider to cover some other system cases.
Revision #2732.46.41 Tue 2011-12-20 01:56:41 -0800
Fixed Bug #794005
The function st_table::mark_virtual_columns_for_write() did not take into account the fact that for any table the value of st_table::vfield is 0 when there are no virtual columns in the table definition.
Revision #2732.46.40 Mon 2011-12-19 14:55:30 -0800
Fixed Bug #906322
If the sorted table belongs to a dependent subquery then the function create_sort_index() should not clear TABLE:: select and TABLE::select for this table after the sort of the table has been performed, because these members are needed for the second execution of the subquery.
Fixed Item* Item_equal::get_first(JOIN_TAB *context, Item *field_item) to work correctly in the case where:
context!= NO_PARTICULAR_TAB, it points to a table within SJ-Materialization nest
field_item points to an item_equal that has a constant Item_field but does not have any fields from tables that are within semi-join nests.
The problem was that LooseScan execution code assumed that tab->key holds the index used for looseScan. This is only true when range or full index scan are used. In case of ref access, the index is in tab->ref.key (and tab->index==0 which explains how LooseScan passed tests with ref access: they used one index)
Fixed by setting/using loosescan_key, which always the correct index#.
Revision #3390.1.2 Wed 2012-01-25 18:27:34 +0400
Update handler status variables after the last commit.
Revision #3390.1.1 Mon 2012-01-23 23:35:52 +0400
Add MRR counters: Handler_mrr_init, Handler_mrr_extra_rowid_sorts, Handler_mrr_extra_key_sorts.
was going to be fed to make_join_select() which would take the condition apart and attach various parts of it to tables inside/outside semi-joins.
However, somebody added equality substition for ref access. That is, if we have a ref access on TBL.key=expr, they would do equality substition in 'expr'. This possibility wasn't accounted for.
Fixed equality substition code by adding a mode that does equality substition under assumption that the processed expression will be attached to a certain particular table TBL.
Revision #3381.1.1 Wed 2012-01-18 03:31:20 -0800
Fixed Bug #917990.
If the expression for a derived table of a query contained a LIMIT clause the estimate of the number of rows in this derived table returned by the EXPLAIN command could be badly off since the optimizer ignored the limit number from the LIMIT clause when getting the estimate.
The call of the method SELECT_LEX_UNIT->set_limit added in the code of mysql_derived_optimize() will be needed also in maria-5.5 where parameters in the LIMIT clause are supported.
Create/use do_copy_nullable_row_to_notnull() function for ref access, which is used when copying from not-NULL field in table that can be NULL-complemented to not-NULL field.
The problem was that const-table-reading code would try to evaluate MATCH() before init_ftfuncs() was called.
Fixed by making MATCH function "expensive" so that nobody tries to evaluate it at optimization phase.
Analysis ( Bug #719198 ):
The assert failed because the execution code for partial matching is designed with the assumption that NULLs on the left side are detected as early as possible, and a NULL result is returned before any lookups are performed at all.
However, in the case of an Item_cache object on the left side, null was not detected properly, because detection was done via Item::is_null(), which is not implemented at all for Item_cache, and resolved to the default Item::is_null() which always returns FALSE.
Solution:
Imlpement Item::is_null().
Analysis ( Bug #730604 ):
The method Item_field::is_null() determines if an item is NULL from its Item_field::field object. However, for Item_fields that represent internal temporary tables, Item_field::field represents the field of the original table that was the source for the temporary table (in this case t1.f3). Both in the committed test case, and in the original bug report the current value of t1.f3 is not NULL. This results in an incorrect count of NULLs for this column. As a consequence, all related Ordered_key buffers are allocated with incorrect sizes. Depending on the exact query and data, these incorrect sizes result in various crashes or failed asserts.
Solution:
The correct value of the current field of the internal temp table is in Item_field::result_field. This value is determined by Item::is_null_result().
The new code injects null rejecting predicates of the form IS NOT NULL(<outer_ref>) and evaluates them before the first row the subquery is constructed.
However, in the case of an Item_cache object on the left side, null was not detected properly, because detection was done via Item::is_null(), which is not implemented at all for Item_cache, and resolved to the default Item::is_null() which always returns FALSE.
Solution:
Use the property Item::null_value instead of is_null(), which is properly updated for Item_cache objects as well.
cleaner code
ability to change from using pointers to offsets at some point
Make DsMrr_impl::dsmrr_init() handle the case of
1st MRR scan using DS-MRR strategy (i.e. doing key sorting and rowid sorting)
2nd MRR scan getting a buffer that's too small to fit one key element and one rowid element, and so falling back to default MRR implementation
In this case, dsmrr_init() is invoked with {primary_handler, secondary_handler} initialized for DS-MRR scan and have to reset them to be initialized for the default MRR scan.
(attempt 2, with simplified testcase)
The problem was that Mrr_ordered_index_reader's interrupt_read() and resume_read() would save and restore 1) index tuple 2) the rowid (as bytes returned by handler->position()). Clustered primary key columns were not saved/restored.
They are not explicitly present in the index tuple (i.e. table->key_info[secondary_key].key_parts doesn't list them), but they are actually there, in particular table->field[clustered_primary_key_member].part_of_key(secondary_key) == 1. Index condition pushdown code [correctly] uses the latter as inidication that pushed index condition can refer to clustered PK members.
The fix was to make interrupt_read()/resume_read() to save/restore clustered primary key members as well, so that we get correct values for them when evaluating pushed index condition.
[3rd attempt: remove the debugging aids, fix comments in testcase]
Solution:
In the methods Item_in_subselect::[single | row]_value_transformer() set: select_lex->uncacheable|= UNCACHEABLE_EXPLAIN;
In addition, for symmetry, change: master_unit->uncacheable|= UNCACHEABLE_EXPLAIN;
instead of UNCACHEABLE_DEPENDENT because if a subquery was not dependent initially, the changed methods do not change this fact. The subquery may later become correlated if it is transformed to an EXISTS query, but it may stay uncorrelated if executed via materialization.
Make equality-substitution-for-ref-access code in JOIN::optimize() treat join_tab->ref.key_copy correctly (in the way create_ref_for_key() has filled it).
Revision #2900.2.1 Wed 2011-02-23 22:23:12 -0800
BNLH algorithm always used a full table scan over the joined table even in the cases when there existed range/index-merge scans that were cheaper than the full table scan.
This was a defect/bug of the implementation of mwl #128. Now hash join can work not only with full table scan of the joined table, but also with full index scan, range and index-merge scans.
Accordingly, in the cases when hash join is used the column 'type' in the EXPLAINs can contain now 'hash_ALL', 'hash_index', 'hash_range' and 'hash_index_merge'. If hash join is coupled with a range/index_merge scan then the columns 'key' and 'key_len' contain info not only on the used hash index, but also on the indexes used for the scan.
Make get_constant_key_infix() take into account that there may be SEL_TREEs with type=SEL_ARG::MAYBE_KEY, which it cannot process, because they are not real ranges but rather indications that we might have been able to construct a range if we had values for some other tables' fields. (check_quick_select() already has such check)
Avoid plugin tests on Windows/embedded, plugins do not and will not work here
In Maria/MyISAM: Release/re-acquire locks to give queries that wait on them a chance to make progress
In Maria/MyISAM: Change from numeric constants to ICP_RES values.
In Maria: Do check index condition in maria_rprev() (was lost in the merge/backport?)
In Maria/MyISAM/XtraDB: Check if the query was killed, and return immediately if it was.
Added new storage engine error: HA_ERR_ABORTED_BY_USER, for handler to signal that it detected a kill of the query and aborted
Authors: Sergey Petrunia & Monty
Assume that outside subquery references are known when doing "Range-checked-for-each-record" check.
When this flag is 'off' the size of the used join buffer is taken directly from the system variable 'join_buffer_size'.
When this flag is 'on' then the size of the buffer depends on the estimated number of rows in the partial join whose records are to be stored in the buffer.
By default this flag is set 'on'.
The bug cannot be reproduced with the same test case for the main 5.3 tree because the backported fix for MySQL Bug #59696 masks the problem that causes the crash in the mentioned test case. It's not clear weather this fix masks this problem in all possible cases.
Anyway the patch for Bug #698882 introduced some inconsistent data structures that could contain indirect references to deleted object.
It happened when two Item_equal objects were merged and the Item_field list of the second object was joined to such list of the first object.
This operation required adjustment of the backward pointers in Item fields from the joined list. However the adjustment was missing and this caused crashes in the tree for MWL#128.
Now the backward pointers are set only when Item_equal items are completely built and are not changed anymore.
Revision #2893.1.1 [merge] Sun 2011-01-23 10:39:53 -0800
Merge
Also reverted the latest addition of the test case for MySQL Bug #45092. It had been already backported earlier.
Revision #2869.2.12 Sat 2011-01-15 02:07:04 +0300
MySQL Bug #46692 Crash occurring on queries with nested FROM subqueries using materialization
Backport testcases
We have a different fix because we've fixed part of the problem as part of fix for Bug #602574.
Revision #2869.2.11 Fri 2011-01-14 20:40:16 +0300
Backport testcase: MySQL Bug #45863 "Assertion failed: (fixed == 0), function fix_fields(), file item.cc, line 4448" (The fix was backported with subquery code backport)
Revision #2869.2.10 Fri 2011-01-14 17:30:27 +0300
Backport of:
3150 Olav Sandstaa 2010-05-07
Test cases for the following "ICP for InnoDB" bugs:
InnoDB: Crash when engine_condition_pushdown is on
Innodb crash at mem_block_get_len line 72
multi-table delete crashes server (InnoDB table)
Server crashes on multi table delete with Innodb
All these bugs are duplicates of either one or both of or .
(backporting of olav@sun.com-20100226091930-qxvakxmcp6463t5w)
Revision #2869.2.9 Fri 2011-01-14 16:38:41 +0300
Test case backport for: MySQL Bug #42580 - Innodb's ORDER BY ..LIMIT returns no rows for null-safe operator <=> NULL
Revision #2869.2.8 Fri 2011-01-14 14:13:11 +0300
Testcase backport: MySQL Bug #43249
Revision #2869.2.7 Fri 2011-01-14 13:51:30 +0300
Testcase backport: MySQL Bug #46548 IN-subqueries return 0 rows with materialization=on
(the bug itself was fixed during the subquery code backport)
Revision #2869.2.6 Fri 2011-01-14 12:55:03 +0300
Backport of:
3723 oystein.grovlen@sun.com 2009-11-23
MySQL Bug #46548 (addendum)
Remove KEY::extra_length. It is not in use.
| |Changelog |
Release date: 10 Sep 2011
For the highlights of this release, see the .
The revision number links will take you to the revision's page on Launchpad. On Launchpad you can view more details of the revision and view diffs of the code modified in that revision.
Thu 2011-09-08 23:24:47 +0400
The bug was caused by outer join being incorrectly converted into inner because of invalid return values of Item_direct_view_ref::not_null_tables().
Provided a correct Item_direct_view_ref::not_null_tables() function.
Revision #3181 [merge] Thu 2011-09-08 21:38:10 +0400
Automerge.
Revision #3173.1.9 Thu 2011-09-08 19:48:14 +0400
Bug #830993: Crash in end_read_record with derived table
Let join buffering code correctly take into account rowids needed by DuplicateElimination when it is calculating minimum record sizes.
In JOIN_CACHE::write_record_data, added asserts that prevent us from writing beyond the end of the buffer.
Revision #3180 [merge] Thu 2011-09-08 09:21:31 -0700
Merge.
Revision #3156.1.1 Mon 2011-08-15 23:18:36 -0700
Fixed LP bug #824463.
When merging a view / derived table the function SELECT_LEX::merge_subquery incorrectly updated the list SELECT_LEX::leaf_tables. Erroneously it appended the leaf_tables list of the merged object L and then removed the reference to the merged object T from the SELECT_LEX::leaf_tables list.
A correct implementation should insert the list L into the SELECT_LEX::leaf_tables list in place of the element of the list that refers to T.
The bug could lead to wrong results or even crashes for queries with nested outer joins over views / derived tables.
Revision #3179 Wed 2011-09-07 20:39:47 +0200
Bug #839387 Assertion `(Item_result) i != TIME_RESULT' failed with CASE + datetime
remove incorrect DBUG_ASSERT().
Fix incorrectly used cmp_item::get_comparator() in Item_func_case and Item_equal
Revision #3178 [merge] Tue 2011-09-06 20:59:29 +0400
Merge
Revision #3173.1.8 Tue 2011-09-06 20:52:36 +0400
Fix typo bug
Tue 2011-09-06 17:06:04 +0400
: Wrong result with semijoin materialization and blob fields
Make subquery_types_allow_materialization() detect a case where create_tmp_table() would create a blob column which would make it impossible to use materialization
Non-semi-join materialization worked because it detected that this case and felt back to use IN->EXISTS. Semi-join Materialization cannot easily fallback, so we have to detect this case early.
Mon 2011-09-05 20:51:37 +0400
: Wrong result with 3-way inner join, LooseScan,multipart keys
Don't use join buffering for tables that are within ranges that are covered by LooseScan strategy.
Mon 2011-09-05 19:28:22 +0400
: Wrong result with innner join, LooseScan, two-column IN() predicate
get_bound_sj_equalities() would produce incorrect bitmap when non-first equality was bound, which resulted in invalid LooseScan plans.
Sun 2011-09-04 16:35:37 +0400
: Crash in Item_equal_fields_iterator::get_curr_field with semijoin+materialization
Item_in_subselect::inject_in_to_exists_cond() should not call ((Item_cond*)join->conds)->argument_list()->concat(join->cond_equal->current_level) as that makes two lists share their tail, and the cond_equal list will end up containing non-Item_equal objects when substitute_for_best_equal_field() walks through join->conds and replaces all Item_equal objects with Item_func_eq objects.
Sat 2011-09-03 17:05:05 +0400
: Assertion `!table || (!table->read_set || bitmap_is_set(...' with aggregates
Make find_all_keys() not to rely on table->tmp_set remaining constant during execution quick_index_merge_select->reset() may change it.
Fri 2011-09-02 23:44:28 +0400
: Crash in setup_sj_materialization_part1() with semijoin+materialization
setup_sj_materialization() code failed to take into account that it can be that the first [in join order ordering] table inside semi-join-materialization nest is also an inner table wrt an outer join (that is embedded in the semi-join). This can happen when all of the tables that are inside the semi-join but not inside the outer join are constant.
Fri 2011-09-02 22:43:35 +0400
: Crash in JOIN::get_partial_cost_and_fanout with semijoin+materialization
Make JOIN::get_partial_cost_and_fanout() be able to handle join plans with semi-join-materialization nests.
Revision #3177 [merge] Tue 2011-09-06 08:38:35 -0700
Merge.
Revision #3169.1.1 Tue 2011-09-06 07:17:39 -0700
Fixed LP bug #838633.
For any query JOIN::optimize() should call the method SELECT::save_leaf_tables after the last transformation that utilizes the statement memory rather than the execution memory.
Revision #3176 [merge] Mon 2011-09-05 10:14:48 +0300
Merge Bug #780386 5.2->5.3 (where other fix was present)
Revision #2732.44.28 Mon 2011-09-05 09:29:49 +0300
Fix of Bug #780386.
ALL subquery should return TRUE if subquery rowa set is empty independently of left part. The problem was that Item_func_(eq,ne,gt,ge,lt,le) do not call execution of second argument if first is NULL no in this case subquery will not be executed and when Item_func_not_all calls any_value() of the subquery or aggregation function which report that there was rows. So for NULL < ALL (SELECT...) result was FALSE instead of TRUE.
Fix is just swapping of arguments of Item_func_(eq,ne,gt,ge,lt,le) (with changing the operation if it is needed) so that result will be the same (for examole a < b is equal to b > a). This fix exploit the fact that first argument will be executed in any case.
Revision #3175 [merge] Mon 2011-09-05 08:28:08 +0300
merge 5.2->5.3
Revision #2732.44.27 Mon 2011-09-05 08:15:46 +0300
Fix pbxt suite to keep the same opti9misation it was before.
Revision #3174 Sat 2011-09-03 11:50:56 +0300
Fixed Bug #828514 "Assertion `! is_set()' failed in Diagnostics_area::set_ok_status with derived table + subquery + concurrent DML"
Revision #3173 [merge] Fri 2011-09-02 15:36:02 +0300
Merge of merge
Revision #3171.1.1 [merge] Fri 2011-09-02 15:10:10 +0300
Merge 5.2->5.3
Revision #3172 [merge] Fri 2011-09-02 14:32:48 +0400
Merge
Revision #3167.1.2 Mon 2011-08-29 21:54:16 +0400
Bug #836491: Crash in Item_field::Item_field from add_ref_to_table_cond() with semijoin+materialization
Let create_tmp_table set KEY_PART_INFO::fieldnr. It is needed in add_ref_to_table_cond(), and possibly other places.
Mon 2011-08-29 19:57:41 +0400
: Assertion `0' failed in replace_where_subcondition with semijoin subquery in HAVING
The problem was that the code that made the check whether the subquery is an AND-part of the WHERE clause didn't work correctly for nested subqueries. In particular, grand-child subquery in HAVING was treated as if it was in the WHERE, which eventually caused an assert when replace_where_subcondition looked for the subquery predicate in the WHERE and couldn't find it there.
and implementations of that function make sure that:
parts of AND-expressions get the mark_as_condition_AND_part() call
Item_in_subselect objects record that they are AND-parts of WHERE/ON
Revision #3171 Thu 2011-09-01 23:53:12 +0300
Fix for Bug #834492
Analysis:
In the test query semi-join merges the inner-most subquery into the outer subquery, and the optimization of the merged subquery finds some new index access methods. Later the IN-EXISTS transformation is applied to the unmerged subquery. Since the optimizer is instructed to not consider materialization, it reoptimizes the plan in-place to take into account the new IN-EXISTS conditions. Just before reoptimization JOIN::choose_subquery_plan resets the query plan, which also resets the access methods found during the semi-join merge. Then reoptimization discovers there are no new access methods, but it leaves the query plan in its reset state. Later semi-join crashes because it assumes these access methods are present.
Solution:
When reoptimizing in-place, reset the query plan only after new access methods were discovered. If no new access methods were discovered, leave the current plan as it was.
Revision #3170 Thu 2011-09-01 14:23:03 +0400
sec_to_time() in the integer context was losing the sign of the result
Revision #3169 Mon 2011-08-29 18:16:18 +0300
Updated crash-me for 5.3
Revision #3168 Mon 2011-08-29 18:14:14 +0300
Added MariaDB executable comment syntax: /*M!# */
Revision #3167 Sat 2011-08-27 00:40:29 +0300
Fix Bug #827416
Analysis:
Constant table optimization of the outer query finds that the right side of the equality is a constant that can be used for an eq_ref access to fetch one row from t1, and substitute t1 with a constant. Thus constant optimization triggers evaluation of the subquery during the optimize phase of the outer query.
The innermost subquery requires a plan with a temporary table because with InnoDB tables the exact count of rows is not known, and the empty tables cannot be optimzied way. JOIN::exec for the innermost subquery substitutes the subquery tables with a temporary table.
When EXPLAIN gets to print the tables in the innermost subquery, EXPLAIN needs to print the name of each table through the corresponding TABLE_LIST object. However, the temporary table created during execution doesn't have a corresponding TABLE_LIST, so we get a null pointer exception.
Solution:
The solution is to forbid using expensive constant expressions for eq_ref access for contant table optimization. Notice that eq_ref with a subquery providing the value is still possible during regular execution.
Revision #3166 [merge] Tue 2011-08-23 15:51:47 +0300
Automatic merge.
Revision #3164.1.2 Tue 2011-08-23 15:39:15 +0300
Fixed Bug #825018
Analysis:
During the first execution of the query through the stored procedure, the optimization phase calls substitute_for_best_equal_field(), which calls Item_in_optimizer::transform(). The latter replaces Item_in_subselect::left_expr with args[0] via assignment. In this test case args[0] is an Item_outer_ref which is created/deallocated for each re-execution. As a result, during the second execution Item_in_subselect::left_expr pointed to freed memory, which resulted in a crash.
Solution:
Tue 2011-08-23 00:00:13 +0300
Fix
Analysis:
Partial matching is used even when there are no NULLs in a materialized subquery, as long as the left NOT IN operand may contain NULL values.
Revision #3165 Mon 2011-08-22 13:38:32 +0200
Bug #822760 Wrong result with view + invalid dates
Revision #3164 Fri 2011-08-19 21:02:05 -0700
Fixed Bug #826279.
When the WHERE/HAVING condition of a subquery has been transformed by the optimizer the pointer stored the 'where'/'having' field of the SELECT_LEX structure used for the subquery must be updated accordingly. Otherwise the pointer may refer to an invalid item. This can lead to the reported assertion failure for some queries with correlated subqueries
Revision #3163 Wed 2011-08-17 14:10:32 +0300
Fix Bug #813473
The bug is a duplicate of MySQL's bug#11764086, however MySQL's fix is incomplete for MariaDB, so this fix is slightly different.
In addition, this patch renames Item_func_not_all::top_level() to is_top_level_item() to make it in line with the analogous methods of Item_in_optimizer, and Item_subselect.
Analysis:
It is possible to determine whether a predicate is NULL-rejecting only if it is a top-level one. However, this was not taken into account for Item_in_optimizer. As a result, a NOT IN predicate was erroneously considered as NULL-rejecting, and the NULL-complemented rows generated by the outer join were rejected before being checked by the NOT IN predicate.
Solution:
Change Item_in_optimizer to be considered as NULL-rejecting only if it a top-level predicate.
Revision #3162 Wed 2011-08-17 12:32:15 +0400
field_conv.cc: added comments opt_range.cc: modified print_key() so that it doesn't do memory re-allocs when printing multipart keys over varchar columns. When it did, key printout in debug trace was interrupted with my_malloc/free printouts.
Revision #3161 [merge] Wed 2011-08-17 12:02:02 +0400
Merge
Revision #3155.1.2 Wed 2011-08-17 11:57:01 +0400
Bug #826935 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed
add_ref_to_table_cond() should not just overwrite pre_idx_push_select_cond with the contents tab->select_cond.
pre_idx_push_select_cond exists precisely for the reason that it may contain a condition that is a strict superset of what is in tab->select_cond.
The fix is to inject generated equality into pre_idx_push_select_cond.
Revision #3160 Tue 2011-08-16 22:48:35 -0700
Fixed Bug #825035.
The value of maybe_null flag should be saved for the second execution of a prepared statement from SELECT that uses an outer join.
Revision #3159 [merge] Tue 2011-08-16 23:45:08 +0300
Merge fix for small_blocksize.test
Revision #3157.1.1 [merge] Tue 2011-08-16 19:02:15 +0300
Merge with 5.2
Revision #3158 [merge] Tue 2011-08-16 21:54:48 +0400
Merge
Revision #3155.1.1 Tue 2011-08-16 21:42:25 +0400
Bug #818280: crash in do_copy_not_null() in maria-5.3 with semijoin
Make simplify_joins() set maybe_null=FALSE for tables that were on the inner sides of inner joins and then were moved to the inner sides of semi-joins.
Revision #3157 [merge] Tue 2011-08-16 15:51:40 +0300
Automatic merge with 5.2
Revision #2732.44.20 Tue 2011-08-16 13:28:20 +0300
Fixed build failure in embedded library regarding that decrease_user_connections() was not declared
Tue 2011-08-16 13:06:07 +0300
If mysqld --log-warnings=3 or higher, then print all check and repair warnings for MyISAM tables to the log.
This is useful when trying to find out why an automatic myisam repair failes.
Tue 2011-08-16 12:32:06 +0300
Fixed bug that MAX_USER_CONNECTIONS was not working properly in all situations (which could cause aborted connects) thd->user_connect is now handled in thd->clenup() which will ensure that it works in all context (including slaves). I added also some DBUG_ASSERT() to ensure that things are working correctly.
Mon 2011-08-15 23:53:55 +0300
Fixed recovery crash "Unclean shutdown corrupted Aria table blocking startup"
Revision #3156 [merge] Mon 2011-08-15 22:14:08 +0300
Automatic merge with 5.2
Revision #2732.44.16 [merge] Mon 2011-08-15 20:42:29 +0300
Merge in bug fix from 5.1
Mon 2011-08-15 20:40:13 +0300
Increase server version
Mon 2011-08-15 16:39:53 +0300
Fixes bugs found by testcase for and "ma_blockrec.c:3000: write_block_record: Assertion `cur_block[1].page_count == 0' failed with a multi-index Aria workload"
The issues were:
[merge] Fri 2011-08-12 15:51:05 +0300
Autmatic merge with 5.1
Wed 2011-08-10 22:44:39 +0300
Fixed 'Assertion `block->hash_link == hash_link && hash_link->block == block' in ma_pagecache.c:2275 with Aria'
Replaced old DBUG_ASSERT with a new correct one + a comment.
Wed 2011-08-10 13:08:19 +0300
Fixes : mysqldump --insert-ignore leaves set unique_checks=0.
This fixes a bug that when you use mysqldump --no-create-info to generate a dump that you want to merge with an existing table,
you can get an innodb table with duplicated unique keys.
Patch originally by Eric Bergen.
Mon 2011-08-08 14:53:52 +0300
Optimize mutex usage.
Revision #3155 Fri 2011-08-12 14:31:40 +0300
Fixed test results after the tests adding.
Revision #3154 Fri 2011-08-12 13:54:41 +0300
Early check of subquery cache hit rate added to limit its performance impact in the worst case.
Revision #3153 Fri 2011-08-12 11:39:29 +0300
Bug #781508: Take relevant test cases from MySQL 5.6 feature preview trees
Identified all test cases in the MySQL file subquery.inc that are not present in MariaDB. This patch adds the test cases that are:
not present in MySQL 5.5, and
already fixed in
The patch adds test cases for the following mysql-trunk bugs:
bug 12763207 - not a bug, mysql-trunk, added test case
- not a bug, mysql-trunk, added test case
bug 11765699 - not a bug, mysql-trunk, added test case
The comparison was based on the following version of mysql-trunk:
Revision #3152 Fri 2011-08-12 11:23:50 +0300
Protect statistic variables of subquery cache.
Revision #3151 Thu 2011-08-11 22:34:41 -0700
Added a test case for Bug #823835 - a duplicate of Bug #823189.
Revision #3150 Thu 2011-08-11 20:24:32 -0700
Fixed Bug #823189.
The method Item_ref::not_null_tables() returned incorrect bitmap for outer references to view columns. This could cause an invalid conversion of an outer join into an inner join that could lead to a wrong result set for a query with a correlated subquery over an outer join whose where condition had an outer reference to a view.
Revision #3149 Thu 2011-08-11 12:11:04 -0700
Fixed Bug #823826.
The method Item_func_isnull::update_used_tables() erroneously did not update cached values stored in the fields used_tables_cache and const_item_cache of the Item_func_isnull objects. As a result the Item_func_isnull::used_tables() returned wrong bitmaps and, as a consequence, push-down predicates could be attached to wrong tables.
Revision #3148 Tue 2011-08-09 18:34:26 +0300
Bug #781508: Take relevant test cases from MySQL 5.6 feature preview trees
Identified all test cases in the MySQL file subquery_mat.inc that are not present in MariaDB. In total found 8 test cases for the following MySQL bugs:
- not a bug in MariaDB, added test case
- not a bug in MariaDB, added test case (checked with VG)
- not a bug in MariaDB, added test case
- not a bug in MariaDB, added test case
- not a bug in MariaDB, added test case
- not a bug in MariaDB, added test case
bug 11852644 - not a bug in MariaDB, added test case
bug 12668294 - not a bug in MariaDB, added test case
All of these MySQL bugs are not present in .
The comparison was based on the following version of mysql-trunk:
Revision #3147 Tue 2011-08-09 10:28:57 +0300
Fix Bug #817384
This bug is a special case of Bug #813447.
Analysis:
Constant optimization finds that the condition t2.a = 1 can be used to access the primary key of table 't2'. As a result both outer table t1,t2 are considered as constant when we reach the execution phase. At the same time, during constant optimization, the IN predicate is not evaluated because it is expensive.
When execution of the outer query reaches do_select(), control flow enter the branch:
This branch checks only the WHERE and HAVING clauses, but doesn't check the ON clauses of the query. Since the IN predicate was not evaluated during optimization, it is not evaluated at all, thus execution doesn't detect that the ON clause is FALSE.\
Solution:
Similar to the patch for , exclude system tables from constant substitution based on unique key lookups if there is an expensive ON condition on the inner table.
Revision #3146 Mon 2011-08-08 22:02:10 -0700
Fixed Bug #819716. Do not optimize derived table for the second time ever.
Revision #3145 [merge] Tue 2011-08-09 01:57:08 +0400
Merge fix for Bug #822134
Revision #3138.1.3 Tue 2011-08-09 01:37:06 +0400
Bug #822134: Invalid plan and wrong result set for Q20 from DBT3 benchmark set
create_ref_for_key() has the code that walks KEYUSE array and tries to use maximum number of keyparts for ref (and eq_ref and ref_or_null) access. When one constructs ref access for table that is inside a SJ-Materialization nest, it is not possible to use tables that are ouside the nest (because materialization is performed before they have any "current value"). The bug was caused by this function not taking this into account.
Revision #3144 [merge] Mon 2011-08-08 23:12:34 +0400
Merge
Revision #3141.1.1 Mon 2011-08-08 22:37:53 +0400
Update test results for previous cset
Revision #3143 Mon 2011-08-08 18:40:41 +0200
Fix long xtradb shutdown on Windows XP
The reason for the long shutdown is hanging in io threads. It appears that just closing completion port on XP does not necessarily signal thread waiting in GetIOCompletionStatus() (even if this works fine on later Windows versions)
The fix is to wakeup background threads using PostQueuedCompletionStatus() with a special 'key' parameter indicating shutdown.
Revision #3142 Mon 2011-08-08 18:01:33 +0200
Bug #882689 - crash during startup on XP.
The reason for the crash is Innodb assertion after trying to load condition variables function dynamically and not finding them
The fix is to skip dynamic loading if srv_use_native_conditions is FALSE. srv_use_native_conditions is derived from Windows version and would be FALSE on XP and TRUE on later Windows.
This is the same handling as in MySQL 5.. In Maria 5.3 srv_use_native_conditions check was presumably lost in the downporting.
Revision #3141 [merge] Fri 2011-08-05 22:07:06 +0400
Merge
Revision #3138.1.2 Fri 2011-08-05 22:01:49 +0400
Backport of:
Revision #3138.1.1 Thu 2011-08-04 18:20:02 +0400
Backport of:
Revision #3140 Wed 2011-08-03 13:58:46 +0200
Limit query length in error log to 64K, to avoid output of full blobs
Wed 2011-08-03 13:42:53 +0200
Enhance crash reporting. Fix
: optimizer_switch must be reported on segfault
: Full query text must be reported on crash
[merge] Mon 2011-08-01 11:05:30 +0200
Automerge 5.2->5.3
Mon 2011-08-01 10:56:24 +0200
After-merge fix of result file (MARIA <-> Aria)
[merge] Sun 2011-07-31 22:59:55 +0200
Automerge 5.2->5.3
Fri 2011-07-29 17:09:16 -0700
Fixed .
This problem could be observed for queries with nested outer joins for which the not_exist optimization were applicable. The problem was caused by the code of the patch for that erroneously forced the return to the previous nested loop level when the join algorithm successfully builds a partial record for an embedded outer to which the not_exist optimization could be applied.
Thu 2011-07-28 17:10:29 +0300
Subquery cache going on disk management fix: Do not go on disk if hit rate is not good.
revno: 3363.3.16
revision-id: jorgen.loland@oracle.com-20110506132631-5wickj6dvrh1dpj6
parent: alexander.nozdrin@oracle.com-20110506132138-46459va9vcbd4nz0
committer: Jorgen Loland <jorgen.loland@oracle.com>
branch nick: mysql-trunk-11765831
timestamp: Fri 2011-05-06 15:26:31 +0200
message:
BUG#11765831: 'RANGE ACCESS' MAY INCORRECTLY FILTER
AWAY QUALIFYING ROWS
.
Preparation patch (does not include fix for the bug):
.
- Extensively document key_or()
- Remove tab indentations from key_or()
- Minor code changes like using existing utility functions
in key_or()revno: 2876.47.174
revision-id: jorgen.loland@oracle.com-20110519120355-qn7eprkad9jqwu5j
parent: mayank.prasad@oracle.com-20110518143645-bdxv4udzrmqsjmhq
committer: Jorgen Loland <jorgen.loland@oracle.com>
branch nick: mysql-trunk-11765831
timestamp: Thu 2011-05-19 14:03:55 +0200
message:
BUG#11765831: 'RANGE ACCESS' MAY INCORRECTLY FILTER
AWAY QUALIFYING ROWS
.
The problem was that the ranges created when OR'ing two
conditions could be incorrect. Without the bugfix,
"I <> 6 OR (I <> 8 AND J = 5)" would create these ranges:
.
"NULL < I < 6",
"6 <= I <= 6 AND 5 <= J <= 5",
"6 < I < 8",
"8 <= I <= 8 AND 5 <= J <= 5",
"8 < I"
.
While the correct ranges is
"NULL < I < 6",
"6 <= I <= 6 AND 5 <= J <= 5",
"6 < I"
.
The problem occurs when key_or() ORs
(1) "NULL < I < 6, 6 <= I <= 6 AND 5 <= J <= 5, 6 < I" with
(2) "8 < I AND 5 <= J <= 5"
.
The reason for the bug is that in key_or(), SEL_ARG *tmp is
used to point to the range in (1) above that is merged with
(2) while key1 points to the root of the red-black tree of
(1). When merging (1) and (2), tmp refers to the "6 < I"
part whereas the root is the "6 <= ... AND 5 <= J <= 5" part.
.
key_or() decides that the tmp range needs to be split into
"6 < I < 8, 8 <= I <= 8, 8 < I", in which next_key_part of the
second range should be that of tmp. However, next_key_part is
set to key1->next_key_part ("5 <= J <= 5") instead of
tmp->next_key_part (empty). Fixing this gives the correct but
not optimal ranges:
"NULL < I < 6",
"6 <= I <= 6 AND 5 <= J <= 5",
"6 < I < 8",
"8 <= I <= 8",
"8 < I"
.
A second problem can be seen above: key_or() may create
adjacent ranges that could be replaced with a single range.
Fixes for this is also included in the patch so that the range
above becomes correct AND optimal:
"NULL < I < 6",
"6 <= I <= 6 AND 5 <= J <= 5",
"6 < I"
.
Merging adjacent ranges like this gives a slightly lower cost
estimate for the range access.{where|on_expr}->fix_fields(...)call
so that AND-parts of the WHERE/ON clauses can determine they are the AND-parts.
Item_cond_or::fix_fields(), Item_func::fix_fields(), Item_subselect::fix_fields (this one was missed),
and all other items-that-contain-items had to reset thd->thd_marker before calling fix_fields() for
their children items, so that the children can see they are not AND-parts of WHERE/ON.
* The "thd_marker approach" required that a lot of code in different locations maintains correct value of
thd->thd_marker, so it was replaced with:
* The new approach with mark_as_condition_AND_part does not keep context in thd->thd_marker. Instead,
setup_conds() now calls {where|on_expr}->mark_as_condition_AND_part()This case was not handled correctly in two different places. First, the implementation of parital matching did not clear the set of matching columns when the merge process advanced to the next row.
Second, there is no need to perform partial matching at all when the left operand has no NULLs.
Solution:
First fix subselect_rowid_merge_engine::partial_match() to properly cleanup the bitmap of matching keys when advancing to the next row.
Second, change subselect_partial_match_engine::exec() so that when the materialized subquery doesn't contain any NULLs, and the left operand of [NOT] IN doesn't contain NULLs either, the method returns without doing any unnecessary partial matching. The correct result in this case is in Item::in_value.
Removed wrong DBUG_ASSERT()
Fixed a problem with underflow() where it generates a key page where all keys didn't fit.
Max key length is now limited by block_size/3 (was block_size /2). This is required for underflow() to work with packed keys.
bug 12616253 - not a bug, mysql-trunk, added test case
Download |Release Notes |Changelog |Overview of 5.3
Release date: 28 Aug 2012
For the highlights of this release, see the release notes.
The revision number links will take you to the revision's page on Launchpad. On Launchpad you can view more details of the revision and view diffs of the code modified in that revision.
Revision #3564 Fri 2012-08-24 23:43:18 +0200
oqgraph 5.5 crashes in buildbot
force -fno-strict-aliasing for oqgraph
Sat 2012-08-25 09:15:57 +0300
fix for
The problem was that was_null and null_value variables was reset in each reexecution of IN subquery, but engine rerun only for non-constant subqueries.
Fixed checking constant in Item_equal sort.
[merge] Fri 2012-08-24 19:13:34 +0200
Merge from 5.2
[merge] Fri 2012-08-24 19:12:47 +0200
Merge from 5.1
[merge] Fri 2012-08-24 15:39:34 +0200
Merge from 5.2.
[merge] Fri 2012-08-24 15:37:39 +0200
Merge from 5.1.
[merge] Fri 2012-08-24 14:26:23 +0200
Merge into latest 5.3
[merge] Fri 2012-08-24 14:02:32 +0200
merge from 5.2
Thu 2012-08-23 13:52:36 +0200
remove mysql-5.1 assert that is already absent in mysql-5.5
Wed 2012-08-22 18:40:27 +0200
mysql-test-run --valgrind main.ps_2myisam gives warning about not initialized memory
Item::get_date() should return 1 unless the value is a valid date.
[merge] Wed 2012-08-22 16:45:25 +0200
5.2 merge.
two tests still fail:
main.innodb_icp and main.range_vs_index_merge_innodb
Tue 2012-08-21 22:24:34 +0400
Better comments
Tue 2012-08-14 14:25:56 -0700
Corrected the pactch for to fix valgrind failures.
Mon 2012-08-13 21:13:14 -0700
Fixed bug .
The bug could caused a crash when the server executed a query with ORDER by and sort_buffer_size was set to a small enough number.
It happened because the small sort buffer did not allow to allocate all merge buffers in it.
[merge] Thu 2012-08-02 00:58:13 +0400
(Mismatches in MySQL engines test suite)
Following reasons caused mismatches:
different handling of invalid values;
Wed 2012-07-18 15:03:05 +0400
: Sergv related to spacial queries
index_merge/intersection is unable to work on GIS indexes, because:
index scans have no Rowid-Ordered-Retrieval property
Tue 2012-06-26 21:43:34 +0300
Fix for
TABLE_LIST::check_single_table made aware about fact that now if table attached to a merged view it can be (unopened) temporary table (in 5.2 it was always leaf table or non (in case of several tables)).
[merge] Sat 2012-06-23 15:00:05 -0700
Merge 5.2->5.3
Sat 2012-06-23 12:19:07 -0700
Fixed bug .
Fri 2012-06-22 14:14:22 +0400
Added comment about QUICK_RANGE_SELECT::free_cond being unused.
Thu 2012-06-21 14:33:36 +0400
Update test results (checked)
Wed 2012-06-20 22:30:24 +0400
Update test results.
Wed 2012-06-20 13:41:31 +0400
Post-merge fixes:
put back the result encoding in func_in.result (messed up by kdiff3)
update .result for other tests (checked)
[merge] Mon 2012-06-18 22:38:11 +0400
Merge 5.2->5.3
Tue 2012-06-12 10:06:26 -0700
Adjusted results in pbxt.negation_elimination after the fix for lp bug 992380.
Fri 2012-06-15 11:33:24 +0300
Fix
Analysis:
The fix for bug implements the method Item_subselect::no_rows_in_result() for all main kinds of subqueries. The purpose of this method is to be called from return_zero_rows() and set Items to some default value in the case when a query returns no rows. Aggregates and subqueries require special treatment in this case.
Thu 2012-06-14 17:03:09 +0300
Fix
Analysis:
Queries with implicit grouping (there is aggregate, but no group by) follow some non-obvious semantics in the case of empty result set. Aggregate functions produce some special "natural" value depending on the function. For instance MIN/MAX return NULL, COUNT returns 0.
[merge] Sun 2012-06-10 14:06:11 +0400
Merge
[merge] Sun 2012-06-10 13:53:06 +0400
Merge from 5.1 to 5.2
Fri 2012-06-08 19:15:01 +0200
: Speedup specific datetime queries that got slower with introduction of microseconds in 5.3
Item::get_seconds() now skips decimal arithmetic, if decimals is 0. This significantly speeds up from_unixtime() if no fractional part is passed.
replace sprintfs used to format temporal values by hand-coded formatting
Wed 2012-06-06 23:02:21 +0300
Fixed pbxt test case not run by default.
Tue 2012-06-05 17:25:10 +0300
Fixed
Analysis:
When the method JOIN::choose_subquery_plan() decided to apply the IN-TO-EXISTS strategy, it set the unit and select_lex uncacheable flag to UNCACHEABLE_DEPENDENT_INJECTED unconditionally.
Mon 2012-06-04 23:22:03 +0200
- Failing assertion: templ->mysql_col_len == len
remove the offending assert.
take the test case from
[merge] Sat 2012-06-02 16:13:05 +0400
Merge
Sat 2012-06-02 03:25:56 +0400
: Multi-table DELETE that uses innodb + index_merge/intersect may fail to delete rows
Fri 2012-06-01 14:56:47 +0200
: Insufficient buffer allocation for Query_log_event
The constructor for Query_log_event allocated 2 bytes too few for extra space needed by Query cache. (Not sure if this is reproducible in practice, as there are often a couple of extra bytes allocated for unused string zero terminators, but better safe than sorry).
Wed 2012-05-30 19:10:18 +0300
Fix for
Analysis:
When a subquery that needs a temp table is executed during the prepare or optimize phase of the outer query, at the end of the subquery execution all the JOIN_TABs of the subquery are replaced by a new JOIN_TAB that selects from the temp table. However that temp table has no corresponding TABLE_LIST. Once EXPLAIN execution reaches its last phase, it tries to print the names of the subquery tables through its TABLE_LISTs, but in the case of this bug there is no such TABLE_LIST (it is NULL), hence a crash.
Tue 2012-05-29 09:59:25 +0500
SELECT WHERE ST_CONTAINS doesn't return all the records where ST_CONTAINS() is 1.
Optimizator fails using index with ST_Within(g, constant_poly).
per-file comments:
[merge] Fri 2012-05-25 00:44:43 -0700
Merge.
Fri 2012-05-25 00:07:26 -0700
Fixed a performance problem: calls of the function imerge_list_and_tree could lead an to exponential growth of the imerge lists.
Fri 2012-05-25 01:20:40 +0400
: Valgrind warnings 'Invalid read' in subselect_engine::calc_const_tables with SELECT
In JOIN::exec(), make the having->update_used_tables() call before we've made the JOIN::cleanup(full=true) call. The latter frees SJ-Materialization structures, which correlated subquery predicate items attempt to walk afterwards.
Wed 2012-05-23 21:05:53 +0400
Update test results after the latest push
Wed 2012-05-23 11:55:14 +0400
: Query with simple join and ORDER BY takes thousands times longer when run with ICP
Correct testcases.
Wed 2012-05-23 11:46:40 +0400
: Query with simple join and ORDER BY takes thousands times longer when run with ICP
Disable IndexConditionPushdown for reverse scans.
Tue 2012-05-22 15:22:55 +0300
Fix
Analysis:
The optimizer detects an empty result through constant table optimization. Then it calls return_zero_rows(), which in turns calls inderctly Item_maxmin_subselect::no_rows_in_result(). The latter method set "value=0", however "value" is pointer to Item_cache, and not just an integer value.
Solution:
When the optimizer discovers an empty result set, set Item_singlerow_subselect::value to a FALSE constant Item instead of NULL.
Mon 2012-05-21 19:37:46 +0500
Non-blocking "set read_only".
Handle the 'set read_only=1' in lighter way, than the FLUSH TABLES READ LOCK;
For the transactional engines we don't wait for operations on that tables to finish.
[merge] Sun 2012-05-20 14:57:29 +0200
5.2 merge
[merge] Fri 2012-05-18 14:23:05 +0200
5.1 merge
[merge] Fri 2012-05-18 16:28:11 +0400
Merge
Fri 2012-05-18 16:24:12 +0400
: Wrong result (extra rows) with semijoin+materialization, IN subqueries, join_cache_level>0
Thu 2012-05-17 10:45:20 +0300
Test suite of fixed bug ().
Tue 2012-05-15 08:31:07 +0300
Fix for
If we did nothing in resolving unique table conflict we should not retry (it leed to infinite loop).
Now we retry (recheck) unique table check only in case if we materialized a table.
Sun 2012-05-13 13:15:17 +0400
: Assertion failure or valgrind errors at best_access_path ...
Let fix_semijoin_strategies_for_picked_join_order() set POSITION::prefix_record_count for POSITION records that it copies from SJ_MATERIALIZATION_INFO::tables.
(These records do not have prefix_record_count set, because they are optimized as joins-inside-semijoin-nests, without full advance_sj_state() processing).
[merge] Sat 2012-05-12 12:27:26 +0400
Merge 5.2->5.3
[merge] Sat 2012-05-12 12:12:35 +0400
Merge 5.2->5.3
[merge] Fri 2012-05-11 11:40:23 +0300
Merge 5.2->5.3
Fri 2012-05-11 09:35:46 +0300
fix for
Mon 2012-05-07 13:26:34 +0300
Fix for
Optimization of aggregate functions detected constant under max() and evalueted it, but condition in the WHWRE clause (which is always FALSE) was not taken into account
Mon 2012-05-07 11:02:58 +0300
Fix for bug
The patch backports two patches from mysql 5.6:
BUG#12640437: USING SQL_BUFFER_RESULT RESULTS IN A DIFFERENT QUERY OUTPUT
Thu 2012-05-03 14:49:52 +0300
Fix
This is a backport of the fix for MySQL bug #13723054 in 5.6.
Original comment:
Analysis:
Spcifically the crash in this bug was a result of the call to key_copy() that copied the whole key, inlcuding the BLOB field which is not used for index access. Copying the blob field overwrote memory as far as the function parameter 'key_info'. As a result the contents of key_info was all 0, which resulted in a crash when this key_info was accessed few lines below in key_cmp().
Tue 2012-05-08 20:58:41 +0300
Fix compiler warnings.
Tue 2012-05-08 19:13:26 +0300
Addition to the fix to .
It is problem of constant propagated to ref* access method (the problem was hiden by using debug binaries for testing).
Mon 2012-05-07 21:14:37 +0300
fix.
In 5.3 we substitute constants in ref access values it can't be null so we do not need add NOT NULL for early NULL filtering.
| |Changelog
(page:[1](mariadb-530-changelog.md)[2](mariadb-530-changelog-p2.md)[3](mariadb-530-changelog-p3.md)[4](mariadb-530-changelog-p4.md)[5](mariadb-530-changelog-p5.md) 6
) |
Release date: 26 July 2011
Mon 2010-10-25 23:48:43 +0300
Fixed
revno: 3350 [merge]
committer: Marko Mäkelä <marko.makela@oracle.com>
branch nick: mysql-trunk
timestamp: Mon 2011-08-08 12:42:09 +0300
message:
Merge mysql-5.5 to mysql-trunk.revno: 3350 [merge]
committer: Marko Mäkelä <marko.makela@oracle.com>
branch nick: mysql-trunk
timestamp: Mon 2011-08-08 12:42:09 +0300
message:
Merge mysql-5.5 to mysql-trunk.if (join->table_count == join->const_tables)
{ ... }Fix constant reporting in Item_subselect.
Revision #2643.153.14 Fri 2012-08-24 19:11:54 +0200
Fix compiler warning
Revision #2643.153.13 Fri 2012-08-24 15:32:44 +0200
Fix compiler warnings
Revision #2643.153.12 [merge] Fri 2012-08-24 10:34:55 +0200
Merge with latest 5.1.
Revision #2732.57.13 Fri 2012-08-24 15:30:05 +0200
MDEV-484 : allow compilation/packaging on Windows with newly released VS2012
Revision #2732.57.12 [merge] Fri 2012-08-24 12:57:19 +0200
Merge into latest 5.2.
Revision #2732.59.1 [merge] Fri 2012-08-24 12:32:46 +0200
Merge from 5.1.
Revision #2643.154.1 Fri 2012-08-24 10:06:16 +0200
MDEV-382: Incorrect quoting (CVE-2012-4414)
Various places in the server replication code was incorrectly quoting strings, which could lead to incorrect SQL on the slave/mysqlbinlog.
Revision #3556.1.1 [merge] Fri 2012-08-24 13:51:16 +0200
Merge from 5.2
call records_in_range() with both range ends being open (which triggers an assert)
Revision #2732.57.11 [merge] Wed 2012-08-22 16:13:54 +0200
5.1 merge
increase xtradb verson from 13.0 to 13.01
Revision #2643.153.11 Wed 2012-08-22 16:10:31 +0200
merge with XtraDB as of Percona-Server-5.1.63-rel13.4
[merge] Wed 2012-08-22 11:40:39 +0200
merge with MySQL 5.1.65
Revision #2732.57.10 Thu 2012-06-21 18:47:13 +0300
Fix for Bug #1001505 and Bug #1001510
We set correct cmp_context during preparation to avoid changing it later by Item_field::equal_fields_propagator. (see mysql bugs #57135 #57692 during merging)
Made sure that the allocated sort buffer would be big enough to contain all possible merge buffers.
different CAST results with fractional seconds;
microseconds support in MariaDB;
different algorithm of comparing temporal values;
differences in error and warning texts and codes;
different approach to truncating datetime values to time;
additional collations;
different record order for queries without ORDER BY;
More details in MDEV-369 comments.
Revision #3552.1.2 Mon 2012-07-30 04:16:49 +0400
MDEV-369 (Mismatches in MySQL engines test suite)
Revision #3552.1.1 Thu 2012-07-26 23:31:08 +0400
Result files were wrong due to MySQL bug#66034
When one does an index-only read over a GIS index, they do not get the index tuple, because index only contains bounding box of the geometry. This is why key_copy() call crashed.
This patch fixes #1, which makes the problem go away. Theoretically, it would be nice to check #2, too, but SE API semantics is not sufficiently precise to do it.
The bug was the result of the incomplete fix for bug lp bug 1008293.
Revision #2732.57.8 Mon 2012-06-18 22:32:17 -0700
Fixed bug MDEV-354.
Virtual columns of ENUM and SET data types were not supported properly in the original patch that introduced virtual columns into MariaDB 5.2.
The problem was that for any virtual column the patch used the interval_id field of the definition of the column in the frm file as a reference to the virtual column expression.
The fix stores the optional interval_id of the virtual column in the extended header of the virtual column expression.
Revision #2732.57.6 [merge] Tue 2012-06-12 00:09:20 -0700
Merge.
Revision #2732.58.1 Mon 2012-06-11 22:12:47 -0700
Fixed Bug #1008293.
One of the reported problems manifested itself in the scenario when one thread tried to get statistics on a key cache while the second thread had not finished initialization of the key cache structure yet. The problem was resolved by forcing serialization of such operations on key caches.
To serialize function calls to perform certain operations over a key cache a new mutex associated with the key cache now is used. It is stored in the field op_lock of the KEY_CACHE structure. It is locked when the operation is performed. Some of the serialized key cache operations utilize calls for other key cache operations. To avoid recursive locking of op_lock the new functions that perform the operations of key cache initialization, destruction and re-partitioning with an additional parameter were introduced.
The parameter says whether the operation over op_lock are to be performed or are to be omitted. The old functions for the operations of key cache initialization, destruction,and re-partitioning now just call the corresponding new functions with the additional parameter set to true requesting to use op_lock while all other calls of these new function have this parameter set to false.
Another problem reported in the bug entry concerned the operation of assigning an index to a key cache. This operation can be called while the key cache structures are not initialized yet. In this case any call of flush_key_blocks() should return without any actions.
No test case is provided with this patch.
Revision #2732.57.5 [merge] Sun 2012-06-10 14:04:21 +0400
Merge
Revision #2732.57.4 [merge] Fri 2012-06-01 23:45:54 +0200
5.1 merge
Revision #2643.153.9 Fri 2012-06-01 17:53:59 +0200
MDEV-256 Bug #995501 - mysqltest attempts to parse Perl code inside a block with false condition, gets confused and throws wrong errors
Revision #2732.57.3 Fri 2012-05-25 10:29:53 +0300
Fix of Bug #992380 + revise fix_fields about missing with_subselect collection
The problem is that some fix_fields do not call Item_func::fix_fields and do not collect with subselect_information.
Revision #2732.57.2 Wed 2012-05-23 18:18:08 +0300
Fix Bug #1001506
This is a backport of the (unchaged) fix for MySQL bug #11764372, 57197.
Analysis:
When the outer query finishes its main execution and computes GROUP BY, it needs to construct a new temporary table (and a corresponding JOIN) to execute the last DISTINCT operation. At this point JOIN::exec calls JOIN::join_free, which calls JOIN::cleanup -> TMP_TABLE_PARAM::cleanup for both the outer and the inner JOINs. The call to the inner TMP_TABLE_PARAM::cleanup sets copy_field = NULL, but not copy_field_end.
The final execution phase that computes the DISTINCT invokes: evaluate_join_record -> end_write -> copy_funcs The last function copies the results of all functions into the temp table. copy_funcs walks over all functions in join->tmp_table_param.items_to_copy. In this case items_to_copy contains both assignments to user variables. The process of copying user variables invokes Item_func_set_user_var::check which in turn re-evaluates the arguments of the user variable assignment. This in turn triggers re-evaluation of the subquery, and ultimately copy_field.
However, the previous call to TMP_TABLE_PARAM::cleanup for the subquery already set copy_field to NULL but not its copy_field_end. This results in a null pointer access, and a crash.
Fix:
Set copy_field_end and save_copy_field_end to null when deleting copy fields in TMP_TABLE_PARAM::cleanup().
Revision #2732.57.1 Tue 2012-05-22 08:48:10 +0300
Fix of Bug #992380 + revise fix_fields about missing with_subselect collection
The problem is that some fix_fields do not call Item_func::fix_fields and do not collect with subselect_information.
Every implementation of Item_subselect::no_rows_in_result() called Item_subselect::make_const() to set the subquery predicate to its default value irrespective of where the predicate was located in the query. Once the predicate was set to a constant it was never executed.
At the same time, the JOIN object of the fake select for UNIONs (the one used for the final result of the UNION), was set after all subqueries in the union were executed. Since we set the subquery as constant, it was never executed, and the corresponding JOIN was never created.
In order to decide whether the result of NOT IN is NULL or FALSE, Item_in_optimizer needs to check if the subquery result was empty or not. This is where we got the crash, because subselect_union_engine::no_rows() checks for unit->fake_select_lex->join->send_records, and the join object was NULL.
Solution:
If a subquery is in the HAVING clause it must be evaluated in order to know its result, so that we can properly filter the result records. Once subqueries in the HAVING clause are executed even in the case of no result rows, this specific crash will be solved, because the UNION will be executed, and its JOIN will be constructed. Therefore the fix for this crash is to narrow the fix for Bug #985667, and to apply Item_subselect::no_rows_in_result() only when the subquery predicate is in the SELECT clause.
The complexity comes from non-aggregate expressions in the select list. If the non-aggregate expression is a constant, it can be computed, so we should return its value, however if the expression is non-constant, and depends on columns from the empty result set, then the only meaningful value is NULL.
The cause of the wrong result was that for subqueries the optimizer didn't make a difference between constant and non-constant ones in the case of empty result for implicit grouping.
Solution:
In all implementations of Item_subselect::no_rows_in_result() check if the subquery predicate is constant. If it is constant, do not set it to the default value for implicit grouping, instead let it be evaluated.
Revision #2732.53.48 Sun 2012-06-10 13:50:21 +0400
Bug #1010351: New "via" keyword in 5.2+ can't be used as identifier anymore
Add the VIA_SYM token into keyword_sp list, which makes it allowed for use as keyword and SP label.
Query1 (original query in the bug report)
BENCHMARK(10000000,DATE_SUB(FROM_UNIXTIME(RAND() * 2147483648), INTERVAL (FLOOR(1 + RAND() * 365)) DAY))
Query2 (Variation of query1 that does not use fractional part in FROM_UNIXTIME parameter)
BENCHMARK(10000000,DATE_SUB(FROM_UNIXTIME(FLOOR(RAND() * 2147483648)), INTERVAL (FLOOR(1 + RAND() * 365)) DAY))
Prior to the patch, the runtimes were (32 bit compilation/AMD machine)
Query1: 41.53 sec
Query2: 23.90 sec
With the patch, the runtimes are
Query1: 32.32 sec (speed up due to removing sprintf)
Query2: 12.06 sec (speed up due to skipping decimal arithmetic)
As result, even if IN-TO-EXISTS injected non-correlated predicates, the subquery was still treated as correlated.
Solution:
Set the subquery as correlated only if the injected predicate(s) depend on the outer query.
Set index columns to be read when using index_merge, even if TABLE->no_keyread is set for the table (happens for multi-table UPDATEs)
Solution:
The fix is to block subquery evaluation inside Item_func_like::fix_fields and Item_func_like::select_optimize() using the Item::is_expensive() test.
mysql-test/r/gis-rt-precise.result
test result fixed.
mysql-test/r/gis-rtree.result
test result fixed.
mysql-test/suite/maria/r/maria-gis-rtree-dynamic.result
test result fixed.
mysql-test/suite/maria/r/maria-gis-rtree-trans.result
test result fixed.
mysql-test/suite/maria/r/maria-gis-rtree.result
test result fixed.
storage/maria/ma_rt_index.c
Use MBR_INTERSECT mode when optimizing the select WITH ST_Within.
storage/myisam/rt_index.c
Use MBR_INTERSECT mode when optimizing the select WITH ST_Within.
All of the Item_[maxmin | singlerow]_subselect::val_XXX methods does:
which of course crashes when value is a NULL pointer.
per-file comments:
mysql-test/r/read_only_innodb.result
MDEV-136 Non-blocking "set read_only".
test result updated.
mysql-test/t/read_only_innodb.test
Non-blocking "set read_only".
test case added.
sql/mysql_priv.h
Non-blocking "set read_only".
The close_cached_tables_set_readonly() declared.
sql/set_var.cc
Non-blocking "set read_only".
Call close_cached_tables_set_readonly() for the read_only::set_var.
sql/sql_base.cc
Non-blocking "set read_only".
Parameters added to the close_cached_tables implementation, close_cached_tables_set_readonly declared.
Prevent blocking on the transactional tables if the set_readonly_mode is on.
Revision #2643.153.8 Fri 2012-05-18 12:42:06 +0200
post-merge fixes
Revision #2643.153.7 [merge] Thu 2012-05-17 12:12:33 +0200
merge with mysql-5.1.63
Revision #2732.53.46 Thu 2012-05-17 10:13:25 +0300
fix of Bug #998321
The problem is that we can't check null_value field of non-basic constant without the item execution.:
make make_cond_after_sjm() correctly handle OR clauses where one branch refers to the semi-join table while the other branch refers to the non-semijoin table.
Revision #2643.153.6 Sat 2012-05-12 11:53:14 +0400
Bug #997747: Assertion `join->best_read < ((double) 1.79..5e+308L)' failed in greedy_search with LEFT JOINs and unique keys
Backport the fix for Bug #806524 from MariaDB 5.3
The not_null_tables() of Item_func_not_all and Item_in_optimizer was inherited from Item_func by mistake. It made the optimizer think that subquery predicates with ALL/ANY/IN were null-rejecting. This could trigger invalid conversions of outer joins into inner joins.
Revision #2732.53.43 Thu 2012-05-10 09:00:21 +0300
Fixed typo
Revision #2732.53.42 Tue 2012-05-08 12:38:22 +0200
MDEV-262 : log_state occationally fails in buildbot.
The failures are missing entries in the slow query log. The reason for the failure are sleep() calls with short duration 10ms, which is less than the default system timer resolution for various WaitForXXXObject functions (15.6 ms) and thus can't work reliably.
The fix is to make sleeps tiny bit longer (20ms from 10ms) in the test.
Revision #2732.53.41 Tue 2012-05-08 00:26:41 +0200
fixes Bug #994156
MDEV-261 : mysqtest crashes when assigning variable to result of select , like
The fix is to detect the condition "no active connection", to report error and die.
Note, that the check for no active connection was already in place for ordinary commands, and was missing only for assign-variable command.
Bug#12578908: SELECT SQL_BUFFER_RESULT OUTPUTS TOO MANY ROWS WHEN GROUP IS OPTIMIZED AWAY
The bug was a result of missing logic to handle the case when there are 'expensive' predicates that are not evaluated during constant table optimization. Such is the case for the IN predicate, which is considered expensive if it is computed via materialization. In general this bug can be triggered with any expensive predicate instead of IN.
When FALSE constant predicates are not evaluated during constant optimization, the execution path changes so that instead of setting JOIN::zero_result_cause after make_join_select, and exiting JOIN::exec via the call to return_zero_rows(), execution ends in JOIN::exec in the branch:
Unlike return_zero_rows(), this branch didn't evaluate the having clause of the query.
The patch adds a call to evaluate the HAVING clause of a query even when all tables are constant, because even for an empty result set some aggregate functions may produce a NULL value.
Revision #2831 Mon 2010-10-18 16:23:05 +0400
Make innodb_plugin testsuite not to use IndexConditionPushdown or DS-MRR (Otherwise we get different EXPLAINs for xtradb and innodb plugin).
Revision #2830 Mon 2010-10-18 12:55:26 +0400
No BUG#, a case brought from 5.2's innodb_mysql_lock.test
Fix a crash in nested semi-join subquery processing
Revision #2829 Sun 2010-10-17 18:05:29 +0400
MariaDB 5.2 -> 5.2 post-merge fixes:
When building multiple-equalities for HAVING, don't set JOIN::cond_equal, set join_having_equal instead. Setting JOIN::cond_equal based on HAVING makes equality propagation data self-inconsistent
Revision #2828 [merge] Thu 2010-10-14 16:01:40 -0700
Merge from mariadb-5.1 (through mariadb-5.2)
Revision #2827 Thu 2010-10-14 11:45:46 -0700
Turned off the test case for MySQL Bug #49322 when join_cache_level=6. It should be turned on back when the tree for MWL#128 is merged into the main 5.3 merge.
Revision #2826 [merge] Thu 2010-10-14 01:50:16 +0400
Merge-in Sanja's post-merge fix
Revision #2823.1.1 Wed 2010-10-13 14:29:38 +0300
version of mysqld changed.
Revision #2825 Thu 2010-10-14 01:48:03 +0400
Merge MariaDB 5.2 -> MariaDB 5.3
post-merge fixes
Revision #2824 Wed 2010-10-13 16:26:58 +0400
More post-merge test result updates (2).
Revision #2823 Tue 2010-10-12 23:11:08 +0300
More post-merge test result updates
Revision #2822 Tue 2010-10-12 22:48:49 +0300
Post-merge test result fixes part#1 (checked)
Revision #2821 Sun 2010-10-10 22:43:19 +0300
Remove garbage comments
Revision #2820 Sun 2010-10-10 17:38:17 +0300
Post-merge fixes part 1
Revision #2819 [merge] Sun 2010-10-10 17:18:11 +0300
Merge 5.2->5.3
Re-commit Monty's merge, partially fixed by Igor and SergeyP, but still broken
Revision #2818 Tue 2010-09-14 16:43:41 +0300
Engine should not be mentioned in such test
Revision #2817 Thu 2010-09-09 11:01:13 +0300
table_elimination switchable only for debug build and has no influence on the result of the test so it is removed.
Revision #2816 Wed 2010-09-08 09:26:17 +0300
(no message)
Revision #2815 Mon 2010-09-06 15:34:24 +0300
Fixed Bug #615760: Check on double cache assignment added into the transformation methods.
Cache parameters print added in EXPLAIN EXTENDED output.
Revision #2814 Wed 2010-09-01 17:42:41 +0300
pbxt test suite fix (expression test added to EXPLAIN EXTENDED).
Revision #2813 Tue 2010-08-31 16:16:10 +0300
Bug #615752 fix. Expression cache added to EXPLAIN EXTENDED output.
Revision #2812 Mon 2010-08-30 11:07:16 +0300
Fixed Bug #608744
The bug is a result of the following change by Monty:
Revision Id: monty@askmonty.org-20100716073301-gstby2062nqd42qv Fri 2010-07-16 10:33:01 +0300
Where Monty changed the queues interface and implementation. The fix adjusts the queue_remove call to the new interface.
Revision #2811 Mon 2010-08-09 21:03:48 +0400
Let xtradb set mrr_length_per_rec stats.
Revision #2810 Mon 2010-08-09 13:00:58 +0300
Fix for Bug #611625: Removing NULL references from subquery parameter list added.
Incorrect limitation on number of parameters removed.
Revision #2809 Thu 2010-08-05 17:23:48 +0300
The test files renamed to have uniform name.
Revision #2808 Fri 2010-07-30 07:16:58 +0300
Fix for Bug #609043
Removed indirect reference in equalities for cache index lookup.
We should use a direct reference because some optimization of the query may optimize out a condition predicate and if the outer reference is the only element of the condition predicate the indirect reference becomes NULL.
We can resolve correctly the indirect reference in Expression_cache_tmptable::make_equalities because it is called before optimization of the cached subquery.
Revision #2807 Thu 2010-07-29 14:13:48 +0300
Bugfix for Bug #608834 (Bug #608824, Bug #609045, Bug #609052).
Added get_tmp_table_item() to cache wrapper as it has all not simple Items (Item_func, Item_field, Item_subquery).
Revision #2806 Fri 2010-07-23 11:25:00 +0300
Removed dead code that was made obsolete by the introduction of check_join_cache_usage() by the change:
Revision #2793 Revision Id: igor@askmonty.org-20091221022615-kx5ieiu0okmiupuc Sun 2009-12-20 18:26:15 -0800
Backport into MariaDB-5.2 the following:
"Block Nested Loop Join and Batched Key Access Join"
Revision #2805 Fri 2010-07-16 14:02:15 +0300
Fixed a problem where the temp table of a materialized subquery was not cleaned up between PS re-executions. The reason was two-fold:
a merge with mysql-6.0 missed select_union::cleanup() that should have cleaned up the temp table, and
the subclass of select_union used by materialization didn't call the base class cleanup() method.
Revision #2804 [merge] Fri 2010-07-16 13:07:11 +0400
Merge
Revision #2802.1.1 Fri 2010-07-16 12:58:24 +0400
Fix @@optimizer_switch support
Let "mysqld --help --verbose" list all optimizer options
Make it possible to add new @@optimizer_switch flags w/o causing .result changes all over the testsuite:
Remove "select @@optimizer_switch" from tests that do not need all switches
Move @@optimizer_switch-specific tests to t/optimizer_switch.test
Revision #2803 [merge] Fri 2010-07-16 11:02:05 +0300
Merge with new queue code. Updated configure.in to have version 5.3
Revision #2800.1.1 Fri 2010-07-16 10:33:01 +0300
Improved speed of thr_alarm from O(N) to O(1). thr_alarm is used to handle timeouts and kill of connections. Fixed compiler warnings. queues.h and queues.c are now based on the UNIREG code and thus made BSD.
Fix code to use new queue() interface. This mostly affects how you access elements in the queue. If USE_NET_CLEAR is not set, don't clear connection from unexpected characters. This should give a speed up when doing a lot of fast queries. Fixed some code in ma_ft_boolean_search.c that had not made it from myisam/ft_boolean_search.c
Revision #2802 Thu 2010-07-15 18:07:01 +0400
Fix order_by test failure: don't run EXPLAIN for a query that has multiple range plans with identical costs.
Revision #2801 Thu 2010-07-15 16:59:10 +0300
Fixed an error in the creation of REF access method for materialized subquery execution, where the REF buffer format was mistaken to be in record format instead of key format. The error was that the null byte for all fields of the record was in the front of the buffer, and not before each field data.
Revision #2800<> Sat 2010-07-10 13:37:30 +0300
Subquery cache (MWL#66) added.
Revision #2799 Tue 2010-07-06 19:16:24 +0400
Fix buildbot valgrind failure
Item_in_subselect::init_left_expr_cache() should not try to guess whether the left expression is accessed "over the grouping operation" (i.e. the subselect is evaluated after the grouping while the left_expr is an Item_ref that wraps an expression from before the grouping). Instead, let new_Cached_item not to try accessing item->real_item() when creating left expr cache.
Revision #2798 Thu 2010-07-01 22:13:19 -0700
Added missing calls of update_virtual_fields() in the
join cache module.
Without these calls SELECTs over tables with virtual columns that used join cache could return wrong results. This could be seen with the test case added into vcol_misc.test
Revision #2797 Sun 2010-06-27 09:52:14 +0400
Add sql/opt_index_cond_pushdown.cc to CMakeLists.txt files
Revision #2796 Sun 2010-06-27 01:00:34 +0400
Fix windows build: add sql/opt_subselect.cc to CMakeLists.txt files
Revision #2795 Sun 2010-06-27 00:55:40 +0400
Fix valgrind failure: when creating key image, don't try to copy out more than field->pack_length() bytes.
Revision #2794 Sat 2010-06-26 23:55:33 +0400
Fix windows build: provide log2 function if the system doesn't have it.
Revision #2793 Sat 2010-06-26 23:33:16 +0400
Post-merge fixes: update test results for vcol and pbxt test suites.
Revision #2792 Sat 2010-06-26 23:11:45 +0400
Post-merge fixes: Update test results. The differences in QEPs are because 5.3 had
handler::index_only_read_time(uint keynr, double records)
while 5.2 got:
handler::keyread_read_time(uint index, uint ranges, ha_rows rows)
which causes floor()'ing of rows parameter, which makes all further costs different.
Revision #2791 Sat 2010-06-26 23:05:09 +0400
Post-merge fixes:
fix a bug in LooseScan strategy execution code (exposed by changing costs/QEP)
Do set join_tab->sorted=TRUE for JOIN_TABs that use LooseScan (partitioning handler cares about "sorted" parameter of h->index_init() call)
Revision #2790 [merge] Sat 2010-06-26 14:05:41 +0400
MariaDB 5.2 -> MariaDB 5.3 merge
Revision #2789 Mon 2010-06-14 15:17:54 +0400
More comments
Revision #2788 Mon 2010-05-10 15:46:08 +0200
fix compilation errors for builds w/o maria engine. tests still fail, the fix will come from 5.1 tree
Revision #2787 Tue 2010-03-30 00:09:40 +0400
Fix buildbot compile failure on hardy-amd64-makedist: invoke proper Item_int constructor.
Revision #2786 Mon 2010-03-29 18:04:35 +0400
MWL#110: Make EXPLAIN always show materialization separately
Add Item_in_subselect::get_identifier() that returns subquery's id
Change select_describe() to produce output in new format
Update test results (checked)
Revision #2785 Tue 2010-03-23 17:57:50 +0300
Disable subselect_notembedded.test due to Bug #545137
Revision #2784 Sun 2010-03-21 23:06:04 +0300
Make test result stable (had different result orderings, on some platforms, both of which satisfied the ORDER BY clause).
Revision #2783 Sun 2010-03-21 22:50:33 +0300
Fix merge error in pbxt suite test results
Revision #2782 Sat 2010-03-20 19:59:30 +0300
Fix union.test failure in buildbot: alternate fix for MySQL Bug #49734
Revision #2781 [merge] Sat 2010-03-20 15:08:44 +0300
Merge
Revision #2779.1.1 Tue 2010-03-16 00:41:30 +0200
MWL#68: Subquery optimization: Efficient NOT IN execution with NULLs
Fix for the PBXT copy of subselect.test.
Revision #2780 [merge] Sat 2010-03-20 15:01:47 +0300
Merge MariaDB-5.2 -> MariaDB 5.3
Revision #2779 [merge] Mon 2010-03-15 21:52:58 +0200
Merge in MWL#68: Subquery optimization: Efficient NOT IN execution with NULLs
Revision #2761.1.6 Thu 2010-03-11 23:43:31 +0200
MWL#68 Subquery optimization: Efficient NOT IN execution with NULLs
This patch does three things:
It adds the possibility to force the execution of top-level [NOT] IN subquery predicates via the IN=>EXISTS transformation. This is done by setting both optimizer switches partial_match_rowid_merge and partial_match_table_scan to "off".
It adjusts all test cases where the complete optimizer_switch is selected because now we have two more switches.
For those test cases where the plan changes because of the new available strategies, we switch off both partial match strategies in order to force the "old" IN=>EXISTS strategy. This is done because most of these test cases specifically test bugs in this strategy.
[merge] Tue 2010-03-09 12:36:15 +0200
Subquery optimization: Efficient NOT IN execution with NULLs
Automerge with 5.3-subqueries
Tue 2010-03-09 12:14:06 +0200
Subquery optimization: Efficient NOT IN execution with NULLs
Implemented a second partial matching strategy via table scan. This strategy is a fallback when there is no memory for rowid merging.
Refactored the selection and creation of partial matching strategies, so that the choice of strategy is encapsulated in a separate method choose_partial_match_strategy().
Mon 2010-02-22 17:16:55 +0200
Subquery optimization: Efficient NOT IN execution with NULLs
This patch mainly adds sorting of all indexes for partial matching according to their NULL selectivity. The patch also fixes a related bug in subselect_rowid_merge_engine::test_null_row() where the wrong matched indexes were skipped.
In addition the patch:
[merge] Mon 2010-02-22 15:57:09 +0200
Automerge with 5.3-subqueries
Fri 2010-02-19 23:55:57 +0200
Subquery optimization: Efficient NOT IN execution with NULLs
This patch implements correct NULL semantics for materialized subquery execution.
The implementation has the following properties and main limitations:
Revision #2778 [merge] Mon 2010-03-15 09:35:35 +0300
Merge
Revision #2776.1.1 Mon 2010-03-15 09:06:59 +0300
Update test results for the previous push
Revision #2777 Mon 2010-03-15 09:32:54 +0300
Apply fix by Roy Lyseng:
MySQL Bug #48623: Multiple subqueries are optimized incorrectly
The function setup_semijoin_dups_elimination() has a major loop that goes through every table in the JOIN object. Usually, there is a normal "plus one" increment in the for loop that implements this, but each semijoin nest is treated as one entity and there is another increment that skips past the semijoin nest to the next table in the JOIN object. However, when combining these two increments, the next joined table is skipped, and if that happens to be the start of another semijoin nest, the correct processing for that nest will not be carried out.
Revision #2776 [merge] Sun 2010-03-14 21:25:43 +0300
Merge
Revision #2773.1.2 Sun 2010-03-14 00:11:06 +0300
Apply fix by oystein.grovlen@sun.com 2010-03-12:
Materialized subselect crashes if using GEOMETRY type
The problem occurred because during semi-join a materialized table was created which contained a GEOMETRY column, which is a specialized BLOB column. This caused an segmentation fault because such tables will have extra columns, and the semi-join code was not prepared for that.
The solution is to disable materialization when Blob/Geometry columns would need to be materialized. Blob columns cannot be used for index look-up anyway, so it does not makes sense to use materialization.
This fix implies that it is detected earlier that subquery materialization can not be used. The result of that is that in->exist optimization may be performed for such queries. Hence, extended query plans for such queries had to be updated.
Sat 2010-03-13 23:04:52 +0300
: XOR in subqueries produces differing results in 5.1 and 5.4
: Wrong result for IN-subquery with materialization
Fix equality substitution in presense of semi-join materialization, lookup and scan variants (started off from fix by Evgen Potemkin, then modified it to work in all cases)
Revision #2775 Sun 2010-03-14 20:55:49 +0300
Fix support-files/build-tags to work with recent versions of bazaar.
Revision #2774 Sun 2010-03-14 20:54:12 +0300
MySQL Bug #43768: Prepared query with nested subqueries core dumps on second execution
Fix two problems:
Let optimize_semijoin_nests() reset sj_nest->sjmat_info irrespectively of value of optimizer_flag. We need this in case somebody has turned optimization off between reexecutions of the same statement.
Do not pull out constant tables out of semi-join nests. The problem is that pullout operation is not undoable, and if a table is constant because it is 1/0-row table it may cease to be constant on the next execution. Note that tables that are constant because of possible eq_ref(const) access will still be pulled out as they are considered functionally-dependent.
Revision #2773 Sun 2010-03-07 18:41:45 +0300
MySQL Bug #49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off
The problem was that DuplicateWeedout strategy setup code wasn't aware of the fact that join buffering will be used and applied optimization that doesn't work together with join buffering. Fixed by making DuplicateWeedout setup code to have a pessimistic check about whether there is a chance that join buffering will be used.
Make JOIN_CACHE_BKA::init() correctly process Copy_field elements that denote saving current rowids in the join buffer.
Revision #2772 Sat 2010-03-06 11:14:55 -0800
Fixed MySQL Bug #51092.
The function JOIN_CACHE::read_all_record_fields could return 0 for an incremental join cache in two cases:
there were no more records in the associated join buffer
there was no table fields stored in the join buffer.
As a result the function JOIN_CACHE::get_record() could return prematurely and did not read all needed fields from join buffers into the record buffer.
Now the function JOIN_CACHE::read_all_record_fields returns -1 if there are no more records in the associated join buffer.
Revision #2771 Fri 2010-03-05 10:54:48 -0800
Corrected Evgen's fix for MySQL Bug #45191. Made sure that join buffers could be used for inner tables of any semi-join when the first match strategy is employed.
Revision #2770 Thu 2010-02-25 08:09:10 +0000
Prepare for OJ+SJ handling: Make replace_where_subcondition() not to assume it's working on the WHERE clause.
Revision #2769 Wed 2010-02-24 12:33:42 +0100
MySQL Bug #49198 Wrong result for second call of procedure with view in subselect.
Re-worked fix of Tor Didriksen:
The problem was that fix_after_pullout() after semijoin conversion wasn't propagated from the view to the underlying table.
On subesequent executions of the prepared statement, we would mark the underlying table as 'dependent' and the predicate anlysis would lead to a different (and illegal) execution plan.
Revision #2768 Tue 2010-02-23 11:22:02 +0200
Subquery backport: update pbxt suite test results (checked).
Revision #2767 Sun 2010-02-21 09:53:12 +0200
Fix buildbot failure: take into account that there is no optimizer_switch flag for table elimination in debug builds. (part 2)
Revision #2766 Sun 2010-02-21 09:33:54 +0200
Fix buildbot failure: take into account that there is no optimizer_switch flag for table elimination in debug builds.
Revision #2765 Sun 2010-02-21 08:32:23 +0200
Change Field_enumerator to enumerate Item_field-s not Field-s. In Item_ref::fix_fields() do invoke mark_as_dependent() for outside references in all cases (see email for more details)
Revision #2764 Sun 2010-02-21 05:36:18 +0200
Better self-recursion protection in Item_subselect::fix_fields. Don't go into branch that calls upper_refs.empty() more than once per PREPARE or EXECUTE
Avoid crashing when processing references to outside from subquery's HAVING (will explain in more details in email)
Revision #2763 Sat 2010-02-20 11:23:29 +0300
Fix Item_subselect::update_used_tables() and fix_after_pullout() to work with prepared statements: re-collect list of upper refs on every PS re-execution.
Revision #2762 Thu 2010-02-18 01:54:59 +0300
Subquery backport: update test results (checked).
Revision #2761 Thu 2010-02-18 00:59:41 +0300
Subquery optimizations backport: fix test failures, update test results.
Revision #2760 Wed 2010-02-17 13:47:55 +0300
Subquery backport:
More test results updates (checked)
Revision #2759 Wed 2010-02-17 13:05:27 +0300
Subquery optimizations backport:
Update test results
More comments
Add Item_in_optimizer::transform() which was lost in backport
Revision #2758 Tue 2010-02-16 00:53:06 +0300
Subquery optimization backport:
Factor out subquery code into sql/opt_subselect.{h,cc}
Stop using the term "confluent" (was used due to misreading the dictionary)
Revision #2757 Fri 2010-02-12 21:10:41 +0300
Fix for previous cset
Revision #2756 Fri 2010-02-12 02:59:58 +0300
MySQL Bug #31480: Incorrect result for nested subquery when executed via semi join
Variant #3 of the fix. It also
Unifies code with table elimination's
is able to handle FROM-subquery pullout.
Revision #2755 Fri 2010-02-12 01:31:18 +0300
Subquery optimizations: backport: enable disabled subquery code in BKA
Revision #2754 Fri 2010-02-12 01:00:36 +0300
Subquery optimizations: backport
Fix valgrind failure: do initialize Item::is_expensive_cache.
Revision #2753 Fri 2010-02-12 00:59:32 +0300
Subquery optimizations backport: Update test results (checked)
Revision #2752 Fri 2010-02-12 00:58:23 +0300
Apply Jorgen Loland's fix: MySQL Bug #45221: Query "SELECT pk FROM C WHERE pk IN (SELECT int_key)" failing
XOR conditions are not optimized, and Item_cond_xor therefore acts like type Func_item even though it inherits from Item_cond. A subtle difference between Item_func and Item_cond is that you can get the children Items from the former by calling arguments(), and from the latter by calling argument_list(). However, since Item_cond_xor inherits from Item_cond, arguments() did not return any Items.
The fact that Item_cond_xor::arguments() did not return it's children items lead to a problem for make_cond_for_index(); the method accepted that XOR items on unindexed columns were pushed using ICP. ICP evaluation of non-indexed columns does not (and should not) work.
The fix for this bug is to make Item_cond_xor return it's children items when the arguments() method is used. This makes Item_cond_xor behave more like Item_func and in turn allows make_cond_for_index() to discover any conflicting children Items.
This is a temporary fix and should be removed when Item_cond_xor is optimized.
Revision #2751 Fri 2010-02-12 00:56:02 +0300
Subquery backport: Update test results (checked)
Revision #2750 Fri 2010-02-12 00:54:56 +0300
Subquery optimization backport: Duplicate Elimination: process temporary table overflow correctly.
Revision #2749 Thu 2010-01-28 16:48:33 +0300
Subquery optimizations: non-semijoin materialization
Backport into Maria DB 5.3, part 1
Revision #2748 Tue 2010-01-19 01:32:23 +0300
Subquery optimizations: Backport into 5.3:
Enable semi-join handling in the join cache code
Revision #2747 Sun 2010-01-17 23:52:20 +0300
Subquery optimizations, backport to 5.3:
Fix valgrind failure
Test result fixes (not finished)
Revision #2746 Sun 2010-01-17 18:01:59 +0300
Fix incorrect merge
Revision #2745 [merge] Sun 2010-01-17 17:55:08 +0300
Merge
Revision #2743.1.1 Fri 2010-01-01 10:36:55 +0200
Backport of subquery optimizations to 5.3
Revision #2744 Sun 2010-01-17 17:51:10 +0300
Backport of subquery optimizations to 5.3. There are still test failures because of:
Wrong query results in outer join + semi join
EXPLAIN output differences
Revision #2743 Sun 2009-12-27 23:24:22 +0300
DS-MRR backport: fix buildbot valgrind failures:
Do call update_used_tables() for new conditions obtained when adding outer join's triggered conditions. Correct values of used_tables() are now needed for condition pushdown.
Update test results
Revision #2742 [merge] Tue 2009-12-22 07:18:49 -0800
Merge
Revision #2738.1.4 Tue 2009-12-22 17:43:00 +0300
Make testcase work for both debug and release
Add opt_range_mrr.cc file into source repo
[merge] Tue 2009-12-22 15:49:15 +0300
Merge : MRR Backport and BKA backport.
Tue 2009-12-22 15:33:21 +0300
: MRR backport
Make index condition pushdown be controlled by an @@optimizer_switch flag, not by @@engine_condition_pushdown
Make MRR buffer size be controlled by @@mrr_buffer_size, not by @@read_rnd_buffer_size
Revision #2741 Tue 2009-12-22 07:12:09 -0800
Added the include files needed for join_cache.test.
Revision #2740 [merge] Mon 2009-12-21 10:34:47 -0800
Merge from 5.2-dsmrr
Revision #2738.1.1 Sat 2009-12-19 22:54:54 +0300
DS-MRR backport: Update test results (checked)
Revision #2739 Sun 2009-12-20 18:26:15 -0800
Backport into MariaDB-5.2 the following:WL#2771 "Block Nested Loop Join and Batched Key Access Join"
Revision #2738 Wed 2009-12-16 12:28:51 +0300
DS-MRR backport:
Fix PBXT test results (PBXT doesn't support MRR or ICP, but we get result diffs because we've also backported a fix that
prints out "Using where" when the table has part of WHERE that it has got from LEFT JOIN's ON expression
Does a better job at removing equalities that are guaranteed to be true by use of ref acccess.
Revision #2737 Wed 2009-12-16 01:37:39 +0300
Add ds_mrr.cc to CMakeLists.txt
Revision #2736 Wed 2009-12-16 00:35:55 +0300
Fix compile failure
Revision #2735 Tue 2009-12-15 20:23:55 +0300
Revision #2734 Tue 2009-12-15 17:53:30 +0300
Revision #2733 Tue 2009-12-15 10:16:46 +0300
Backport into MariaDB-5.2 the following:
MWL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface"
MWL#2475 "Batched range read functions for MyISAM/InnoDb" "Index condition pushdown for MyISAM/InnoDB"
Igor's fix from sp1r-igor@olga.mysql.com-20080330055902-07614: There could be observed the following problems:
EXPLAIN did not mention pushdown conditions from on expressions in the 'extra' column. As a result if a query had no where conditions pushed down to a table, but had on conditions pushed to this table the 'extra' column in the EXPLAIN for the table missed 'using where'.
Conditions for ref access were not eliminated from on expressions though such conditions were eliminated from the where condition.
MariaDB 5.3.0 Changelog — page:[1](mariadb-530-changelog.md)[2](mariadb-530-changelog-p2.md)[3](mariadb-530-changelog-p3.md)[4](mariadb-530-changelog-p4.md)[5](mariadb-530-changelog-p5.md) 6
if (forced_const)
return value->val_real();let x = `SELECT <something>`The crash is caused by arbitrary memory area owerwriting in case of
BLOB fields during attempt to copy BLOB field key image into record
buffer(record buffer is too small to get BLOB key part image).
note:
QUICK_GROUP_MIN_MAX_SELECT can not work with BLOB fields
because it uses record buffer as temporary buffer for key values
however this case is filtered out by covering_keys() check
in get_best_group_min_max() as BLOBs always require key length
modificator in the key declaration and if the key has a BLOB
then it can not be covered key.
The fix is to use 'max_used_key_length' key length instead of 0.Original comment:
-----------------
3714 Jorgen Loland 2012-03-01
BUG#12640437 - USING SQL_BUFFER_RESULT RESULTS IN A DIFFERENT
QUERY OUTPUT
.
For all but simple grouped queries, temporary tables are used to
resolve grouping. In these cases, the list of grouping fields is
stored in the temporary table and grouping is resolved
there (e.g. by adding a unique constraint on the involved
fields). Because of this, grouping is already done when the rows
are read from the temporary table.
.
In the case where a group clause may be optimized away, grouping
does not have to be resolved using a temporary table. However, if
a temporary table is explicitly requested (e.g. because the
SQL_BUFFER_RESULT hint is used, or the statement is
INSERT...SELECT), a temporary table is used anyway. In this case,
the temporary table is created with an empty group list (because
the group clause was optimized away) and it will therefore not
create groups. Since the temporary table does not take care of
grouping, JOIN::group shall not be set to false in
make_simple_join(). This was fixed in bug 12578908.
.
However, there is an exception where make_simple_join() should
set JOIN::group to false even if the query uses a temporary table
that was explicitly requested but is not strictly needed. That
exception is if the loose index scan access method (explain
says "Using index for group-by") is used to read into the
temporary table. With loose index scan, grouping is resolved
by the access method. This is exactly what happens in this bug.if (join->tables == join->const_tables)
{
...
else if (join->send_row_on_empty_set())
...
rc= join->result->send_data(*columns_list);
}Refactored the representation of partial match strategies so that:
each strategy is represented by a polymorphic class, and
the base class for all partial match strategies contains common execution code.
Added an estimate of the memory needed for the rowid merge strategy, and the system variable "rowid_merge_buff_size" to control the maximum memory to be used by the rowid merge algorithm.
Added two optimizer_switch system variables to control the choice of partial match strategy: "partial_match_rowid_merge", "partial_match_table_scan".
Fixed multiple problems with deallocation of resources by the partial match strategies.
adds few ::print() methods,
renames few variables that had similar names but different purpose.
It passes all query result tests, but fails a number of EXPLAIN tests because of changed plans.
The EXPLAIN output for partial matching is not decided yet.
It works only when all necessary indexes fit into main memory. Notice that these are not the general B-tree/Hash indexes, but instead much more compact ones, therefore this limitation may not be a problem in many practical cases.
It doesn't contain specialized tests.
In several places the implementation uses methods that are modified copies of other similar methods. These cases need to be refactored to avoid code duplication.
Add a test if the predicate is top-level just before deciding on partial matching. If it is top-level, use a more efficient exec method (index lookup).
Add sorting of indexes according to their selectivity. The code is almost there.
Needs more comments, and to sync existing ones with the implementation.
Move parts of code to separate files
Code cleanup
Add --sorted_result to some SELECTs in tests.
Download |Release Notes |Changelog
(page:1 [2](mariadb-530-changelog-p2.md)[3](mariadb-530-changelog-p3.md)[4](mariadb-530-changelog-p4.md)[5](mariadb-530-changelog-p5.md)[6](mariadb-530-changelog-p6.md)
) |Overview of 5.3
Release date: 26 July 2011
Revision #3134 Fri 2011-07-22 23:47:28 -0700
Removed settings of 'derived_merge' to 'on' in ps tests.
Fri 2011-07-22 21:39:55 -0700
Fixed a crash with pbxt.subselect when 'derived_merge' is set off in the optimizer switch.
[merge] Thu 2011-07-21 15:55:08 -0700
Merge.
Thu 2011-07-21 14:23:08 -0700
Made the optimizer switches 'derived_merge' and 'derived_with_keys' off by default.
Thu 2011-07-21 23:37:40 +0300
Fix for
In case of two views with subqueries it is dificult to decide about order of injected ORDER BY clauses.
A simple solution is just prohibit ORDER BY injection if there is other order by.
Thu 2011-07-21 19:14:34 +0400
: Wrong result with semijoin + view + outer join in maria-5.3-subqueries-mwl90
Correct handling of outer joins + DuplicateWeedout (docs pending)
[merge] Thu 2011-07-21 15:50:25 +0300
Merge from 5.2
[merge] Thu 2011-07-21 15:21:22 +0300
Test fix merge.
Thu 2011-07-21 00:43:37 -0700
Fixed .
Do not make substitution of a single-row table if it is an inner table of an outer join with on expression containing an expensive subquery.
Wed 2011-07-20 21:55:55 -0700
Fixed .
An aggregating query over an empty set of a join of two tables with a rejecting HAVING clause erroneously could return a row. It could happen in the cases when the optimizer made a conclusion that the aggregating set was empty. Wrong results were produced because the server missed initial setting for aggregation functions in the mentioned cases.
[merge] Wed 2011-07-20 16:49:36 -0700
Merge.
Wed 2011-07-20 16:09:28 -0700
Fixed .
Wed 2011-07-20 16:02:26 -0700
Adjusted the results of the pbxt.subselect test after the push of the patch for .
Wed 2011-07-20 21:48:41 +0300
Fix of .
ALL subquery should return TRUE if subquery rowa set is empty independently of left part. The problem was that Item_func_(eq,ne,gt,ge,lt,le) do not call execution of second argument if first is NULL no in this case subquery will not be executed and when Item_func_not_all calls any_value() of the subquery or aggregation function which report that there was rows. So for NULL < ALL (SELECT...) result was FALSE instead of TRUE.
Fix is just swapping of arguments of Item_func_(eq,ne,gt,ge,lt,le) (with changing the operation if it is needed) so that result will be the same (for examole a < b is equal to b > a). This fix exploit the fact that first argument will be executed in any case.
Wed 2011-07-20 11:56:28 +0400
Fix a compile error, and most likely a bug: jtb_table_no holds table number, not table->map.
[merge] Wed 2011-07-20 11:21:30 +0400
Merge fix for
Wed 2011-07-20 01:31:40 +0400
: Assertion `join->best_read < 1.7976931348623157e+308 with table_elimination=on and derived_merge=on reset_nj_counters() used to rely on the fact that join nests have table->table==NULL. This ceased to be true wit new derived table optimizations. Use test for table->nested_join!=NULL instead.
Tue 2011-07-19 23:19:10 +0300
Fixed .
The problem was that optimizer removes some outer references (it they are constant for example) and the list of outer items built during prepare phase is not actual during execution phase when we need it as the cache parameters. First solution was use pointer on pointer on outer reference Item and initialize temporary table on demand. This solved most problem except case when optimiser also reduce Item which contains outer references ('OR' in this bug test suite).
Tue 2011-07-19 22:22:40 +0400
: Wrong result with semijoin=on, outer join in maria-5.3-subqueries-mwl90
Add testcase.
Tue 2011-07-19 13:48:16 +0400
Buildbot fixes: add --sorted-result
[merge] Tue 2011-07-19 11:45:46 +0400
Merge
[merge] Fri 2011-07-15 03:37:16 +0400
Merge
[merge] Mon 2011-07-18 23:21:48 -0700
Merge.
Sun 2011-07-17 23:12:31 -0700
Fixed .
[merge] Mon 2011-07-18 20:40:50 -0700
Merge.
Mon 2011-07-18 20:05:33 -0700
Fixed valgrind problems of the patch for bug 794901.
Mon 2011-07-18 23:45:38 +0300
Fix
Analysis:
Both the wrong result and the valgrind warning were a result of incomplete cleanup of the MIN/MAX subquery rewrite. At the first execution of the query, the non-aggregate subquery is transformed into an aggregate MIN/MAX subquery. During the fix_fields phase of the MIN/MAX function, it sets the property st_select_lex::with_sum_func to true.
[merge] Sun 2011-07-17 00:52:07 -0700
Merge with the latest 5.3 code.
Sat 2011-07-16 23:57:43 -0700
Fixed .
[merge] Fri 2011-07-15 12:16:46 +0300
Merge of subquery cache off by default.
Fri 2011-07-15 11:36:36 +0300
Make subquery cache off by default.
[merge] Fri 2011-07-15 09:17:22 +0300
Automatic merge.
Fri 2011-07-15 00:23:57 +0300
efficient partial matching
Thu 2011-07-14 22:24:59 -0700
Changed the default setting of the optimizer switch 'optimize_join_buffer_size'. Made it 'off' by default.
Fri 2011-07-15 03:34:00 +0400
Test result update forgotten in pre-previous cset.
Fri 2011-07-15 03:29:38 +0400
Valgrind fix for the previous cset:
{ha_myisam,ha_maria}::index_read_idx_map should also initialize end_range, because index condition function will attempt to check it. We initialize it like index_init() does.
[merge] Thu 2011-07-14 20:06:46 +0400
Merge
Thu 2011-07-14 01:53:05 +0400
Disable LooseScan and FirstMatch when outer joins are present.
Thu 2011-07-14 17:44:37 +0400
Wrong result with in_to_exists=on in maria-5.3-mwl89
Make {ha_myisam,ha_maria}::index_read_idx_map check pushed index condition.
Address review feedback (added comments)
[merge] Wed 2011-07-13 22:19:32 -0700
Merge.
Wed 2011-07-13 21:06:28 -0700
Fixed .
Wed 2011-07-13 20:00:28 -0700
Corrected the patch for to fix valgrind failures.
[merge] Wed 2011-07-13 12:14:35 -0700
Merge.
Tue 2011-07-12 23:47:35 -0700
Fixed .
Wed 2011-07-13 11:05:33 -0700
Corrected the code of the recent patch that had changed the base class for Item_func_xor. Added the implementation of the subst_argument_checker virtual method that the objects of this class used to use before the patch.
Reverted the previous result changes in sunselect_sj and subselect_sj_jcl6.
Wed 2011-07-13 16:49:52 +0400
Update test results for previous cset
[merge] Tue 2011-07-12 13:02:19 +0400
Merge
Mon 2011-07-11 23:48:35 +0400
Port of code for: (part of testcase is in mysql-test/t/subquery*.test and will be ported separately)
Mon 2011-07-11 10:56:48 -0700
Fixed . Auto-generated names for view field items must be allocated in the statement memory, not in the execution memory of the statement.
Sun 2011-07-10 17:19:45 -0700
Fixed . Missing initialization of the bitmap not_null_tables_cache to 0 in the function Item_func::eval_not_null_tables caused this bug. This function is called indirectly from the function SELECT_LEX::update_used_tables after merging mergeable views and derived tables into the main query. The leaf tables of resulting query may change their bitmap numbers after this merge. That's why the not_null_tables_cache bitmaps must be updated. Due to the bug mentioned above the result of the re-evaluation of the not_null_tables_cache turned out to be incorrect in some cases. This could trigger an invalid conversion of outer joins into inner joins leading to invalid query result sets.
Also removed an implicit conversion from int to bool in the function SELECT_LEX::update_used_tables.
[
merge] Sun 2011-07-10 13:41:30 +0200
merge
[
merge] Sun 2011-07-10 13:01:00 +0200
merge
Sat 2011-07-09 22:34:56 -0700
Fixed . The value of THD::used tables should be re-evaluated after merges of views and derived tables into the main query. Now it's done in the function SELECT_LEX::update_used_tables. The re-evaluation of the 'used_table' bitmaps for the items in HAVING, GROUP BY and ORDER BY clauses has been added as well.
Sat 2011-07-09 16:33:40 +0400
Semi-join fixes: make COST_VECT objects survive add_io(add_io_cnt=0, add_avg_cost=...) calls without getting NaN in internal fields.
Sat 2011-07-09 13:47:41 +0400
[No BUG#] Fixes for problems discovered when running mysql-trunk's subquery testsuite
[merge] Sat 2011-07-09 11:20:15 +0400
Merge @@optimizer_switch default settings changes into 5.3
Fri 2011-07-08 22:01:02 +0400
Update test results for previous csets.
Scavenged subquery tests from testcases other than t/subselect*.test and put them into single file
Fri 2011-07-08 18:46:47 +0400
Set the default to be mrr=off,mrr_sort_keys=off:
Set the default
Adjust the testcases so that 'new' tests are run with optimizations turned on.
[merge] Fri 2011-07-08 16:42:59 -0700
Merge.
Fri 2011-07-08 16:39:28 -0700
Fixed . The bug was caused by an incorrect code of the function Item_direct_view_ref::replace_equal_field introduced in the patch for bugs 717577, 724942. The function erroneously returned the wrapped field instead of the Item_direct_view_ref object itself in the cases when no replacement happened.
[merge] Fri 2011-07-08 10:56:46 +0300
Merge test cases for bugs that were fixed by .
Fri 2011-07-08 10:51:53 +0300
Test for
[merge] Thu 2011-07-07 13:06:40 -0700
Merge.
Thu 2011-07-07 13:04:48 -0700
Fixed . The offending query returns a wrong result set because the optimizer erroneously eliminated the where condition evaluated it to TRUE. The cause of this wrong transformation was that the flag maybe_null for an inner table of the outer join was not set to TRUE after the table had replaced the wrapping view. Now the function SELECT_LEX::update_used_tables resets the value of the maybe_null flag for each leaf table of the query after all merges of views have been done.
Thu 2011-07-07 16:28:26 +0300
Fix
Analysis: This bug is yet another incarnation of the generic problem where optimization of the outer query triggers evaluation of a subquery, and this evaluation performs a destructive change to the subquery plan. Specifically a temp table is created for the DISTINCT operation that replaces the original subquery table. Later, select_describe() attempts to print the table name, however, there is no corresponding TABLE_LIST object to the internal temp table, so we get a crash. Execution works fine because it is not interested in the corresponding TABLE_LIST object (or its name).
[merge] Wed 2011-07-06 17:26:01 -0700
Merge.
Wed 2011-07-06 17:24:42 -0700
Fixed . The function generate_derived_keys_for_table incorrectly handled the cases when a materialized view or derived table could be accessed by different keys on the same fields if these keys depended on the same tables.
Wed 2011-07-06 21:32:07 +0300
Adjust PBXT test results.
[merge] Wed 2011-07-06 17:27:38 +0300
Merge the fix for
Mon 2011-07-04 14:51:16 +0300
Fix
[merge] Wed 2011-07-06 10:30:51 +0400
Merge fix for
Wed 2011-07-06 10:21:31 +0400
: Crash in replace_where_subcondition with nested subquery and semijoin=on
Tue 2011-07-05 22:38:38 +0200
fix compile warnings
[merge] Tue 2011-07-05 21:46:53 +0200
merge Windows performance patches into 5.3
Sun 2011-06-26 01:07:39 +0200
set errno to EBADF, if file descriptor < 0 in my_write()
[merge] Tue 2011-07-05 21:48:50 +0400
Merge fix for
Tue 2011-07-05 21:22:13 +0400
: Crash in pull_out_semijoin_tables with outer join + semijoin + derived tables in maria-5.3 with
Tue 2011-07-05 15:28:15 +0200
: Remove the --innodb-release-locks-early feature.
The exposes a design flaw in --innodb-release-locks-early.
It does not work with InnoDB crash recovery, so it breaks transactional
integrety. So remove the feature.
Tue 2011-07-05 10:32:49 +0400
Update test results for the previous cset.
Tue 2011-07-05 01:44:15 +0400
Change the default @@optimizer_switch setting fromsemijoin=on,firstmatch=on,loosescan=on
tosemijoin=off,firstmatch=off,loosescan=off
Adjust the testcases:
[merge] Mon 2011-07-04 11:02:35 -0700
Merge.
Sun 2011-07-03 14:59:01 -0700
Fixed . The assert conditions in the functions Item_direct_ref_to_ident::transform and Item_direct_ref_to_ident::compile could be not valid after constant propagation when fields and field references may be substituted for constants. Not only these invalid asserts have been removed, but the functions containing them have been removed as well because now Item_ref::transform and Item_ref::compile can be used instead of them.
[merge] Mon 2011-07-04 17:27:46 +0300
Automatic merge
Sat 2011-07-02 17:37:59 +0300
Fixed compilation & test issues found by buildbot
Fri 2011-07-01 21:53:47 -0700
Fixed . If no index is used to access a materialized derived table or view then the value of TABLE_REF::key for this table must be (-1).
[merge] Fri 2011-07-01 15:35:34 +0300
Automatic merge
[merge] Fri 2011-07-01 15:16:10 +0300 Merge with 5.2
Fri 2011-07-01 15:08:30 +0300
Fri 2011-07-01 13:22:23 +0400
Buildbot run fixes:
update suite/pbxt/r/status.result with changes that arise from addition of Handler_tmp_% status variables.
[merge] Fri 2011-07-01 12:45:45 +0400
Merge first chunk of OJ+SJ fixes into 5.3
Thu 2011-06-30 20:49:11 +0400
Fix buildbot failures:
Thu 2011-06-30 19:32:19 -0700
Fixed . The function generate_derived_keys_for_table should set the value of the number of keys for the derived table to 0 before it starts generating key definitions for the table. It's important as the function can be called twice by the optimizer for a derived table if the query contains a subquery to which the IN-EXIST transformation is applicable.
Fixed a valgrind complain.
Wed 2011-06-29 20:07:24 -0700
Fixed . If the expression for a derived table contained a clause LIMIT 0 SELECT from such derived table incorrectly returned a non-empty set.
Fixed by ensuring JOIN::do_send_rows to be updated after the call of st_select_lex_unit::set_limit that sets the value of JOIN::unit->select_limit_cnt.
Changelog — page:1 [2](mariadb-530-changelog-p2.md)[3](mariadb-530-changelog-p3.md)[4](mariadb-530-changelog-p4.md)[5](mariadb-530-changelog-p5.md)[6](mariadb-530-changelog-p6.md)
Revision #2643.143.28 Thu 2011-07-21 15:14:16 +0300
Fixed PBXT test.
Revision #2732.44.5 [merge] Thu 2011-07-21 13:15:09 +0300
Merge 5.1->5.2
Revision #2643.143.27 Thu 2011-07-21 12:29:00 +0300
Removed incorrect fix and its test suite (the test suit is duplicate).
Fixed explains of previous patch.
Thu 2011-07-21 11:45:19 +0300
The function description added.
Thu 2011-07-21 11:20:55 +0300
Fix of
There are 2 volatile condition constructions AND/OR constructions and fields(references) when first good supported to be top elements of conditions because it is normal practice (see copy_andor_structure for example) fields without any expression in the condition is really rare and mostly useless case however it could lead to problems when optimiser changes/moves them unaware of other variables referring to them. An easy solution of this problem is just to replace single field in a condition with equivalent expression well supported by the server ( -> != 0).
Revision #2732.44.4 [merge] Tue 2011-07-12 22:42:00 +0200
5.1 merge
Revision #2643.143.24 Tue 2011-07-12 08:58:33 +0200
bugfix: create internal temporary tables in mysql_tmpdir, not in datadir
Sun 2011-07-10 13:38:15 +0200
Post-fix for : replace uint with "unsigned int" in mysql.h.pp, too
[merge] Sun 2011-07-10 12:33:08 +0200
merge
[
merge] Sun 2011-07-10 12:31:09 +0200
Thu 2011-07-07 22:37:38 +0200
protocol safety fix:
before strlen(db) we need to be sure that db lies within packet boundaries
Revision #2732.44.3 Fri 2011-07-08 00:13:24 +0200
protocol safety fix:
before strlen(db) we need to be sure that
db lies within packet boundaries.
same for client_plugin.
The function matching_cond should take into account that there may be always false constant conjunctive conditions that has not been evaluated yet,for example, conjunctive conditions with non-correlated subqueries.
Removed depends_on list (because it is not neede any mnore for the cache, in the place where it was used it replaced with upper_refs).
Added processor (collect_outer_ref_processor) and get_cache_parameters() methods to collect outer references (or other expression parameters in future).
Revision #3108.1.1 Fri 2011-07-15 02:58:34 +0400
Bug #803457: Wrong result with semijoin + view + outer join in maria-5.3-subqueries-mwl90
(This is not a real fix for this bug, even though it makes it to no longer repeat)
Semi-join subquery predicates, i.e. ... WHERE outer_expr IN (SELECT ...) may have null-rejecting properties, may allow to convert outer joins into inner.
When convert_subq_to_sj() injected IN-equality into parent's WHERE/ON clause, it didn't call $new_cond->top_level_item(), which would cause null-rejecting properties to be lost.
Fixed, now the mentioned outer-to-inner conversion will really take place.
This bug could lead to wrong result sets for a query over a materialized derived table or view accessed by a multi-component key.
It happened because the function get_next_field_for_derived_key was supposed to update its argument, and it did not do it.
The second execution of the query finds this flag to be ON. When optimization reaches the same MIN/MAX subquery transformation, it tests if the subquery is an aggregate or not. Since select_lex->with_sum_func == true from the previous execution, the transformation executes the second branch that handles aggregate subqueries. This substitutes the subquery Item into a Item_maxmin_subselect. At the same time elsewhere it is assumed that the subquery Item is of type Item_allany_subselect. Ultimately this results in casting the actual object to the wrong class, and calling the wrong any_value() method from empty_underlying_subquery().
Solution:
Cleanup the st_select_lex::with_sum_func property in the case when the MIN/MAX transformation was performed for a non-aggregate subquery, so that the transformation can be repeated.
Also: *
simplified the code of the function mysql_derived_merge_for_insert.
moved merge of views/dt for multi-update/delete to the prepare stage.
the list of the references to the candidates for semi-join now is allocated in the statement memory.
Revision #3100.1.1 [merge] Mon 2011-07-11 14:00:44 -0700
Merge with the latest 5.3 code.
Revision #3025.1.7 Mon 2011-06-13 22:18:40 -0700
Fixed a typo in the patch for Bug #794890.
Revision #3025.1.6 Mon 2011-06-13 19:03:03 -0700
Fixed Bug #794890.
Changed the code that processing of multi-updates and multi-deletes with multitable views at the prepare stage.
A proper solution would be: never to perform any transformations of views before and at the prepare stage. Yet it would require re-engineering of the code that checks privileges and updatability of views. Ultimately this re-engineering has to be done to provide a clean solution for INSERT/UPDATE/DELETE statements that use views.
Fixed a valgrind problem in the function TABLE::use_index.
Added an initial set of feature-specific test cases
Handled the special case where the materialized subquery of an IN predicates consists of only NULL values.
Fixed a bug where making Item_in_subselect a constant, didn't respect its null_value value.
Revision #3106.1.2 Thu 2011-07-14 12:53:00 +0300
Fix Bug #777691
Analysis:
For some of the re-executions of the correlated subquery the where clause is false. In these cases the execution of the subquery detects that it must generate a NULL row because of implicit grouping. In this case the subquery execution reaches the following code in do_select():
while ((table= li++)) mark_as_null_row(table->table);
This code marks all rows in the table as complete NULL rows. In the example, when evaluating the field t2.f10 for the second row, all bits of Field::null_ptr[0] are set by the previous call to mark_as_null_row(). Then the call to Field::is_null() returns true, resulting in a NULL for the MAX function.
Thus the lines above are not suitable for subquery re-execution because mark_as_null_row() changes the NULL bits of each table field, and there is no logic to restore these fields.
Solution:
The call to mark_as_null_row() was added by the fix for bug . Therefore removing the fix for corrects this wrong result. At the same time the test for behaves correctly because the changes of result in a different execution path where:
the constant subquery is evaluated via JOIN::exec_const_cond
detecting that it has an empty result triggers the branch
Revision #3106.1.1 [merge] Thu 2011-07-14 10:22:18 +0300
Automatic merge.
Revision #3102.2.2 Thu 2011-07-14 00:15:07 +0300
Fix Bug #809266
Analysis:
This is a bug in , where it was incorrectly assumed that if there is a match in the only non-null key, then if there is a covering NULL row on all remaining NULL-able columns there is a partial match. However, this is not the case, because even if there is such a null-only sub-row, it is not guaranteed to be part of the matched sub-row. The matched sub-row and the NULL-only sub-row may be parts of different rows.
In fact there are two cases:
there is a complete row with only NULL values, and
Solution:
The solution is to:
split covering_null_row_width into two members: has_covering_null_row, and has_covering_null_columns, and
take into account each state during initialization and execution.
[merge] Wed 2011-07-13 17:11:46 +0300
Merged the fix for
Wed 2011-07-13 17:09:09 +0300
Fixed
The attribute not_null_tables could be calculated incorrectly in the function SELECT_LEX::update_used_tables for queries over views with row items in the WHERE clause. It happened because no implementation of the virtual callback function eval_not_null_tables was provided for the class Item_row.
Also slightly optimized the code calculating the value of the maybe_null flag for tables in the function SELECT_LEX::update_used_tables.
The bitmap of used tables must be evaluated for the select list of every materialized derived table / view and saved in a dedicated field.
This is also applied to materialized subqueries.
Bug #11766642: crash in Item_field::register_field_in_read_map with view
(Former MySQL Bug #59793)
Prior to the refactoring in this patch, Item_cond_xor behaved partially as an Item_cond and partially as an Item_func. The reasoning behind this was that XOR is currently not optimized (thus should be Item_func instead of Item_cond), but it was planned optimize it in the future (thus, made Item_cond anyway to ease optimization later).
Even though Item_cond inherits from Item_func, there are differences between these two. One difference is that the arguments are stored differently. Item_cond stores them in a list while Item_func store them in an args[].
was caused by Item_cond_xor storing arguments in the list while users of the objects would look for them in args[]. The fix back then was to store the arguments in both locations.
In this bug, Item_cond_xor initially gets two Item_field arguments. These are stored in the list inherited from Item_cond and in args[] inherited from Item_func. During resolution, find_field_in_view() replaces the Item_fields stored in the list with Item_direct_view_refs, but args[] still points to the unresolved Item_fields. This shows that the fix for 45221 was incorrect.
The refactoring performed in this patch removes the confusion by making the XOR item an Item_func period. A neg_transformer() is also implemented for Item_func_xor to improve performance when negating XOR expressions. An XOR is negated by negating one of the operands.
Revision #3095.1.1 Mon 2011-07-11 17:13:16 +0400
Alternate version of MySQL's fix for MySQL Bug #49453.
The cause of the crash is sj_nest->sj_subq_pred->unit->first_select()->item_list contains "stale" items for the second execution. By "stale" I mean that they have item->fixed==FALSE, and they are Item_field object instead of Item_direct_view_ref.
The solution is to use sj_nest->sj_subq_pred->unit->first_select()->ref_pointer_array. Surprisingly, that array contains items that are ok.
Oracle team has introduced and is using NESTED_JOIN::sj_inner_exprs, but we go without that and always copy the ref_pointer_array.
Revision #3089.2.3 Fri 2011-07-08 19:09:30 +0400
Make table_elimination=on|off flag to be always present in @@optimizer_switch.
Revision #3089.2.2 Fri 2011-07-08 18:49:53 +0400
Forgot to add these two files when setting semijoin=off by default:
Pull out relevant tests from "irrelevant" tests and run them with optimizations on.
Run range.test and innodb.test with both mrr=on and mrr=off
The bug masked two other minor bugs that could result in not quite correct output of the EXPLAIN command for some queries. They were fixed in the patch as well.
The bug itself has been fixed by MWL#89.
Revision #3089.1.3 Fri 2011-07-08 08:52:30 +0300
Test case for Bug #611396
The bug itself has been fixed by MWL#89.
Revision #3089.1.2 Thu 2011-07-07 17:22:28 +0300
Test for Bug #612543
The bug itself has been fixed by MWL#89.
Revision #3089.1.1 Thu 2011-07-07 17:07:13 +0300
Test case for Bug #611690
The bug itself has been fixed by MWL#89.
Solution: Similar to other such bugs, block the evaluation of expensive Items in convert_const_to_int().
Analysis: This bug consists of two related problems that are result of too early evaluation of single-row subqueries during the optimization phase of the outer query.
Several optimizer code paths try to evaluate single-row subqueries in order to produce a constant and use that constant for further optimzation.
When the execution of the subquery peforms destructive changes to the representation of the subquery, and these changes are not anticipated by the subsequent optimization phases of the outer query, we tipically get a crash or failed assert.
Specifically, in this bug the inner-most suqbuery with DISTINCT triggers a substitution of the original JOIN object by a single-table JOIN object with a temp table needed to perform the DISTINCT operation (created by JOIN::make_simple_join).
This substitution breaks EXPLAIN because: a) in the first example JOIN::cleanup no longer can reach the original table of the innermost subquery, and close all indexes, and b) in this second test query, EXPLAIN attempts to print the name of the internal temp table, and crashes because the temp table has no name (NULL pointer instead).
Solution:
a) fully disable subquery evaluation during optimization in all cases - both for constant propagation and range optimization, and
b) change JOIN::join_free() to perform cleanup irrespective of EXPLAIN or not.
SELECT_LEX::merge_subquery should not set "(*in_subq)->emb_on_expr_nest= derived" for subqueries that are in the ON expressions of semi-joins.
Revision #2732.40.13 Sun 2011-06-19 17:19:22 +0200
Fix "make dist" : add my_winfile.c and my_winerr.c to EXTRA_DIST list
Revision #2732.40.12 Sun 2011-06-19 00:51:41 +0200
add missing DBUG_RETURN
Revision #2732.40.11 Sun 2011-06-19 00:29:49 +0200
fix compile error on *nix
Revision #2732.40.10 Sat 2011-06-18 21:56:47 +0200
dummy change to trigger the buildbot
Revision #2732.40.9 Fri 2011-06-17 00:29:22 +0200
Point to the correct documentation on building in our KB.
Revision #2732.40.8 Thu 2011-06-16 14:51:50 +0200
Fix MySQL Bug #21978 : 'flush_time' value set for 1800 sec
This setting is obsolete now. It could makes sense in the past, situations open file handles limit was low. It does not make sense anymore to flush all files every 1.5 hours now, after 2048 myisam file limit is removed as fix to MySQL Bug #24509.
Revision #2732.40.7 Thu 2011-06-16 14:33:09 +0200
Accept innodb_flush_method values previously allowed on Unix only map them to corresponding Windows CreateFile flags, O_DSYNC=>FILE_FLAG_WRITE_THROUGH ALL_O_DIRECT=>FILE_FLAG_NO_BUFFERING
Ability to specify innodb_flush_method=O_DSYNC fixes MySQL Bug #31876 (InnoDB commit performance slow on Windows XP), by removing an extra FlushFileBuffers() call overhead.
Revision #2732.40.6 Mon 2011-06-13 02:38:16 +0200
fix warnings
Revision #2732.40.5 Sun 2011-06-12 16:44:41 +0200
fix mismerge
Revision #2732.40.4 [merge] Sun 2011-06-12 16:26:43 +0200
merge
Revision #2732.43.1 Sun 2011-06-12 16:09:28 +0200
Backport fix for MySQL Bug #56405 : use native windows condition variables and rwlocks in mysys, if Windows supports it.
Revision #2732.40.3 [merge] Sun 2011-06-12 16:24:00 +0200
merge
Revision #2732.42.1 Sun 2011-06-12 16:07:18 +0200
Fix XtraDB Bug #714143 : Windows native async io is disabled.
The patch uses completion ports for asynchronous IO notification , instead of formerly used notification via event . This also removes the limit of 64 async IOs per background IO thread (this limit was forced by using WaitForMultipleObjects in previous AIO implementation)
Revision #2732.40.2 [merge] Sun 2011-06-12 16:11:05 +0200
merge
Revision #2732.41.1 [merge] Sun 2011-06-12 15:54:49 +0200
Backport scalability improvements for innodb on Windows , MySQL Bug #52102 ()
Sat 2011-06-04 20:06:01 +0200
improve Innodb locking primitives on Windows (, and fix OS_FILE_LIMIT - on Windows it is about 16 millions
Revision #2732.40.1 [merge] Sun 2011-06-12 16:10:38 +0200
merge
Revision #2732.39.1 Sun 2011-06-12 15:52:07 +0200
Backport Fix for MySQL Bug #24509 - 2048 file descriptor limit on windows needs increasing.
The patch replaces the use of the POSIX I/O interfaces in mysys on Windows with
the Win32 API calls (CreateFile, WriteFile, etc). The Windows HANDLE for the open
file is stored in the my_file_info struct, along with a flag for append mode
(because the Windows API does not support opening files in append mode in all cases)
The default max open files has been increased to 16384 and can be increased further
by setting --max-open-files= during the server start.
Noteworthy benefit of this patch is that it removes limits from the table_cache size - allowing for more simultaneus users
Don't perform table pullout out of semi-join nests that have nested outer joins.
Let all other test files run with the new default settings (i.e. with new optimizations disabled)
Copy subquery testcases from these files into t/subselect_extra.test which will run them with new optimizations enabled.
Added progress reporting for alter table, LOAD DATA INFILE and for aria tables: check table, repair table, analyze table.
The client gets a progress report message that triggers a callback function if requested with mysql_options(MYSQL_PROGRESS_CALLBACK, function)
Added Progress field last to 'show processlist'
Stage, Max_stage and Progress field added to information_schema.progresslist
The 'mysql' client by defaults enables progress reports when the output is a tty.
Added progress_report_time time variable to configure how often progress reports is sent to client
Added read only system variable 'in_transaction' which is 1 if we have executed a BEGIN statement.
Revision #3066.1.3 Fri 2011-07-01 14:16:36 +0300
Updated result
Revision #3066.1.2 Fri 2011-07-01 10:20:11 +0200
Added read only system variable 'in_transaction' which tells if there's an active transaction.
fixed a bug - not clearing "in transaction" status on set @@autocommit=1
Revision #3066.1.1 Fri 2011-07-01 09:05:15 +0200
Removed check_license() function
JOIN::prepare would have set JOIN::table_count to incorrect value (bad merge of MWL 106)
optimize_keyuse() would use table-bit as table number (the change in optimize_keyuse is also the reason for query plan changes. Not expected to have much effect because only handles cases of no index statistics)
st_select_lex::register_dependency_item() ignored the fact that some of the selects on the dependency paths could have been merged to their parents (because they were mergeable VIEWs)
Undo the incorrect fix in Item_subselect::recalc_used_tables(): do not call fix_after_pullout() for Item_subselect::Ref_to_outside members.
Revision #3068.1.2 Wed 2011-06-29 15:07:28 +0400
Bug #802965: Crash in do_copy_not_null with semijoin=on in maria-5.3
The crash was because a NOT NULL table column inside the subquery was considered NULLable because the code thought it was on the inner side of an outer join nest.
Fixed by making correct distinction between tables inside outer join nests and inside semi-join nests.
Revision #3068.1.1 [merge] Wed 2011-06-29 11:52:26 +0400
Merge
Revision #3062.3.4 Tue 2011-06-28 18:25:02 +0400
Remove garbage comment
Tue 2011-06-28 17:42:10 +0400
Followup to previous commit:
Update test results
Fix a problem with PS:
Tue 2011-06-28 00:51:26 +0400
Test: enable semi-join processing for cases of semi-joins and outer joins, except for the case when the subquery is in the ON clause.
[merge] Mon 2011-06-27 23:40:58 +0400
Merge semi-join+outer-join fixes into 5.3
merge
Revision #2643.146.3 Sun 2011-07-10 12:27:42 +0200
Bug #808233: Undefined uint in typelib.h
Fix is to replace uint in public header with unsigned int. uint is not guaranteed to be defined by system headers.
if (zero_result_cause) return_zero_rows()
return_zero_rows() calls mark_as_null_row().
all nullable columns contain only NULL values.
These two cases were incorrectly mixed up in the class member subselect_partial_match_engine::covering_null_row_width.
In addition to the bug fix explained below, the patch performs few renames, and adds some comments to avoid similar problems.
Analysis:
The failed assert was due to a bug in MWL#68, where it was incorrectly assumed that the size of the bitmap subselect_rowid_merge_engine::null_only_columns should be the same as the size of the array of Ordered_keys.
The bitmap null_only_columns contains bits to mark columns that contain only NULLs. Therefore the indexes of the bits to be set in null_only_columns are different from the indexes of the Ordered_keys. If there is a NULL-only column that appears in a table after the last partial match column with Ordered_key, this NULL-only column would require setting a bit with index bigger than the size of the bitmap null_only_columns.
Accessing such a bit caused the failed assert.
Solution:
Upon analysis, it turns out that null_only_columns is not needed at all, because we are looking for partial matches, and having such columns guarantees that there is a partial match for any corresponding outer value.
Therefore the patch removes subselect_rowid_merge_engine::null_only_columns.
After an unmerged subquery predicate has been pulled, it should call fix_after_pullout() for outer_refs.
Download |Release Notes |Changelog |Overview of 5.3
Release date: 21 Dec 2011
For the highlights of this release, see the release notes.
The revision number links will take you to the revision's page on Launchpad. On Launchpad you can view more details of the revision and view diffs of the code modified in that revision.
Revision #3367 Tue 2011-12-20 12:13:47 +0400
Fix version number: it's 5.3.3
Tue 2011-12-20 09:57:42 +0400
Update mysql-test/suite/pbxt/r/subselect.result for the previous push
Mon 2011-12-19 23:05:44 +0200
Backport of from MySQL 5.6
The patch differs from the original MySQL patch as follows:
All test case differences have been reviewed one by one, and care has been taken to restore the original plan so that each test case executes the code path it was designed for.
Mon 2011-12-19 22:24:10 +0400
: EXPLAIN EXTENDED crashes in TABLE_LIST::print with limited max_join_size
Take into account that subquery's optimization can fail because of @@max_join_size error.
Mon 2011-12-19 20:58:55 +0400
: Wrong result with LEFT JOIN, constant table, semijoin=ON,materialization=ON
Correct handling for SJ-Materialization + outer joins (details in the comments in the code)
Mon 2011-12-19 18:07:19 +0400
Remove garbage comments
Mon 2011-12-19 10:11:21 +0200
Supression condition made wider to cover some other system cases.
Sun 2011-12-18 23:38:37 -0800
Fixed .
Do not perform index condition pushdown for conditions containing subqueries and stored functions.
Sun 2011-12-18 19:25:00 +0400
Bump version number: now it's 5.3.3 (5.3.2 has been released some time ago)
Fri 2011-12-16 08:05:14 -0800
Adjusted test cases of the suite funcs_1.
Fri 2011-12-16 14:19:58 +0400
Update test results for previous push
Fri 2011-12-16 10:21:46 +0400
GIS issues fixed.
Failures on SUN Solaris. Buggy compiler there required some extra initialization for variables. Then the 02 optimization leads to bugs when values set through the pointer are not always taken into account. Finally, the (long long) / (long) crashes there, the explicit typeconverstion added. Failing innodb_plunin.innodb_gis.test fixed.
per-file comments:
[merge] Thu 2011-12-15 15:55:00 -0800
Merge
[merge] Thu 2011-12-15 14:28:34 -0800
Merge.
[merge] Fri 2011-12-16 03:46:04 +0400
Merge
Fri 2011-12-16 03:44:25 +0400
: Wrong result (extra row) with semijoin=ON, materialization=OFF, optimizer_prune_level=0
Thu 2011-12-15 17:26:32 +0400
Fix unused variable 'thd' error.
[merge] Thu 2011-12-15 16:47:39 +0400
Merge
Thu 2011-12-15 02:49:19 +0400
Make MyISAM's version of create_internal_tmp_table set QPLAN_TMP_DISK, like Aria version does (otherwise slow query log would show Tmp_table_on_disk=No when it should have said Yes)
Thu 2011-12-15 16:43:28 +0400
Fix trivial merge error
[merge] Wed 2011-12-14 20:38:38 +0200
Merge
[merge] Wed 2011-12-14 20:36:51 +0200
Merge with 5.2
[merge] Wed 2011-12-14 04:56:54 +0400
Merge
Wed 2011-12-14 04:39:29 +0400
: Crash in TABLE_LIST::print on EXPLAIN EXTENDED
[merge] Tue 2011-12-13 14:28:53 -0800
Merge
Tue 2011-12-13 14:20:47 -0800
Fixed .
Wed 2011-12-14 02:15:15 +0400
: Crash or invalid read at st_join_table::cleanup, st_table::disable_keyread
Do a "more thorough" cleanup of SJ-Materialization join tab in JOIN_TAB::cleanup. The bug was due to the fact that JOIN_TAB::cleanup() may be called multiple times for the same tab if the join has grouping.
Tue 2011-12-13 20:52:06 +0200
The variable query_cache_strip_comments allowed in embedded server.
[merge] Tue 2011-12-13 14:11:08 +0200
Automatic merge
Tue 2011-12-13 14:00:20 +0200
Fixed valgrind error when storing db_name_length in query_cache.
[merge] Mon 2011-12-12 13:00:33 +0100
5.2->5.3 merge
Mon 2011-12-12 12:36:46 +0200
Fixed
Sun 2011-12-11 19:41:53 -0800
Fixed
The cause of the reported assertion failure was a division of a double value by 0.
[merge] Sun 2011-12-11 14:38:14 -0800
Merge
Sun 2011-12-11 12:56:06 -0800
Fixed
Sun 2011-12-11 12:42:43 -0800
Adjusted the results of pbxt.subselect after the latest merge 5.1->5.2->5.3.
[merge] Sun 2011-12-11 19:28:05 +0200
Merge with 5.1 & fixes to IGNORE handling
Sun 2011-12-11 18:39:33 +0200
Rewrite IGNORE handling:
Sat 2011-12-03 23:06:16 +0200
Added handler and temporary table usage to mytop
Fixed prompt on reconnect in mysql client
Fri 2011-12-09 14:30:50 -0800
A bug was found and fixed in MariaDB 5.3 in Item_allany_subselect::cleanup().
ORDER BY is not removed because we are unsure of all effects, and it would prevent enabling ORDER BY ... LIMIT subqueries.
ref_pointer_array.m_size is not adjusted because we don't do array bounds checking, and because it looks risky.
Original comment by Jorgen Loland:
MySQL Worklog #5953 - Optimize away useless subquery clauses
For IN/ALL/ANY/SOME/EXISTS subqueries, the following clauses are meaningless:
ORDER BY (since we don't support LIMIT in these subqueries)
DISTINCT
GROUP BY if there is no HAVING clause and no aggregate functions
This WL detects and optimizes away these useless parts of the query during JOIN::prepare()
mysql-test/suite/innodb_plugin/t/innodb_gis.test
GIS issues fixed.
sql/gcalc_slicescan.cc
GIS issues fixed.
sql/gcalc_tools.cc
GIS issues fixed.
Revision #3349.2.2 Thu 2011-12-15 14:26:59 -0800
Made join_cache_level == 2 by default.
Revision #3349.2.1 Thu 2011-12-15 00:21:15 -0800
Made the optimizer switch flags 'outer_join_with_cache', 'semijoin_with_cache' set to 'on' by default.
Correctly handle plan refinement stage for LooseScan plans: run create_ref_for_key() if LooseScan plan includes a ref access, and if we don't have any fixed key components, switch to a full index scan.
Revision #2732.46.39 [merge] Tue 2011-12-13 20:08:41 +0200
Merge with 5.1
Updated version number in configure
Revision #2643.143.66 Mon 2011-12-12 16:28:16 +0100
new "./configure --disable-distribution" option
Mon 2011-12-12 13:37:18 +0100
Fix GCC build failure in PBXT in some cases/platforms.
Sun 2011-12-11 22:58:01 +0200
Fixed valgrind problem: reference on deleted memory of temporary table name. Removed previous patch of this problem.
Revision #2732.46.38 Tue 2011-12-13 19:57:19 +0200
Fixed Bug #887051 ; Error in recovery with LOAD DATA + DELETE
Revision #3345.1.1 Tue 2011-12-13 20:07:23 +0200
Fixed failure with query_cache.test for embedded server
Let JTBM optimization code handle the case where the subquery is degenerate and doesn't have a join query plan. Regular materialization would fall back to IN->EXISTS for such cases. Semi-Join materialization does not have such option, instead we introduce and use "constant JTBM join tabs".
A memory overwrite in the function test_if_skip_sort_order() could cause a crash for some queries with subqueries.
Changed storage to be 2 bytes instead of sizeof(size_t) (simple optimization)
Fixed bug when using query_cache_strip_comments and query that started with '('
Fixed DBUG_PRINT() that used wrong (not initialized) variables.
The range optimizer incorrectly chose a loose scan for group by when there is a correlated WHERE condition. This range access method cannot be executed for correlated conditions also with the "range checked for each record" because generally the range access method can change for each outer record. Loose scan destructively changes the query plan and removes the GROUP operation, which will result in wrong query plans if another range access is chosen dynamically.
Revision #2732.46.36 Thu 2011-12-08 12:05:52 +0200
Fixed Bug #888456
Analysis:
The class member QUICK_GROUP_MIN_MAX_SELECT::seen_first_key was not reset between subquery re-executions. Thus each subsequent execution continued from the group that was reached by the previous subquery execution. As a result loose scan reached end of file much earlier, and returned empty result where it shouldn't.
Solution:
Reset seen_first_key before each re-execution of the loose scan.
Revision #2732.46.35 Sat 2011-12-03 22:44:33 +0100
updated the version in configure
Revision #2732.46.34 Fri 2011-12-02 16:27:13 +0100
PAM plugin with test
Revision #2732.46.33 Fri 2011-12-02 16:26:43 +0100
add --plugin-dir and --default-auth to mysqltest.
dialog plugin now always returns mysql->password if non-empty and the first question is of password type
split get_tty_password into get_tty_password_buff and strdup.
dialog plugin now uses get_tty_password by default
dialog.test
moved small tests of individual plugins into a dedicated suite
Revision #2732.46.32 Sat 2011-12-03 10:53:00 +0100
update tests
If the duplicate elimination strategy is used for a semi-join and potentially one of the block-based join algorithms can be employed to join the inner tables of the semi-join then sorting of the head (first non-constant) table for a query with ORDER BY / GROUP BY cannot be used.
Instead of supressing all errors, only suppress safe ones like:
ER_DUP_KEY, ER_BAD_NULL_ERROR, ER_SUBQUERY_NO_1_ROW, ER_ROW_IS_REFERENCED_2
Revision #3327.1.2 [merge] Sun 2011-12-11 11:34:44 +0200
Merge with 5.2.
no_error handling for select (used by INSERT ... SELECT) still needs to
be fixed, but I will do that in a separate commit
Revision #2732.46.31 [merge] Sat 2011-12-03 20:47:25 +0200
Merge with 5.1
Sat 2011-12-03 20:29:15 +0200
Added suppressions
Fixed feedback_plugin_send to not generate a random number of lines.
Sat 2011-12-03 20:44:54 +0200
Fixed buildbot warnings
Fri 2011-12-02 18:10:54 +0200
Fixed some Aria limits to be more sane
[merge] Fri 2011-12-02 17:32:56 +0200
Merge
Fri 2011-12-02 17:22:17 +0200
Fixed bug where automaticly zerofilled table was not part of recovery if crash happended before next checkpoint.
Thu 2011-12-01 22:37:45 +0100
Fix intermittently failing variables-notembedded test case.
After sending packet that is too large, clienrt can get either an error packet with ER_NET_PACKET_TOO_LARGE, or a socket error. Both cases are valid, since the server does not ensure reply was fully read by client, before shutting down and closing the socket.
Thu 2011-12-01 20:21:11 +0200
Fixed compiler warning
[merge] Thu 2011-12-01 20:14:53 +0200
Merge with 5.1
Thu 2011-12-01 20:11:41 +0200
Fixed that --with-libedit --without-readline works
[merge] Wed 2011-11-30 22:57:18 +0200
Merge with 5.1
Wed 2011-11-30 20:57:09 +0200
Fixed compiler warning and errors
[merge] Tue 2011-11-29 22:48:24 +0200
Merge with 5.1 + fixes for build failures in 5.2
Tue 2011-11-29 15:32:25 +0200
Fixed that maria-recover works as expected.
Tue 2011-11-29 08:50:54 +0100
Fix testcases:
main.merge fails with errno 13 in copy_file().
The reason for the error is that copy_file tries to create a file with the same name as recently deleted one, and there is still an open handle for the deleted file.
Tue 2011-11-29 02:00:24 +0100
merge, fix Windows warnings
Mon 2011-11-28 15:08:12 +0100
after merge fixes
[merge] Thu 2011-11-24 22:48:35 +0200
Automatic merge
Thu 2011-11-24 19:07:36 +0200
Added test case for Using 'innodb_sys_indexes' causes core dump
Tue 2011-11-22 21:55:11 +0100
fix dialog plugin to work on windows
Tue 2011-11-15 13:14:54 +0200
Fix for sql_buffer_result=1 gives wrong result for GROUP BY with a +
Fixed Bug #901312
The function setup_sj_materialization_part1() forgot to set the value of TABLE::map for any materialized IN subquery.
This could lead to wrong results for queries with subqueries that were converted to queries with semijoins.
Revision #3338 Thu 2011-12-08 16:29:45 +0400
Bug #901655 ST_BUFFER asserts with a coplicated shape.
Coinciding nodes can appear as a result of DOUBLE inaccuracy.
We should test that before we start the loop.
Also the spatial relations can be calculated faster if we check MBR relations first. And we do have the shape's MBR-s now.
per-file comments:
sql/gcalc_slicescan.cc
set_extent() method added.
ST_BUFFER asserts with a coplicated shape.
Revision #3337 Thu 2011-12-08 04:22:38 +0400
Small semi-join optimization improvement:
if we're considering FirstMatch access with one inner table, and @@optimizer_switch has semijoin_with_cache flag, calculate costs as if we used join cache (because we will be able to do so)
Revision #3336 [merge] Thu 2011-12-08 02:47:54 +0400
Merge fix for Bug #868908
Revision #3322.1.3 Wed 2011-12-07 23:15:57 +0400
Remove garbage assignments causing failures on Windows
Wed 2011-12-07 19:21:51 +0400
: Crash in check_simple_equality() with semijoin + materialization + prepared statement
Part2: safety and code cleanup
Wed 2011-12-07 01:03:00 +0400
: Crash in check_simple_equality() with semijoin + materialization + prepared statement
Part 1 of the fix: for semi-join merged subqueries, calling child_join->optimize() until we're done with all PS-lifetime optimizations in the parent.
Revision #3335 Thu 2011-12-08 02:12:48 +0400
Bug #901032: Wrong result for MIN/MAX on an indexed column with materialization and semijoin
opt_sum_query() should not assume that join tables from sj-materialization have known numbers of rows.
Revision #3334 Tue 2011-12-06 13:42:18 -0800
Fixed Bug #900469.
The execution plan cannot use sorting on the first table from the sequence of the joined tables if it plans to employ the block-based hash join algorithm.
Revision #3333 Tue 2011-12-06 02:46:42 -0800
Fixed Bug #899509.
The optimizer must ignore any possible hash join key when looking for the query execution plan with join_cache_level set to 0.
Revision #3332 [merge] Mon 2011-12-05 18:52:50 -0800
Merge
Revision #3330.1.1 [merge] Mon 2011-12-05 18:51:56 -0800
Merge
Mon 2011-12-05 09:50:24 -0800
Fixed .
KEYUSE elements for a possible hash join key are not sorted by field numbers of the second table T of the hash join operation. Besides some of these KEYUSE elements cannot be used to build any key as their key expressions depend on the tables that are planned to be accessed after the table T.
The code before the patch did not take this into account and, as a result, execition of a query the employing block-based hash join algorithm could cause a crash or return a wrong result set.
Revision #3331 Tue 2011-12-06 01:04:27 +0400
Bug #899962: materialized subquery with join_cache_level=3
Make create_tmp_table() set KEY_PART_INFO attributes for the keys it creates.
This wasn't needed before but is needed now, when temp. tables that are results of SJ-Materialization are being used for joins.
This particular bug depended on HA_VAR_LENGTH_PART being set, but also added code to set HA_BLOB_PART and HA_NULL_PART when appropriate.
Revision #3330 Mon 2011-12-05 10:24:14 +0400
Update test result missed in the previous cset
Revision #3329 Mon 2011-12-05 01:31:42 +0400
Make subquery Materialization, as well as semi-join Materialization be shown in EXPLAIN as select_type==MATERIALIZED.
Before, we had select_type==SUBQUERY and it was difficult to tell materialized subqueries from uncorrelated scalar-context subqueries.
Revision #3328 Sun 2011-12-04 07:43:33 -0800
Fixed Bug #899696.
If has been decided that the first match strategy is to be used to join table T from a semi-join nest while no buffer can be employed to join this table then no join buffer can be used to join any table in the join sequence between the first one belonging to the semi-join nest and table T.
Revision #3327 Fri 2011-12-02 00:36:55 +0200
Added new file (for netware)
Added some file to ignore
Revision #3326 Fri 2011-12-02 00:34:59 +0200
Fixes for netware by Guenter Knauf
Revision #3325 Fri 2011-12-02 00:24:58 +0200
Patch to get MariaDB to compile on CYGWIN; By Guenter Knauf
Increased number of locks in thr_lock (used only when testing)
Revision #3324 Wed 2011-11-30 10:22:53 -0800
Fixed Bug #898073.
The tables from the same semi-join or outer join nest cannot use join buffers if in the join sequence of the query execution plan they are separated by a table that is planned to be joined without usage of a join buffer.
Revision #3323 [merge] Wed 2011-11-30 08:28:40 +0200
Merge the fix of Bug #825051
Revision #3321.1.1 Tue 2011-11-29 23:06:39 +0200
Fixed Bug #825051
The cause of the wrong result was that Item_ref_null_helper::get_date() didn't use a method of the *_result() family, and fetched the data for the field from the current row instead of result_field. Changed to use the correct *_result() method, like to all other similar methods of Item_ref_null_helper.
Revision #3322 Tue 2011-11-29 23:09:06 +0200
Added test suite for the Bug #885162 (fixed by the patch for Bug #859375 and Bug #887458).
Revision #3321 Tue 2011-11-29 15:27:52 +0400
Bug #857066 Wrong result with ST_DISJOINT when using an index.
DISJOINT can't be properly optimized with the RTree keys in MyISAM also.
per-file comments:
storage/myisam/rt_index.c
Wrong result with ST_DISJOINT when using an index.
don't optimize DISJOINT with the RTree keys.
Revision #3320 Tue 2011-11-29 02:11:13 +0400
Bug #857066 Wrong result with ST_DISJOINT when using an index the ST_DISJOINT can't be properly optimized with the RTree key at the moment.
per-file comments:
storage/maria/ma_rt_index.c
Wrong result with ST_DISJOINT when using an index disabled optimization for the DISJOINT case.
Revision #3319 Mon 2011-11-28 15:24:07 +0200
Fix Bug #833777, Bug #894397
Analysis:
Bug #894397 was a consequence of a prior incorrect fix of Bug #833777 which didn't take into account that even when all tables are constant there may be correlated conditions, and the where clause is not equivalent to the constant conditions.
Solution:
When there are constant tables only, evaluate only the conditions that reference outer fields, because the constant conditions are already checked, and the where clause doesn't have other conditions than constant ones, and outer referencing ones. The fix for also fixes
Revision #3318 Mon 2011-11-28 12:42:14 +0200
Fixed Bug #747278
The problem was that when we have single row subquery with no rows Item_cache(es) which represent result row was not null and being requested via element_index() returned random value.
The fix is setting all Item_cache(es) in NULL before executing the query (reset() method) which guaranty NULL value of whole query or its elements requested in any way if no rows was found.
set_null() method was added to Item_cache to guaranty correct NULL value in case of reseting the cache.
Revision #3317 Sat 2011-11-26 14:23:00 -0800
Set new default values for the optimizer switch flags 'derived_merge' and 'derived_with_keys'. Now they are set on by default.
Revision #3316 [merge] Sat 2011-11-26 12:27:52 +0400
Merge
Revision #3314.1.5 Fri 2011-11-25 23:54:36 +0400
Subquery code cleanups:
Make functions that operate on SJ_TMP_TABLE be member functions
Make Loose_scan_opt data members private
Revision #3314.1.4 Fri 2011-11-25 21:45:58 +0400
Update test results
Revision #3314.1.3 Fri 2011-11-25 15:48:56 +0400
Update test results
Revision #3314.1.2 Fri 2011-11-25 14:57:27 +0400
Remove garbage comments
Revision #3314.1.1 [merge] Fri 2011-11-25 14:28:43 +0400
Merge
Revision #3275.1.3 Fri 2011-11-25 05:56:58 +0400
Semi-join optimizations code cleanup part 2:
Make EXPLAIN display "Start temporary" at the start of the fanout (it used to display at the first table whose rowid gets into temp. table which is not that useful for the user)
Updated test results (all checked)
Wed 2011-11-23 04:25:52 +0400
Semi-join optimizations code cleanup:
Break down POSITION/advance_sj_state() into four classes representing potential semi-join strategies.
Treat all strategies uniformly (before, DuplicateWeedout was special as it was the catch-all strategy. Now, we're still relying on it to be the catch-all, but are able to function,e.g. with firstmatch=on,duplicate_weedout=off.
Sat 2011-11-12 20:50:11 +0200
: Second assertion `keypart_map' failed in maria_rkey with semijoin
in advance_sj_state: Do not try to construct LooseScan strategy if we're already behind the last LooseScan table.
Revision #3315 Fri 2011-11-25 22:54:13 +0400
Remove garbage comment
Revision #3314 Thu 2011-11-24 22:56:02 -0800
Currently innodb_plugin does not support ICP. Part2.
Revision #3313 Thu 2011-11-24 23:47:50 +0200
Added valgrind suppression for an error due to
Revision #3312 Thu 2011-11-24 23:15:40 +0200
Fix Bug #894326
The patch also fixes an unrelated compiler warning.
Analysis:
The temporary table created during SJ-materialization might be used for sorting for a group by operation. The sort buffers for this internal temporary table were not cleared by the execution code after each subquery re-execution. This resulted in a memory leak detected by valgrind.
Solution:
Cleanup the sort buffers for the semijon tables as well.
Revision #3311 Thu 2011-11-24 12:19:37 -0800 Currently innodb_plugin does not support ICP.
Revision #3310 Thu 2011-11-24 15:12:10 +0200
Fix for Bug #859375 and Bug #887458.
Stop attempts to apply IN/ALL/ANY optimizations to so called "fake_select" (used for ordering and filtering results of union) in union subquery execution.
Revision #3309 Thu 2011-11-24 16:26:13 +0400
fixes to make compilers happy.
per-file comments:
mysql-test/t/gis-precise.test
number-to-string conversion differs on Windows.
Have to tolerate this while GIS data is stored in doubles.
sql/spatial.cc
prev_x initialization added.
Revision #3308 Wed 2011-11-23 23:13:51 +0200
Fix Bug #893486
Analysis:
The bug is a result of an incomplete fix for Bug #869036
That fix didn't take into account that there may be a case when ther are no NULLs in the materialized subquery, however all columns without NULLs may not be grouped in the only non-null index. This is the case when the left subquery expression has nullable columns.
Solution:
The patch handles two missing sub-cases of the case when there are no value (non-null matches) for any outer expression, and there are both NULLs and non-NUll values in the outer reference.
If the materialized subquery contains no NULLs there cannot be a partial match, because there are no NULLs in those columns where the outer reference has no NULLs.
If the materialized subquery contains NULLs, but there exists a column, such that its corresponding outer expression has no NULL, and this column also has no NULL. Then there cannot be a partial match either.
Revision #3307 Tue 2011-11-22 17:57:33 +0400
Small fixes to make compilers happy.
Revision #3306 Tue 2011-11-22 17:32:05 +0400
Windows has no 'nearbyint' in libraries.
So removed.
Revision #3305 [merge] Tue 2011-11-22 12:06:46 +0200
Merge default materialization=on.
Revision #3300.2.1 [merge] Mon 2011-11-21 17:48:25 +0200
Merge enabling materialization=on by default.
[merge] Mon 2011-11-21 16:56:32 +0200
Merge enabling of materialization=on by default with main tree.
Wed 2011-11-09 21:29:01 +0200
Fixed PBXT test cases.
Revision #3304 Mon 2011-11-21 22:16:01 +0200
Fix Bug #833777
Correct test file.
Revision #3303 Mon 2011-11-21 22:01:47 +0200
Fix Bug #833777
Fix test to pass on 32-bit machines by reducing the depth of subquery nestedness to less than 31 (sizeof(ulong)-1).
Revision #3302 [merge] Mon 2011-11-21 11:21:30 -0800
Merge.
Revision #3300.1.1 Mon 2011-11-21 09:06:35 -0800
Fixed Bug #887496
This bug in the function Loose_scan_opt::check_ref_access_part1 could lead to choosing an invalid execution plan employing a loose scan access to a semi-join table even in the cases when such access could not be used at all. This could result in wrong answers for some queries with IN subqueries.
Revision #3301 Mon 2011-11-21 18:00:55 +0200
Fix Bug #833777
Analysis:
The optimizer distinguishes two kinds of 'constant' conditions: expensive ones, and non-expensive ones. The non-expensive conditions are evaluated inside make_join_select(), and if false, already the optimizer detects empty query results.
In order to avoid arbitrarily expensive optimization, the evaluation of expensive constant conditions is delayed until execution. These conditions are attached to JOIN::exec_const_cond and evaluated in the beginning of JOIN::exec. The relevant execution logic is:
As a result, when an expensive constant condition is TRUE, it is evaluated twice - once through JOIN::exec_const_cond, and once through JOIN::cond. When the expensive constant condition is a subquery, predicate, the subquery is evaluated twice. If we have many levels of subqueries, this logic results in a chain of recursive subquery executions that walk a perfect binary tree. The result is that for subquries with depth N, JOIN::exec is executed O(2^N) times.
Solution:
Notice that the second execution of the constant conditions happens inside do_select(), in the branch: if (join->table_count == join->const_tables) { ... } In this case exec_const_cond is equivalent to the whole WHERE clause, therefore the WHERE clause has already been checked in the beginnig of JOIN::exec, and has been found to be true. The bug is addressed by not evaluating the WHERE clause if there was exec_const_conds, and it was TRUE.
Revision #3300 Mon 2011-11-21 07:00:14 -0800
Corrected the patch that made the optimizer switch for index condition pushdown set to 'on' by default.
Revision #3299 Mon 2011-11-21 05:16:16 -0800
Made the optimizer switch for index condition pushdown set to 'on' by default.
Revision #3298 Sun 2011-11-20 04:53:07 -0800
Fixed Bug #892725.
A non-first execution of a prepared statement missed a call of the TABLE_LIST::process_index_hints() method in the code of the function setup_tables().
At some scenarios this could lead to the choice of a quite inefficient execution plan for the base query of the prepared statement.
Revision #3297 Sun 2011-11-20 12:30:43 +0400
Fix for Bug #809849 spatial operations must be KILL-able.
Checks for thd->killed state added to the long loops in geometry calculations.
per-file comments:
sql/gcalc_slicescan.cc
Fix for spatial operations must be KILL-able.
checks for TERMINATED_STATE added.
sql/gcalc_slicescan.h
Revision #3296 Fri 2011-11-18 13:32:21 -0800
Fixed Bug #891995
This bug in the function setup_semijoin_dups_elimination() could lead to invalid choice of the sequence of tables for which semi-join duplicate elimination was applied.
Revision #3295 Fri 2011-11-18 09:35:51 -0800
Fixed Bug #891953
Due to this bug the function SEL_IMERGE::or_sel_tree_with_checks() could build an inconsistent merge tree if one of the SEL_TREEs in the resulting index merge happened to contain a full key range.
This could trigger an assertion failure.
Revision #3294 Fri 2011-11-18 18:15:06 +0400
unused variable removed.
Revision #3293 Fri 2011-11-18 17:56:42 +0400
GCALC_CHECK_WITH_FLOAT disabled.
That's not a good option for an onrdinary user.
Revision #3292 Fri 2011-11-18 04:41:25 -0800
Fixed Bug #800184
The function key_and() erroneously called SEL_ARG::increment_use_count() when SEL_ARG::incr_refs() should had been called. This could lead to wrong values of use_count for some SEL_ARG trees.
Revision #3291 [merge] Thu 2011-11-17 08:00:22 -0800
Merge.
Revision #3287.1.1 Thu 2011-11-17 03:24:20 -0800
Corrected the fix for Bug #891052
Revision #3290 Thu 2011-11-17 18:03:47 +0400
small fixes to make compiler happy.
Revision #3289 Thu 2011-11-17 17:12:58 +0400
test results updated.
Revision #3288 [merge] Thu 2011-11-17 14:27:00 +0400
merging.
Revision #2978.3.42 [merge] Sat 2011-11-12 19:56:29 +0400
merging.
Sun 2011-10-16 21:16:53 +0500
code cleanup.
Sun 2011-10-16 19:55:37 +0500
GIS code cleanup.
Fri 2011-10-14 18:37:40 +0500
#define added
Fri 2011-10-14 17:57:07 +0500
repeating calcualtions eliminated.
Fri 2011-10-14 16:10:55 +0500
GIS code.
Forward calculations introduced.
per-file comments:
Thu 2011-10-06 17:41:28 +0500
Copyright notices fixed.
Wed 2011-10-05 14:45:39 +0500
Valgrind warning fixed.
Coordinate size limitation removed.
per-file comments:
Tue 2011-10-04 15:29:39 +0500
GIS code cleanup.
GCALC_xxx macros fixed for the GCALC_DBUG_OFF case.
per-file comments:
Tue 2011-10-04 15:01:21 +0500
GIS library code cleanup.
GCALC_DBUG_OFF and related infrastructure defined so we can enable/disable debugging conveniently.
per-file comments:
Fri 2011-09-23 17:00:36 +0500
Wrong result with ST_INTERSECTS and LINESTRINGs
Line autointersection point was treated as if it doesn't belong to the line.
It's in some way logical, but seems to confuse people. Fixed.
Fri 2011-09-23 15:36:56 +0500
ST_WITHIN returns wrong result with MULTIPOINT and POLYGON actually only testcase added as the bug was fixed already.
modified:
mysql-test/r/gis-precise.result
Fri 2011-09-23 15:25:48 +0500
fix for ST_EQUALS returns TRUE on two nonidentical MULTIPOINTs
The 'single point' event was forgotten in the relation's calculation
per-file comments:
Fri 2011-09-23 15:05:36 +0500
fix for 857050 ST_WITHIN returns wrong result with MULTIPOINT and POLYGON return GEOMETRYCOLLECTION EMPTY, not NULL for the query
per-file comments:
mysql-test/r/gis.result
Thu 2011-09-22 18:53:36 +0500
fixed bugs
ST_CROSSES returns different result than PostGIS for overlapping polygons
ST_WITHIN returns wrong result for partially overlapping polygons
Wed 2011-09-21 13:26:21 +0500
ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed.
per-file comments:
mysql-test/r/gis.result
Wed 2011-09-21 12:50:03 +0500
fix for GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"
per-file comments:
mysql-test/r/gis.result
Wed 2011-09-21 09:29:37 +0500
bugs fixed
Compiler error: gcalc_slicescan.cc:2036: error: suggest parentheses around comparison in operand of .|. in maria-5.3-gis
ST_AREA does not work on GEOMETRYCOLLECTIONs in maria-5.3-gis
Wed 2011-09-21 00:04:41 +0500
several bugs fixed here.
Second assertion `m_poly_borders->next' failed in Gcalc_operation_reducer::count_slice in maria-5.3-gis
Fourth assertion `n > 0 && n < SINUSES_CALCULATED*2+1' in get_n_sincos
Tue 2011-09-13 18:26:16 +0500
Fix for Wrong result with ST_INTERSECTION between linestrings and a polygon in 5.3-gis
Coordinates were mistakenly reversed for MULTIPOINT.
Tue 2011-09-13 15:19:55 +0500
Fix for Assertion `fabs(cur_isc->x-m_cur_intersection->x) + fabs(cur_isc->y-m_cur_intersection->y) < 0.000000000001' failed in Gcalc_scan_iterator::intersection_scan() in maria-5.3-gis
That assertion's check was too tight. Released it a bit.
per-file comments:
Tue 2011-09-13 13:59:11 +0500
Fix for few similar bugs:
Assertion `t->rp->type == Gcalc_function::shape_line' failed in Gcalc_operation_reducer::end_line in maria-5.3-gi
Assertion `m_poly_borders->next' failed in Gcalc_operation_reducer::count_slice in maria-5.3-gis
Mon 2011-09-05 09:49:46 +0500
Crash in Gcalc_operation_reducer::end_couple with ST_UNION and MULTIPOLYGONs in 5.3-gis.
When edges of a polygon coicide, it can form an pike, that is turned into a line after an operation.
In this case a former polygon point can be an end of a single line, and that case wasn't properly handled.
Mon 2011-09-05 09:13:58 +0500
Crash in Gcalc_scan_iterator::point::get_shape with ST_DISTANCE and MULTILINESTRING in maria-5.3-gis.
wrong variable was used as a result of inattentive copypaste.
per-file comments:
Sun 2011-09-04 23:48:17 +0500
100% CPU usage with ST_UNION in maria-5.3-gis.
Line loops weren't recognized when collect results.
Fixed by checking if we got the same beginning point of the line.
Sun 2011-09-04 19:11:04 +0500
ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
We didn't implement an empty geometry. And returning NULL instead of it is not quite correct. So here is the implementation of the empty value as GEOMETRYCOLLECTION().
per-file comments:
Fri 2011-09-02 09:38:17 +0500
and
tests added.
per-file comments:
Thu 2011-09-01 11:44:56 +0500
PostGIS-style 'same point' handling.
Wed 2011-07-13 14:57:27 +0500
Fix for Memory corruption/valgrind warning/crash in move_hole() with ST_UNION.
Second smaller hole in the polygon got link to the bigger one as it's the outer ring. Fixed by specifying the outer ring explicitly.
per-file comments:
Tue 2011-07-12 11:21:20 +0500
Fix for Assertion `t1->result_range' in Gcalc_operation_reducer::end_couple.
We cannot cut a line from a polygon. So if the polygon fits the condition, and the intersection of a line and the polygon doesn't, we just skip the line.
That rule wasn't applied if the line start was inside the polygon, which leaded to the assertion.
Fri 2011-07-08 15:38:15 +0500
Fix for Second assertion in Gis_geometry_collection::init_from_opresult.
A polygon has no right to have holes that are actually points.
So just skip them when we collect the result of an operation.
Thu 2011-07-07 21:30:51 +0500
Fix for Second assertion Assertion `n > 0 && n < SINUSES_CALCULATED*2+1' in get_n_sincos.
Just typo-style mistake. Should be '||' instead of '&&'.
per-file comments:
Thu 2011-07-07 16:59:45 +0500
Fix for Assertion 0 in Gcalc_scan_iterator::pop_suitable_intersection
There were actually two bugs. One was when the line that intersects itself the intersection point treated as it doesn't belong to the line.
Second when edges partly coincide, wrong result produced when we try to find their intersection.
Tue 2011-07-05 19:42:35 +0500
Crash in wkb_get_double with ST_INTERSECTION.
That crash happened with the complicated topology of the result.
If we found a hole in a polygon whose outside border was already found, we need to paste the hole right after it and respectively shift polygons after it. Also we need to update poly_position fields in these polygons. That last thing wasn't properly done that led to the crash.
Mon 2011-07-04 16:17:34 +0500
fix for Assertion with ST_INTERSECTION on NULL values
The ::val_str() method has to return NULL if it calculated the null_value, not just set the related flag.
per-file comments:
Mon 2011-07-04 16:03:36 +0500
Infinite recursion in Gcalc_function::count_internal with ST_BUFFER over MULTIPOINT
Collections were treated mistakenly, so the counter for the final UNION operation received the wrong value.
As a fix we implement Item_func_buffer::Transporter::start_collection() method, where we set the proper operation and the operand counter. start_poly() and start_line() were also modified to function correctly for the polygon as a part of a collection.
Thu 2011-06-30 19:24:52 +0500
fix for ST_BUFFER asserts if radius = 0.
Internal caclucations can't handle zero distance properly.
As the ST_BUFFER(geom, 0) is in fact NOOP, we'll just return the
Thu 2011-06-30 18:18:27 +0500
fix for Assertion `(0)' failed in Gis_geometry_collection::init_from_opresult on ST_UNION
If the result contains a polygon with a hole, consequitive shapes weren't calculated properly, as the hole appeared as shape in the result, but actually it's a single shape with the surrounding polygon. It's more natural to use the size of the result as a border instead of the number of resulting shapes.
[merge] Mon 2011-06-20 00:21:41 +0500
gis-related tests fixes.
merging.
Tue 2011-06-14 11:20:48 +0500
Revision #3287 Thu 2011-11-17 01:00:46 -0800
Fixed Bug #891052.
Some optimizer switches were missing in the help lists of mysqld.
Revision #3286 Thu 2011-11-17 01:25:10 +0200
Fix Bug #869036
Apart from the fix, the patch also adds few more unrelated test cases for partial matching, and fixes few typos.
Analysis:
This bug uncovered that partial matching via rowid intersection didn't handle the case when:
the left IN argument has some NULLs,
there are no non-null value matches, and there is no non-null column,
the subquery columns that are not covered with the NULLs in the left IN argument contain at least one row, such that it has NULL values in all columns where the left IN operand has no NULLs.
In this case there is a partial match.
In addition the analysis of the related code uncovered incorrect handling of few other related cases.
Solution:
The solution for the bug is to check if there exists a row with NULLs in all columns other than the ones having NULL in the let IN operand.
The check is implemented via checking whether the bitmaps that store NULL information in class Ordered_key have a non-empty intersection for the relevant columns.
The intersection itself is implemented via the function bitmap_exists_intersection() in my_bitmap.c.
Revision #3285 Wed 2011-11-16 06:11:25 -0800
Fixed Bug #887479.
The function setup_semijoin_dups_elimination erroneously assumed that if join_cache_level is set to 3 or 4 then the type of the access to a table cannot be JT_REF or JT_EQ_REF. This could lead to wrong query result sets.
Revision #3284 [merge] Tue 2011-11-15 14:35:36 -0800
Merge.
Revision #3278.1.1 Tue 2011-11-15 13:03:00 -0800
Fixed Bug #889750.
If the optimizer switch 'semijoin_with_cache' is set to 'off' then join cache cannot be used to join inner tables of a semijoin.
Also fixed a bug in the function check_join_cache_usage() that led to wrong output of the EXPLAIN commands for some test cases.
Revision #3283 Mon 2011-11-14 19:24:36 +0200
Fix Bug #889744
MariaDB 5.5 merges changes from MySQL 5.5 where all constant expressions are wrapped into an Item_cache. As a result, constant single-row subqueries were also wrapped in an Item_cache. When analyzing the where clause for constant expressions that can be evaluated during optimization, subqueries wrapped into an Item_cache did not appear as expensive, and were therefore evaluated during optimization. Such evaluation is against the current architecture of MariaDB 5.3 where subquries are executed during the execute phase.
The patch adds the is_expensive() predicate to Item_cache.
This makes Item_cache consistent with other wrapping Item classes that need to look at the properties of the wrapped object.
Revision #3282 [merge] Mon 2011-11-14 00:32:21 +0100
5.2->5.3 merge
Revision #2732.46.16 [merge] Sun 2011-11-13 18:41:45 +0100
5.1->5.2 merge
Sun 2011-11-13 13:28:35 +0100
don't make feedback_plugin_send.test as 'big'
don't assume that the http reply packet will arrive in all in one piece
Revision #3281 Sun 2011-11-13 12:02:13 +0200
Fix for Bug #824425: Prohibiting subqueries in rows for left part of IN/ALL/ANY
Fix for walk() method of subqueries: always call the method on the subquery.
Revision #3280 [merge] Sun 2011-11-13 09:10:45 +0100
5.2->5.3 merge
Revision #2732.46.15 [merge] Sun 2011-11-13 08:30:03 +0100
5.1-5.2 merge
Sat 2011-11-12 18:40:51 +0100
increase feedback plugin version
Revision #3279 [merge] Sat 2011-11-12 18:08:12 +0100
5.2->5.3 merge
Revision #2732.46.14 [merge] Sat 2011-11-12 16:47:14 +0100
5.1 merge
Sat 2011-11-12 16:41:00 +0100
feedback plugin:
fix for mem_total on windows
report the time of the data snapshot
Tue 2011-11-08 23:07:19 +0100
typos fixed
(thanks viva64.com)
[merge] Fri 2011-11-04 12:41:27 +0200
Merge of gcc 4.6 fixes
Thu 2011-10-27 19:18:25 +0300
Fix gcc 4.6 warning after merge with 5.1
Tue 2011-11-01 12:36:43 +0400
: Wrong result with RIGHT JOIN + derived_merge
Make eliminate_tables_for_list() take into account that it is not possible to eliminate a table if it is used in the upper-side ON expressions. Example:
Here it would eliminate t2 which is not possible because of use of t2.columns.
Revision #3278 [merge] Sat 2011-11-12 03:57:46 -0800
Merge.
Revision #3148.1.1 Sat 2011-11-12 02:20:44 -0800
Fixed Bug #823301
A bug in the code of the function key_or could lead to a situation when performing of an OR operation for one index changes the result the operation for another index. This bug is fixed with this patch.
Also corrected the specification and the code of the function or_sel_tree_with_checks.
Revision #3277 Sat 2011-11-12 12:03:27 +0200
Remove unused variable detected by GCC 4.6.1.
Revision #3276 Sat 2011-11-12 11:29:12 +0200
In MariaDB, when running in ONLY_FULL_GROUP_BY mode, the server produced in incorrect error message that there is an aggregate function without GROUP BY, for artificially created MIN/MAX functions during subquery MIN/MAX optimization.
The fix introduces a way to distinguish between artifially created MIN/MAX functions as a result of a rewrite, and normal ones present in the query. The test for ONLY_FULL_GROUP_BY violation now tests in addition if a MIN/MAX function was part of a MIN/MAX subquery rewrite.
In order to be able to distinguish these MIN/MAX functions, the patch introduces an additional flag in Item_in_subselect::in_strategy - SUBS_STRATEGY_CHOSEN. This flag is set when the optimizer makes its final choice of a subuqery strategy. In order to make the choice consistent, access to Item_in_subselect::in_strategy is provided via new class methods.
Fix
In MariaDB, when running in ONLY_FULL_GROUP_BY mode, the server produced in incorrect error message that there is an aggregate function without GROUP BY, for artificially created MIN/MAX functions during subquery MIN/MAX optimization.
The fix introduces a way to distinguish between artifially created MIN/MAX functions as a result of a rewrite, and normal ones present in the query. The test for ONLY_FULL_GROUP_BY violation now tests in addition if a MIN/MAX function was part of a MIN/MAX subquery rewrite.
In order to be able to distinguish these MIN/MAX functions, the patch introduces an additional flag in Item_in_subselect::in_strategy - SUBS_STRATEGY_CHOSEN. This flag is set when the optimizer makes its final choice of a subuqery strategy. In order to make the choice consistent, access to Item_in_subselect::in_strategy is provided via new class methods.
Revision #3275 Fri 2011-11-11 14:53:26 -0800
Fixed Bug #879871
The function add_ref_to_table_cond missed updating the value of join_tab->pre_idx_push_select_cond after having updated the value of join_tab->select->pre_idx_push_select_cond.
Revision #3274 [merge] Thu 2011-11-10 13:28:02 -0800
Merge of the maria-5.3-icp tree into the 5.3 tree
Revision #3256.1.16 [merge] Tue 2011-11-08 08:04:48 -0800
Merge.
Mon 2011-11-07 23:30:03 +0400
: Wrong result with ICP, outer join, subquery in maria-5.3-icp
Do not push index condition if we're using a triggered ref access.
[merge] Sun 2011-11-06 13:44:59 -0800
Merge.
Sun 2011-11-06 01:23:03 -0700
Fixed
The bug happened because in some cases the function JOIN::exec did not save the value of TABLE::pre_idx_push_select_cond in TABLE::select->pre_idx_push_select_cond for the sort table.
Noticed and fixed a bug in the function make_cond_remainder that builds the remainder condition after extraction of an index pushdown condition from the where condition. The code erroneously assumed that the function make_cond_for_table left the value of ICP_COND_USES_INDEX_ONLY in sub-condition markers.
Fri 2011-11-04 05:39:45 -0700
Fixed
The call of the virtual function cancel_pushed_idx_cond in the code of the function test_if_skip_sort_order was misplaced when backporting the fix for
[merge] Wed 2011-11-02 01:22:11 -0700
Merge.
Tue 2011-11-01 07:00:55 -0700
Backported the fix and the test case for from the mysql-5.6 code line.
Fixed a bug in select_describe.
Adjusted results for affected test cases.
Mon 2011-10-31 01:36:28 -0700
Fixed a compilation error.
Mon 2011-10-31 01:13:12 -0700
Backported the test case for from the mysql-5.6 code line.
(Failed to reproduce the bug in mariadb-5.3).
Sun 2011-10-30 06:17:07 -0700
Backported the fix and the test case for from the mysql-5.6 code line.
Sun 2011-10-30 04:18:09 -0700
Backported the test case for from mysql-5.6 code line.
The bug was fixed by the patches for and that were applied earlier to the mariadb-5.3 code.
Sun 2011-10-30 03:34:26 -0700
Backported the test case for from mysql-5.6 code line.
The bug was fixed by the patch for that was applied earlier to the mariadb-5.3 code.
Sun 2011-10-30 02:37:10 -0700
Backported the test case for The fix was backported earlier.
Sat 2011-10-29 15:36:24 -0700
Backported the fix and the test case for from mysql-5.6 code line.
[merge] Fri 2011-10-28 05:19:45 -0700
Merge.
[merge] Fri 2011-10-28 04:07:11 -0700
Merge.
Thu 2011-06-02 14:03:02 -0700
Applied the patch for (for the mysql-5.6 code line).
Revision #3273 Mon 2011-11-07 16:39:02 +0400
Make subselect_extra_no_semijoin.test run the tests with semijoin=off,
update test results
Revision #3272 Fri 2011-11-04 12:04:12 +0200
Fixed that test doesn't abort if 'var' points to a deleted directory (common case when using --mem)
Better error message if --log-bin is used without --log-bin-index
Revision #3271 Fri 2011-11-04 10:14:25 +0200
Fixed Bug #884101 "Crash in check_table_is_closed with concurrent workload"
Revision #3270 Thu 2011-11-03 13:00:25 +0100
rename binlog_dbug_fsync_sleep -> debug_binlog_fsync_sleep
Revision #3269 Thu 2011-11-03 12:59:48 +0100
cast.test: use exact double, to be independent from compiler optimizations
Revision #3268 [merge] Wed 2011-11-02 22:06:22 +0400
Merge
Revision #3262.1.3 Wed 2011-11-02 22:05:08 +0400
Bug #878753: Assertion '0' failed in replace_where_subcondition with derived_merge
Remove the assert in replace_where_subcondition (the patch has explanation why)
Revision #3267 Wed 2011-11-02 20:01:50 +0400
Change the default @@optimizer_switch settings:
More test result updates (the errors are the same, the difference is that "at row X" became "at row Y" due to queries with semi-joins producing select results in different order)
Revision #3266 Wed 2011-11-02 19:52:11 +0400
Fix "unused variable addr" warning
Revision #3265 [merge] Wed 2011-11-02 19:37:26 +0400
Merge
Revision #3262.1.2 Wed 2011-11-02 19:36:08 +0400
Change the default @@optimizer_switch settings:
More test result updates
Revision #3264 [merge] Wed 2011-11-02 13:51:47 +0400
Merge
Revision #3262.1.1 Wed 2011-11-02 13:48:41 +0400
Change the default @@optimizer_switch settings:
semijoin=on
firstmatch=on
loosescan=on
Revision #3263 [merge] Wed 2011-11-02 10:05:07 +0200
Merge of Bug #872775 fix
Revision #3248.1.1 Tue 2011-11-01 17:42:52 +0200
Fix of Bug #872775
The problem was that merged views has its own nest_level numbering => when we compare nest levels we should take into considiration basis (i.e. 0 level), if it is different then nest levels are not comparable.
Revision #3262 Tue 2011-11-01 18:19:19 +0200
Fix Bug #833702
Analysis:
Equality propagation propagated the constant '7' into args[0] of the Item_in_optimizer that stands for the "< ANY" predicate. At the same the min/max subquery rewrite swapped the order of the left and right operands of the "<" predicate, but used Item_in_subselect::left_expr.
As a result, when the <ANY predicate is executed early in the execution phase as a contant condition, instead of a constant right (swapped) argument of the < predicate, there was a field (t3.a). This field had no data, since the whole predicate is considered constant, and it is evaluated before any tables are read. Having junk in the field row buffer produced wrong result
Solution:
Fix create_swap to pick the correct Item_in_optimizer left argument.
Revision #3261 Tue 2011-11-01 13:22:09 +0200
Fix of typo.
Revision #3260 Tue 2011-11-01 12:04:11 +0400
Bug #884631: Table elimination works 5.3 release builds even if turned off
Make table elimination to actually switch itself on/off in release builds.
Revision #3259 Mon 2011-10-31 15:07:43 +0400
Bug #882994: Crash in QUICK_RANGE_SELECT::reset with derived_with_keys
The bug was caused by the following scenario:
a quick select is created with get_quick_select_for_ref. The quick select refers to temporary (derived) table. It saves table->file, which refers to a ha_heap object.
When temp table is populated, ha_heap reaches max. size and is converted to a ha_myisam. However, quick->file remains pointing to where ha_heap was.
Attempt to use the quick select causes crash.
Fixed by introducing QUICK_SELECT_I::replace_handler(). Note that it will not work for index_merge quick selects. Which is fine, because these quick selects are never created for derived tables.
Revision #3258 Fri 2011-10-28 12:38:36 +0400
Let t/myisam_icp.test run include/icp_tests.inc with MRR/ICP turned ON (not OFF)
Fix the compile-time-default value of optimizer_switch printed by mysqld --help --defaults
Revision #3257 Fri 2011-10-28 11:23:30 +0400
Make innodb_no_mrricp.test to really run with MRR and ICP turned OFF.
Revision #3256 Thu 2011-10-27 12:03:33 -0700
Moved the test case for Bug #879939 to derived_view.test where it belongs to.
Revision #3255 [merge] Thu 2011-10-27 09:14:45 -0700
Merge.
Revision #3252.1.1 Thu 2011-10-27 08:32:24 -0700
Fixed Bug #874035
The function Item_direct_view_ref::fix_fields erroneously did not correct the value of the flag maybe_null when the view for which the item was being fixed happened to be an inner table of an outer join.
Revision #3254 Thu 2011-10-27 13:54:28 +0400
Bug #882472: subselect4.test fails in current 5.3
The problem was that the value of READ_RECORD::file was not updated when the underlying table was temporary and was converted from heap to myisam. Resolved by eliminating READ_RECORD::file, always use READ_RECORD::table->file
Revision #3253 Wed 2011-10-26 20:25:18 +0300
Fixed Bug #879939 "assertion in ha_maria::enable_indexes with derived_with_keys=on"
Honor unique/not unique when creating keys for internal tempory tables.
Added new variables to be used to limit how keys are created for internal temporary tables.
Revision #3252 Wed 2011-10-26 04:27:09 -0700
Fixed Bug #881449
The function SELECT_LEX::update_used_tables first must clean up all bitmaps to be recalculated for all tables that require it and only after this walk through on conditions attached to the tables to update these bitmaps.
Revision #3251 [merge] Wed 2011-10-26 10:58:40 +0400
Merge fix for Bug #877288
Revision #3249.1.1 Wed 2011-10-26 02:38:49 +0400
Bug #877288: Wrong result with semijoin + materialization + multipart key
when create_ref_for_key() is constructing a ref access for a table that's inside a SJ-Materialization nest, it may not use references to fields of tables that are unside the nest (because these fields will not yet have values when ref access will be used)
The check was performed in the first of create_ref_for_key's loops (the one which counts how many key parts are usable) but not in the second (the one which actually fills the TABLE_REF structure).
Revision #3250 Tue 2011-10-25 14:18:19 -0700
Fixed Bug #881318.
If a materialized derived table / view is empty then for this table the value of file->ref is 0. This was not taken into account by the function JOIN_CACHE::write_record_data. As a result a query using an empty materialized derived tables as inner tables of outer joins and IN subqueries in WHERE conditions could cause server crashes when the optimizer employed join caches and duplicate elimination for semi-joins.
Revision #3249 Mon 2011-10-24 12:54:28 -0700
Fixed Bug #880724
Do not create KEYUSEs for a materialized view over a constant table.
Revision #3248 Sun 2011-10-23 05:46:03 -0700
Fixed Bug #879882
This bug happened because the function Item_cond::eval_not_null_tables erroneously did not initialize the value of not_null_tables_cache.
Revision #3247 Sat 2011-10-22 07:19:43 -0700
Fixed Bug #878769
The method DsMrr_impl::dsmrr_init erroneously tried to get a KEY descriptor for key with number MAX_KEY. This caused valgrind complains.
Revision #3246 Sat 2011-10-22 00:14:27 -0700
Fixed Bug #874378
This bug happened for the queries over multi-table mergeable views because the bitmap TABLE::read_set of the underlying tables were not updated after the views had been merged into the query.
Now this bitmaps are updated properly.
Also the bitmap TABLE::merge_keys now is updated in prevention of future bugs.
Revision #3245 Thu 2011-10-20 08:02:31 -0700
Added a test case for Bug #873263 fixed by the patch for Bug #874006
Revision #3244 Thu 2011-10-20 04:59:20 -0700
Fixed Bug #878199
The function JOIN::drop_unused_derived_keys could erroneously set the value of REF::key to 0 for a joined materialized view/derived table in the case when no REF access to the table was used by the query execution plan. This could cause a crash of the server.
Revision #3243 [merge] Wed 2011-10-19 23:35:11 -0700
Merge.
Revision #3240.1.1 Wed 2011-10-19 23:28:37 -0700
Fixed Bug #877316
This bug happened due to incompleteness of the fix for : the occurrences of the fields in the conditions of correlated subqueries were not taken into account when recalculating covering keys bit maps.
Revision #3242 [merge] Wed 2011-10-19 21:01:42 +0200
merge 5.2
Revision #2732.46.11 [merge] Wed 2011-10-19 20:53:16 +0200
merge from 5.1
Wed 2011-10-19 20:51:01 +0200
Fix endless loop in my_gethwaddr()
Thu 2011-10-13 11:20:33 +0200
silence the "uninitialized" warning
Sun 2011-10-16 21:55:53 +0300
Fixed wrong info message for mysqld --general-log
Fixed wrong parameter type for --general-log. Now one can enable it with --general-log= 1 | true | on
Revision #3241 Tue 2011-10-18 22:50:17 +0300
Fix of building on Mac OS.
Revision #3240 [merge] Tue 2011-10-18 14:04:10 +0300
merge
Revision #3233.2.1 Tue 2011-10-18 13:44:12 +0300
Compiler warning about assigned but not used variables fixed.
Revision #3239 Mon 2011-10-17 03:42:56 -0700
Fixed a compiler warning.
Revision #3238 [merge] Mon 2011-10-17 01:20:16 -0700
Merge.
Revision #3235.1.1 Sun 2011-10-16 13:23:57 -0700
Fixed Bug #874006
This bug manifested itself with queries containing non-correlated IN subqueries over materialized views/derived tables.
The bug happened because the code of the function generate_derived_keys did not take into account that the function could be called twice when the optimizer was deciding whether in-exist transformation should be applied.
Revision #3237 Sun 2011-10-16 22:46:11 +0300
Remove extra MariaDB- from binary tar.gz file name
Print server version name to .err file on crash
Revision #3236 Fri 2011-10-14 17:51:16 +0200
In crash handler, output session value of the optimizer switch.
Revision #3235 [merge] Fri 2011-10-14 03:56:41 -0700
Merge.
Revision #3233.1.1 [merge] Fri 2011-10-14 00:11:50 -0700
Merge.
Thu 2011-10-13 22:39:00 -0700
Fixed
This bug happened because the maps of covering keys for mergeable derived tables/views was not recalculated after the derived tables/vies had been merged into the main query.
Revision #3234 Fri 2011-10-14 12:41:20 +0200
update pbxt test results
Revision #3233 Thu 2011-10-13 13:44:50 +0200
Bug #817966 int_column IN (string_constant)
restore the status quo from before the microsecond patch
Revision #3232 Thu 2011-10-13 11:23:59 +0200
typo.
Revision #2643.143.62 [merge] Thu 2011-12-01 19:20:57 +0100
merge
merge] Thu 2011-12-01 19:18:45 +0100
merge
Thu 2011-12-01 19:15:09 +0100
Fix main.merge testcase on Windows
Fixed buildbot failures (compiler warnings, failing tests)
Revision #2643.143.59 Wed 2011-11-30 18:44:51 +0200
Fixed compiler warnings and other bugs found by buildbot.
Revision #2643.143.58 Wed 2011-11-30 11:37:28 +0100
test both federated and federatedX in the federated suite.
Revision #2643.143.57 Wed 2011-11-30 13:53:25 +0100
Cherrypick into XtraDB: Bug#13002783 PARTIALLY UNINITIALIZED CASCADE UPDATE VECTOR<>
We merged the test case for this into MariaDB 5.1, but the fix was not yet part of XtraDB.
Revision #2643.143.56 Wed 2011-11-30 00:34:05 +0200
Fixed compiler warnings
"" is now used if no option is set
Revision #2643.143.54 Tue 2011-11-29 01:10:17 +0100
Fix Windows build, and a conversion truncation warning.
Revision #2643.143.53 Thu 2011-11-24 19:23:20 +0200
Fixed that one can use --maria-recover=backup,force
(Before we only allowed one option)
To fix, use my_delete_allow_opened() for MTR's delete_file. On Windows, this renames file to unique name prior to deletion, and prevents EACCES errors for files opened with FILE_SHARE_DELETE.
innodb_bug59641
generates warnings, after server was killed and restarted in the test case.
The warnings are about test_suppression table (needs to be repaired, as it that was written just prior to the crash)
Fixed by using FLUSH TABLES after populating warning suppression table.
Revision #2732.48.1 [merge] Thu 2011-11-24 18:48:58 +0200
Merge with MariaDB 5.1
Revision #2643.143.52 Thu 2011-11-24 16:04:19 +0200
Fixes for build failuers found by buildbot
[merge] Wed 2011-11-23 19:32:14 +0200
Merge with MySQL 5.1.60
Wed 2011-11-23 10:25:27 +0200
Fixes of testcases after merge with MySQL 5.1.59
[merge] Mon 2011-11-21 19:19:37 +0200
Merge of XtraDB for 5.1.59
[merge] Mon 2011-11-21 14:21:13 +0100
Merge XtraDB from Percona-Server-5.1.59-13 into .
[merge] Mon 2011-11-21 19:17:56 +0200
Automatic merge
[merge] Mon 2011-11-21 19:13:14 +0200
Initial merge with MySQL 5.1 (XtraDB still needs to be merged)
sql/gcalc_slicescan.h
set_extent() method declared.
Bug #901655 ST_BUFFER asserts with a coplicated shape.
sql/gcalc_tools.cc
Bug #901655 ST_BUFFER asserts with a coplicated shape.
checks for equal nodes added.
sql/item_geofunc.cc
Bug #901655 ST_BUFFER asserts with a coplicated shape.
MBR for the shapes calculated, and MBR checks added before we start the heavy calculations.
sql/spatial.h
Bug #901655 ST_BUFFER asserts with a coplicated shape.
MBR::buffer() method implemented.
Update test results (checked)
Removed a comment that is not true any more.
Consistent use of the SUBS_NOT_TRANSFORMED constant for in_strategy.
Revision #3273.1.1 Wed 2011-11-09 15:36:25 +0200
Enable subquery materialization=ON by default.
Fix for Bug #809849 spatial operations must be KILL-able.
defines added to include checks for termination in the library.
sql/gcalc_tools.cc
Fix for Bug #809849 spatial operations must be KILL-able.
checks for TERMINATED_STATE added.
sql/gcalc_tools.h
Fix for Bug #809849 spatial operations must be KILL-able.
TERMINATED_STATE pointers added.
sql/item_geofunc.cc
Fix for Bug #809849 spatial operations must be KILL-able.
sql/item_geofunc.h
Fix for Bug #809849 spatial operations must be KILL-able.
sql/gcalc_slicescan.cc
sql/gcalc_slicescan.h
sql/gcalc_tools.cc
sql/gcalc_tools.h
sql/item_geofunc.cc
mysql-test/r/gis-precise.result
test result updated.
sql/gcalc_slicescan.cc
Check coordinate extent to pick better precidion in the ::set_double()
sql/gcalc_slicescan.h
free_list() can lead to valgrind warnig. Fixed
sql/gcalc_tools.cc
free_list() call changed.
sql/gcalc_slicescan.h
GIS code cleanup.
sql/gcalc_slicescan.cc
GIS library code cleanup.
sql/gcalc_slicescan.h
GIS library code cleanup.
sql/gcalc_tools.cc
GIS library code cleanup.
sql/gcalc_tools.h
GIS library code cleanup.
per_file_comments:
mysql-test/r/gis-precise.result
Bug #857087 Wrong result with ST_INTERSECTS and LINESTRINGs
test result updated.
mysql-test/t/gis-precise.test
Wrong result with ST_INTERSECTS and LINESTRINGs
test case added.
sql/gcalc_tools.cc
Wrong result with ST_INTERSECTS and LINESTRINGs
Point of line autointersection handled as it belongs to the line.
sql/gcalc_tools.h
Wrong result with ST_INTERSECTS and LINESTRINGs
Gcalc_function::set_i_state() added
Bug #857050 ST_WITHIN returns wrong result with MULTIPOINT and POLYGON
test result updated.
mysql-test/t/gis-precise.test
Bug #857050 ST_WITHIN returns wrong result with MULTIPOINT and POLYGON
test case added.
sql/gcalc_tools.cc
superfluous variable removed.
mysql-test/r/gis-precise.result
fix for Bug #857051 ST_EQUALS returns TRUE on two nonidentical MULTIPOINTs
test result updated.
mysql-test/t/gis-precise.test
fix for Bug #857051 ST_EQUALS returns TRUE on two nonidentical MULTIPOINTs
test case added.
sql/gcalc_tools.cc
fix for Bug #857051 ST_EQUALS returns TRUE on two nonidentical MULTIPOINTs
scev_single_point is properly handled.
fix for 857050 ST_WITHIN returns wrong result with MULTIPOINT and POLYGON test result updated.
sql/spatial.cc
fix for 857050 ST_WITHIN returns wrong result with MULTIPOINT and POLYGON return of the Geometry::envelope() changed for the empty geometry.
Bug #855492 ST_WITHIN returns TRUE on point on the edge of a polygon
Bug #855497 ST_ENVELOPE of GEOMETRYCOLLECTION EMPTY returns NULL and not GEOMETRYCOLLECTION EMPTY
Bug #855503 ST_EQUALS reports TRUE between a POLYGON and a MULTILINESTRING
Bug #855505 ST_TOUCHES reports TRUE for intersecting polygon and linestring
Changed the way weird functions like Crosses or Touches treated.
Added BORDER handling to the Gcalc_function.
per-file comments:
mysql-test/r/gis-precise.result
GIS bugs fixed.
test result updated.
mysql-test/t/gis-precise.test
GIS bugs fixed.
test cases added.
sql/gcalc_slicescan.h
GIS bugs fixed.
sql/gcalc_tools.cc
GIS bugs fixed.
sql/gcalc_tools.h
GIS bugs fixed.
sql/item_create.cc
GIS bugs fixed.
sql/item_geofunc.cc
GIS bugs fixed.
sql/item_geofunc.h
GIS bugs fixed.
sql/spatial.cc
GIS bugs fixed.
Bug #855336 ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed.
test result updated.
mysql-test/t/gis.test
Bug #855336 ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed.
test case added.
sql/item_geofunc.cc
Bug #855336 ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed.
geom_length() call fixed.
sql/spatial.cc
Bug #855336 ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed.
Geometry_collection::geom_length implemented.
sql/spatial.h
Bug #855336 ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed.
Geometry_collection::geom_length declaration added.
fix for Bug #848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"
test result updated.
mysql-test/t/gis.test
fix for Bug #848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"
test case added.
sql/gstream.cc
fix for Bug #848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"
lookup_next_word() implemented.
sql/gstream.h
fix for Bug #848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"
lookup_next_word() added.
sql/spatial.cc
fix for Bug #848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"
name changed for the empty geometry.
sql/spatial.h
fix for Bug #848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"
declarations modified.
per-file comments:
mysql-test/r/gis.result
test result updated.
mysql-test/t/gis.test
test case added for 850775.
sql/gcalc_slicescan.cc
compiler error fixed.
sql/spatial.cc
ST_AREA implementation for GEOMETRY_COLLECTION, POINT and LINESTRING.
sql/spatial.h
area() declarations added.
Bug #849789 Second assertion `m_poly_borders->next' failed in Gcalc_operation_reducer::count_slice in maria-5.3-gis
Bug #848901 Assertion `fabs(cur_isc->x-m_cur_intersection->x) + fabs(cur_isc->y-m_cur_intersection->y) < 0.000000000001' failed in Gcalc_scan_iterator::intersection_scan() in maria-5.3-gis
per-file comments:
mysql-test/r/gis-precise.result
test result updated.
mysql-test/r/gis.result
test result updated.
sql/gcalc_slicescan.cc
bugfixes.
sql/gcalc_slicescan.h
bugfixes.
sql/gcalc_tools.cc
bugfixes.
sql/gcalc_tools.h
bugfixes.
sql/item_geofunc.cc
bugfixes.
sql/spatial.cc
bugfixes.
mysql-test/r/gis-precise.result
Fix for Bug #848939 Wrong result with ST_INTERSECTION between linestrings and a polygon in 5.3-gis
test result updated.
mysql-test/t/gis-precise.test
Fix for Wrong result with ST_INTERSECTION between linestrings and a polygon in 5.3-gis
test case added.
sql/gcalc_tools.cc
Fix for Wrong result with ST_INTERSECTION between linestrings and a polygon in 5.3-gis
coordinates set in the proper order.
mysql-test/r/gis-precise.result
Fix for Bug #848901
test result updated.
mysql-test/t/gis-precise.test
Fix for Bug #848901
test case added.
sql/gcalc_slicescan.cc
Fix for Bug #848901
The DBUG_ASSERT check is too tight here.
Bug #841638 Assertion `!m_prev || m_prev->x != x || m_prev->y != y' failed in Gcalc_shape_transporter::int_add_point in maria-5.3-gis
Bug #841662 Third assertion `n > 0 && n < SINUSES_CALCULATED*2+1' in get_n_sincos
Bug #841745 Assertion `!sp0->is_bottom()' failed in Gcalc_scan_iterator::find_intersections in maria-5.3-gis
They mostly was caused by inprecision of double arithmetic.
Fixed by changes in how to handle multiple intersections to keep their order right.
Also ST_DISTANCE(GEOM, EMPTY_GEOM) was defined as NULL.
per-file comments:
mysql-test/r/gis-precise.result
GIS bugfixes.
test result updated.
mysql-test/t/gis-precise.test
GIS bugfixes.
test cases added.
sql/gcalc_slicescan.cc
GIS bugfixes.
If intersections are close, add order checks to cope with the double calcualtions imprecision.
sql/gcalc_slicescan.h
GIS bugfixes.
n_row parameter added to intersection to check their order.
sql/item_geofunc.cc
GIS bugfixes.
ST_DISTANCE(GEOM, EMPTY_GEOM) returns NULL.
per-file comments:
mysql-test/r/gis-precise.result
Bug #839327 Crash in Gcalc_operation_reducer::end_couple with ST_UNION and MULTIPOLYGONs in 5.3-gis.
test result updated.
mysql-test/t/gis-precise.test
Crash in Gcalc_operation_reducer::end_couple with ST_UNION and MULTIPOLYGONs in 5.3-gis.
test case added.
sql/gcalc_tools.cc
Crash in Gcalc_operation_reducer::end_couple with ST_UNION and MULTIPOLYGONs in 5.3-gis.
in the scev_two_ends case check if we have single line ending on a polygon node.
mysql-test/r/gis-precise.result
Bug #839318 Crash in Gcalc_scan_iterator::point::get_shape with ST_DISTANCE and MULTILINESTRING in maria-5.3-gis.
test result updated.
mysql-test/t/gis-precise.test
Crash in Gcalc_scan_iterator::point::get_shape with ST_DISTANCE and MULTILINESTRING in maria-5.3-gis.
test case added.
sql/item_geofunc.cc
Crash in Gcalc_scan_iterator::point::get_shape with ST_DISTANCE and MULTILINESTRING in maria-5.3-gis.
use 'ev' variable instead of the 'evpos'.
per-file comments:
mysql-test/r/gis-precise.result
Bug #839341 100% CPU usage with ST_UNION in maria-5.3-gis.
test result updated.
mysql-test/t/gis-precise.test
100% CPU usage with ST_UNION in maria-5.3-gis.
test case added.
sql/gcalc_tools.cc
100% CPU usage with ST_UNION in maria-5.3-gis.
check if we get the beginning node of the linestring, then cut the loop.
mysql-test/r/gis-precise.result
Bug #801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
test result updated.
mysql-test/r/gis.result
ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
test result updated.
mysql-test/t/gis-precise.test
ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
test case added.
mysql-test/t/gis.test
ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
test case added.
sql/field.cc
ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
store GEOMETRYCOLLECTION() properly.
sql/gcalc_tools.cc
ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
create the GEOMETRYCOLLECTION() for the empty result.
sql/gstream.h
ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
next_symbol() added.
sql/spatial.cc
ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
code modified to handle 0 geometries in the GEOMETRYCOLLECTION properly.
mysql-test/r/gis-precise.result
test result updated.
mysql-test/t/gis-precise.test
test case added.
mysql-test/r/gis-precise.result
Fix for Bug #804266 Memory corruption/valgrind warning/crash in move_hole() with ST_UNION.
test result updated.
mysql-test/t/gis-precise.test
Fix for Bug #804266 Memory corruption/valgrind warning/crash in move_hole() with ST_UNION.
test case added.
sql/gcalc_tools.cc
Fix for Bug #804266 Memory corruption/valgrind warning/crash in move_hole() with ST_UNION.
specify the outer ring explicitly in the get_polygon_result parameter.
sql/gcalc_tools.h
Fix for Bug #804266 Memory corruption/valgrind warning/crash in move_hole() with ST_UNION.
add the outer ring as a parameter to the get_polygon_result.
per-file comments:
mysql-test/r/gis-precise.result
Fix for Bug #801217 Assertion `t1->result_range' in Gcalc_operation_reducer::end_couple.
test result updated.
mysql-test/t/gis-precise.test
Fix for Assertion `t1->result_range' in Gcalc_operation_reducer::end_couple.
test case added.
sql/gcalc_tools.cc
Fix for Assertion `t1->result_range' in Gcalc_operation_reducer::end_couple.
Don't mark the line as a border if it's inside a polygon that fits the result condition.
per-file comments:
mysql-test/r/gis-precise.result
Fix for Bug #804259 Second assertion in Gis_geometry_collection::init_from_opresult.
test result updated.
mysql-test/t/gis-precise.test
Fix for Second assertion in Gis_geometry_collection::init_from_opresult.
test case added.
sql/gcalc_tools.cc
Fix for Second assertion in Gis_geometry_collection::init_from_opresult.
Skip the point in the result if it's the hole inside a polygon.
mysql-test/r/gis-precise.result
Fix for Bug #805860 Second assertion Assertion `n > 0 && n < SINUSES_CALCULATED*2+1' in get_n_sincos.
test result updated.
mysql-test/t/gis-precise.test
Fix for Second assertion Assertion `n > 0 && n < SINUSES_CALCULATED*2+1' in get_n_sincos.
test case added.
sql/item_geofunc.cc
Fix for Second assertion Assertion `n > 0 && n < SINUSES_CALCULATED*2+1' in get_n_sincos.
condition fixed.
per-file comments:
mysql-test/r/gis-precise.result
Fix for Bug #804324 Assertion 0 in Gcalc_scan_iterator::pop_suitable_intersection
test result updated.
mysql-test/t/gis-precise.test
Fix for Assertion 0 in Gcalc_scan_iterator::pop_suitable_intersection
test case added.
sql/gcalc_slicescan.cc
Fix for Assertion 0 in Gcalc_scan_iterator::pop_suitable_intersection
skip the intersection if it just line that intersects itself.
sql/gcalc_tools.cc
Fix for Assertion 0 in Gcalc_scan_iterator::pop_suitable_intersection
if edges coincide, just pick the first coinciding poing as an intersection.
To fix that we keep the list of the found polygons and update the poly_positions that are bigger or equal to where we placed the next hole.
per-file comments:
mysql-test/r/gis-precise.result
Bug #804305 Crash in wkb_get_double with ST_INTERSECTION.
test result updated.
mysql-test/t/gis-precise.test
Crash in wkb_get_double with ST_INTERSECTION.
test result added.
sql/gcalc_tools.cc
Crash in wkb_get_double with ST_INTERSECTION.
keep the list of the found polygons and update their poly_position fields respectively.
sql/gcalc_tools.h
Crash in wkb_get_double with ST_INTERSECTION.
Gcalc_result_receiver::move_hole interface changed.
mysql-test/r/gis-precise.result
fix for Bug #801212 Assertion with ST_INTERSECTION on NULL values
test result updated.
mysql-test/t/gis-precise.test
fix for Assertion with ST_INTERSECTION on NULL values
test case added.
sql/item_geofunc.cc
fix for Assertion with ST_INTERSECTION on NULL values
return NULL from the val_str if we get the null_value.
per-file comments:
mysql-test/r/gis-precise.result
Bug #801199 Infinite recursion in Gcalc_function::count_internal with ST_BUFFER over MULTIPOINT
test result updated.
mysql-test/t/gis-precise.test
Infinite recursion in Gcalc_function::count_internal with ST_BUFFER over MULTIPOINT
test case added.
sql/item_geofunc.cc
Infinite recursion in Gcalc_function::count_internal with ST_BUFFER over MULTIPOINT
start_collection() implemented.
sql/item_geofunc.h
Infinite recursion in Gcalc_function::count_internal with ST_BUFFER over MULTIPOINT
Item_func_buffer::Transporter::start_collection() defined.
'geom' as the result here.
per-file comments:
mysql-test/r/gis-precise.result
fix for Bug #201189 ST_BUFFER asserts if radius = 0.
test result updated.
mysql-test/t/gis-precise.test
fix for ST_BUFFER asserts if radius = 0.
test case added.
sql/item_geofunc.cc
fix for ST_BUFFER asserts if radius = 0.
return the first argument as the result of the ST_BUFFER, if the distance is 0 there.
mysql-test/r/gis-precise.result
fix for Bug #801243 Assertion `(0)' failed in Gis_geometry_collection::init_from_opresult on ST_UNION
test result updated.
mysql-test/t/gis-precise.test
fix for Assertion `(0)' failed in Gis_geometry_collection::init_from_opresult on ST_UNION
test case added.
sql/spatial.cc
fix for Assertion `(0)' failed in Gis_geometry_collection::init_from_opresult on ST_UNION
check the data lenght instead of number of shapes.
sql/spatial.h
fix for Assertion `(0)' failed in Gis_geometry_collection::init_from_opresult on ST_UNION
check the data lenght instead of number of shapes.
Precision spatial function tests added.
Revision #2978.3.2 Thu 2011-05-05 14:30:59 +0500
forgotten h-files added to the NOINST_HEADERS
Revision #2978.3.1 Wed 2011-05-04 23:20:17 +0500
Precise GIS functions added.
Revision #2732.47.1 [merge] Thu 2011-10-27 17:51:30 +0300
5.1->5.2 merge (gcc 4.6 warnings and apple hwaddress fixes).
Revision #2643.143.43 Thu 2011-10-27 15:22:52 +0300
Fix gcc 4.6 warnings about assigned but not used variables.
Fixed my_gethwaddr.c to allow compilation on Mac OS X.
Adjusted many result files from the regression test suite after this fix .
This patch fixed the crash in innodb_bug59307.
Revision #3015.2.2 [merge] Wed 2011-06-01 20:49:37 -0700
Merge.
Revision #2954.1.6 Wed 2011-06-01 17:41:50 -0700
Modified the code backported from mysql 5.6 to make it handle virtual columns as well.
Sun 2011-05-29 11:09:05 -0700
Backported the test case for
Fri 2011-05-27 20:50:06 -0700
Backported the test case for from mysql code line.
Extended the test case to show how MariaDB applies ICP for indexes with some components defined on the beginning of fields.
Fri 2011-05-27 17:04:29 -0700
Backported the test case for from mysql code line.
Fri 2011-05-27 15:20:19 -0700
Backported the test case for fixed by the patch for
Backported the test case for fixed by the patch for
Slightly optimized the code of the fix for
Wed 2011-05-25 16:01:56 -0700
Downported InnoDB support of Index Condition Pushdown from MySQL-5.6 code line.
Fixed that bool parameters can also take 'on' and 'off' as parameters. This is in line with the values assigned to them in mysqld.
JOIN::exec()
{
if (! join->exec_const_cond->val_int())
{
produce an empty result;
stop execution
}
continue execution
execute the original WHERE clause (that contains exec_const_cond)
...
}xxx JOIN (t1 LEFT JOIN t2 ON cond ) ON func(t2.columns)Revision #0.6.47 Mon 2011-11-21 13:20:15 +0100
Updated with changes from Percona Server 5.1.56-13, from
lp:percona-server/5.1, tag Percona-Server-5.1.59-13.0.
Merged: revid:ignacio.nin@percona.com-20111016133841-fzpr5s89n13ft1s1
Fixed up copyright messages.
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL
This page is licensed: CC BY-SA / Gnu FDL