Commit graph

68472 commits

Author SHA1 Message Date
Sergey Petrunya
424f56b3ba BUG#920713: 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.
2012-01-25 22:05:20 +04:00
Sergey Petrunya
364c07934c Merge 2012-01-25 18:36:57 +04:00
Sergey Petrunya
73cc529b51 BUG#920255: Wrong result (extra rows) with loosescan and IN subquery
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#.
2012-01-25 18:33:57 +04:00
Sergey Petrunya
e10816118a Update handler status variables after the last commit. 2012-01-25 18:27:34 +04:00
Sergei Golubchik
8fedf8ac75 mtr runs only "big" tests, if --big-test is repeated twice 2012-01-25 11:34:43 +01:00
Sergey Petrunya
2ae3fca465 Add MRR counters: Handler_mrr_init, Handler_mrr_extra_rowid_sorts,
Handler_mrr_extra_key_sorts.
2012-01-23 23:35:52 +04:00
unknown
5db8b5113b Fixed creating limit for exists subquery. 2012-01-23 15:14:13 +02:00
Sergei Golubchik
81690cf326 MDEV-106 my_gethwaddr() does not compile on Solaris 11 2012-01-23 11:43:28 +01:00
Igor Babaev
7bdbdb05ce Back-ported test cases for bugs #54437, #55955, #52329, #57623 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.
2012-01-22 12:54:30 -08:00
Igor Babaev
80009f5862 Back-ported test cases for bugs #53060, #53305, #50358, #49453 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.
2012-01-21 20:58:23 -08:00
Igor Babaev
bb4053afc3 Fixed LP 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.
2012-01-20 23:54:43 -08:00
Sergey Petrunya
9f60aa27f7 BUG#912513: 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
   = 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.
2012-01-20 02:11:53 +04:00
Sergey Petrunya
8bedf1ea1c BUG#912538: 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.
2012-01-19 23:44:43 +04:00
Vladislav Vaintroub
0e975ded65 Fix compiler warning on Windows. 2012-01-19 13:46:59 +01:00
Igor Babaev
d92e84e083 Merge 2012-01-18 15:28:13 -08:00
Igor Babaev
40e4d09c53 Merge 2012-01-18 14:19:28 -08:00
Sergei Golubchik
88f451aa6e multi-delete should ignore semi-join internal temp tables, when looking for tables to delete from 2012-01-18 14:52:56 +01:00
Sergei Golubchik
b297463407 lp:893522 more problems found by PVS Studio 2012-01-18 14:52:38 +01:00
Igor Babaev
746dbbe583 Fixed LP 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.
2012-01-18 03:31:20 -08:00
unknown
69327e2987 Adjust test results after Monty's push of the new
handler counter Handler_read_rnd_deleted.
2012-01-18 12:53:50 +02:00
unknown
6b4c132bc7 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.
2012-01-17 15:16:00 +02:00
Michael Widenius
5438d57315 Added Handler_read_rnd_deleted, number of deleted rows found with ha_read_rnd_first. 2012-01-13 14:35:49 +02:00
Sergei Golubchik
e4c61d263b lp:901693 dialog.c:perform_dialog treats every password prompt as first 2012-01-12 20:13:41 +01:00
Sergei Golubchik
a1e3fa93c7 lp:893522 more problems found by PVS Studio 2012-01-12 20:13:22 +01:00
Sergei Golubchik
f523df0a04 openpam compatibility 2012-01-12 20:12:46 +01:00
Sergei Golubchik
3c1125d4ca fixes for get_password():
1. on windows: don't hang when there's no console, that is, _getch() returns -1. 
2. on windows: _getch() returns an int, not char.
   to distinguish between (char)255 and (int)-1
3. everywhere. isspace(pos[-1]) == ' ' never worked,
   isspace() returns a boolean, not a char. the never-worked loop was
   removed to preserve the existing behavior.
2012-01-12 20:12:14 +01:00
Karen Langford
dacaaf22a3 Fixes required to build on AIX 2012-01-11 18:40:29 +01:00
unknown
296b450d3b Fix the comment. 2012-01-11 10:35:16 +02:00
unknown
cf31ccc33c Fix for LP BUG#908269 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.
2012-01-10 23:26:00 +02:00
Sergey Petrunya
d21189d775 Merge fix for BUG#912510 2012-01-10 18:20:56 +04:00
Michael Widenius
a148cf7fb0 Fixed that --sorted-result in mysql-test-run also works for exec
mysql-test/r/information_schema_all_engines.result:
  Update result
mysql-test/t/information_schema_all_engines.test:
  Added --sorted-results as tables in information_schema are not sorted.
2012-01-09 13:49:47 +02:00
Vladislav Vaintroub
cf86abffbf MDEV-77 - 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.
2012-01-08 21:14:07 +01:00
Sergey Petrunya
0b590282fc BUG#912510: Crash in do_copy_not_null with semijoin=ON, firstmatch=ON, aggregate ...
- 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.
2012-01-08 14:43:14 +04:00
Sergei Golubchik
ac3c60d552 report innodb_file_per_table, innodb_flush_log_at_trx_commit, innodb_flush_method 2012-01-04 20:10:15 +01:00
Igor Babaev
cd55894a52 Fixed LP bug #910083.
The patch for bug 685411 erroneously removed a call of engine->set_thd()
from Item_subselect::fix_fields().
2012-01-02 20:06:36 -08:00
Sergey Petrunya
7714496dc1 Make test results stable. 2011-12-30 22:19:05 +01:00
unknown
0868847b55 Update version in configure.in (was forgotten in 5.3.3 release). 2011-12-30 20:22:52 +01:00
Sergei Golubchik
b8b7b4eb6b plugin renamed socket_peercred -> unix_socket.
test added.
2011-12-30 13:57:03 +01:00
Sergey Petrunya
0346e25f07 Continuation of the efforts in previous cset. 2011-12-30 11:34:29 +01:00
Igor Babaev
74fdbec68e Fixed LP bug #848652.
The cause of this bug was the same as for bug 902356 fixed for 5.3.
2011-12-29 21:55:17 -08:00
Sergei Golubchik
1417606b1f on windows: don't link all plugins with mysqld, only do it for storage engines. 2011-12-29 22:52:13 +01:00
Igor Babaev
4b7919368e Back-ported the test case for bug #12616253 from mariadb-5.3 that
was actually a duplicate of LP bug #888456 fixed in mariadb-5.2.
2012-01-14 00:02:02 -08:00
Igor Babaev
4de7978a3f Back-ported the fix and the test case for bug #50257 from mariadb-5.3 code line.
Adjusted results for a few test cases.
2012-01-13 19:00:50 -08:00
Igor Babaev
6dfe0956d6 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.
2012-01-13 12:23:19 -08:00
Vladislav Vaintroub
22876a5495 MDEV-50 : Fix default compilation comment 2012-01-10 19:26:47 +01:00
Vladislav Vaintroub
39ebfa51ef Fix MDEV-49 : version_compile_machine server variable is 'unknown' for x64 builds 2012-01-10 19:23:00 +01:00
Michael Widenius
629cdab808 Fixed compiler and test failures found by buildbot
configure.in:
  Added testing of STRNDUP (not found on solaris)
mysql-test/include/wait_until_connected_again.inc:
  Also test for error 2005 (can happen on windows)
mysql-test/include/wait_until_disconnected.inc:
  Also test for error 2005 (can happen on windows)
mysql-test/suite/innodb_plugin/r/innodb_bug30423.result:
  Number of rows is not stable (found difference on Solaris)
mysql-test/suite/innodb_plugin/t/innodb_bug30423.test:
  Number of rows is not stable (found difference on Solaris)
plugin/auth_pam/auth_pam.c:
  Use internal strndup if it doesn't exist on system (solaris)
  Changed code so that it should also compile on solaris.
2012-01-08 20:29:05 +02:00
Michael Widenius
7e576c0710 Merge 2012-01-07 14:59:03 +02:00
Michael Widenius
d725c52d27 Fixed wrong merge 2012-01-07 10:23:46 +02:00
unknown
d63fc00f35 Fix of LP 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.
2012-01-05 11:06:52 +02:00