Commit graph

87825 commits

Author SHA1 Message Date
Sergey Petrunya
c397f97407 MDEV-5732: Valgrind warning for index_merge and extended_keys
- Make is_key_scan_ror() take into account the existence of extended keys.
2014-02-25 19:25:49 +04:00
Sergei Golubchik
0b9a0a3517 5.5 merge 2014-02-25 16:04:35 +01:00
Sergey Petrunya
6324c36bd7 Update test results after the previous push 2014-02-25 13:01:57 +04:00
Sergey Petrunya
fb6183a80b MDEV-5244: Make extended_keys=ON by default in 10.0
- Change the default flag value to ON.
- Update the testcases to be run extended_keys=ON:
  = trivial test result updates
  = If extended_keys setting makes a difference for a testcase, run the testcase 
    with extended_keys=off. There were only a few such cases
- Update to vcol_select_innodb looks like a worse plan but it will be gone in 10.0.
2014-02-25 01:18:13 +04:00
Alexey Botchkov
222e73c7a1 MariaDB Audit plugin added. 2014-02-24 23:40:16 +04:00
Sergei Golubchik
ff2e82f4a1 5.3 merge 2014-02-22 22:51:20 +01:00
Michael Widenius
6efa5efa7d Fixed that rpl_row_create_table can be run with --ps-protocol
As part of the fix we don't anymore generate a create table statement when doing a
CREATE TABLE IF NOT EXISTS table_that_exist LiKE temporary_table
if the 'table_that_exist' existed.

This is because it's not self evident if we should generate a create statement
matching the existing table or the temporary_table. 
The old code generated a table like the existing table in row based replication and like the temporary table
in statement based replication.
It's better to ensure that both cases works the same way.

mysql-test/suite/rpl/r/rpl_row_create_table.result:
  Updated results
  (Now we don't anymore CREATE TABLE IF NOT EXISTS LIKE if the table existed)
sql/sql_base.cc:
  More DBUG_PRINT
sql/sql_error.cc:
  More DBUG_PRINT
sql/sql_table.cc:
  Don't generate a create table statement when doing a
  CREATE TABLE IF NOT EXISTS table_that_exist like temporary_table if the table existed.
2014-02-22 03:11:56 +02:00
Sergei Golubchik
004642525d Fix "cmake . && cmake -DWITHOUT_TOKUDB=1" to disable tokudb 2014-02-21 23:42:29 +01: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
Sergei Golubchik
74feebcd43 MDEV-5624 mysqldump --dump-slave option does not restart the replication if the dump has failed 2014-02-21 00:53:02 +01:00
Sergei Golubchik
ea0915dcad federatedx: avoid unnecessary bzero. improve dbug traces 2014-02-21 00:52:58 +01:00
Sergei Golubchik
e840d323e2 MDEV-5698 Using ORDER BY in a FederatedX table is abnormally slow
In ::position() federated needs to know an element before the
current ("data_cursor") in the single-linked list. Replace list
traversal for every ::position() call (which is O(n^2)) with remembering
the current element before it's advanced by mysql_fetch_row().

storage/federatedx/federatedx_io_mysql.cc:
  mdev:5698
2014-02-21 00:52:50 +01:00
Sergei Golubchik
62f3552390 MDEV-5609 create new test ssl certificates
Use 20-year ssl certificates for mysql-test from RedHat patch
2014-02-19 21:40:34 +01:00
Sergei Golubchik
d81d13f177 MDEV-5390 doesn't install on fedora if mysql is installed, part 2
On fedora:
1. provide/obsoleve mariadb-* packages
2. MariaDB-common conflicts with mariadb-libs (on filesystem level),
   but does not provide or obsolete it.
2014-02-19 21:40:25 +01:00
Sergei Golubchik
de8f29bd3a RPM:
* readability fixes
* CPackRPM wrapper to fix property leakage between components (cmake bug 13248)
2014-02-19 21:40:20 +01:00
Sergei Golubchik
11d27996e4 increment and get the query_id atomically, otherwise two concurrent threads
might end up having the same query id
2014-02-19 21:40:15 +01:00
Sergei Golubchik
afcd7091a0 MDEV-5529 Sync libmysqlclient.so symbol versioning across distributions
An attempt to introduce libmysqlclient.so symbol versioning that is
compatible both with Debian and Fedora all versions: put all symbols into
libmysqlclient_18 version node (as on Debian), but also put aliases of
old symbols into libmysqlclient_16 version node (as on Fedora).

Also use a linker script to create aliases of exported symbols, not
rpm_support.cc source file.
2014-02-19 21:39:16 +01: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
Sergey Vojtovich
d12c7adf71 MDEV-5314 - Compiling fails on OSX using clang
This is port of fix for MySQL BUG#17647863.

revno: 5572
revision-id: jon.hauglid@oracle.com-20131030232243-b0pw98oy72uka2sj
committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
timestamp: Thu 2013-10-31 00:22:43 +0100
message:
  Bug#17647863: MYSQL DOES NOT COMPILE ON OSX 10.9 GM

  Rename test() macro to MY_TEST() to avoid conflict with libc++.
2014-02-19 14:05:15 +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
Sergei Golubchik
b1966435c2 MDEV-5580 /etc/init.d/mysql exits too early
Wait until the server starts accepting connections, not until the pid file appears
2014-02-17 11:10:30 +01:00
Sergei Golubchik
7b9c7c18d0 MDEV-5654 Server crashes on second installation of daemon_example plugin
daemon plugin: join the thread to make sure it exits before the plugin is unloaded
2014-02-17 11:10:26 +01:00
Sergei Golubchik
7131282464 At --log-warnings=9 or more, log at what address a dynamic plugin was loaded.
It helps to interpret valgrind/safemalloc memory-related warnings that are
printed when a plugin is unloaded (and thus cannot resolve addresses automatically)
2014-02-17 11:10:22 +01:00
Sergei Golubchik
3febb3ce1d mtr: smarter check for usable ipv6.
Handles the case of
sysctl net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1
2014-02-17 11:10:18 +01:00
Sergei Golubchik
5f1a2cf8e3 errmsg.sys files are located in the builddir, not in the srcdir 2014-02-17 11:10:14 +01:00
Sergei Golubchik
cb324d91ad MDEV-5579 rpm postun scriptlet leaks exit code to rpm 2014-02-17 11:10:03 +01:00
Sergei Golubchik
95f4bf1857 MDEV-5613 m_string.h exports generic function names without a namespace prefix, like str2int
don't include m_string. in my_valgrind.h
2014-02-17 11:09:57 +01:00
Sergei Golubchik
ce4d5fe53c RPM: fix alternative provides/obsoletes - put the correct architecture and version 2014-02-17 11:09:50 +01:00
Sergei Golubchik
8c718bf595 MDEV-5436 mysql_config returns non-zero when running without parameters 2014-02-17 11:09:45 +01:00
Sergey Vojtovich
5d6e756cd1 send_eval may free evaluated query buffer before connection thread
actually consumed it. With this patch evaluated query buffer is freed
along with query buffer.

The problem was uncovered by udf_debug_sync.test when it was run with
--embedded.
2014-02-18 10:54:05 +04:00
Sergey Petrunya
fd9e34ffd7 Post-merge fixes: merge MariaDB's fix for MDEV-5177 and MDEV-5555
with Oracle's fix for Bug#17588348 by reverting Oracle's fix.
2014-02-17 23:20:07 +04:00
Sergey Petrunya
b594e31b6b Merge 2014-02-17 18:53:54 +04:00
Sergey Petrunya
df963fd3c7 MDEV-5177: ha_partition and innodb index intersection produce fewer rows (MySQL Bug#70703)
MDEV-5555: Incorrect index_merge on BTREE indices
- In ha_partition, make ordered index reads return rows in rowid order
  when index columns are the same.
2014-02-17 18:50:54 +04:00
Sergei Golubchik
c8abf3e6de don't open and fill all I_S tables for SELECT * FROM I_S.TRIGGERS 2014-02-17 11:09:40 +01:00
Sergei Golubchik
84c96a263e different fix for internal Oracle MySQL bug#16324629 that doesn't crash
(simply, copied from FederatedX)
2014-02-17 11:09:33 +01:00
Sergei Golubchik
4881c65007 test case for
MDEV-5689 ExtractValue(xml, 'substring(/x,/y)') crashes
MySQL bug#12428404 MYSQLD.EXE CRASHES WHEN EXTRACTVALUE() IS CALLED WITH MALFORMED XPATH EXP
2014-02-17 11:09:24 +01:00
Sergei Golubchik
84651126c0 MySQL-5.5.36 merge
(without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
2014-02-17 11:00:51 +01: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
1fa5183241 revert revno 4060:
revision-id: monty@askmonty.org-20140211120313-z158i1sdlxxeotgl
  committer: Michael Widenius <monty@askmonty.org>
  message:
    Enable rpl_row_create_table (no reason to keep this disabled anymore)

Still fails (in --ps), no reason to enable it if it is not fixed.
2014-02-14 15:34:23 +01:00
Sergei Golubchik
64f96de766 fix SphinxSE to not leave Sphinx_error status variable uninitialized 2014-02-14 15:16:23 +01:00
Sergei Golubchik
fb27ce22f7 5.3 merge 2014-02-14 14:09:29 +01: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