Commit graph

69545 commits

Author SHA1 Message Date
Alexander Barkov
a24ea50d1a MDEV-5338 XML parser accepts malformed data 2014-04-23 15:53:47 +04:00
Alexander Barkov
213f10363e MDEV-6045 MySQL Bug#11829861 - SUBSTRING_INDEX() RESULTS "OMIT" CHARACTER WHEN USED INSIDE LOWER() 2014-04-21 13:19:32 +04:00
Alexander Barkov
5fc5195fc5 An after-fix for
MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found

Recording the forgotten test results.
2014-04-21 11:29:50 +04:00
Alexander Barkov
cfa4548ba5 MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found 2014-04-21 10:13:38 +04:00
Alexander Barkov
8db600f951 MDEV-5041 Inserting a TIME with hour>24 into a DATETIME column produces a wrong value 2014-04-18 12:19:51 +04:00
Igor Babaev
13dc299a4f Fixed bugs mdev-5927 and mdev-6116.
Both bugs are caused by the same problem: the function optimize_cond() should
update the value of *cond_equal rather than the value of join->cond_equal,
because it is called not only for the WHERE condition, but for the HAVING
condition as well.
2014-04-16 22:34:52 -07:00
unknown
65f80d4052 Merge MDEV-6067 from 5.2 to 5.3. 2014-04-11 09:38:55 +02:00
unknown
a1ae8f9ba8 MDEV-6067: Partitioned table DML sometimes binlogged without XID event
Add test case.
2014-04-11 09:03:53 +02:00
unknown
68bad3c7c0 MDEV-6067: Partitioned table DML sometimes binlogged without XID event
Revert the old patch revid:monty@askmonty.org-20100325133339-7mkel6valai0b4lb

This patch caused the InnoDB part of the transaction to not be marked
read-write in some cases, which messes up XA commit (and likely other
stuff as well).
2014-04-11 08:39:48 +02:00
Alexander Barkov
63d0918807 MDEV-5783 Assertion `0' failed in make_sortkey(SORTPARAM*, uchar*, uchar*) on ORDER BY HEX( UNCOMPRESSED_LENGTH( pk ) ) 2014-03-23 16:02:56 +04:00
unknown
2eb920b262 Fix to make it compiling with valgrind. 2014-03-21 12:23:09 +02:00
Sergey Petrunya
8dae5a8a89 Merge 2014-03-18 12:06:32 +04:00
Sergei Golubchik
5d0c01608c 5.2 merge 2014-03-16 21:03:01 +01:00
Sergei Golubchik
e772cbd7b7 5.1 merge 2014-03-16 13:59:44 +01:00
Sergei Golubchik
cfc83cf9d3 5.2 merge 2014-03-16 12:44:47 +01:00
Sergei Golubchik
d7304375e5 mysql-5.1.73 merge 2014-03-15 18:24:15 +01:00
unknown
5c8ed7dd54 MDEV-5446: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' fails on EXPLAIN EXTENDED with VALUES function
field_index should be set correctly for null field created by Item_insert_value::fix_fields().
2014-03-14 11:38:17 +02:00
Sergei Golubchik
8428c116c7 don't run unix_socket tests when $USER is already present in mysql.user
(as it's done in 10.0)
2014-03-13 20:12:50 +01:00
Sergei Golubchik
a0ea960c3e 5.2 merge 2014-03-13 18:36:52 +01:00
Sergei Golubchik
5616bd5597 unix_socket bypasses make_if_fail by not doing any network reads 2014-03-13 16:35:14 +01:00
Sergei Golubchik
18830d78a3 mtr: move if(unix_socket) test to include/have_unix_socket.inc 2014-03-13 16:34:34 +01:00
Sergey Petrunya
8c04dd33dd MDEV-5811: Server crashes in best_access_path with materialization+semijoin and big_tables=ON
- With big_tables=ON, materialized table will use Aria (or MyISAM) SE, which
  allows prefix key reads. However, the temp.table has rec_per_key=NULL which
  causes the optimizer to crash when attempting to read index statistics for a 
  prefix index read.
- Fixed by providing a rec_per_key array with zeros (i.e. "no statistics data")
2014-03-13 12:20:57 +01:00
unknown
fad4b33376 merge 5.2->5.3 2014-03-12 18:47:19 +02:00
unknown
627005d825 merge 5.1->5.2 2014-03-12 18:43:44 +02:00
unknown
cd29dc9821 MDEV-5717: Server crash with insert statement containing DEFAULT into view
Item_default_value::arg can be NULL so walk() should take it into consideration.
2014-03-12 15:50:00 +02:00
unknown
d8ea8a3d13 MDEV-5717: Server crash with insert statement containing DEFAULT into view
Item_default_value::arg can be NULL so walk() should take it into consideration.
2014-03-12 12:34:16 +02:00
unknown
321ff25f3d MDEV-5740: Assertion `!derived->first_select()->exclude_from_table_unique_test || derived->outer_select()-> exclude_from_table_unique_test' failed on 2nd execution of PS with derived_merge
Do not check tables of executed units.
Debug info about stages of derived tables execution added.
2014-03-07 13:57:07 +02:00
Igor Babaev
1f2ef57403 Fixed bug mdev-5686.
The calls of the function remove_eq_conds() may change the and/or structure
of the where conditions. So JOIN::equal_cond should be updated for non-recursive
calls of remove_eq_conds().
2014-03-06 13:56:34 -08:00
Igor Babaev
3e03c9eae9 After constant row substitution the optimizer should call the method
update_used_tables for the the where condition to update cached
indicators of constant subexpressions. It should be done before further
possible simplification of the where condition.

This change caused simplification of the executed where conditions 
in many test cases.
2014-02-20 21:27:33 -08:00
Sergey Petrunya
6ebaa4939e Backport the following from 5.5 to 5.3:
MDEV-4556 Server crashes in SEL_ARG::rb_insert with index_merge+index_merge_sort_union, FORCE INDEX
- merge_same_index_scans() may put the same SEL_ARG tree in multiple result plans.
  make it call incr_refs() on the SEL_ARG trees that it does key_or() on, because 
  key_or(sel_arg_tree_1, sel_arg_tree_2) call may invalidate SEL_ARG trees pointed 
  by sel_arg_tree_1 and sel_arg_tree_2.
2014-02-19 18:34:12 +04:00
Sergey Petrunya
ddc21f7977 Fix compile failure:
In function ‘void* memset(void*, int, size_t)’,
    inlined from ‘void Lifo_buffer::set_buffer_space(uchar*, uchar*)’ at sql_lifo_buffer.h:70:5,
    inlined from ‘int DsMrr_impl::dsmrr_init(handler*, RANGE_SEQ_IF*, void*, uint, uint, HANDLER_BUFFER*)’ at multi_range_read.cc:895:62:
/usr/include/i386-linux-gnu/bits/string3.h:82:32: error: call to ‘__warn_memset_zero_len’ declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters [-Werror]

It was intentional that the buffer is set to zero length there.
2014-02-19 17:52:47 +04:00
Sergey Petrunya
260c802e7d Add a debugger helper function that does this:
(gdb) p dbug_print_table_row(table)
  $33 = "SUBQUERY2_t1(col_int_key,col_varchar_nokey)=(7,c)"
2014-02-19 17:47:02 +04:00
Sergey Petrunya
097b644006 MDEV-5600: Wrong result on 2nd execution of PS depending on the length of the query
- Item_direct_view_ref didn't clear its pointer to item_equal in ::cleanup.
- Some Item_direct_view_ref objects have statement lifetime (i.e. they
  survive across multiple EXECUTE commands). Item_equal objects live only for
  the duration of one EXECUTE. This caused Item_direct_view_ref to have a stale pointer,
  which could cause all sorts of effects. (In this bug's testcase it was pointing to
  the wrong Item_equal, causing wrong query result)
- Fixed by doing what Item_field::cleanup() does - don't keep item_equal pointer value.
- There is no testcase because the only testcase I've got is highly fragile (e.g. the
  bug will not show up if @@datadir is of the wrong length).
2014-02-19 17:45:33 +04:00
Alexey Botchkov
84580f950c MDEV-5481 mysqldump fails to dump geometry types properly.
Fixed so the MYSQL_TYPE_GEOMETRY is treated as BLOB.
2014-02-18 17:45:08 +04:00
Alexey Botchkov
820b1a6687 MDEV-5615 crash in Gcalc_function::add_operation.
The result is EMPTY for a buffer(line, -1), but we still
need one FALSE operation to be stored in the condition.
And we actually add it but forgot to alloc memory to store it.
2014-02-18 17:15:25 +04:00
Sergey Petrunya
ccb54beb6d Merge 2014-02-15 01:26:53 +04:00
Sergey Petrunya
8c9b2f3429 MDEV-5581: Server crashes in in JOIN::prepare on 2nd execution of PS with materialization+semijoin
- The problem was that JOIN::prepare() tried to set TABLE::maybe_null
  for a table in join. Non-merged semi-join tables 1) are present as 
  join's base tables on second EXECUTE, but 2) do not yet have a TABLE 
  object.
  Worked around the problem by putting mixed_implicit_grouping into JOIN
  object, and then passing it to JTBM tables in setup_jtbm_semi_joins().
2014-02-15 01:21:46 +04:00
Sergei Golubchik
5a21dc7df1 fix suite/sphinx/suite.pm to not start searchd twice 2014-02-14 14:08:16 +01:00
Sergei Golubchik
9d5731ef1b fix the test 2014-02-14 11:14:10 +01:00
Sergei Golubchik
8a26d19088 record incorrect result for MDEV-5539 Empty results in UNION with Sphinx engine
(just to have the test in the tree when we merge the upstream fix)
2014-02-14 10:39:25 +01:00
Sergei Golubchik
12253abadb MDEV-714 LP:1020645 - crash (sig 11) with union query
Don't ignore the error from st_select_lex_unit::optimize()
2014-02-13 20:21:57 +01:00
Sergei Golubchik
4b57720caa use a different error for MySQL bug#11747970 - kill the query,
as it was supposed to be in bug#11747970, don't fake an error.
(this kill can be useful for other bugs too)
2014-02-13 20:20:17 +01:00
Sergei Golubchik
642495345f Remove the fix from MySQL-5.1 that's not necessary in 5.3 2014-02-13 20:18:07 +01:00
Sergei Golubchik
913beda8c8 5.2 merge 2014-02-13 10:15:03 +01:00
Sergei Golubchik
48445f3556 5.1 merge 2014-02-13 08:25:33 +01:00
Sergei Golubchik
5f5d2db141 fix embedded tests
(mainly by backporting 5.5. changes)

mysql-test/suite/maria/t/distinct.test:
  Remove the test that requires SSL. One test case for a bug is enough.
sql/scheduler.cc:
  make it the same as in 5.5
storage/innodb_plugin/row/row0mysql.c:
  make it the same as in 5.5
storage/innodb_plugin/row/row0sel.c:
  make it the same as in 5.5
storage/xtradb/row/row0mysql.c:
  make it the same as in 5.5
storage/xtradb/row/row0sel.c:
  make it the same as in 5.5
2014-02-13 08:09:07 +01:00
Sergei Golubchik
52f038c5c3 MDEV-5655 Server crashes on NAME_CONST containing AND/OR expressions
fix the NAME_CONST check to only allow literals, negated literals, and literals with
the explicit collation.
2014-02-12 21:17:28 +01:00
Igor Babaev
3845a89b01 Merge 2014-02-07 16:55:25 -08:00
Igor Babaev
50b9e30b72 Fixed bug mdev-5611.
The method Item_field::update_table_bitmaps() should not try
to mark the bit for a self-referencing virtual column.
2014-02-07 15:50:36 -08:00
Sergey Petrunya
cfbc545d1a Merge 2014-02-07 23:57:55 +04:00