Commit graph

75673 commits

Author SHA1 Message Date
Sergei Golubchik
d11829654c merge with MySQL 5.5.27
manually checked every change, reverted incorrect or stupid changes.
2012-08-09 17:22:00 +02:00
Sergei Golubchik
704898bf32 undo the fix for MySQL Bug#12998841 2012-08-08 12:32:34 +02:00
Sergei Golubchik
e022b6ef07 MDEV-392 MTR: skip-combinations option is declared in help, but is ignored
remove unused mtr option
2012-08-08 12:08:54 +02:00
Michael Widenius
a7123f5075 Fixed compiler warnings
sql/log.h:
  Fixed compiler warnings reported for gcc 2.7.1
storage/xtradb/handler/ha_innodb.cc:
  Remove not used variables
2012-08-06 16:33:11 +03:00
Sergei Golubchik
6ed4a283fd MDEV-399 Combinations defined in the base suite cannot be skipped by overlay
When appliying parent combinations to the overlay,
filter them through the %skip_combinations using the overlayed filename
2012-08-01 19:57:36 +02:00
Vladislav Vaintroub
bd39599668 fix oqgraph on MSVC 2012-08-02 23:17:27 +02:00
Elena Stepanova
b69e8d46b6 MDEV-369: Mismatches in MySQL engines test suite
Post-merge fixes for mismatches that only affect 5.5 (but not 5.3)
2012-08-02 04:48:33 +04:00
Elena Stepanova
f2b4305bd4 Merge 5.3->5.5 2012-08-02 04:22:43 +04:00
Elena Stepanova
4f3674c8c0 MDEV-369 (Mismatches in MySQL engines test suite)
Following reasons caused mismatches:
  - different handling of invalid values;
  - different CAST results with fractional seconds;
  - microseconds support in MariaDB;
  - different algorithm of comparing temporal values;
  - differences in error and warning texts and codes;
  - different approach to truncating datetime values to time;
  - additional collations;
  - different record order for queries without ORDER BY;
  - MySQL bug#66034.
More details in MDEV-369 comments.
2012-08-02 00:58:13 +04:00
Sergei Golubchik
6d4acc43e5 MDEV-336 oqgraph 5.5 crashes in buildbot
make CMakeLists.txt to detect if the installed boost can be compiled with the
installed compile and specified set of compiler options.

Background: even sufficiently new Boost cannot be compiled with the sufficiently old gcc
in the presence of -fno-rtti
2012-07-31 22:39:33 +02:00
Sergei Golubchik
0117a92fed MDEV-419 ensure that all HAVE_XXX constants can be set by cmake
add missing checks to configure.cmake
remove dead code and unused HAVE_xxx constants from the sources
2012-07-31 19:29:07 +02:00
Sergei Golubchik
42ea25d4c5 MDEV-375 Server crashes in THD::print_aborted_warning with log_warnings > 3
Don't use ER(xxx) in THD::close_connection(), when current_thd is already reset to NULL.
Prefer ER_THD() or ER_DEFAULT() instead.
2012-07-31 18:32:46 +02:00
Alexey Botchkov
9705ad5e33 MDEV-340 Save replication comments for DROP TABLE.
mysql_rm_table_no_locks() function was modified.
      When we construct log record for the DROP TABLE, now we
      look if there's a comment before the first table name and
      add it to the record if so.
  
per-file comments:
  sql/sql_table.cc
  MDEV-340 Save replication comments for DROP TABLE.
        comment_length() function implemented to find comments in the query,
        call it in mysql_rm_table_no_locks() and use the result to form log record.
  mysql-test/suite/binlog/r/binlog_drop_if_exists.result
  MDEV-340 Save replication comments for DROP TABLE.
        test result updated.
  mysql-test/suite/binlog/t/binlog_drop_if_exists.test
  MDEV-340 Save replication comments for DROP TABLE.
        test case added.
2012-07-31 16:21:53 +05:00
Sergei Golubchik
7368ef56c6 MDEV-418 Feedback plugin statisics problem
Add the check for sys/utsname.h to configure.cmake
2012-07-31 11:31:26 +02:00
Vladislav Vaintroub
257fd9d3d9 MDEV-417 - fix typo that prevented use of atomic instructions on Windows
use correct macro for Microsoft compiler. It is _MSC_VER , not _MSV_VER
2012-07-30 20:13:23 +02:00
Elena Stepanova
d1a90e852b MDEV-369 (Mismatches in MySQL engines test suite)
Following reasons caused mismatches:
  - different handling of invalid values;
  - different CAST results with fractional seconds;
  - microseconds support in MariaDB;
  - different algorithm of comparing temporal values;
  - differences in error and warning texts and codes;
  - different approach to truncating datetime values to time;
  - additional collations;
  - different record order for queries without ORDER BY;
  - MySQL bug#66034.
More details in MDEV-369 comments.
2012-07-30 04:16:49 +04:00
Elena Stepanova
3ca3b44dbb Result files were wrong due to MySQL bug#66034 2012-07-26 23:31:08 +04:00
Sergey Petrunya
55597a4869 MDEV-410: EXPLAIN shows type=range, while SHOW EXPLAIN and userstat show full table scan is used
- Make Item_subselect::fix_fields() ignore UNCACHEABLE_EXPLAIN flag when deciding whether 
  the subquery item should be marked as constant.
2012-07-25 20:41:48 +04:00
unknown
a742d49c90 Awoiding registering partiton engine underlying tables whan it has no sens. 2012-07-24 17:50:06 +03:00
Vladislav Vaintroub
13f6783f75 MDEV-409 : /etc/my.cnf config file overwritten during RPM installation
Fix : use attribute %config(noreplace)  for /etc/my.cnf , instead of (automatically generated) %config
2012-07-23 23:54:57 +02:00
Axel Schwenke
cb4bf95214 merged in MDEV-11 "Generic storage engine test suite"
see https://mariadb.atlassian.net/browse/MDEV-11
2012-07-19 13:24:24 +02:00
Axel Schwenke
1b1b36ab3e merged with maria/5.5 2012-07-19 13:21:53 +02:00
Sergey Petrunya
79c4b4e440 Merge 5.3->5.5 2012-07-18 22:40:15 +04:00
Sergey Petrunya
33e961c1ab Merge bug#1007622 from 5.3 to 5.5 2012-07-18 22:36:20 +04:00
Sergey Petrunya
7e6bec87c1 MDEV-398: Sergv related to spacial queries
- index_merge/intersection is unable to work on GIS indexes, because:
  1. index scans have no Rowid-Ordered-Retrieval property
  2. When one does an index-only read over a GIS index, they do not 
     get the index tuple, because index only contains bounding box of the geometry.
     This is why key_copy() call crashed.
This patch fixes #1, which makes the problem go away. Theoretically, it would 
be nice to check #2, too, but SE API semantics is not sufficiently precise to do it.
2012-07-18 15:03:05 +04:00
unknown
82f821ee8f fix to satisfy compiler. 2012-07-16 10:48:03 +03:00
Elena Stepanova
72a5542f0e MDEV-11: Generic storage engine test suite 2012-07-16 06:17:56 +04:00
Elena Stepanova
403cac0fe7 Allow multiple error codes inside a variable in --error command 2012-07-16 06:14:53 +04:00
Elena Stepanova
49da8e7e21 Export sys_errno and errno to variables 2012-07-16 06:12:11 +04:00
unknown
9f6a1c5842 fixed MySQL bug#53775:
Now partition engine adds underlying tables to the QC and ask underlying tables engine permittion to cache the query and return result of the query.

Incorrect QC cleanup in case of table registration failure fixe.

Unified interface for myisammrg & partitioned engnes for QC.
2012-07-13 22:17:32 +03:00
Vladislav Vaintroub
718bbcbfd0 MDEV-393. Remove --loose-pbxt=OFF/loose-skip-pbxt from bootstrapper calls to avoid "unknown parameter" warning 2012-07-12 15:32:35 +02:00
Sergei Golubchik
a08631d696 lp:1023404 problems with savepoints and tokudb with 5.5
fix incorrect merge
2012-07-11 16:19:05 +02:00
Bjorn Munch
1877016c39 Empty version change upmerge 2012-07-11 15:34:38 +02:00
unknown
4c33e849f1 Raise version number after cloning 5.1.65 2012-07-11 15:18:34 +02:00
unknown
21bc74e0c9 2012-07-11 16:42:55 +05:30
unknown
28255d4c58 2012-07-11 08:43:26 +02:00
Chaithra Gopalareddy
fc74e2e08f Bug #13444084:PRIMARY KEY OR UNIQUE KEY >453 BYTES FAILS FOR
COUNT DISTINCT GROUP BY

PROBLEM:
To calculate the final result of the count(distinct(select 1))
we call 'end_send' function instead of 'end_send_group'.
'end_send' cannot be called if we have aggregate functions
that need to be evaluated.

ANALYSIS:
While evaluating for a possible loose_index_scan option for
the query, the variable 'is_agg_distinct' is set to 'false'
as the item in the distinct clause is not a field. But, we
choose loose_index_scan by not taking this into 
consideration.
So, while setting the final 'select_function' to evaluate
the result, 'precomputed_group_by' is set to TRUE as in
this case loose_index_scan is chosen and we do not have
agg_distinct in the query (which is clearly wrong as we
have one).
As a result, 'end_send' function is chosen as the final
select_function instead of 'end_send_group'. The difference
between the two being, 'end_send_group' evaluates the
aggregates while 'end_send' does not. Hence the wrong result.

FIX:
The variable 'is_agg_distinct' always represents if 
'loose_idnex_scan' can be chosen for aggregate_distinct 
functions present in the select.
So, we check for this variable to continue with 
loose_index_scan option.


sql/opt_range.cc:
  Do not continue if is_agg_distinct is not set in case
  of agg_distinct functions.
2012-07-11 08:19:17 +05:30
Rohit Kalhans
6fe6288d83 bug#11759333:
follow-up patch for the failure on pb2 windows build
2012-07-10 22:02:25 +05:30
Mayank Prasad
3a71ab0805 Bug#13889741: HANDLE_FATAL_SIGNAL IN _DB_ENTER_ |HANDLE_FATAL_SIGNAL IN STRNLEN
Follow up patch to resolve pb2 failure on windows platform
2012-07-10 19:59:59 +05:30
Jon Olav Hauglid
a47e778a61 Bug#12623923 Server can crash after failure to create
primary key with innodb tables

The bug was triggered if a single ALTER TABLE statement both
added and dropped indexes and ALTER TABLE failed during drop
(e.g. because the index was needed in a foreign key constraint).
In such cases, the server index information would get out of
sync with InnoDB - the added index would be present inside
InnoDB, but not in the server. This could then lead to InnoDB
error messages and/or server crashes.

The root cause is that new indexes are added before old indexes
are dropped. This means that if ALTER TABLE fails while dropping
indexes, index changes will be reverted in the server but not
inside InnoDB.

This patch fixes the problem by dropping any added indexes
if drop fails (for ALTER TABLE statements that both adds
and drops indexes). 

However, this won't work if we added a primary key as this
key might not be possible to drop inside InnoDB. Therefore,
we resort to the copy algorithm if a primary key is added
by an ALTER TABLE statement that also drops an index.

In 5.6 this bug is more properly fixed by the handler interface
changes done in the scope of WL#5534 "Online ALTER".
2012-07-10 16:13:02 +02:00
unknown
51a47a8d3a 2012-07-10 19:15:20 +05:30
unknown
dfa0093096 2012-07-10 18:55:07 +05:30
Rohit Kalhans
6da51d1705 BUG#11759333: SBR LOGGING WARNING MESSAGES FOR PRIMARY
KEY UPDATES WITH A LIMIT OF 1

Problem: The unsafety warning for statements such as
update...limit1 where pk=1 are thrown when binlog-format
= STATEMENT,despite of the fact that such statements are
actually safe. this leads to filling up of the disk space 
with false warnings.
 
Solution: This is not a complete fix for the problem, but
prevents the disks from getting filled up. This should
therefore be regarded as a workaround. In the future this
should be overriden by server general suppress/filtering
framework. It should also be noted that another worklog is
supposed to defeat this case's artificial unsafety.

We use a warning suppression mechanism to detect warning flood,
enable the suppression, and disable this when the average
warnings/second has reduced to acceptable limits.
 
  Activation: The supression for LIMIT unsafe statements are
  activated when the last 50 warnings were logged in less 
  than 50 seconds. 
 
  Supression: Once activated this supression will prevent the
  individual warnings to be logged in the error log, but print
  the warning for every 50 warnings with the note:
  "The last warning was repeated N times in last S seconds"  
  Noteworthy is the fact that this supression works only on the
  error logs and the warnings seen by the clients will remain as
  it is (i.e. one warning/ unsafe statement)
 
  Deactivation: The supression will be deactivated once the
  average # of warnings/sec have gone down to the acceptable limits.



sql/sql_class.cc:
  Added code to supress warning while logging them to error-log.
2012-07-10 18:24:11 +05:30
Andrei Elkin
c60ad57543 null-merge from 5.1. 2012-07-10 13:56:06 +03:00
Andrei Elkin
f4dc921596 merge from 5.5 repo. 2012-07-10 13:53:19 +03:00
Andrei Elkin
cd0912a4ca merge from 5.1 repo. 2012-07-10 13:51:50 +03:00
Bjorn Munch
88a74a168d null upmerge 2012-07-10 12:01:09 +02:00
Andrei Elkin
eca29d5f33 merge from 5.1 repo. 2012-07-10 13:00:03 +03:00
Bjorn Munch
8647617947 mysql_client_fw.c was not included in make dist 2012-07-10 11:57:24 +02:00
Bjorn Munch
5473c42ac1 null upmerge 2012-07-10 11:51:18 +02:00