Commit graph

68621 commits

Author SHA1 Message Date
Vladislav Vaintroub
97aa8e8c0a LPBUG#983285 - incompatibility in frm in case of VIEWs with non-default ALGORITHM option.
As part of derived tables redesign, values for VIEW_ALGORITHM_MERGE and VIEW_ALGORITHM_TMPTABLE have changed from (former values 1 rsp 2 , new values 5 rsp 9).

This lead to the problem that views, created with version 5.2  or earlier would not work in all situations  (e.g "SHOW CREATE VIEW"), or with mysqldump.

The fix is to restore backward compatibility for the from file, and convert algorithm={1,2} in the frm to {5,9} when reading .frm from disk, and store backward compatible values when writing from to disk. 

Also allow processing correct processing for "invalid" .frms created with MariaDB 5.3/5.5 GA releases (where algorithm stored in memory matched the one stored in frm).
2012-04-20 21:09:16 +02:00
unknown
9997b78ae4 LP BUG#978847 fixed.
Fixed incorrect type casting which made all fields (except very first) changes to materialized table incorrect.
Saved list of view/derived table used items after expanding '*'.
2012-04-19 09:16:30 +03:00
Sergey Petrunya
b9bbe4a18b BUG#978479: Wrong result (extra rows) with derived_with_keys+loosescan+semijoin=ON, materialization=OFF
- Part#2: Don't try to construct a LooseScan access on indexes that do not guarantee 
  index-ordered reads.
2012-04-19 05:37:16 +04:00
Sergey Petrunya
994c6db2d1 BUG#978479: Wrong result (extra rows) with derived_with_keys+loosescan+semijoin=ON, materialization=OFF
Part#1: make EXPLAIN's plan match the one by actual execution: 
Item_subselect::used_tables() should return the same value irrespectively 
of whether we're running an EXPLAIN or a SELECT.
2012-04-19 04:50:32 +04:00
Vladislav Vaintroub
2004bd1736 merge 2012-04-16 23:35:38 +02:00
Vladislav Vaintroub
806df88cc6 merge 2012-04-16 23:32:50 +02:00
Vladislav Vaintroub
5af60b5ed4 fix compiler warnings 2012-04-16 23:31:33 +02:00
Vladislav Vaintroub
85f7acf631 backport a change from 5.5 to remove thread sleeps from Innodb assertions on Windows.
This can result in bad deadlocks (e.g loader lock), seen in latest crash reports.
2012-04-16 23:31:02 +02:00
Vladislav Vaintroub
6d22c2e73a merge 2012-04-16 17:41:43 +02:00
Vladislav Vaintroub
dbb744a3bf merge 2012-04-16 15:38:53 +02:00
Vladislav Vaintroub
4da30b3e3d MDEV-221 - Properly escape command line when starting mysql_install_db
since password characters can contain quotes or spaces.

The proper quoting method for command line arguments used here was  extracted from
http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx

Additionally, mysql_install_db.exe now passes root password to "mysqld.exe --bootstrap"
 in hexadecimal form, to handle potential special chars inside password string literal.
2012-04-16 15:28:33 +02:00
Igor Babaev
f081107fe0 Fixed LP bug #972943 properly.
The previous patch for the bug (that erroneously identified the bug as
bug 972973 in its comment) was incorrect. 
It turned out that the code that triggered the abort complain reported for
the bug was not needed at all.
2012-04-07 17:27:00 -07:00
Igor Babaev
b95ae56b9f Fixed LP bug #972973.
When the function free_tmp_table deletes the handler object for
a temporary table the field TABLE::file for this table should be
set to NULL. Otherwise an assertion failure may occur.
2012-04-07 02:29:04 -07:00
Igor Babaev
c1feaf8d8a Merge. 2012-04-06 16:40:39 -07:00
Igor Babaev
4ca9b8eb3a Fixed bug #915222.
This bug happened because the function find_field_in_view formed
autogenerated names of view columns without a possibility to roll
them back. In some situation it could cause memory misuses reported
by valgrind or even crashes.
2012-04-06 15:08:09 -07:00
unknown
545377ab50 Unused method removed. 2012-04-06 13:18:12 +03:00
Alexey Botchkov
4632f33d33 merging. 2012-04-06 14:24:00 +05:00
Alexey Botchkov
ab5c6cd736 merging. 2012-04-06 13:51:42 +05:00
Alexey Botchkov
357c5f7464 MDEV-80 Memory engine table full at much less than max_heap_table_size with btree index.
RB-tree index in the MEMORY table fails if it grews over 4G.
        That happened because the old_allocated variable in hp_rb_write_key()
        had the uint type. Changed with the 'size_t' type to be same as the
        'rb_tree.allocated'.

per-file comments:
  storage/heap/hp_write.c
MDEV-80 Memory engine table full at much less than max_heap_table_size with btree index.
        uint->size_t for the 'old_allocated'.
2012-04-06 13:31:33 +05:00
Sergei Golubchik
a3073ecd96 merge 2012-04-05 23:07:18 +02:00
unknown
1a48919036 Fix of LP bug#968720.
When a view/derived table is converted from merged to materialized the
items from the used_item lists are substituted for items referring to
the fields of the result of the materialization. The problem appeared
with queries employing natural joins. Since the resolution of a natural
join was performed only once the used_item list formed at the second
execution of the query lacked the references to the fields that were
used only in the equality predicates generated for the natural join.
2012-04-05 23:32:57 +03:00
Sergei Golubchik
cbd52a42ee merge 2012-04-05 12:01:52 +02:00
Sergei Golubchik
dea3544b2d mysql-5.1.62 merge 2012-04-05 10:49:38 +02:00
Sergey Petrunya
cc2298ebb7 Make test results stable. 2012-04-04 21:35:34 +04:00
Sergei Golubchik
c72d5e80c5 mdev-212 sporadic main.connect failures in 5.3
don't cast implicitly an int to a char, when a boolean value is desired.
2012-04-04 15:41:50 +02:00
Michael Widenius
e14d6ef4b7 Merge with 5.2
Fixed additional changed pbxt test cases
2012-04-04 14:19:46 +03:00
Michael Widenius
70a3cafe4d Merge with 5.1 2012-04-04 13:50:24 +03:00
Michael Widenius
1ff3a106fb Merge in deleted fixes 2012-04-04 13:38:19 +03:00
Michael Widenius
6a0c2e8b21 Fixed test cases that changed as part of fixing bugs with record count and partitioning 2012-04-04 13:20:06 +03:00
Sergey Petrunya
4629de4fda Merge 2012-04-04 12:37:46 +04:00
Sergey Petrunya
656c284d81 BUG#913030: better comments and function names. 2012-04-04 12:26:36 +04:00
Michael Widenius
daf29d2a7a Merge with 5.2 2012-04-04 01:00:23 +03:00
Michael Widenius
24a67aa816 Merge with 5.1 2012-04-04 00:33:02 +03:00
Michael Widenius
a3bee835ee Fixed lp:970528 "Server crashes in my_strnncollsp_simple on LEFT JOIN with CSV table, TEXT field"
The main problem was a bug in CSV where it provided wrong statistics (it claimed the table was empty when it wasn't)
I also fixed wrong freeing of blob's in the CSV handler. (Any call to handler::read_first_row() on a CSV table with blobs would fail)



mysql-test/r/csv.result:
  Added new test case
mysql-test/r/partition_innodb.result:
  Updated test results after fixing bug with impossible partitions and const tables
mysql-test/t/csv.test:
  Added new test case
sql/sql_select.cc:
  Cleaned up code for handling of partitions.
  Fixed also a bug where we didn't threat a table with impossible partitions as a const table.
storage/csv/ha_tina.cc:
  Allocate blobroot onces.
2012-04-04 00:14:07 +03:00
Michael Widenius
2149a42928 Don't disable core on signal just becasue platform doesn't handle stack traces 2012-04-03 15:42:26 +03:00
Sergey Petrunya
d734a13d05 Merge 2012-04-02 21:47:31 +04:00
Sergey Petrunya
2a16e7674b BUG#913030: Optimizer chooses a suboptimal excution plan for Q18 from DBT-3
- When doing join optimization, pre-sort the tables so that they mimic the execution
  order we've had with 'semijoin=off'. 
- That way, we will not get regressions when there are two query plans (the old and the
  new) that have indentical costs but different execution times (because of factors that
  the optimizer was not able to take into account).
2012-04-02 21:41:54 +04:00
Sergei Golubchik
1c6d95f3bb merge 2012-04-02 17:54:33 +02:00
Sergei Golubchik
534c2b1205 MDEV-209 SET PASSWORD in 5.2 does not update user's auth plugin 2012-04-02 11:29:28 +02:00
Michael Widenius
ca28d5fcf8 automatic merge 2012-04-02 12:27:15 +03:00
Michael Widenius
398f754b54 Fixed lp:886479 "[PATCH] plugin boolean result"
Thanks to Maarten Vanraes for the patch


sql/sql_plugin.cc:
  Fix plugin boolean variables to receive the value "1", not "-1", when they are set to 1.
  Aside from being bizarre, the existing behavior is unportable: machines where char is unsigned print "255" instead.
2012-04-02 11:45:07 +03:00
Sergei Golubchik
c01ec9d583 merge 2012-03-30 16:13:41 +02:00
Sergei Golubchik
ed5e97702c merge 2012-03-30 16:12:21 +02:00
Sergei Golubchik
99075c84b2 mdev-205 don't install libevent headers 2012-03-30 16:09:57 +02:00
Michael Widenius
3dc35ee493 Compatibility fixes by U Orsini 2012-03-30 16:00:10 +03:00
Michael Widenius
474ee1eedb Merge from 5.2 2012-03-30 13:54:33 +03:00
Michael Widenius
deaf220c50 Automatic merge 2012-03-30 13:51:16 +03:00
Michael Widenius
9b8542a4f6 Fixed bug lp:967914 "CHECK TABLE persistently reports table corruption after removing Aria logs"
Fixed that repair removes the 'table is moved' mark.

mysql-test/suite/maria/r/maria-autozerofill.result:
  Test case for lp:967914
mysql-test/suite/maria/t/maria-autozerofill.test:
  Test case for lp:967914
storage/maria/ha_maria.cc:
  Fixed that repair removes the 'table is moved' mark.
2012-03-30 13:42:52 +03:00
Sergei Golubchik
bd63a5443d merge 2012-03-30 08:49:57 +02:00
Sergei Golubchik
fb3eb4a7e3 merge 2012-03-29 21:15:30 +02:00