Commit graph

67125 commits

Author SHA1 Message Date
Michael Widenius
60bd2133d7 Fixed compile failure when we don't use system zlib
Fixed crash when setting query_cache_type to 0.

client/Makefile.am:
  Added zlib include (needed by checksum.c)
sql/set_var.cc:
  Updated call to disable_query_cache()
sql/sql_cache.cc:
  Don't give warning if we start mysqld with --query_cache_type=0 --query_cache-size=0
  Fixed crash when setting query_cache_type to 0 (we shouldn't call query_cache.disable_query_cache() when there is no current_thd)
sql/sql_cache.h:
  Added THD to disable_query_cache()
2011-06-09 13:35:01 +03:00
Michael Widenius
163d7acc9f Fixed build failure on OpenSolaris
strings/ctype-simple.c:
  Fixed some compiler warnings
2011-06-09 11:13:03 +03:00
Michael Widenius
8d7f810894 Upgraded to latest handlersocket code. This fixed LP:766870 "Assertion `next_insert_id == 0' failed with handlersocket"
sql/handler.cc:
  Added DBUG_ code
2011-06-07 14:19:49 +03:00
Michael Widenius
2740edcf56 Fixed that mysqld --no-defaults --help --verbose doesn't give a lot of irrelevant error messages.
sql/mysql_priv.h:
  Make opt_help global
sql/mysqld.cc:
  Don't give (double) warnings about lower case file systems if --help is given.
  Don't give warning about non existing data directory if --help is given.
sql/sql_plugin.cc:
  Give a better warning if --help is used and plugin table doesn't exists
2011-06-07 10:54:37 +03:00
Michael Widenius
370f79e389 Fixed strict alias problem by replacing = with memcpy() 2011-06-07 10:29:08 +03:00
Igor Babaev
059aff15cd Fixed LP bug #784441.
The code that added semi-join transformations missed checking
the state of the fixed flag for the items built with the
and_items function before calls of the fix_fields method.
This could lead to an abort failure when the first argument
of and_items() happened to be NULL.
2011-06-06 15:50:46 -07:00
Michael Widenius
29af1aefe9 Merge with 5.2 to get bug fixes for thr_lock 2011-06-06 19:37:33 +03:00
Michael Widenius
7e04f7c8fb Fixed that SHOW COLUMNS for a virtual persistent column shows 'PERSISTENT' instead of 'VIRTUAL'
Strict mode now gives error if one tries to update a virtual column.

mysql-test/suite/vcol/r/vcol_column_def_options_innodb.result:
  Updated test results
mysql-test/suite/vcol/r/vcol_column_def_options_myisam.result:
  Updated test results
mysql-test/suite/vcol/r/vcol_keys_innodb.result:
  Updated test results
mysql-test/suite/vcol/r/vcol_keys_myisam.result:
  Updated test results
mysql-test/suite/vcol/r/vcol_misc.result:
  Added new test for 'show columns' and error handling when trying to update a virtual column.
mysql-test/suite/vcol/t/vcol_misc.test:
  Added new test for 'show columns' and error handling when trying to update a virtual column.
sql/sql_base.cc:
  Strict mode now gives error if one tries to update a virtual column.
sql/sql_show.cc:
  Show PERSISTENT instead of VIRTUAL for persistent columns.
2011-06-06 17:25:01 +03:00
Michael Widenius
6ae42b75b8 Fixed lock sorting and lock check issues with thr_lock that caused warnings when running test suite.
Safety check that could cause core dump when doing create table with virtual column.

mysql-test/mysql-test-run.pl:
  Show also warnings from thr_lock (which starts with just Warning, not Warning:)
mysql-test/r/lock.result:
  Added test that showed not relevant warning when using table locks.
mysql-test/t/lock.test:
  Added test that showed not relevant warning when using table locks.
mysys/thr_lock.c:
  Fixed sorting of locks.
  (Old sort code didn't handle case where TL_WRITE_CONCURRENT_INSERT must be sorted before TL_WRITE)
  Added more information to check_locks warning output.
  Fixed wrong testing of multiple different write locks for same table.
sql/item_cmpfunc.cc:
  Safety check that could cause core dump when doing create table with virtual column.
2011-06-06 16:39:06 +03:00
Sergey Petrunya
f0f2ec3086 Buildbot fixes:
- make sp.test work both with and without query_cache (attempt 2)
- fix compile warning in make_sort_key(), as directed by SergeiG
2011-06-03 21:45:24 +04:00
Vladislav Vaintroub
668d79e87c Fixed compiler warning in central header file mysql_priv.h. 2011-06-03 15:06:13 +02:00
Sergey Petrunya
80e14ddb88 More changes from optimizer_use_mrr to optimizer_switch 2011-06-03 13:42:02 +04:00
Sergey Petrunya
40acadc779 Buildbot fixes: don't use @@optimizer_use_mrr, it has been moved into @@optimizer_switch 2011-06-03 11:32:21 +04:00
Sergey Petrunya
d9513849bc Buildbot fixes: let mysql-test/t/sp.test set @@query_cache_size only if the server has query cache. 2011-06-03 10:49:50 +04:00
Sergey Petrunya
3fa0c9f468 Merge 2011-06-03 09:38:59 +04:00
Igor Babaev
33c8796beb Merge 2011-06-02 17:33:08 -07:00
Sergey Petrunya
9482e387e6 Change optimizer_use_mrr=auto|disable|force
to be optimizer_switch flags mrr=on|off and mrr_cost_based=on|off.
2011-06-03 00:25:58 +04:00
Sergey Petrunya
c44c1bd188 Merge fix for BUG#787299. 2011-06-02 23:52:36 +04:00
Sergey Petrunya
ebb130b189 BUG#787299: Valgrind complains on a join query with two IN subqueries
- Don't attempt to construct FirstMatch access method if we've 
  just figured three lines above that it can't be used (because join
  prefix doesn't have the needed tables), and so have set 
    pos->first_firstmatch_table= MAX_TABLES 
  Attempts to analyze join->positions[MAX_TABLES] caused valgrind warnings
2011-06-02 23:48:33 +04:00
Sergey Petrunya
97db031521 Change suite/rpl/t/rpl_row_basic_11bugs.test to require query cache. 2011-06-02 16:46:47 +04:00
Igor Babaev
8bf69ab7bf Corrected the previous patch concerning elimination of SQL_SELECT::original_cond.
Corrected the code from the patch for  LP bug 702322.
2011-05-31 09:39:35 -07:00
unknown
8d086ec759 automerge 2011-05-31 12:16:02 +02:00
unknown
3b724a0505 Attempt to fix rpl.rpl_corruption failure seen in Buildbot on Windows.
There is a potential race when we stop the slave. It may take some time for
the master to detect that the slave connection is closed (eg. if scheduling
delays the TCP RSET packet or whatever). Since we inject only a single corrupt
binlog event, we may be unfortunate enough to inject it on the wrong
connection, to a slave io thread that's already stopped.

Fix by waiting for the old dump thread on the master to go away before
injecting the corrupt event.
2011-05-31 12:14:21 +02:00
Sergey Petrunya
0cf912c23f - Remove compiler warning
- Remove garbage comments
2011-05-30 11:19:40 +04:00
Sergey Petrunya
922830830a Merge 5.3-main -> MWL#90 2011-05-30 10:51:41 +04:00
Igor Babaev
5dc9a53d19 Eliminated the member original_cond from the class SQL_SELECT
introduced at the latest merge 5.1->5.2->5.3.
It is basically not needed since if SQL_SELECT::pre_idx_push_select_cond 
is not NULL then SQL_SELECT::original_cond would point to the same condition
as SQL_SELECT::pre_idx_push_select_cond. Otherwise SQL_SELECT::original_cond
would be equal to SQL_SELECT::cond.
2011-05-29 20:48:14 -07:00
Sergey Petrunya
037e16583e Remove garbage comments 2011-05-29 13:22:38 +04:00
Sergey Petrunya
5cd18326c2 Merge 5.3->main -> 5.3-mwl90 2011-05-29 12:58:44 +04:00
Sergey Petrunya
4efe046352 Update pbxt suite test results 2011-05-29 11:38:32 +04:00
Igor Babaev
8ce2e1bcbe Fixed the abort failure of a test case from vcol.vcol_misc.
The fix blocks execution of any constant sub-expressions of
the defining expressions for virtual columns when context
analysis if these expressions is performed.

Fixed a compiler warning.
2011-05-28 22:07:56 -07:00
Sergey Petrunya
ded7342daa - Update test results (trivial)
- Code cleanup: remove garbage comments
2011-05-29 01:47:24 +04:00
Sergey Petrunya
6f17421c27 Buildbot fixes:
- Don't call table_list->process_index_hints() for JTBM pseudo-tables
- Update test results
2011-05-29 01:24:36 +04:00
Sergey Petrunya
6b74453386 Post-merge fix for tests
- bad .result merge
- make .test file do not switch off both materialization and IN->EXISTS as that leads to error now.
2011-05-29 00:51:26 +04:00
Sergey Petrunya
0b69585dec Buildbot fixes
- Update test results (checked)
- Fix compiler warning
2011-05-29 00:41:41 +04:00
Vladislav Vaintroub
1e1755be86 Fix gcc warning. 2011-05-28 19:28:39 +02:00
Sergey Petrunya
77c4c4d8ea post-merge fixes: get MWL#90 code to work with MWL#89's
way of processing prepared statements:
- conversion subquery_predicate -> TABLE_LIST is once per-statement
- However, the code must take into account that materialized temptable
  is dropped and re-created on each execution (the tricky part is that 
  at start of n-th EXECUTE we have TABLE_LIST object but not its TABLE object)
- IN-equality is injected into WHERE on every execution.
2011-05-28 20:34:04 +04:00
Vladislav Vaintroub
b519f2b626 Fix compile errors and warnings and test errors introduced by microseconds push.
Also, change windows timespec definition to be Unix-ish - simplifies handling a lot.
2011-05-28 16:57:58 +02:00
Michael Widenius
152dfe5867 Automatic merge 2011-05-28 06:00:22 +03:00
Michael Widenius
2894d50e3e automatic merge with 5.3 2011-05-28 05:58:16 +03:00
Michael Widenius
bf33056ef9 automatic merge with 5.2 2011-05-28 05:17:24 +03:00
Michael Widenius
f197991f41 Merge with 5.1-microseconds
A lot of small fixes and new test cases.

client/mysqlbinlog.cc:
  Cast removed
client/mysqltest.cc:
  Added missing DBUG_RETURN
include/my_pthread.h:
  set_timespec_time_nsec() now only takes one argument
mysql-test/t/date_formats.test:
  Remove --disable_ps_protocl as now also ps supports microseconds
mysys/my_uuid.c:
  Changed to use my_interval_timer() instead of my_getsystime()
mysys/waiting_threads.c:
  Changed to use my_hrtime()
sql/field.h:
  Added bool special_const_compare() for fields that may convert values before compare (like year)
sql/field_conv.cc:
  Added test to get optimal copying of identical temporal values.
sql/item.cc:
  Return that item_int is equal if it's positive, even if unsigned flag is different.
  Fixed Item_cache_str::save_in_field() to have identical null check as other similar functions
  Added proper NULL check to Item_cache_int::save_in_field()
sql/item_cmpfunc.cc:
  Don't call convert_constant_item() if there is nothing that is worth converting.
  Simplified test when years should be converted
sql/item_sum.cc:
  Mark cache values in Item_sum_hybrid as not constants to ensure they are not replaced by other cache values in compare_datetime()
sql/item_timefunc.cc:
  Changed sec_to_time() to take a my_decimal argument to ensure we don't loose any sub seconds.
  Added Item_temporal_func::get_time() (This simplifies some things)
sql/mysql_priv.h:
  Added Lazy_string_decimal()
sql/mysqld.cc:
  Added my_decimal constants max_seconds_for_time_type, time_second_part_factor
sql/table.cc:
  Changed expr_arena to be of type CONVENTIONAL_EXECUTION to ensure that we don't loose any items that are created by fix_fields()
sql/tztime.cc:
  TIME_to_gmt_sec() now sets *in_dst_time_gap in case of errors
  This is needed to be able to detect if timestamp is 0
storage/maria/lockman.c:
  Changed from my_getsystime() to set_timespec_time_nsec()
storage/maria/ma_loghandler.c:
  Changed from my_getsystime() to my_hrtime()
storage/maria/ma_recovery.c:
  Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/maria/unittest/trnman-t.c:
  Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/xtradb/handler/ha_innodb.cc:
  Added support for new time,datetime and timestamp
unittest/mysys/thr_template.c:
  my_getsystime() -> my_interval_timer()
unittest/mysys/waiting_threads-t.c:
  my_getsystime() -> my_interval_timer()
2011-05-28 05:11:32 +03:00
Vladislav Vaintroub
00752ba43c merge 2011-05-27 19:09:40 +02:00
Vladislav Vaintroub
9ace4da571 merge 2011-05-27 19:05:35 +02:00
Vladislav Vaintroub
7aba87b72f Workaround a cmake bug that was only visible on a newly installed Philip's machine.
CMake 2.8.4 crashed on this line
 IF(something AND IS_DIRECTORY(something_else))
when both  "something" and "something_else" were empty.

Changing the line slightly (using cascading "IF" instead)  solved the crash.
2011-05-27 18:57:40 +02:00
Michael Widenius
73f78f7766 Fixed memory overrun in mysql_tzinfo_to_sql 2011-05-26 18:35:26 +03:00
Michael Widenius
e2962ee07e Automatic merge 2011-05-26 18:34:22 +03:00
Michael Widenius
fb7ee69128 Merge with 5.1 to get in fix wrong setpriority() call 2011-05-26 18:07:06 +03:00
Vladislav Vaintroub
192672d072 Fix line endings. 2011-05-26 13:42:22 +02:00
Michael Widenius
ccdecaea59 Disable call to setpriority() in pbxt. This caused mysqld to run with nice priority -19, which was far from optimal.
mysql-test/suite/innodb/r/innodb_bug60049.result:
  Updated results
mysql-test/suite/innodb/t/innodb_bug60049.test:
  Force global.innodb_fast_shutdown to 0 as test require it
mysql-test/suite/innodb_plugin/t/innodb_bug60049.test:
  Force global.innodb_fast_shutdown to 0 as test require it
storage/pbxt/src/pthread_xt.cc:
  Disable call to setpriority()
2011-05-26 14:38:17 +03:00
Sergey Petrunya
aa551f1b9e Post-merge fixes part#2 2011-05-26 15:01:26 +04:00