Commit graph

31678 commits

Author SHA1 Message Date
Igor Babaev
4a6a08309c Merge 5.5 -> 5.5-mwl248. 2012-06-26 11:37:48 -07:00
Igor Babaev
4ff6fd34da Changed the type of all double columns in the system statistical tables
mysql.column_stat, mysql.table_stat for the type DECIMAL(12,4).
When cached the values from these columns are multiplied by factor 10^5
and stored as ulong numbers now.
2012-06-25 22:33:07 -07:00
Igor Babaev
2954ed1ec9 Merge 5.3->5.5. 2012-06-24 09:10:11 -07:00
Igor Babaev
20f3f4a273 Merge 5.2->5.3 2012-06-23 15:00:05 -07:00
Sergey Petrunya
f8f65accf9 Add back testcase for lp:817966 (was lost in the merge) 2012-06-23 20:12:54 +04:00
unknown
048cc42052 MDEV-342: fix two race conditions in the test case that could occasionally cause spurious failures. 2012-06-22 10:42:55 +02:00
unknown
a5731b27b7 MDEV-342: Do not mark old binlog file as cleanly closed during rotate until
the new file is fully synced to disk and binlog index. This fixes a window
where a crash would leave next server restart unable to detect that a crash
occured, causing recovery to fail.
2012-06-21 21:17:34 +02:00
unknown
e7362d457a MDEV-359: Fix another case where switch-off semisync could cause a race that ended with server crash.
This one was when the code releases and reaquires the lock with pthread_cond_wait() - and semisync is switched off meanwhile.
2012-06-21 19:02:53 +02:00
Sergei Golubchik
14b756c739 Use the portable form of INSTALL PLUGIN in rpl_mdev359.test 2012-06-21 17:39:21 +02:00
Sergei Golubchik
c2ca301cd8 fixing the order of includes in the rpl_mdev359.test 2012-06-21 14:00:19 +02:00
Sergey Petrunya
eeea010fdc Update test results (checked) 2012-06-21 14:33:36 +04:00
unknown
5e13093df1 MDEV-359: Server crash when SET GLOBAL rpl_semi_sync_master_enabled = OFF
The semisync code does a fast-but-unsafe check for enabled or not without lock,
followed by a slow-but-safe check under lock. However, if the slow check failed,
the code still referenced not valid data (in an assert() expression), causing a
crash.

Fixed by not running the incorrect assert when semisync is disabled.
2012-06-21 11:52:54 +02:00
Sergey Petrunya
20de3c8968 Update test results. 2012-06-20 22:30:24 +04:00
Sergey Petrunya
8c762965d3 Merge 5.3 -> 5.5 2012-06-20 15:01:28 +04:00
Sergey Petrunya
584d923c32 Post-merge fixes:
- put back the result encoding in func_in.result (messed up by kdiff3)
- update .result for other tests (checked)
2012-06-20 13:41:31 +04:00
unknown
0b93b444b6 Merged the fix for bug lp:944706, mdev-193 2012-06-19 15:06:45 +03:00
Igor Babaev
0c69f22032 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.
2012-06-18 22:32:17 -07:00
Daniel Bartholomew
37f8094652 fixed some urls that the previous update missed 2012-06-18 17:29:05 -04:00
Sergey Petrunya
90fbd8b22b Merge 5.2->5.3 2012-06-18 22:38:11 +04:00
Sergey Petrunya
28f2c5641d 5.3->5.5 merge 2012-06-18 16:50:16 +04:00
Sergei Golubchik
b8153269f1 fix an overly agressive optimization in Item_func_conv_charset 2012-06-17 16:09:16 +02:00
Sergei Golubchik
6cf8672f43 fix innodb_bug12902967 to pass when aio check on /dev/shm fails 2012-06-16 14:58:00 +02:00
Sergei Golubchik
bf5df8ccbf merge 2012-06-16 09:03:07 +02:00
Sergei Golubchik
a247b12fe6 MDEV-316 lp:1009085 Assertion failed: warn_item, file item_cmpfunc.cc, line 3613
make sure that find_date_time_item() is called before agg_arg_charsets_for_comparison().
optimize Item_func_conv_charset to avoid conversion if no string result is needed
2012-06-15 17:22:49 +02:00
Sergei Golubchik
37f5632212 merged with XtraDB 1.1.8-26.0 2012-06-15 14:54:23 +02:00
Michael Widenius
8ad377aad9 Automatic merge 2012-06-15 13:39:07 +03:00
Michael Widenius
4a23bb9074 Removed one variable from the test output that was depending on timing.
mysql-test/suite/sphinx/sphinx.result:
  Removed sphinx_time, as it was depending on timing.
mysql-test/suite/sphinx/sphinx.test:
  Removed sphinx_time, as it was depending on timing.
2012-06-15 13:36:34 +03:00
Michael Widenius
7cd1dc5de2 Fix for: lp:1013432 and MySQL#64800:
mysqldump with --include-master-host-port putting quotes around port number
Patch from Stewart Smith

client/mysqldump.c:
  Remove quotes from MASTER_PORT
2012-06-15 13:08:10 +03:00
unknown
db6dbadb5a Fix bug lp:1008686
Analysis:
The fix for bug lp:985667 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.

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 lp:985667,
and to apply Item_subselect::no_rows_in_result() only when the subquery predicate
is in the SELECT clause.
2012-06-15 11:33:24 +03:00
Igor Babaev
1d74ae6b42 Fixed LP bug #1002157.
The class Item_func missed an implementation of the virtual 
function update_null_value.
Back-ported the fix for bug 62125 from mysql 5.6 code line.
The test case was also back-ported.
2012-06-15 00:01:20 -07:00
unknown
cf3a499f54 Merge the fix for lp:944706, mdev-193 2012-06-14 23:55:22 +03:00
Sergei Golubchik
0522307ed1 mysql-5.5 merge 2012-06-14 20:05:31 +02:00
unknown
88d3d853f4 Fix bug lp:1008773
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.

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.
2012-06-14 17:03:09 +03:00
Igor Babaev
28b4aba40a Merge. 2012-06-13 16:28:47 -07:00
Igor Babaev
64aa1fcb13 Adjusted results in pbxt.negation_elimination after the fix for lp bug 992380. 2012-06-12 10:06:26 -07:00
Sergey Petrunya
9892ace475 Merge BUG#1010351 from 5.2 to 5.5 2012-06-10 14:12:50 +04:00
Sergey Petrunya
af1909fc0e Merge 2012-06-10 14:06:11 +04:00
Sergey Petrunya
ae51b5b698 Merge 2012-06-10 14:04:21 +04:00
Sergey Petrunya
b038ad856e Merge BUG#1010351 from 5.1 to 5.2 2012-06-10 13:53:06 +04:00
Sergey Petrunya
a7229e8c20 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.
2012-06-10 13:50:21 +04:00
Igor Babaev
10f42e2c33 Fixed LP bug #1010729.
The bug prevented acceptance of UNION queries whose non-first select 
clauses contained join expressions with degenerated single-table nests
as valid queries.
The bug was introduced into mysql-5.5 code line by the patch for
bug 33204.
2012-06-08 22:15:49 -07:00
Michael Widenius
438e9eca68 Changed last_insert_id() to be unsigned.
Fixed MDEV-331: last_insert_id() returns a signed number

mysql-test/r/auto_increment.result:
  Added test case
mysql-test/t/auto_increment.test:
  Added test case
sql/item_func.h:
  Changed last_insert_id() to be unsigned.
2012-06-08 22:12:44 +03:00
Sergei Golubchik
d2ca6d2e7f apply mysql fix for bug#58421 to XtraDB 2012-06-08 14:50:50 +02:00
unknown
e326a3893f Fixed pbxt test case not run by default. 2012-06-06 23:02:21 +03:00
unknown
c2677de7ac Merge the fix for lp:944706, mdev-193 2012-06-06 22:26:40 +03:00
Sergei Golubchik
1838938671 fixes for bintar mtr failures:
look for plugins in the correct path.
skip --plugin-load if it has the empty soname part, not only if the whole argument is empty.
2012-06-06 16:41:13 +02:00
unknown
8efc63ba5d Merge 2012-06-06 16:19:48 +03:00
Sergei Golubchik
7eaf0975ac merge 2012-06-06 14:06:13 +02:00
unknown
f1ab00891a Fixed bug lp:1000649
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.
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.
2012-06-05 17:25:10 +03:00
Sergei Golubchik
265d5aaa2e MDEV-308 lp:1008516 - Failing assertion: templ->mysql_col_len == len
remove the offending assert.
take the test case from mysql Bug#58015
2012-06-04 23:22:03 +02:00