Commit graph

68872 commits

Author SHA1 Message Date
Sergei Golubchik
2f5f360f17 merge 2012-09-24 17:29:26 +02:00
Sergei Golubchik
9ae909643d merge 2012-09-24 13:57:45 +02:00
Sergei Golubchik
7d82c6fa04 MDEV-543 mysql_install_db doesn't work with blanks in either basedir or datadir path 2012-09-24 11:33:41 +02:00
unknown
792efd59bc MDEV-521 fix.
After pullout item during single row subselect transformation it should be fixed properly.
2012-09-20 12:48:59 +03:00
unknown
0bc89929ef - Merged the fix for bug lp:1009187, mdev-373.
- Performed some refactoring and simplification that was enabled and required by the merge.
2012-09-17 11:13:46 +03:00
unknown
b917fb63a6 Fix bug lp:1009187, mdev-373, mysql bug#58628
Analysis:
The queries in question use the [unique | index]_subquery execution methods.
These methods reuse the ref keys constructed by create_ref_for_key(). The
way create_ref_for_key() works is that it doesn't store in ref.key_copy[]
store_key elements that represent constants. In particular it doesn't store
the store_key for NULL constants.

The execution of [unique | index]_subquery calls
subselect_uniquesubquery_engine::copy_ref_key, which in addition to copy
the left IN argument into a index lookup key, is supposed to detect if
the left IN argument contains NULLs. Since the store_key for the NULL
constant is not copied into the key array, the null is not detected, and
execution erroneously proceeds as if it should look for a complete match.

Solution:
The solution (unlike MySQL) is to reuse already computed information about
NULL presence. Item_in_optimizer::val_int already finds out if the left IN
operand contains NULLs. The fix propagates this to the execution methods
subselect_[unique | index]subquery_engine::exec so it knows if there were
NULL values independent of the presence of keys.

In addition the patch siplifies copy_ref_key() and the logic that hanldes
the case of NULLs in the left IN operand.
2012-09-14 11:26:01 +03:00
unknown
83bdf56ebd Fix of MDEV-511.
As far as we reopen tables so TABLE become invalid we should remove the pointer on cleanup().
2012-09-07 09:39:51 +03:00
unknown
54bb28d4a1 MDEV-486 LP BUG#1010116 fix.
Link view/derived table fields to a real table to check turning the table record to null row.

Item_direct_view_ref wrapper now checks if table is turned to null row.
2012-09-05 23:23:58 +03:00
Alexey Botchkov
589c62fefe Bug #1043845 st_distance() results are incorrect depending on variable order.
Autointersections of an object were treated as nodes, so the wrong result.

per-file comments:
  mysql-test/r/gis.result
Bug #1043845 st_distance() results are incorrect depending on variable order.
        test result updated.
  mysql-test/t/gis.test
Bug #1043845 st_distance() results are incorrect depending on variable order.
        test case added.
  sql/item.cc
        small fix to make compilers happy.
  sql/item_geofunc.cc
Bug #1043845 st_distance() results are incorrect depending on variable order.
        Skip intersection points when calculate distance.
2012-08-31 19:50:45 +05:00
Sergei Golubchik
51e14492e9 compilation warning 2012-08-31 12:01:52 +02:00
unknown
10802c4d90 MDEV-381: fdatasync() does not correctly flush growing binlog file.
When we append data to the binlog file, we use fdatasync() to ensure
the data gets to disk so that crash recovery can work.

Unfortunately there seems to be a bug in ext3/ext4 on linux, so that
fdatasync() does not correctly sync all data when the size of a file
is increased. This causes crash recovery to not work correctly (it
loses transactions from the binlog).

As a work-around, use fsync() for the binlog, not fdatasync(). Since
we are increasing the file size, (correct) fdatasync() will most
likely not be faster than fsync() on any file system, and fsync()
does work correctly on ext3/ext4. This avoids the need to try to
detect if we are running on buggy ext3/ext4.
2012-08-30 10:53:49 +02:00
Sergei Golubchik
0536c506ff MDEV-437 Microseconds: In time functions precision is calculated modulo 256
store the precision in uint, not uint8
2012-08-30 09:05:27 +02:00
Sergei Golubchik
2de4f09a75 MDEV-438 Microseconds: Precision is ignored in CURRENT_TIMESTAMP(N) when it is given as a default column value
The syntax for specifying precision in the DEFAULT clause is unintentional and unsupported.
Don't allow it anymore.
2012-08-29 18:36:57 +02:00
Sergei Golubchik
3444e8e925 MDEV-454 Addition of a time interval reduces the resulting value
1. Field_newdate::get_date should refuse to return a date with zeros when
   TIME_NO_ZERO_IN_DATE is set, not when TIME_FUZZY_DATE is unset
2. Item_func_to_days and Item_date_add_interval can only work with valid dates,
   no zeros allowed.
2012-08-29 17:55:59 +02:00
Sergei Golubchik
a44331ab34 MDEV-456 An out-of-range datetime value (with a 5-digit year) can be created and cause troubles
fix Item_func_add_time::get_date() to generate valid dates.
Move the validity check inside get_date_from_daynr()
instead of relying on callers
(5 that had it, and 2 that did not, but should've)
2012-08-29 10:59:51 +02:00
unknown
95ee3fbf30 MDEV-492: fixed incorrect error check. 2012-08-29 11:35:42 +03:00
Sergey Petrunya
da3a1c8156 Fix bugs in BatchedKeyAccess that show up when working with a
storage engine in HA_MRR_NO_ASSOCIATION mode.
(there is no testcase because we don't ship any such engines currently)
2012-08-28 13:51:01 +04:00
Sergei Golubchik
e988c4dde6 MDEV-336 oqgraph 5.5 crashes in buildbot
force -fno-strict-aliasing for oqgraph
2012-08-24 23:43:18 +02:00
unknown
4d2b05b7d7 fix for MDEV-367
The problem was that was_null and null_value variables was reset in each reexecution of IN subquery, but engine rerun only for non-constant subqueries.

Fixed checking constant in Item_equal sort.
Fix constant reporting in Item_subselect.
2012-08-25 09:15:57 +03:00
unknown
b02ad35e94 Merge from 5.2 2012-08-24 19:13:34 +02:00
unknown
caea98a417 Merge from 5.1 2012-08-24 19:12:47 +02:00
unknown
f37610ecb4 Fix compiler warning 2012-08-24 19:11:54 +02:00
unknown
f090677383 Merge from 5.2. 2012-08-24 15:39:34 +02:00
unknown
c64afe8d94 Merge from 5.1. 2012-08-24 15:37:39 +02:00
unknown
077e453f9f Fix compiler warnings 2012-08-24 15:32:44 +02:00
Vladislav Vaintroub
f024e0d5e9 MDEV-484 : allow compilation/packaging on Windows with newly released VS2012 2012-08-24 15:30:05 +02:00
unknown
4092d08bb8 Merge into latest 5.3 2012-08-24 14:26:23 +02:00
unknown
fc666a0df6 merge from 5.2 2012-08-24 14:02:32 +02:00
unknown
e44a800d91 Merge from 5.2 2012-08-24 13:51:16 +02:00
unknown
89e4d23f3b Merge into latest 5.2. 2012-08-24 12:57:19 +02:00
unknown
96703a63da Merge from 5.1. 2012-08-24 12:32:46 +02:00
unknown
4997ddfa9e Merge with latest 5.1. 2012-08-24 10:34:55 +02:00
unknown
cdeabcfd43 MDEV-382: Incorrect quoting
Various places in the server replication code was incorrectly quoting
strings, which could lead to incorrect SQL on the slave/mysqlbinlog.
2012-08-24 10:06:16 +02:00
Sergei Golubchik
4201939d57 remove mysql-5.1 assert that is already absent in mysql-5.5 2012-08-23 13:52:36 +02:00
Sergei Golubchik
8d69a0feaa MDEV-472 mysql-test-run --valgrind main.ps_2myisam gives warning about not initialized memory
Item::get_date() should return 1 unless the value is a valid date.
2012-08-22 18:40:27 +02:00
Sergei Golubchik
f72a765997 5.2 merge.
two tests still fail:
  main.innodb_icp and main.range_vs_index_merge_innodb
  call records_in_range() with both range ends being open
  (which triggers an assert)
2012-08-22 16:45:25 +02:00
Sergei Golubchik
1fd8150a5b 5.1 merge
increase xtradb verson from 13.0 to 13.01
2012-08-22 16:13:54 +02:00
Sergei Golubchik
115a296756 merge with XtraDB as of Percona-Server-5.1.63-rel13.4 2012-08-22 16:10:31 +02:00
Sergei Golubchik
cefc30b166 merge with MySQL 5.1.65 2012-08-22 11:40:39 +02:00
Sergey Petrunya
ed06ba3492 Better comments 2012-08-21 22:24:34 +04:00
Igor Babaev
fbee9f5b6e Corrected the pactch for mdev-449 to fix valgrind failures. 2012-08-14 14:25:56 -07:00
Igor Babaev
d07b179fd2 Fixed bug mdev-449.
The bug could caused a crash when the server executed a query with
ORDER by and sort_buffer_size was set to a small enough number.
It happened because the small sort buffer did not allow to allocate
all merge buffers in it.
Made sure that the allocated sort buffer would be big enough
to contain all possible merge buffers.
2012-08-13 21:13:14 -07: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
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
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
Bjorn Munch
1713550775 Merge unpushed changes from 5.1.64-release 2012-07-12 10:00:14 +02:00
unknown
dfa0093096 2012-07-10 18:55:07 +05:30
Andrei Elkin
cd0912a4ca merge from 5.1 repo. 2012-07-10 13:51:50 +03:00
Andrei Elkin
eca29d5f33 merge from 5.1 repo. 2012-07-10 13:00:03 +03:00