Commit graph

74697 commits

Author SHA1 Message Date
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
Vladislav Vaintroub
3cb24fff33 - Always compile my_new.cc and safemalloc.c with mysys
Preprocessor macros USE_MYSYS_NEW and -DSAFEMALLOC are 
used to conditionally compile safemalloc or overwritten new/delete.

-Define dummy symbol in my_new.cc in case -DUSE_MYSYS_NEW is not set.
This avoids compiler/linker warnings about an essentially empty file
being compiled.
2012-01-20 22:32:31 +01:00
Vladislav Vaintroub
c232b20232 Fix embedded build on Windows. 2012-01-20 16:54:35 +01:00
Vladislav Vaintroub
2ed40859c4 Remove debug output 2012-01-20 12:39:06 +01:00
Vladislav Vaintroub
74cac79218 - Fix rpl_checksum test. Use basename of file in error messages, not the o
nes prefixed with .\ or ./
- Add my_basename() to mysys.
- Do not compile files that are not needed on Windows (my_addr_resolve, an
d safemalloc related stuff it it is not used)
Avoids linker warnings about compilation of essentially empty files.
2012-01-20 01:57:58 +01:00
Vladislav Vaintroub
139bf5ce4c MDEV-103: 'debug' is disabled in this build warnings causes tests to fail
The root cause is that after recent fixes around --debug variable (lp:909051)
the variable is now available in both release and debug builds, such that MTR
cannot tell a debug compiled server from optimized one.

To fix, assign a special default value 'disabled' for 'debug' variable in optimized build
and fix MTR to check for this special value to recognize optimized build.
2012-01-20 01:57:34 +01: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
4502f3b93f disable character_sets_dir_basic - slashes vs backslashes problem is not possible to resolve 2012-01-19 18:41:56 +01:00
Vladislav Vaintroub
3482963ad6 fix broken result file 2012-01-19 17:44:22 +01:00
Vladislav Vaintroub
607c9a6c68 Fix innodb_bug60229 (get the innodb change into xtradb) 2012-01-19 17:31:07 +01:00
Sergei Golubchik
e3e15687a0 update the test result 2012-01-19 14:12:16 +01:00
Vladislav Vaintroub
0e975ded65 Fix compiler warning on Windows. 2012-01-19 13:46:59 +01:00
Igor Babaev
e63506af2b Added a test case for LP bug #915291.
The bug was fixed by the patch for bug 914560.
2012-01-18 19:38:03 -08: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
309ca7b447 fix the linking failure on windows 2012-01-18 22:09:20 +01:00
Vladislav Vaintroub
c492296127 ensure that lock is held, whenever active thread counter changes.
It was not the case inside listener routine.
2012-01-18 21:12:04 +01: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
Igor Babaev
e041331c89 Merge 2012-01-18 00:38:13 -08:00
Igor Babaev
4fa282db2b Fixed the failure of sp.test reported in the issue MDEV-86. 2012-01-17 23:42:49 -08:00
Vladislav Vaintroub
6909311028 Threadpool : address some of the monty's review points
Also, print message when pool blocks.
2012-01-17 18:50:40 +01: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
Igor Babaev
7902a73d4c Fixed LP bug #914560.
The patch for MWL #247 forgot to initialize the TABLE::ext_key_parts and
TABLE::ext_key_flags of the temporary tables by a query. This could cause
crashes for queries the execution of which needed creation of temporary
tables.
2012-01-17 03:26:49 -08:00
Sergei Golubchik
4cd19779c7 MDEV-69 SET optimizer_switch = REPLACE(...) causes ER_WRONG_VALUE_FOR_VAR
find_set() in typelib.c expected a zero-terminated string

include/typelib.h:
  disable unused flags
2012-01-17 10:55:27 +01:00
Sergei Golubchik
1433621c14 fixes for non-debug builds (CMAKE_BUILD_TYPE=Release or RelWithDebInfo)
client/CMakeLists.txt:
  1. -rdynamic is a linker flag.
  2. it should be used in all builds, not debug only
libmysql/get_password.c:
  prefer a standard function, when possible
  (otherwise a plugin will need to load it from the client)
2012-01-17 09:11:20 +01:00
Sergei Golubchik
8b278b4415 merge 2012-01-16 21:13:05 +01:00
Sergei Golubchik
8d13f97084 remove unused flag 2012-01-16 21:06:44 +01:00
Sergei Golubchik
2ec0f46b88 query cache sysvar fixes
sql/share/errmsg-utf8.txt:
  correct the error message, as query_cache_type variable is not read-ony anymore
sql/sql_cache.cc:
  the caller should verify that query cache resize
  is possible, before trying it
sql/sys_vars.cc:
  * test if qc resize is possible in the sysvar on_check() funntion,
    not in the on_update() function.
  * use the error message that better describes the problem
2012-01-16 21:06:23 +01:00
Sergei Golubchik
baca1a40e9 enable test cases for bugs fixed in xtradb.
disable test cases for bugs not fixed in xtradb.

mysql-test/suite/innodb/t/innodb-lock.test:
  instead of disabling the test in disabled.def
  (hoping that somebody someday will enable it),
  skip it only for xtradb (not for innodb), and
  only for the current xtradb version. the test
  will enable itself automatically on the next
  xtradb merge
mysql-test/suite/innodb/t/innodb_cmp_drop_table.test:
  instead of disabling the test in disabled.def
  (hoping that somebody someday will enable it),
  skip it only for xtradb (not for innodb), and
  only for the current xtradb version. the test
  will enable itself automatically on the next
  xtradb merge
mysql-test/suite/innodb/t/innodb_corrupt_bit.test:
  fix the error number
storage/innobase/handler/ha_innodb.cc:
  fix the error number
storage/xtradb/handler/ha_innodb.cc:
  fix the error number
2012-01-16 21:02:43 +01:00
Sergei Golubchik
0c07546175 minor mtr fix
mysql-test/mysql-test-run.pl:
  strace-client does not take an argument
2012-01-16 20:58:00 +01:00
Sergei Golubchik
38e3ae155d mysql-5.5 merge 2012-01-16 20:16:35 +01:00
Vladislav Vaintroub
1f8cbf168c Fix threadpool on BSD and Solaris 2012-01-16 02:18:24 +01:00
Vladislav Vaintroub
d212991e89 Get rid of idle thread counter atomic variable.
Instead, use function that loops over groups and 
calculates  idle threads for  "show status".
2012-01-15 15:41:25 +01:00
Vladislav Vaintroub
18c9b345b4 Threadpool -address review comments 2012-01-15 11:17:45 +01:00
Vladislav Vaintroub
2533633b5f Simplify thread attach/detach. Use connection specific mysys_var, rather than sharing worker thread's my_thread_var with THD. 2012-01-13 15:53:17 +01:00
Sergei Golubchik
c56483d972 remove duplicate .opt with AUTH_PLUGIN_SO 2012-01-13 15:52:19 +01:00
Sergei Golubchik
4f435bddfd 5.3 merge 2012-01-13 15:50:02 +01:00
Sergei Golubchik
6ca4ca7d37 multi-delete should ignore semi-join internal temp tables,
when looking for tables to delete from
2012-01-13 13:54:55 +01: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
45e25e3643 lp:893522 more problems found by PVS Studio 2012-01-12 20:23:02 +01: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