Commit graph

88658 commits

Author SHA1 Message Date
Sergey Petrunya
b1a1a79a69 Merge 2014-04-02 03:56:04 -07:00
Sergey Petrunya
26a3d567c9 MDEV-5992: EITS: Selectivity of non-indexed condition is counted twice in table's fanout
MDEV-5984: EITS: Incorrect filtered% value for single-table select with range access
- Fix calculate_cond_selectivity_for_table() to work correctly with range accesses 
  over multi-component keys:
  = First, take selectivity of all possible range scans into account. Remember which 
    fields were used bt the range scans.
  = Then, calculate selectivity produced by sargable predicates on fields. If a 
    field was used in a possible range access, assume its selectivity is already
    taken into account.
- Fix table_cond_selectivity(): when quick select is used, selectivity of
  COND(table) is taken into account in matching_candidates_in_table(). In
  table_cond_selectivity() we should not apply it for the second time.
2014-04-01 09:59:51 -07:00
Olivier Bertrand
3f361af7ce - FIX MDEV-5989 (max(indexed) doesn't work)
By implementing index_last
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/xindex.cpp

- Adding the TYPE_BIN Connect internal type
  (not tested and not used yet)
modified:
  storage/connect/global.h
  storage/connect/value.cpp
  storage/connect/value.h
2014-04-01 18:14:57 +02:00
Rich Prohaska
dc9ed4c5fe #205 build tokudb with webscalesql-5.6 2014-03-31 11:05:45 -04:00
Elena Stepanova
2f60292aa4 Options option_name=0 in combination files were processed incorrectly 2014-03-31 18:04:05 +04:00
Elena Stepanova
4527456092 Increase version number 2014-03-31 18:03:30 +04:00
Rich Prohaska
a77a73fd32 #204 print compression status variables 2014-03-31 08:57:42 -04:00
Olivier Bertrand
b1ae834165 - Fix using ~ in file name on Linux
modified:
  storage/connect/osutil.c
  storage/connect/plugutil.c
  
- Fix using fmt uninitialized in Tabcolumns
modified:
  storage/connect/tabutil.cpp

- Suppress gcc warning
modified:
  storage/connect/ha_connect.cc
2014-03-31 01:20:35 +02:00
Olivier Bertrand
fe3cbcdffa - Add system variables type_conv and conv_size. This addresses the eventual
conversion from TEXT to VARCHAR  in PROXY and MYSQL tables.
modified:
  storage/connect/ha_connect.cc
  storage/connect/myconn.cpp
  storage/connect/myconn.h
  storage/connect/myutil.cpp
  storage/connect/tabmysql.cpp
  storage/connect/tabutil.cpp

- Add the xmap system variable addressing whether file mapping should be used
  to handle indexing.
modified:
  storage/connect/CMakeLists.txt
  storage/connect/ha_connect.cc
  storage/connect/xindex.cpp
  storage/connect/xindex.h

- Do take care of ~ in Linux version of _fullpath (not tested yet)
modified:
  storage/connect/osutil.c
2014-03-30 22:52:54 +02:00
Sergei Golubchik
41a2ca5c16 10.0-connect merge 2014-03-29 17:32:46 +01:00
Sergei Golubchik
5c5834b091 *never* put anything with side-effects in an assert() -
asserts can be conditionally compiled out.
2014-03-29 17:31:08 +01:00
Sergei Golubchik
9d04a25604 temporarily disable part of the test in ps-protocol. name resolution issues.
see MDEV-5981
2014-03-29 14:16:58 +01:00
Seppo Jaakola
f4defb0b7b References: lp:1299430 - initial support for tokudb replication in master-slave model 2014-03-29 13:34:50 +02:00
Sergei Golubchik
0643d1f319 another post-fix patch for MDEV-5850: MySQL Bug#21317: SHOW CREATE DATABASE does not obey to lower_case_table_names
(for case-insensitive filesystems)

sql/events.cc:
  for "SHOW EVENTS IN db_name"
sql/sp_head.h:
  for "CREATE EVENT", and everything SP-related
sql/sql_acl.cc:
  privilege check for mysql_change_db()
sql/sql_db.cc:
  for metadata locking of db names
sql/sql_parse.cc:
  any_db is a constant, it is not writable
sql/sql_show.cc:
  for SHOW CREATE TRIGGER and other trigger-related statements
2014-03-29 11:33:25 +01:00
Sergei Golubchik
73f4861575 MDEV-5969 Crash in prepared statement with NO_ZERO_IN_DATE and ROLLUP
MDEV-5971 Asymmetry between CAST(DATE'2001-00-00') to INT and TO CHAR in prepared statements

Consistently set maybe_null flag, even not-NULL temporal literal may become NULL
in the restrictive sql_mode.
2014-03-29 11:33:20 +01:00
Sergei Golubchik
b37157e49e update the result file 2014-03-29 11:32:49 +01:00
Sergei Golubchik
a5196354f6 MDEV-5979 Server crashes on truncating a temporary InnoDB table on Windows
fix uninit variable
2014-03-28 21:46:58 +01:00
Michael Widenius
d5a185a552 automatic merge 2014-03-28 21:42:57 +02:00
Nirbhay Choubey
9d2e90f379 Merged revision 3471, 3472 & 3473 from maria-5.5-galera. 2014-03-28 08:26:08 -04:00
Michael Widenius
3f7ee1f12e Updated sponsors and authors 2014-03-28 09:31:43 +02:00
Michael Widenius
10ae6e35d0 Fixed that the we don't change CREATE to CREATE OR REPLACE, except if the slave removed an existing table as part of CREATE.
This will help the following replicaition scenario:
MariaDB 10.0 master (statement replication) -> MariaDB 10.0 slave (row based replication) -> MySQL or MariaDB 5.x slave


mysql-test/r/mysqld--help.result:
  Updated help text
mysql-test/suite/rpl/r/create_or_replace_mix.result:
  Added more tests
mysql-test/suite/rpl/r/create_or_replace_row.result:
  Added more tests
mysql-test/suite/rpl/r/create_or_replace_statement.result:
  Added more tests
mysql-test/suite/rpl/t/create_or_replace.inc:
  Added more tests
sql/handler.h:
  Added org_options so that we can detect what come from the query and what was possible added later.
sql/sql_insert.cc:
  Only write CREATE OR REPLACE if was originally specified or if we delete a conflicting table as part of create
sql/sql_parse.cc:
  Remember orginal create options
sql/sql_table.cc:
  Only write CREATE OR REPLACE if was originally specified or if we delete a conflicting table as part of create
sql/sys_vars.cc:
  Updated help text
2014-03-28 09:31:24 +02:00
Sergey Vojtovich
71064cbe5d MDEV-5964 - main.mdev-504 unveils assertion failure in
TABLE_SHARE::visit_subgraph

tc_acquire_table() is not ready to update TABLE::in_use without mutex:
thr1: table= free_tables.pop_front(); // table->in_use is 0
thr2: tdc_remove_table();
thr2: find_deadlock(); // assert(table->in_use != 0)
thr1: table->in_use= thd;

Protect update of TABLE::in_use by LOCK_table_share.
2014-03-28 11:30:10 +04:00
Sergey Petrunya
68015a99cd Change the order of parameters in DECODE_HISTOGRAM to match the order of fields in
mysql.column_stats.
2014-03-28 23:18:33 +04:00
Sergey Petrunya
44c8e2bb77 Merge 2014-03-28 22:19:16 +04:00
Sergey Petrunya
f68332cb71 MDEV-5978: valgrind failure in rpl_row_corruption
- Fix valgrind failure: don't touch table_list->master_had_triggers 
  when RBR_TRIGGERS is not compiled in.
2014-03-28 22:17:57 +04:00
Sergei Golubchik
c386daf0c0 post-fix patch for MDEV-5850: MySQL Bug#21317: SHOW CREATE DATABASE does not obey to lower_case_table_names 2014-03-27 23:23:28 +01:00
Sergey Petrunya
9a06e531f4 Merge 2014-03-28 00:38:56 +04:00
Sergey Petrunya
92e49bb066 MDEV-4360: ANALYZE shows "Table is already up to date" while updating stats
- Show a line with "Engine-independent statistics collected" when ANALYZE command
  caused EITS statistics to be recollected.
2014-03-28 00:32:53 +04:00
Nirbhay Choubey
02ba2bfdb4 Merging revision from codership-mysql/5.5 (r3928..3968) and
codership-mysql/5.6 (r4021..4065).
- Also contains fixes for some build failures.
2014-03-27 16:26:00 -04:00
Nirbhay Choubey
a500865c13 Merged revision 3471, 3472 & 3473 from maria-5.5-galera. 2014-03-27 16:22:57 -04:00
Olivier Bertrand
bdbe7430bc - Make local MySQL connection default to unix socket on Linux or enable
to use named pipe on Windows by specifying the host as '.'
  This addresses MDEV-5952.
modified:
  storage/connect/myconn.cpp

- Clean some unused code
modified:
  storage/connect/connect.cc
  storage/connect/connect.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
2014-03-27 19:07:17 +01:00
Sergei Golubchik
9bf8a68577 disable connect tests for --embedded 2014-03-27 13:25:02 +01:00
Nirbhay Choubey
43c6c2ac77 Merged r3468 from maria-5.5-galera. 2014-03-27 08:22:29 -04:00
Nirbhay Choubey
7fd382f117 Merged r3466 from maria-5.5-galera. 2014-03-27 08:17:24 -04:00
Sergei Golubchik
933c3a5e5b compilation failure on windows 2014-03-27 12:17:53 +01:00
Sergei Golubchik
3b33caaca3 mtr: remove --use-copy, autodetect symlink support instead 2014-03-27 12:04:34 +01:00
Sergey Petrunya
42263a2b0a Merge 2014-03-27 14:57:53 +04:00
Sergey Petrunya
aef0b4a897 MDEV-5962: EITS: value "position" calculated incorrectly for CHAR(n) columns
- Dont substract unsigned numbers, use correct calculations.
- (there is no testcase because effort is required to come up with it)
2014-03-27 14:55:29 +04:00
Sergei Golubchik
43498927fa update .result file 2014-03-27 11:25:27 +01:00
Sergey Petrunya
79a8a6130b Code cleanup:
- Move [some] engine-agnostic tests from t/selectivity.test to t/selectivity_no_engine.test
- Move Histogram::point_selectivity to sql_statistics.cc
2014-03-27 13:08:00 +04:00
Seppo Jaakola
8fb80a58bf References lp:1280896 - merged the fix from wsrep-5.6
skipping secondary index dupkey checks for applier
2014-03-27 10:56:11 +02:00
Sergey Petrunya
0d67aafaa2 Merge 2014-03-27 12:37:05 +04:00
Sergey Petrunya
ab061a2bb3 MDEV-5926, MDEV-4362 post-fixes:
- Histogram::find_bucket() should not walk off the end of the value range.
- Address review feedback in Histogram::point_selectivity(): different handling
  for zero-width buckets, and explanations.
2014-03-27 12:30:49 +04:00
Sergei Golubchik
1a4c8ae1be heap.test: hide a warning on 32-bit 2014-03-27 08:11:05 +01:00
Sergei Golubchik
e29a4dd519 MDEV-5433 select_result::send_error() is unused
remove dead code
2014-03-26 22:32:20 +01:00
Sergei Golubchik
707dd6b9e9 MDEV-5943 'show table status' does not immediately show tokudb tables
MDEV-5839 TokuDB tables not properly cleaned on DROP DATABASE

TokuDB does not support discover_table_names() and writes no files
in the database directory, so automatic filename-based
discover_table_names() doesn't work either. So, it must force .frm
file to disk in ::create()
2014-03-26 22:32:15 +01:00
Sergei Golubchik
97687f2888 Fix hostcache_ipv4_blocked and hostcache_ipv6_blocked to pass.
Don't abort plugin reads whem mpvio->make_it_fail is set - this can leak information.
2014-03-26 22:32:10 +01:00
Sergei Golubchik
06bdc441f0 update tokudb tests for 10.0 2014-03-26 22:31:17 +01:00
Sergei Golubchik
06be773cdb Revert revision sergii@pisem.net-20130123151853-xc6i3l11aqv0iykk
Rename back my_init_dynamic_array2() -> init_dynamic_array2()
It happens to be a part of the de facto API :(
2014-03-26 22:26:13 +01:00
Sergei Golubchik
10740939eb 5.5 merge 2014-03-26 22:25:38 +01:00