Commit graph

67712 commits

Author SHA1 Message Date
Igor Babaev
3a7169572c Backported the test case for bug 59843 from the mysql-5.6 code line.
(Failed to reproduce the bug in mariadb-5.3).
2011-10-31 01:13:12 -07:00
Igor Babaev
7dd42686fe Backported the fix and the test case for bug 59483 from the mysql-5.6 code line. 2011-10-30 06:17:07 -07:00
Igor Babaev
e5627c9802 Backported the test case for bug 58838 from mysql-5.6 code line.
The bug was fixed by the patches for LP bugs 668644,702322 that
were applied earlier to the mariadb-5.3 code.
2011-10-30 04:18:09 -07:00
Igor Babaev
c118219f38 Backported the test case for bug 59186 from mysql-5.6 code line.
The bug was fixed by the patch for LP bug 694092 that was
applied earlier to the mariadb-5.3 code.
2011-10-30 03:34:26 -07:00
Igor Babaev
4cf3cb7240 Backported the test case for bug 58837. The fix was backported earlier. 2011-10-30 02:37:10 -07:00
Igor Babaev
7bc6a83b02 Backported the fix and the test case for bug #58816 from mysql-5.6 code line. 2011-10-29 15:36:24 -07:00
Igor Babaev
a8f5b5e866 Merge. 2011-10-28 05:19:45 -07:00
Igor Babaev
4b4dfd57f5 Merge. 2011-10-28 04:07:11 -07:00
Sergey Petrunya
3694bb90a4 - Let t/myisam_icp.test run include/icp_tests.inc with MRR/ICP turned ON (not OFF)
- Fix the compile-time-default value of optimizer_switch printed by mysqld --help --defaults
2011-10-28 12:38:36 +04:00
Sergey Petrunya
363094f6e7 Make innodb_no_mrricp.test to really run with MRR and ICP turned OFF. 2011-10-28 11:23:30 +04:00
Igor Babaev
2162704829 Moved the test case for bug 879939 to derived_view.test where it belongs to. 2011-10-27 12:03:33 -07:00
unknown
26387734fd Fix gcc 4.6 warning after merge with 5.1 2011-10-27 19:18:25 +03:00
Igor Babaev
aaa47b88a6 Merge. 2011-10-27 09:14:45 -07:00
Igor Babaev
2a3858d9d0 Fixed LP bug #874035.
The function Item_direct_view_ref::fix_fields erroneously did not correct
the value of the flag maybe_null when the view for which the item was
being fixed happened to be an inner table of an outer join.
2011-10-27 08:32:24 -07:00
unknown
dd564da398 5.1->5.2 merge (gcc 4.6 warnings and apple hwaddress fixes). 2011-10-27 17:51:30 +03:00
unknown
28e2777991 Fix gcc 4.6 warnings about assigned but not used variables.
Fixed my_gethwaddr.c to allow compilation on Mac OS X.
2011-10-27 15:22:52 +03:00
Sergey Petrunya
08e9e6a790 BUG#882472: subselect4.test fails in current 5.3
- The problem was that the value of READ_RECORD::file was not updated when the underlying table
  was temporary and was converted from heap to myisam. Resolved by eliminating READ_RECORD::file,
  always use READ_RECORD::table->file
2011-10-27 13:54:28 +04:00
Michael Widenius
fa36a7426b Fixed lp:879939 "assertion in ha_maria::enable_indexes with derived_with_keys=on"
Honor unique/not unique when creating keys for internal tempory tables.
Added new variables to be used to limit how keys are created for internal temporary tables.


include/maria.h:
  Added maria_max_key_length() and maria_max_key_segments()
include/myisam.h:
  Added myisam_max_key_length() and myisam_max_key_segments()
mysql-test/r/mysql.result:
  Drop all used tables
mysql-test/r/subselect4.result:
  Added test case for lp:879939
mysql-test/t/mysql.test:
  Drop all used tables
mysql-test/t/subselect4.test:
  Added test case for lp:879939
sql/mysql_priv.h:
  Added internal_tmp_table_max_key_length and internal_tmp_table_max_key_segments to be used to limit how keys for derived tables are created.
sql/mysqld.cc:
  Added internal_tmp_table_max_key_length and internal_tmp_table_max_key_segments to be used to limit how keys for derived tables are created.
sql/share/errmsg.txt:
  Added new error message for internal errors
sql/sql_select.cc:
  Give error if we try to create a wrong key (this error should never happen)
  Honor unique/not unique when creating keys for internal tempory tables.
storage/maria/ha_maria.cc:
  Added change_table_ptr() to ensure that external_ref points always to the correct table.
  (Not having this caused an assert in the included test)
storage/maria/ha_maria.h:
  Added change_table_ptr() to ensure that external_ref points always to the correct table.
storage/maria/ma_check.c:
  Fixed bug in Duplicate key error printing (now row position is printed correctly)
storage/maria/ma_create.c:
  maria_max_key_length() -> _ma_max_key_length()
storage/maria/ma_info.c:
  Added extern function maria_max_key_length() to calculate the max key length based on current block size.
storage/maria/ma_open.c:
  maria_max_key_length() -> _ma_max_key_length()
storage/maria/maria_def.h:
  maria_max_key_length() -> _ma_max_key_length()
storage/myisam/ha_myisam.cc:
  Added change_table_ptr() to ensure that external_ref points always to the correct table.
  (Not having this caused an assert in the included test)
storage/myisam/ha_myisam.h:
  Added change_table_ptr() to ensure that external_ref points always to the correct table.
2011-10-26 20:25:18 +03:00
Igor Babaev
16942bc5ca Fixed LP bug #881449.
The function SELECT_LEX::update_used_tables first must clean up
all bitmaps to be recalculated for all tables that require it
and only after this walk through on conditions attached to the
tables to update these bitmaps.
2011-10-26 04:27:09 -07:00
Sergey Petrunya
fbcff7a488 Merge fix for BUG#877288 2011-10-26 10:58:40 +04:00
Sergey Petrunya
8e6440df0b BUG#877288: Wrong result with semijoin + materialization + multipart key
- when create_ref_for_key() is constructing a ref access for
  a table that's inside a SJ-Materialization nest, it may not 
  use references to fields of tables that are unside the nest (because 
  these fields will not yet have values when ref access will be used)
  
  The check was performed in the first of create_ref_for_key's loops (the 
  one which counts how many key parts are usable) but not in the second
  (the one which actually fills the TABLE_REF structure).
2011-10-26 02:38:49 +04:00
Igor Babaev
a8f7c03c1e Fixed LP bug #881318.
If a materialized derived table / view is empty then for this table
the value of file->ref is 0. This was not taken into account by
the function JOIN_CACHE::write_record_data. As a result a query
using an empty materialized derived tables as inner tables of outer
joins and IN subqueries in WHERE conditions could cause server crashes
when the optimizer employed join caches and duplicate elimination for
semi-joins.
2011-10-25 14:18:19 -07:00
Igor Babaev
c0a1bd1ed6 Fixed LP bug #880724.
Do not create KEYUSEs for a materialized view over a constant table.
2011-10-24 12:54:28 -07:00
Igor Babaev
391c5db1fc Fixed LP bug #879882.
This bug happened because the function Item_cond::eval_not_null_tables
erroneously did not initialize the value of not_null_tables_cache.
2011-10-23 05:46:03 -07:00
Igor Babaev
2b173bf894 Fixed LP bug #878769.
The method DsMrr_impl::dsmrr_init erroneously tried to get a KEY descriptor
for key with number MAX_KEY. This caused valgrind complains.
2011-10-22 07:19:43 -07:00
Igor Babaev
fdf789a7ea Fixed LP bug #874378.
This bug happened for the queries over multi-table mergeable views
because the bitmap TABLE::read_set of the underlying tables were not
updated after the views had been merged into the query.
Now this bitmaps are updated properly.
Also the bitmap TABLE::merge_keys now is updated in prevention of
future bugs.
2011-10-22 00:14:27 -07:00
Igor Babaev
b117a3c453 Added a test case for LP bug #873263 fixed by the patch for bug 874006. 2011-10-20 08:02:31 -07:00
Igor Babaev
e7a7e2a036 Fixed LP bug #878199.
The function JOIN::drop_unused_derived_keys could erroneously set
the value of REF::key to 0 for a joined materialized view/derived table
in the case when no REF access to the table was used by the query
execution plan. This could cause a crash of the server.
2011-10-20 04:59:20 -07:00
Igor Babaev
0e4d88f1b2 Merge. 2011-10-19 23:35:11 -07:00
Igor Babaev
945f12cf8f Fixed LP bug #877316.
This bug happened due to incompleteness of the fix for bug 872735:
the occurrences of the fields in the conditions of correlated
subqueries were not taken into account when recalculating
covering keys bit maps.
2011-10-19 23:28:37 -07:00
Vladislav Vaintroub
29c3debd30 merge 5.2 2011-10-19 21:01:42 +02:00
Vladislav Vaintroub
aa327cdd48 merge from 5.1 2011-10-19 20:53:16 +02:00
Vladislav Vaintroub
78eb1d48c9 Fix endless loop in my_gethwaddr() 2011-10-19 20:51:01 +02:00
unknown
9f79d2f9e1 Fix of building on Mac OS. 2011-10-18 22:50:17 +03:00
unknown
4720b6f68b merge 2011-10-18 14:04:10 +03:00
unknown
255c04aed8 Compiler warning about assigned but not used variables fixed. 2011-10-18 13:44:12 +03:00
Igor Babaev
cc80671202 Fixed a compiler warning. 2011-10-17 03:42:56 -07:00
Igor Babaev
bb916d0f09 Merge. 2011-10-17 01:20:16 -07:00
Igor Babaev
f5955f87c6 Fixed LP bug #874006.
This bug manifested itself with queries containing non-correlated
IN subqueries over materialized views/derived tables.  
The bug happened because the code of the function generate_derived_keys did
not take into account that the function could be called twice when the
optimizer was deciding whether in-exist transformation should be applied.
2011-10-16 13:23:57 -07:00
Michael Widenius
d5959780aa Remove extra MariaDB- from binary tar.gz file name
Print server version name to .err file on crash 

scripts/make_binary_distribution.sh:
  Remove extra MariaDB- from binary tar.gz file name
sql/mysqld.cc:
  Print server version name to .err file on crash (to ensure people paste also that when they report a crash)
2011-10-16 22:46:11 +03:00
Michael Widenius
e3e60a4102 Fixed wrong info message for mysqld --general-log
Fixed wrong parameter type for --general-log. Now one can enable it with --general-log= 1 | true | on
Fixed that bool parameters can also take 'on' and 'off' as parameters. This is in line with the values assigned to them in mysqld.


mysys/my_getopt.c:
  Fixed that bool parameters can also take 'on' and 'off' as parameters.
sql/mysqld.cc:
  Fixed wrong info message for mysqld --general-log
  Fixed wrong parameter type for --general-log. Now one can enable it with --general-log= 1 | true | on
2011-10-16 21:55:53 +03:00
Vladislav Vaintroub
aed67d2582 In crash handler, output session value of the optimizer switch. 2011-10-14 17:51:16 +02:00
Igor Babaev
5e4a381cc5 Merge. 2011-10-14 03:56:41 -07:00
Sergei Golubchik
60e1ef85e5 update pbxt test results 2011-10-14 12:41:20 +02:00
Igor Babaev
54e296d4a7 Merge. 2011-10-14 00:11:50 -07:00
Igor Babaev
9e6f484788 Fixed LP bug #872735.
This bug happened because the maps of covering keys for mergeable derived
tables/views was not recalculated after the derived tables/vies had been
merged into the main query.
2011-10-13 22:39:00 -07:00
Sergei Golubchik
9f6e24a05a lp:817966 int_column IN (string_constant)
restore the status quo from before the microsecond patch
2011-10-13 13:44:50 +02:00
Sergei Golubchik
76e9131fbe typo. 2011-10-13 11:23:59 +02:00
Sergei Golubchik
d588488855 silence the "uninitialized" warning 2011-10-13 11:20:33 +02:00
Sergey Petrunya
94bf62b65b Remove garbage comment 2011-10-13 00:15:51 +04:00