Commit graph

173808 commits

Author SHA1 Message Date
Jan Lindström
c0b6c27dbe MDEV-9548: Alter table (renaming and adding index) fails with "Incorrect key file for table"
MDEV-9469: 'Incorrect key file' on ALTER TABLE

InnoDB needs to rebuild table if column name is changed and
added index (or foreign key) is created based on this new
name in same alter table.
2016-02-15 14:48:15 +02:00
Vladislav Vaintroub
e1385f2083 fix buffer overrun 2016-02-15 13:02:57 +01:00
Sergei Golubchik
daa4a2c7ee MDEV-9351 Fix CPU detection for TokuDB on FreeBSD
"x86_64" is "amd64" on FreeBSD
2016-02-15 13:02:21 +01:00
Sergei Golubchik
5a0f2f5ea8 MDEV-9149 Ctrl-C in MySQL client does not interrupt query, but interrupts the session instead
mysql.cc:
Unlike the main MYSQL structure, kill_mysql did not have MYSQL_OPT_PROTOCOL set.

Move all connection-related settings to a separate function and
use it both for the main MYSQL and for kill_mysql.
2016-02-15 13:02:21 +01:00
Sergei Golubchik
9630eda0de MDEV-9390 Function found_rows() gives incorrect result where the previous SELECT contains ORDER BY clause
use the raw found_rows value only when SQL_CALC_FOUND_ROWS was specified
2016-02-15 13:02:21 +01:00
Sergei Golubchik
38b89a61c3 MDEV-9103 Altering table comment does a full copy
following InnoDB's logic, altering a comment or a default
field's value needs "NO_LOCK", not EXCLUSIVE
2016-02-15 13:02:21 +01:00
Sergei Golubchik
3c6b771753 MDEV-9045 Inconsistent handling of "ALGORITHM=INPLACE" with PERSISTENT generated columns
Only set Alter_inplace_info::ALTER_COLUMN_VCOL flag if
a vcol might be affected by the ALTER TABLE statement
2016-02-15 13:02:21 +01:00
Sergei Golubchik
48ea84f057 MDEV-8427 main.connect fails on ppc64el in 10.0 as of 1a8cf15d
Followup fix for bug#35074: update the second location where
max_used_connections is calculated (to be like the
first one).
2016-02-15 13:02:21 +01:00
Sergei Golubchik
9b9522a8b5 MDEV-8133 ALTER TABLE can perform the operation but escape the binary log
fix a few cases where a successful ALTER was not binlogged:
* on errors after the completed ALTER, binlog it, then return an error
* don't let thd->killed abort open_table() after completed
  online ALTER.
2016-02-15 13:02:21 +01:00
Sergei Golubchik
1fc6e297f2 XtraDB/InnoDB crash with autoinc, vcol and online alter
Fix the doubly questional fix for MySQL Bug#17250787:
* it detected autoinc index by looking for the first index
  that starts from autoinc column. never mind one column
  can be part of many indexes.
* it used autoinc_field->field_index to look up into internal
  innodb dictionary. But field_index accounts for virtual
  columns too, while innodb dictionary ignores them.

Find the index by its name, like elsewhere in ha_innobase.
2016-02-15 13:02:21 +01:00
Sergei Golubchik
3889b19f54 more strict ipv6_ok check in mtr
don't use ipv6 is the check fails for any reason. for example, an
ancient solaris perl didn't have sockaddr_in6() in Socket at all.
2016-02-15 12:51:35 +01:00
Sergei Golubchik
8f5030ea86 fix my_gethwaddr() for solaris
it caused feedback plugin tests to fail
2016-02-15 12:51:35 +01:00
Sergei Golubchik
95740bc5c5 dtrace in cmake
1. ignore generated dtrace files
2. don't rewrite probes_mysql_nodtrace.h in-place
2016-02-15 12:51:35 +01:00
Sergei Golubchik
a5d9597e97 better inline check
1. check that unused inline functions are removed
2. only allow compilation if they are or if the check if overridden
3. with CMAKE_GENERATOR=Makefiles, use all flags when testing
   (e.g. both CMAKE_C_FLAGS and CMAKE_C_FLAGS_DEBUG if
   CMAKE_BUILD_TYPE=Debug). This is because
 - on Solaris with the SunPro compiler, default CMAKE_C_FLAGS_xxx
   values contain -xO2 (for Release and RelWithDebInfo)
   and -g (for RelWithDebInfo and Debug)
 - proper inlining only works at -xO4 without -g
 - so if CMAKE_C_FLAGS has -xO4, inlining would work in
   configure.cmake (before this fix) and fail during actual compilation

also remove the outdated check for inline from myu_global.h
2016-02-15 12:51:35 +01:00
Sergei Golubchik
5f078cc8ff compilation errors on sparc sun studio 10
1. unused static inline functions are only removed at -xO4,
   otherwise test binaries will depend on various mysys
   symbols that they don't use. Link test with libmysys.

2. Sphinx - don't instantiate (explicitly) templates before
   they're defined. Or, rather, don't instantiate them explicitly at
   all.

3. GIS - don't use anonymous unions and structs.
2016-02-15 12:51:35 +01:00
Olivier Bertrand
d163ad338d - Fix to MDEV-9542 Connect was not handling NULLs in the answer
from catalog functions and tables. It does now and when decimal
  is NULL defines DOUBLE without parameters.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mysql-test/connect/r/odbc.result
  modified:   storage/connect/mysql-test/connect/r/odbc_oracle.result
  modified:   storage/connect/mysql-test/connect/r/odbc_postgresql.result
  modified:   storage/connect/mysql-test/connect/r/odbc_sqlite3.result
  modified:   storage/connect/mysql-test/connect/r/odbc_xls.result
  modified:   storage/connect/odbconn.cpp
  modified:   storage/connect/table.cpp
  modified:   storage/connect/valblk.h
2016-02-15 10:32:30 +01:00
Vicențiu Ciorbaru
2a47817896 MDEV-9225 mysql_upgrade segfault due to missing /etc/my.cnf.d
In case of missing includedir file, we would attempt to free a NULL
pointer. Make sure to guard against that.
2016-02-14 18:33:20 +02:00
Vicențiu Ciorbaru
b7dc830274 Fix memory leak when failing to read config file
In the case of error during my_load_defaults, we would not free the
args array.
2016-02-14 18:31:48 +02:00
Nirbhay Choubey
d23bd26bec Merge tag 'mariadb-5.5.48' into 5.5-galera 2016-02-13 18:28:36 -05:00
Alexey Botchkov
93e9d81efa Errorneous PSI declaration line fixed. 2016-02-12 12:04:11 +04:00
Elena Stepanova
2c79f57530 MDEV-9464 perfschema.global_read_lock fails when executed after perfschema.dml_setup_instruments
dml_setup_instruments did not restore settings in setup_instruments table
after updating it as a part of the test flow
2016-02-12 03:47:25 +02:00
Sergey Vojtovich
5094a4ab33 Adjusted main.contributors test result. 2016-02-11 13:54:06 +04:00
Sergey Vojtovich
fbf132b3d2 Merge pull request #155 from iangilfillan/10.0
Documentation fixes
2016-02-11 11:24:45 +04:00
Sergey
d859ffff79 Merge pull request #145 from ottok/ok-debpkg-10.0
MDEV-9354: Debian: unmask the mysql.service on installation
2016-02-11 11:15:14 +04:00
Nirbhay Choubey
b83de1151a Update WSREP_PATCH_REVNO. 2016-02-10 18:04:08 -05:00
Philip Stoev
a6d0903764 Bump WSREP_PATCH_VERSION in cmake/wsrep.cmake to 14 2016-02-10 17:48:35 -05:00
Philip Stoev
403a8bf8df Bump WSREP_PATCH_VERSION in cmake/wsrep.cmake to 13 2016-02-10 17:47:54 -05:00
sjaakola
1ce821b509 Refs codership/mysql-wsrep#221
- disabling certain IB atomic builtins, which caused complete hangs
2016-02-10 17:46:51 -05:00
Daniele Sciascia
bd1d2b90a7 refs codership/mysql-wsrep#201
Removes MTR tests.
2016-02-10 17:42:42 -05:00
Teemu Ollakka
8a93a7c0b0 refs codership/mysql-wsrep#226 Limit binlog recovery to found wsrep position
Limit binlog recovery so that the wsrep position found from
storage engines is not exceeded. This is required to have consistent
position between wsrep position stored in innodb header and
recoverd binlog.
2016-02-10 17:42:22 -05:00
Nirbhay Choubey
652e4c1d33 Fix for a build failure. 2016-02-10 17:29:28 -05:00
Daniele Sciascia
484bbd332f refs codership/mysql-wsrep#201
Manually merged query cache fixes from
97c02faf0a39dd189eeda4f75fb35bc5db69d541.
2016-02-10 16:33:04 -05:00
Alexander Barkov
a9a08b1e2f MDEV-9371 select insert('a',2,1,'b') doesn't return expected 'a' 2016-02-10 10:03:47 +04:00
Daniele Sciascia
0c7dffe9e1 refs codership/mysql-wsrep#201
- Eliminates code duplication in query cache patch
- Reduces the number of iterations in mysql-wsrep#201.test
  to shorten the execution time
- Adds a new test case that exercises more scenarios
2016-02-09 21:52:42 -05:00
Daniele Sciascia
8a71fde01f refs codership/mysql-wsrep#201
- Fixes query cache so that it is aware of wsrep_sync_wait.
  Query cache would return (possibly stale) results to the
  client, regardless of the value of wsrep_sync_wait.
- Includes the test case that reproduced the issue.
2016-02-09 21:28:54 -05:00
Vicențiu Ciorbaru
3c5c04bd2b MDEV-7122: Assertion `0' failed in subselect_hash_sj_engine::init
Fix test failure when using maria small-block size. We need to query
the max_key_length and max_key_parts based on the the tmp table engine.
2016-02-10 04:00:08 +02:00
Vladislav Vaintroub
b436db98fe Fix compilation 2016-02-10 00:20:23 +01:00
Oleksandr Byelkin
6b614c620e MDEV-7765: Crash (Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field_index) || bitmap_is_set(table->vcol_set, field_index))' fails) on using function over not created table
Problem was that created table was not marked as used (not set query_id) and so opening tables for stored function pick it up (as opened place holder for it) and used changing TABLE internals.
2016-02-09 18:58:54 +01:00
Vicențiu Ciorbaru
775cccca9f MDEV-7122: Assertion `0' failed in subselect_hash_sj_engine::init
The select mentioned in the bug attempted to create a temporary table
using the maria storage engine. The table needs to have primary keys such that
duplicates can be removed. Unfortunately this use case has a longer
than allowed key and the tmp table got created without a temporary key.
We must not allow materialization for the subquery if the total key
length and key parts is greater than what the storage engine supports.
2016-02-09 19:02:25 +02:00
Sergei Golubchik
01628ce35a Merge branch 'bb-5.5-serg' into 5.5 2016-02-09 14:08:36 +01:00
Sergei Golubchik
afce5415de Merge branch 'merge-xtradb-5.5' into 5.5
5.5.47-37.7
2016-02-09 14:06:45 +01:00
Sergei Golubchik
5d478f5339 Bug#19817021
test case for ALTER TABLE view CHECK PARTITION
2016-02-09 11:29:06 +01:00
Sergei Golubchik
6703e5b6da Bug#20691429 ASSERTION `CHILD_L' FAILED IN STORAGE/MYISAMMRG/HA_MYISAMMRG.CC:631
test case
2016-02-09 11:28:59 +01:00
Sergei Golubchik
dece4bc57a cleanup: make assert more readable 2016-02-09 11:28:44 +01:00
Sergei Golubchik
63d3ccdfee Bug#21205695 DROP TABLE MAY CAUSE SLAVES TO BREAK
Correct fix. Generate the query in the client charset,
not in the system one.
2016-02-09 11:28:13 +01:00
Sergei Golubchik
f3444df415 Merge branch 'mysql/5.5' into 5.5
reverted about half of commits as either not applicable or
outright wrong
2016-02-09 11:27:40 +01:00
Alexey Botchkov
ea0c3fc87b MDEV-9438 backport feedback-http-proxy to 5.5 and 10.0.
The http-proxy option to the FEEDBACK plugin backported.
2016-02-09 05:19:56 +04:00
Sergei Petrunia
b17a435069 MDEV-6859: scalar subqueries in a comparison produced unexpected result
When one evaluates row-based comparison like (X, Y) = (A,B), one should
first call bring_value() for the Item that returns row value. If you
don't do that and just attempt to read values of X and Y, you get stale
values.
Semi-join/Materialization can take a row-based comparison apart and
make ref access from it. In that case, we need to call bring_value()
to get the index lookup components.
2016-02-09 02:31:47 +03:00
Sergei Golubchik
3cfd36bbe2 5.5.47-37.7 2016-02-09 00:13:25 +01:00
Sergei Petrunia
d443d70d06 MDEV-7823: Server crashes in next_depth_first_tab on nested IN clauses with SQ inside
Consider a query with subquery in form t.key=(select ...). Suppose, the
parent query uses this equality for ref access.
It will attempt to evaluate the subquery in get_best_combination(),
right before the join->join_tab[...] array is filled.  The problem was
that subquery optimization will attempt to look at parent's join->join_tab
to check how many times subquery will be executed (and crash).

Fixed by not doing that when the subquery is constant (non-constant
subqueries are only be evaluated during join execution, so they are not
affected)
2016-02-09 01:46:53 +03:00