summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fixed bug mdev-5410.Igor Babaev2013-12-124-5/+59
| | | | | The fix for bug #27937 was incomplete: it did not handle correctly the queries containing UNION with global ORDER BY in subselects.
* Another attempt to fix the memory leak of mdev-5400.Igor Babaev2013-12-112-0/+2
|
* Fixed bug mdev-5400:Igor Babaev2013-12-071-1/+0
| | | | a memory leak in save_index() first seen in the test case for mdev-5382.
* MergeIgor Babaev2013-12-053-2/+33
|\
| * Fixed bug mdev-5382Igor Babaev2013-12-053-2/+33
| | | | | | | | | | | | | | When marking used columns the function find_field_in_table_ref() erroneously called the walk method for the real item behind a view/derived table field with the second parameter set to TRUE. This erroneous code was introduced in 2006.
* | MDEV-5353: server crash on subselect if WHERE applied to some result fieldunknown2013-12-044-6/+31
|/ | | | Correct processing of view/derived with no tables added.
* MDEV-5374 main.func_time fails with valgrind warningAlexander Barkov2013-12-031-1/+2
| | | | | | | | "Conditional jump or move depends on uninitialised" in Item_time_typecast::get_date. Adding "null_value" into the debug assert condition.
* 5.2 mergeSergei Golubchik2013-12-023-19/+40
|\
| * 5.1 mergeSergei Golubchik2013-12-013-19/+40
| |\
| | * MDEV-5266 MySQL:57657 - Temporary MERGE table with temporary underlying is ↵Sergei Golubchik2013-11-293-19/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | broken by ALTER Fix ha_myisammrg::update_create_info() to do what ha_myisammrg::append_create_info() does - take sub-table names from TABLE_LIST, not reverse engineer tablefile names. Backport praveenkumar.hulakund@oracle.com-20120127081643-u7dxy23i8yyqarm7 from mysql-5.6
* | | MDEV-4857 Wrong result of HOUR('1 00:00:00')Alexander Barkov2013-12-027-5/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: mysql-test/r/func_time.result mysql-test/t/func_time.test sql-common/my_time.c sql/item_func.h sql/item_timefunc.cc sql/mysql_priv.h sql/time.cc
* | | MDEV-5344: LEFT OUTER JOIN table data is lost in ON DUPLICATE KEY UPDATE sectionSergey Petrunya2013-11-273-0/+72
| | | | | | | | | | | | | | | - For INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, table elimination should check which tables are referenced in the ON DUPLICATE KEY UPDATE clause.
* | | Made sure that JOIN::cond_equal is correctly set after the call ofIgor Babaev2013-11-241-0/+28
| | | | | | | | | | | | remove_eq_conds() in the function make_join_statistics().
* | | Post-review changes of the patch for bug mdev-5103.Igor Babaev2013-11-221-4/+3
| | |
* | | MergeIgor Babaev2013-11-2114-130/+103
|\ \ \
| * | | Another attempt to fix bug mdev-5103.Igor Babaev2013-11-2114-130/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The earlier pushed fix for the bug was incomplete. It did not remove the main cause of the problem: the function remove_eq_conds() removed always true multiple equalities from any conjunct, but did not adjust the list of them stored in Item_cond_and::cond_equal.current_level. Simplified the test case for the bug and moved it to another test file. The fix triggered changes in EXPLAIN EXTENDED for some queries.
* | | | MDEV-4859 Wrong value and data type of "SELECT MAX(time_column) + 1 FROM t1"Alexander Barkov2013-11-2110-31/+265
|/ / / | | | | | | | | | | | | Fixed.
* | | Fixed bug mdev-5288.Igor Babaev2013-11-143-3/+29
| | | | | | | | | | | | This bug was a consequence of the incorrect fix for bug mdev-5091.
* | | Merge 5.2->5.3Alexander Barkov2013-11-141-3/+5
|\ \ \ | |/ /
| * | Merge 5.1->5.2Alexander Barkov2013-11-141-3/+5
| |\ \ | | |/
| | * MDEV-5290 MTR cannot find mysql_tzinfo_to_sql on WindowsAlexander Barkov2013-11-141-3/+5
| | | | | | | | | | | | | | | | | | | | | mysql_tzinfo_to_sql is not compiled under Windows in the pre-5.5 versions. Do not set the MYSQL_TZINFO_TO_SQL variable in the version prior to 5.5 under Windows.
* | | MergeIgor Babaev2013-11-133-1/+35
|\ \ \
| * | | Fixed bug mdev-5091.Igor Babaev2013-11-133-1/+35
| | | | | | | | | | | | | | | | | | | | The function SELECT_LEX::update_used_tables should process all ORDER BY lists in any subselect of a union.
* | | | Merge 5.2 -> 5.3Alexander Barkov2013-11-136-4/+82
|\ \ \ \ | | |/ / | |/| |
| * | | Merge 5.1 -> 5.2Alexander Barkov2013-11-136-4/+82
| |\ \ \ | | | |/ | | |/|
| | * | MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and aboveAlexander Barkov2013-11-136-4/+82
| | | | | | | | | | | | | | | | | | | | | | | | Allow only one level of symlink recursion in mysql_tzdata_to_sql, to avoid infinite loops.
* | | | incorrect assertion removedunknown2013-11-131-1/+0
| | | |
* | | | MDEV-5284 Assertion `!(*expr)->fixed' fails in replace_where_subcondition ↵Sergei Golubchik2013-11-133-4/+19
| |_|/ |/| | | | | | | | with IN suquery
* | | MDEV-5113 Wrong result (extra row) and valgrind warnings in ↵Sergei Golubchik2013-11-123-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | Item_maxmin_subselect::any_value on 2nd execution of PS with SELECT subquery When setting Item_func_not_all::test_sum_item or Item_func_not_all::test_sub_item, reset the other one to NULL - they can never be set both. When a PS is reexecuted, different executions might be optimized differently and a wrong test_su*_item might stay set from the previous execution.
* | | MDEV-5153: Server crashes in Item_ref::fix_fields on 2nd execution of PS ↵unknown2013-11-115-28/+99
| | | | | | | | | | | | | | | | | | | | | with LEFT JOIN and MERGE view or SELECT SQ 1. Transformation of row IN subquery made the same as single value. 2. replace_where_subcondition() made working on several layers of OR/AND because it called on expression before fix_fields().
* | | MDEV-5103: server crashed on singular Item_equalunknown2013-11-114-2/+117
| | | | | | | | | | | | | | | | | | Singular Item_equal support added. The problem was that during constant table substitution Item_equal become containing only one constant which was not supported internally.
* | | Merge 5.2 -> 5.3Alexander Barkov2013-11-081-8/+9
|\ \ \ | |/ /
| * | Merge 5.1 -> 5.2Alexander Barkov2013-11-081-8/+9
| |\ \ | | |/
| | * MDEV-5181 incorrect binary search in remove_status_vars()Alexander Barkov2013-11-081-8/+9
| | | | | | | | | | | | | | | | | | | | | The loop in the binary search in remove_status_vars() was incorrectly implemented and could continue infinitely in some cases. Rewrote the binary search code.
* | | MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32Alexander Barkov2013-11-0813-4/+134
| | |
* | | MariaDB made be compiled by gcc 4.8.1unknown2013-10-299-10/+10
| | | | | | | | | | | | | | | | | | There was 2 problems: 1) coping/moving of the same type (usually casting) as sizeof() (solved in different ways depends on the cause); 2) using 'const' in SSL_CTX::getVerifyCallback() which return object (not reference) and so copy of the object will be created and 'const' has no sens.
* | | MDEV-5104 crash in Item_field::used_tables with broken order bytimour@askmonty.org2013-10-2911-13/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Analysis: st_select_lex_unit::prepare() computes can_skip_order_by as TRUE. As a result join->prepare() gets called with order == NULL, and doesn't do name resolution for the inner ORDER clause. Due to this the prepare phase doesn't detect that the query references non-exiting function and field. Later join->optimize() calls update_used_tables() for a non-resolved Item_field, which understandably has no Field object. This call results in a crash. Solution: Resolve unnecessary ORDER BY clauses to detect if they reference non-exising objects. Then remove such clauses from the JOIN object.
* | | MDEV-5143: update of a joined table with a nested subquery with a syntax ↵unknown2013-10-214-2/+70
| | | | | | | | | | | | | | | | | | | | | error crashes mysqld with signal 11 Added check of SELECT_LEX::handle_derived() result.
* | | Merge 5.2 -> 5.3Alexander Barkov2013-10-212-1/+5
|\ \ \ | |/ /
| * | Merge 5.1 -> 5.2Alexander Barkov2013-10-212-1/+5
| |\ \ | | |/
| | * A clean-up for DEV-4890 Valgrind warnings on shutdown on a build with openSSLAlexander Barkov2013-10-212-1/+5
| | |
* | | Merge 5.2->5.3Alexander Barkov2013-10-160-0/+0
|\ \ \ | |/ /
| * | Merge 5.1->5.2Alexander Barkov2013-10-164-0/+24
| |\ \ | | |/
* | | Merge 5.1 -> 5.3Alexander Barkov2013-10-164-0/+24
|\ \ \ | | |/ | |/|
| * | MDEV-4890 Valgrind warnings on shutdown on a build with openSSLAlexander Barkov2013-10-164-0/+24
| | |
* | | MDEV-5107:Left Join Yields All Nulls Instead of Appropriate Matchesunknown2013-10-113-1/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-5034:Wrong result on LEFT JOIN with a SELECT SQ or a merge view, UNION in IN subquery Make reset null_row same as it was set in evaluate_null_complemented_join_record(). The problem was that view firlds detect null_row by not-yet-reset table.
* | | Fixed bug mdev-5135.Igor Babaev2013-10-145-6/+93
| | | | | | | | | | | | The patch for bug mdev-5105 incorrectly counted conditions in nested joins.
* | | Fixed bug mdev-5132.Igor Babaev2013-10-114-13/+34
| | | | | | | | | | | | | | | | | | | | | Objects of the classes Item_func_isnull and Item_func_isnotnull must have the flag sargable set to TRUE. Set the value of the flag sargable only in constructors of the classes inherited from Item_int_func.
* | | Fixed a problem of the patch for mdev-5105 that caused valgrind complains.Igor Babaev2013-10-111-7/+10
| | |
* | | Fixed bug mdev-5105.Igor Babaev2013-10-1010-11/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug caused a memory overwrite in the function update_ref_and_keys() It happened due to a wrong value of SELECT_LEX::cond_count. This value historically was calculated by the fix_fields method. Now the logic of calling this method became too complicated and, as a result, this value is calculated not always correctly. The patch changes the way how and when the values of SELECT_LEX::cond_count and of SELECT_LEX::between_count are calculated. The new code does it just at the beginning of update_ref_and_keys().