Commit graph

31275 commits

Author SHA1 Message Date
Alexey Botchkov
620d62ac3e plugin.result fixed. 2012-03-14 09:40:54 +04:00
Sergei Golubchik
262a2ab59d monty's cleanup of my_thr_init.c
and collateral changes
2012-03-13 13:29:44 +01:00
Sergei Golubchik
d32b537edf broad suppression for dlsym "memory leak" - same as for dlclose 2012-03-13 13:28:08 +01:00
unknown
ecbd868f58 Merged the implementation of MDEV-28 LIMIT ROWS EXAMINED into MariaDB 5.5. 2012-03-12 00:45:18 +02:00
unknown
8aebd44e0e Implementation of MDEV-28 LIMIT ROWS EXAMINED
https://mariadb.atlassian.net/browse/MDEV-28
  
This task implements a new clause LIMIT ROWS EXAMINED <num>
as an extention to the ANSI LIMIT clause. This extension
allows to limit the number of rows and/or keys a query
would access (read and/or write) during query execution.
2012-03-11 14:39:20 +02:00
Sergei Golubchik
96a21ab324 fix uninitialized warning in mysql-test-run.pl
make the test to require sphinx 2.0.4 or later
2012-03-09 09:20:45 +01:00
Sergei Golubchik
4933d21e5d merge with mysql-5.5.21 2012-03-09 08:06:59 +01:00
Michael Widenius
aba6d06c34 Upgraded sphinx to version 2.0.4
Fixed memory leaks and compiler warnings in ha_sphinx.cc
Added HA_MUST_USE_TABLE_CONDITION_PUSHDOWN so that an engine can force index condition to be used

mysql-test/suite/sphinx/sphinx.result:
  Added testing of pushdown conditions and sphinx status variables.
mysql-test/suite/sphinx/sphinx.test:
  Added testing of pushdown conditions and sphinx status variables.
mysql-test/suite/sphinx/suite.pm:
  Print version number if sphinx version is too old.
sql/handler.h:
  Added HA_MUST_USE_TABLE_CONDITION_PUSHDOWN so that an engine can force index condition to be used
sql/sql_base.cc:
  Added 'thd' argument to check_unused() to be able to set 'entry->in_use' if we call handler->extra().
  This was needed as sphinx (and possible other storage engines) assumes that 'in_use' is set if handler functions are called.
sql/sql_select.cc:
  Test if handler is forcing pushdown condition to be used.
storage/sphinx/ha_sphinx.cc:
  Updated to version 2.0.4
  Fixed memory leaks and compiler warnings.
storage/sphinx/ha_sphinx.h:
  Updated to version 2.0.4
storage/sphinx/snippets_udf.cc:
  Updated to version 2.0.4
2012-03-07 17:38:47 +02:00
Sergei Golubchik
18c51eee35 5.3 merge 2012-03-06 20:46:07 +01:00
Igor Babaev
f92cfdb8a9 Merge. 2012-03-05 22:33:46 -08:00
Igor Babaev
04ee30e75a Fixed LP bug #946055.
The function create_hj_key_for_table() that builds the descriptor of
the hash join key to access a table of a materialized subquery must
ignore any equi-join predicate depending on the tables not belonging
to the subquery.
2012-03-05 20:32:28 -08:00
Sergei Golubchik
1c530b36d1 mdev-20: INSTALL PLUGIN SONAME 2012-03-05 21:48:06 +01:00
Michael Widenius
4ab7a33e1e Automatic merge 2012-03-05 22:00:24 +02:00
Sergei Golubchik
98141ea42b updates after writing https://kb.askmonty.org/en/mysql-test-auxiliary-files
mysql-test/README.suites:
  removed. it was turned into a manual, eventually
mysql-test/include/default_mysqld.cnf:
  use normal environment variables instead of magic @OPT.vardir
mysql-test/lib/My/ConfigFactory.pm:
  use normal environment variables instead of magic @OPT.vardir
mysql-test/mysql-test-run.pl:
  initialize environment variables before parsing the first my.cnf template - it may refer to them
mysql-test/suite/sphinx/my.cnf:
  use normal environment variables instead of magic @OPT.vardir
2012-03-05 17:44:26 +01:00
unknown
8a5940c477 Fix for LP BUG#944504
Problem is that subquery execution can't be called during prepare/optimize phase.

Also small fix for subquery test suite.
2012-03-05 15:48:12 +02:00
Igor Babaev
6f3c39a057 Fixed LP bug #944782.
This bug in the function JOIN::drop_unused_derived_keys() could
leave the internal structures for a materialized derived table
in an inconsistent state. This led to a not quite correct EXPLAIN
output when no additional key had been created to access the table.
It also may lead to more serious consequences: so, the test case
added with this fix caused a crash in mariadb-5.5.20.
2012-03-04 22:38:17 -08:00
Igor Babaev
fba0ead63e Supported extended keys (MWL #247) for innodb_plugin. 2012-03-03 13:22:49 -08:00
Igor Babaev
f9db747b83 Merge 2012-03-02 22:52:03 -08:00
Igor Babaev
8bc5045ea3 Merge MWL #247 from mariadb 5.3 -> mariadb 5.5. 2012-03-02 15:03:20 -08:00
Sergei Golubchik
0b690fdf81 misc test/result fixes
mysql-test/include/rpl_udf.inc:
  supppression should be added after master-slave.inc to affect both a master and a slave
mysql-test/suite/rpl/t/rpl_udf.test:
  supppression should be added after master-slave.inc to affect both a master and a slave
2012-03-02 08:32:16 +01:00
unknown
5d6989ea71 Merge MWL#234: @@skip_replication, into latest MariaDB 5.5 for push 2012-03-02 07:45:06 +01:00
Igor Babaev
8b469eb515 Merge 5.3->5.5. 2012-03-01 14:22:22 -08:00
Sergei Golubchik
29b0b0b5de misc test/result fixes
mysql-test/include/have_xtradb.combinations:
  xtradb tests need this I_S table
mysql-test/lib/mtr_cases.pm:
  fix for .deb and .rpm installations
2012-03-01 17:04:57 +01:00
unknown
acd7727e43 replicate_events_marked_for_skip does not exist in embedded. 2012-03-01 16:06:27 +01:00
unknown
22a504f897 Merge MWL#234: @@skip_replication feature to MariaDB 5.5. 2012-03-01 12:41:49 +01:00
Igor Babaev
000deedf3b Fixed LP bug #943543.
This bug appeared after the patch for bug 939009 that in the
function merge_key_fields forgot to reset a proper value for
the val field in the result of the merge operation of the key
field created for a regular key access and  the key field
created to look for a NULL key.

Adjusted the results of the test case for bug 939009 that
actually were incorrect.
2012-02-29 23:28:16 -08:00
Sergei Golubchik
e4bfb6f161 pbxt suite is now a main-pbxt overlay 2012-02-29 21:55:04 +01:00
Michael Widenius
e4e85cd2ef Fixed lp:925377 "Querying myisam table metadata while 'alter table..enable keys' is running may corrupt the table"
Fixed wrong mutex order bug in Aria when flush_log_for_bitmap() was called when table is not yet marked for change.

include/my_base.h:
  Added flag that table is opened only for status
mysql-test/r/myisam-big.result:
  Test case for lp:925377
mysql-test/t/myisam-big.test:
  Test case for lp:925377
sql/sql_base.cc:
  If thd->version == 0 (happens only when we are opening a table that is flushed under  MYSQL_LOCK_IGNORE_FLUSH), open the table in HA_OPEN_FOR_STATUS mode
storage/maria/ma_bitmap.c:
  Fixed wrong mutex order bug in Aria when flush_log_for_bitmap() was called when table is not yet marked for change.
storage/maria/ma_dbug.c:
  Ignore last_version <= 1 as these are either flushed or only opened for status
storage/maria/ma_open.c:
  Use last_version=1 as a marker that table was opened with HA_OPEN_FOR_STATUS.
  In this case we just open a new version of the table in read only mode.
storage/myisam/mi_create.c:
  Update prototype
storage/myisam/mi_dbug.c:
  Ignore last_version <= 1 as these are either flushed or only opened for status
storage/myisam/mi_open.c:
  Use last_version=1 as a marker that table was opened with HA_OPEN_FOR_STATUS.
  If HA_OPEN_FOR_STATUS is used, we will not assert if there is an old not-to-be-used version of the table existing.
  In this case we just open a new version of the table in read only mode.
storage/myisam/myisamdef.h:
  Updated prototype
2012-02-28 23:18:52 +02:00
Sergei Golubchik
54f9fe6c8b lp:938977 - Query performance with join/index super slow on MariaDB 5.3.4RC
make sure that stored routines are evaluated (that is, de facto - cached) in convert_const_to_int().
revert the fix for lp:806943 because it cannot be repeated anymore.
add few tests for convert_const_to_int()
2012-02-28 15:41:55 +01:00
Sergei Golubchik
45faabf44f merge 2012-02-28 15:04:31 +01:00
Michael Widenius
adf3deda88 Automatic merge 2012-02-28 13:50:30 +02:00
Michael Widenius
cf06b29f60 Fixed lp:905716 "Assertion `page->size <= share->max_index_block_size'"
The issue was that Aria allowed too long keys to be created (so that the internal buffer was not big enough to hold the whole key).
Key lengths is now limited to HA_MAX_KEY_LENGTH (1000), as for MyISAM.
Fixed failure in  "_ma_apply_redo_index: Assertion `new_page_length == 0", as found by buildbot.

mysql-test/suite/maria/r/maria.result:
  Updated results
mysql-test/suite/maria/r/maria3.result:
  Updated results. Added test for bug fix
mysql-test/suite/maria/t/maria3.test:
  Updated results. Added test for bug fix
mysql-test/suite/maria/t/optimize.test:
  Updated test for new max key length
storage/maria/ha_maria.cc:
  Limit key to HA_MAX_KEY_LENGTH.
storage/maria/ma_key_recover.c:
  Limit used page length to max page size (this is in line with the code that writes the entry to the log).
  This fixes failure in  "_ma_apply_redo_index: Assertion `new_page_length == 0", as found by buildbot.
storage/maria/ma_search.c:
  Extra DBUG
storage/maria/ma_write.c:
  Added test to detect errors earlier.
2012-02-28 13:39:02 +02:00
Igor Babaev
9db23c8280 Merge. 2012-02-27 21:23:12 -08:00
Vladislav Vaintroub
62dcaf8c29 merge 5.5 2012-02-27 19:32:44 +01:00
unknown
f0c682858f Merge MWL#192: non-blocking client library into MariaDB. 2012-02-26 16:11:44 +01:00
Igor Babaev
c92d8cba45 Merge 5.2->5.3 2012-02-26 02:42:45 -08:00
Igor Babaev
d2e3b33b8c Rolled back the patch for bug 791761.
A better fix for this bug will be pulled from mariadb-5.2.
2012-02-26 00:19:07 -08:00
Sergei Golubchik
1df16a171b make the test result independent from sizeof(void*) 2012-02-25 16:13:24 +01:00
unknown
6a72fbe396 Fix of LP bug:938518 (also LP bug:791761 and LP bug:806955)
Cause of the bug is uninitialized items before evaluation HAVING clasue in case of empty result.
2012-02-25 09:03:06 +02:00
Igor Babaev
b161b2e110 Merge. 2012-02-24 18:35:58 -08:00
Igor Babaev
841a74a4d6 Fixed LP bug #939009.
The result of materialization of the right part of an IN subquery predicate
is placed into a temporary table. Each row of the materialized table is
distinct. A unique key over all fields of the temporary table is defined and
created. It allows to perform key look-ups into the table.
The table created for a materialized subquery can be accessed by key as
any other table. The function best_access-path search for the best access
to join a table to a given partial join. With some where conditions this
function considers a possibility of a ref_or_null access. If such access
employs the unique key on the temporary table then when estimating
the cost this access the function tries to use the array rec_per_key. Yet,
such array is not built for this unique key. This causes a crash of the server.

Rows returned by the subquery that contain nulls don't have to be placed
into temporary table, as they cannot be match any row produced by the
left part of the subquery predicate. So all fields of the temporary table
can be defined as non-nullable. In this case any ref_or_null access
to the temporary table does not make any sense and it does not make sense
to estimate such an access.

The fix makes sure that the temporary table for a materialized IN subquery
is defined with columns that are all non-nullable. The also ensures that 
any row with nulls returned by the subquery is not placed into the
temporary table.
2012-02-24 16:50:22 -08:00
Sergey Petrunya
6400df6d71 Update test results. 2012-02-25 01:42:28 +04:00
Sergey Petrunya
8871806788 BUG#938131: Subquery materialization is not used in CREATE TABLE SELECT
- Enable subquery materialization for CREATE TABLE ... SELECT.
2012-02-24 22:42:37 +04:00
Sergey Petrunya
2256ecdd7c Merge 5.2->5.3 2012-02-24 20:07:12 +04:00
Michael Widenius
0919edf32d Automatic merge 2012-02-24 17:21:44 +02:00
Michael Widenius
60aad31422 Fix for lp:909635: MariaDB crashes on a select with long varchar and blob fields
Problem was a crash in internal temporary (Maria) files when row length exceeded 65535

mysql-test/suite/maria/r/maria3.result:
  Added test case
mysql-test/suite/maria/t/maria3.test:
  Added test case
storage/maria/ma_open.c:
  Added support for row length > 65535.
  This fixes crash when using tables with longer row lengths.
2012-02-24 17:01:47 +02:00
Sergei Golubchik
3f28115e0e 5.3 merge 2012-02-24 14:37:00 +01:00
Sergey Petrunya
d206480605 Merge fix for BUG#934597 2012-02-24 17:13:04 +04:00
Sergey Petrunya
914245ccd8 BUG#934597: Assertion `! is_set()' failed in Diagnostics_area::set_ok_status(THD...
- After the exec_const_cond->val_int() call, check for error and return.
  (if we don't do it, we will eventually hit an error when trying to set status OK in 
   the diagnostics area, which already has an error status).
2012-02-24 17:09:13 +04:00
Michael Widenius
6e1dac8f77 Automatic merge 2012-02-23 17:00:10 +02:00