Commit graph

65798 commits

Author SHA1 Message Date
Igor Babaev
ed2405788f Fixed vargrind problems in check_join_cache_usage().
Merged the patch for bug 697557. Adjusted the results.
2011-01-06 11:40:01 -08:00
Igor Babaev
cb4fa7f401 Fixed LP bug #697557.
When stored in a key buffer any varchar field has a length prefix
that always takes 2 bytes.
2011-01-05 15:03:30 -08:00
Igor Babaev
85523738b9 Fixed a compile warning. 2011-01-05 00:06:41 -08:00
Igor Babaev
af800fd92f The patch adds the code that allows to use equi-join conditions
for hash join in the cases when there are no suitable indexes
for these conditions.
2011-01-04 21:59:41 -08:00
Igor Babaev
77cbad4b31 Corrected the test case for bug 695304.
Added a test case for bug #695442 - a duplicate of bug 694092.
2010-12-29 18:14:03 -08:00
Igor Babaev
a2a09f06bf Merge. 2010-12-29 13:45:38 -08:00
Igor Babaev
f844a7bae7 Fixed LP bug#695304.
The bug was the result of a bad merge maria-5.2-wl21 -> 5.3.
2010-12-29 11:00:22 -08:00
Igor Babaev
ea7082aee2 Merge 2010-12-28 12:25:33 -08:00
Igor Babaev
dccc01a82a Merge 2010-12-28 11:44:28 -08:00
Igor Babaev
63f78fa887 Merge 2010-12-27 20:54:33 -08:00
Igor Babaev
511b53ab7a Post-merge fixes. 2010-12-27 15:34:28 -08:00
Igor Babaev
0dc5ef87d4 Merge 2010-12-27 14:22:05 -08:00
Igor Babaev
18dc64eca2 Fixed LP bug #694443.
One of the hash functions employed by the BNLH join algorithm
calculates the the value of hash index for key value utilizing
every byte of the key buffer. To make this calculation valid
one has to ensure that for any key value unused bytes of the 
buffer are filled with with a certain filler. We choose 0 as
a filler for these bytes.

Added an optional boolean parameter with_zerofill to the function
key_copy. If the value of the parameter is TRUE all unused bytes
of the key buffer is filled with 0.
2010-12-26 16:31:03 -08:00
Igor Babaev
1eb21dc4be Merge 2010-12-25 18:54:14 -08:00
Igor Babaev
1eb5e0e603 Merge 2010-12-24 16:24:20 -08:00
Igor Babaev
d9a81475c7 Fixed LP bug#694092.
In some cases the function make_cond_for_index() was mistaken
when detecting index only pushdown conditions for a table: 
a pushdown condition that was not index only could be marked
as such.
It happened because the procedure erroneously used the markers
for index only conditions that remained from the calls of
this function that extracted the index conditions for other 
tables.
Fixed by erasing index only markers as soon as they are need
anymore.
2010-12-24 14:36:35 -08:00
Igor Babaev
7d68e1ead7 Merge: mwl#24+mwl#21 5.1->5.2 2010-12-24 08:17:43 -08:00
Igor Babaev
6f2db629a0 Post-review fixes. 2010-12-22 18:45:44 -08:00
Igor Babaev
a095346a9d Fixed LP bug #670380.
Lifted the limitation that hash join could not be used over 
varchar fields with non-binary collation.
2010-12-22 00:37:35 -08:00
Sergey Petrunya
f51a26885f Fix compile error on Windows: instead of round(X) use floor(X+0.5) 2010-12-22 02:26:35 +03:00
Sergey Petrunya
33e40f7d5b MWL#121-125 DS-MRR improvements
- Merge with 5.3-main
2010-12-21 14:40:23 +03:00
Sergei Golubchik
6c958d6e80 bug#683112 Maria 5.2 incorrectly reports "(using password: NO)" even when password is specified
set thd->password appropriately also for cases when a user was not found.
2010-12-20 19:19:24 +01:00
Sergey Petrunya
9d480f6af3 BUG#670417: Diverging results in maria-5.3-mwl128-dsmrr-cpk with join buffer
- Fixes for the second fix: take into account case where we don't need to save/restore the scan.
2010-12-20 14:40:12 +03:00
Sergey Petrunya
09a84dc470 BUG#670417: Diverging results in maria-5.3-mwl128-dsmrr-cpk with join buffer
Switch from "Disable identical key handling optimization when
  IndexConditionPushdown is used" approach
To 
 an approach where we save/restore index tuple and so can use index condition pushdown.
2010-12-19 13:56:12 +03:00
Igor Babaev
65af63b038 Addressed the feedback from the review of Monty on the cumulative patch for
mwl#21.
2010-12-19 00:44:39 -08:00
Sergey Petrunya
81eb82b47d Fix a compiler warning on sparc32 2010-12-17 14:58:08 +03:00
Sergey Petrunya
80cbf3a1c2 Small code cleanups 2010-12-17 13:06:21 +03:00
unknown
970e67b5e3 MBug#691437: storage/sphinx/plug.in missing from source tarball.
It was missing from EXTRA_DIST in Makefile.am.
2010-12-17 08:33:36 +01:00
Sergey Petrunya
c696fb6ef3 Better comments 2010-12-16 23:43:52 +03:00
Sergey Petrunya
8dc612e6ab MWL#121-125 DS-MRR improvements
- Address Monty's review feedback, portion 3
2010-12-16 23:37:26 +03:00
Sergey Petrunya
3e633eea66 MWL#121-125 DS-MRR improvements
- Address Monty's review feedback, portion 2
2010-12-16 21:18:35 +03:00
Sergey Petrunya
802db7a64b - Fix compiler warning
- Better warnings
2010-12-15 10:45:08 +03:00
unknown
4f28dcbe32 Fix LP BUG#685411
Analysis:
The assert failed because st_select_lex::print() was called for subqueries
as follows:

Item_subselect::print() ->
  subselect_single_select_engine::print() -> st_select_lex::print()

It was Item_subselect::fix_fields() that set the thd by calling set_thd(),
so when this print() was called before fix_fields(), subselect_engine::thd
was NULL.

Solution:
The patch makes all constructors of all subselect_engine classes to take
a THD parameter. The default subselect_single_select_engine engine is created
early during parse time, in the Item_subselect::init call, so we pass the
correct THD object already at this point.
2010-12-14 14:08:05 +02:00
Sergey Petrunya
eafc4bef33 MWL#121-125 DS-MRR improvements
- Address review feedback: change return type of RANGE_SEQ_IF::next()
2010-12-13 20:01:32 +03:00
Michael Widenius
09d2e7f680 merge with 5.1
(Includes patch for overrun detected by valgrind thanks to previous my_alloca() -> my_malloc() patch)
2010-12-13 15:51:47 +02:00
Michael Widenius
0b20943e9d Fixed typo that caused compile failure in thr_lock.c
mysys/thr_lock.c:
  Fixed typo that caused compile failure
2010-12-13 15:27:13 +02:00
Michael Widenius
ffb0cd6146 When compiling with valgrind, change my_alloca() to use my_malloc()
- This allows us to detect missing my_afree() calls and also find overruns (when running with valgrind) to alloca() areas.
- Added missing my_afree() calls
- Fixed wrong call to my_afree()


include/my_sys.h:
  When compiling with valgrind, change my_alloca() to use my_malloc()
mysql-test/suite/innodb/t/innodb_bug57255.test:
  Speed up taste case (patch from Stewart Smith)
mysql-test/suite/innodb_plugin/t/innodb_bug57255.test:
  Speed up taste case (patch from Stewart Smith)
sql/ha_partition.cc:
  Removed casts from my_afree()
sql/opt_range.cc:
  Add missing my_afree() calls.
storage/maria/ma_rt_split.c:
  Fixed wrong parameter to my_afree()
2010-12-13 15:05:57 +02:00
Sergey Petrunya
58b646001a Merge DS-MRR/CPK improvements into 5.3-main 2010-12-13 13:42:40 +03:00
Igor Babaev
419d524ff9 Fixed compiler warnings. 2010-12-11 12:50:39 -08:00
Igor Babaev
91f950b1c6 Fixed a compiler warning. 2010-12-10 23:40:19 -08:00
Igor Babaev
7f52af655a Merge. 2010-12-10 23:23:34 -08:00
Igor Babaev
597934eedf Fixed compiler warnings. 2010-12-10 20:58:28 -08:00
Sergey Petrunya
14ca046833 Fix crashes on sparc-32 bit: use memcpy when we need to access non-aligned
pointers.
2010-12-10 20:18:12 +03:00
Michael Widenius
bd2034dbee Fix for Lbug:#686010 maria.optimize corrupts stack around alloca() call
storage/maria/ma_check.c:
  Allocate also memory for nodflag and transid's
storage/maria/ma_write.c:
  Allow nodflag and transid as part of key.
  (This has nothing to do with the bug report, but it's a safer check).
storage/maria/maria_def.h:
  Define MARIA_MAX_POINTER_LENGTH (length of pointer to node)
  Added node pointer length to MARIA_INDEX_OVERHEAD_SIZE, as this is part of the key.
  (Safety fix)
2010-12-10 17:15:18 +02:00
Michael Widenius
84edaac4f1 Better warning message if lock test fails
Made archive.test a bit more safe



mysql-test/r/archive.result:
  Added removal of files to make rerun of failed test work
mysql-test/t/archive.test:
  Added removal of files to make rerun of failed test work
mysys/thr_lock.c:
  Better warning message if lock test fails
2010-12-10 17:04:09 +02:00
Igor Babaev
212e42263d Merge. 2010-12-10 01:17:09 -08:00
unknown
b78f624044 Fix wrong merge of patch for Bug#46639. 2010-12-10 09:51:34 +01:00
Igor Babaev
c4080280df Merge 2010-12-09 21:55:14 -08:00
Igor Babaev
afcefa97d9 Addemdum for bug #685952.
Also:
Changed the value of TIME_FOR_COMPARE_ROWID to make it the same as for MWL 21.
Changed some queries in range_vs_index_merge.test to make them generate
the same plans as earlier.
2010-12-09 11:06:32 -08:00
Sergey Petrunya
a86599e1e4 BUG#671340: Diverging results in with mrr_sort_keys=ON|OFF and join_cache_level=5
- Make Mrr_ordered_index_reader() save the rowid across scan interruptions

Also
- Fix compiler warning for setup_buffer_sizes()
- Add commented key_copy/key_restore for better handling of a similar issue
  with index record being destroyed by scan interruption (which causes 
  incorrect evaluation of pushed index condition later on).
2010-12-09 00:47:33 +03:00