1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-01 03:26:54 +03:00
Commit Graph

32556 Commits

Author SHA1 Message Date
6bd0f5dae7 Removing double new-line markers when doing LOAD_FILE('example.ini').
The libary to handle INI files on Windows XP adds an extra empty
line before sections name.

Newer versions of Windows do not.
Unix replacement implementation also do not.

modified:
  mysql-test/suite/connect/r/ini.result
  mysql-test/suite/connect/t/ini.test
2013-02-08 18:20:40 +04:00
d0f6e9a8ce Adding a test for TABLE_TYPE=DIR
added:
  mysql-test/suite/connect/r/dir.result
  mysql-test/suite/connect/t/dir.test
2013-02-08 14:22:10 +04:00
516e8af860 Adding tests for TABLE_TYPE=INI
added:
  mysql-test/suite/connect/r/ini.result
  mysql-test/suite/connect/std_data/contact.ini
  mysql-test/suite/connect/t/ini.test
2013-02-08 13:33:25 +04:00
ec838d5663 Adding tests for TABLE_TYPE=CSV 2013-02-08 13:08:25 +04:00
dd9ee7d157 Adding a test for TABLE_TYPE=BIN
added:
  mysql-test/suite/connect/r/bin.result
  mysql-test/suite/connect/std_data/Testbal.dat
  mysql-test/suite/connect/t/bin.test
2013-02-08 12:22:26 +04:00
48aee45957 Fixed bug mdev-3995.
This bug happened because the executor tried to use a wrong
TABLE REF object when building access keys. It constructed
keys from fields of a materialized table from a ref object
created to construct keys from the fields of the underlying
base table. This could happen only when materialized table
was created for a non-correlated IN subquery and only
when the materialized table used for lookups.
In this case we are guaranteed to be able to construct the
keys from the fields of tables that would be outer tables
for the tables of the IN subquery.
The patch makes sure that no ref objects constructed from
fields of materialized lookup tables are to be used.
2013-02-07 21:46:02 -08:00
e648ff111a MDEV-537 Make multi-column non-top level subqueries to be executed via index (index/unique subquery)
instead of single_select_engine

This task changes the IN-EXISTS rewrite for multi-column subqueries
"(a, b) IN (select b, c ...)" to work in the same way as for
single-column subqueries "a IN (select b ...) with respect to the
injection of NULL-rejecting predicates.
 
More specifically, the method
Item_in_subselect::create_row_in_to_exists_cond()
adds Item_is_not_null_test and Item_func_trig_cond only if the left
IN operand can be NULL. Not having these predicates when not necessary,
makes it possible to rewrite the subquery into a "unique_subquery" or
"index_subquery" when there is a suitable index on the only
subquery table.
2013-02-07 15:33:24 +02:00
60c4cab3bd Adding missing DROP TABLE.
Otherwise, the further tests fail on "table t1 already exists"
2013-02-06 20:09:46 +04:00
0758b2bded Adding a test for ODBC/XLS.
Currently only for ASCII data.
TODO: add tests for extended letters (e.g. Latin1, Cyrillic, etc).


added:
  mysql-test/suite/connect/r/odbc_xls.result
  mysql-test/suite/connect/std_data/contacts.xls
  mysql-test/suite/connect/t/odbc_xls.test
2013-02-06 20:04:17 +04:00
9aa88d5050 Adding tests for TABLE_TYPE=FIX
added:
  mysql-test/suite/connect/r/fix.result
  mysql-test/suite/connect/std_data/boys.txt
  mysql-test/suite/connect/std_data/boyswin.txt
  mysql-test/suite/connect/std_data/dept.dat
  mysql-test/suite/connect/t/fix.test
2013-02-06 15:15:39 +04:00
06dd5ea43e Adding basic tests for TABLE_TYPE=fmt
added:
  mysql-test/suite/connect/r/fmt.result
  mysql-test/suite/connect/std_data/funny.txt
  mysql-test/suite/connect/std_data/funny2.txt
  mysql-test/suite/connect/t/fmt.test
2013-02-06 14:15:55 +04:00
1b40c7c76b Commenting ALTER test which changes the DBF file size.
It does not work on Windows.

modified:
  mysql-test/suite/connect/r/dbf.result
  mysql-test/suite/connect/t/dbf.test
2013-02-06 13:25:36 +04:00
0b2dc3fc59 Fix for bug MDEV-765 (LP:825075)
Analys:
The cause for the wrong result was that the optimizer
incorrectly chose min/max loose scan when it is not
applicable. The applicability test missed the case when
a condition on the MIN/MAX argument was OR-ed with a
condition on some other field. In this case, the MIN/MAX
condition cannot be used for loose scan.

Solution:
Extend the test check_group_min_max_predicates() to check
that the WHERE clause is of the form: "cond1 AND cond2"
where 
  cond1 - does not use min_max_column at all.
  cond2 - is an AND/OR tree with leaves in form "min_max_column $CMP$ const"
          or $CMP$ is one of the functions between, is [not] null
2013-02-04 17:35:48 +02:00
9d8d62eeff Adding preliminary code to skip the test "xml".
It's incomplete, because CONNECT engine allows
to create the table even if libxml2 is not compiled.
Asked Olivier to reject CREATE TABLE in such cases.

modified:
  mysql-test/suite/connect/t/xml.test
2013-02-04 17:51:36 +04:00
ead2372e55 Adding tests for NULL column values.
modified:
  mysql-test/suite/connect/r/dbf.result
  mysql-test/suite/connect/t/dbf.test
2013-02-04 14:47:30 +04:00
49e3bb028c Adding tests for ALTER TABLE
modified:
  mysql-test/suite/connect/r/dbf.result
  mysql-test/suite/connect/t/dbf.test
2013-02-04 14:42:56 +04:00
f5f61edb76 Skip cassandra_qcache.test if there is no Cassandra cluster running. 2013-02-04 10:38:31 +04:00
3c8b9ed6fb Merge fix for MDEV-3997. 2013-02-04 10:15:52 +04:00
a3e64c8616 merge 2013-02-04 12:04:29 +02:00
6ae14e6cd2 MDEV-3997: Querying a Cassandra table on a server with query cache enabled is likely to cause problems
- Disable query cache for Cassandra tables.
2013-02-04 10:14:20 +04:00
0abbcf7b00 Fix mysql-test/suite/plugins/suite.pm to correctly check if Cassandra cluster is running. 2013-02-04 09:22:29 +04:00
7f444caa0a MDEV-4028 - Converted rdiff files to uniform
MDEV-11 - Modifed tests and result files to use explicit column lists
          in INSERT and SELECT statements
2013-02-03 02:53:57 +04:00
1e976f420e Adding tests for SMALLINT and BIGINT for DBF.
modified:
  mysql-test/suite/connect/r/dbf.result
  mysql-test/suite/connect/t/dbf.test
2013-02-01 15:09:41 +04:00
768b62fe2f Fix bug MDEV-641
Analysis:
Range analysis discoveres that the query can be executed via loose index scan for GROUP BY.
Later, GROUP BY analysis fails to confirm that the GROUP operation can be computed via an
index because there is no logic to handle duplicate field references in the GROUP clause.
As a result the optimizer produces an inconsistent plan. It constructs a temporary table,
but on the other hand the group fields are not set to point there.
    
Solution:
Make loose scan analysis work in sync with order by analysis. In the case of duplicate
columns loose scan will not be applicable. This limitation will be lifted in 10.0 by
removing duplicate columns.
2013-02-01 00:09:36 +02:00
deb0cd3f27 avoid mtr errors for --plugin-add=EXAMPLE=$HA_EXAMPLE_SO
when no ha_example.so is built
2013-01-31 15:51:26 +01:00
e8c24a7374 Adding OPTION_LIST='xmlsup=libxml2' to make
sure the tests work in a similar way on Windows
      when both DOMDOC and LIBXML2 are compiled.

      Tests with DOMDOC will go into a separate *.test file.

      modified:
        mysql-test/suite/connect/r/xml.result
        mysql-test/suite/connect/t/xml.test
        storage/connect/CMakeLists.txt
2013-01-31 18:01:55 +04:00
1e3610dd48 Adding basic XML tests. More XML tests coming soon.
added:
  mysql-test/suite/connect/r/xml.result
  mysql-test/suite/connect/std_data/
  mysql-test/suite/connect/std_data/cp1251.xml
  mysql-test/suite/connect/std_data/latin1.xml
  mysql-test/suite/connect/std_data/nocs.xml
  mysql-test/suite/connect/std_data/xsample.xml
  mysql-test/suite/connect/t/xml.test
2013-01-31 17:44:36 +04:00
792d6b348c skip cassandra.test unless cassandra is running 2013-01-31 13:19:53 +01:00
a5ad8d15f6 MDEV-4121: binlog.binlog_row_binlog sporadic test failure
Add a wait for binlog checkpoint to avoid thread scheduling
giving different binlog order at random.
2013-01-31 11:29:58 +01:00
8eccf8dd72 Adding DBF stored procedures to dump the underlying DBF file structure.
modified:
    mysql-test/suite/connect/r/dbf.result
    mysql-test/suite/connect/t/dbf.test
2013-01-31 13:13:24 +04:00
ab83952f29 10.0-base merge 2013-01-31 09:48:19 +01:00
7af8c83df3 Adding more DBF tests for ENGINE=CONNECT.
modified:
  mysql-test/suite/connect/r/dbf.result
  mysql-test/suite/connect/t/dbf.test
2013-01-30 18:34:03 +04:00
ea5632e9d7 MDEV-3984: Double free of Master_info * when CHANGE MASTER fails.
When CHANGE MASTER fails, it may or may not have already added
the Master_info * to the index. Implement logic that properly
handles removal and freeing in both cases.
2013-01-30 15:11:36 +01:00
8d49e7ddf1 Adding a test suite for the CONNECT storage engine.
added:
  mysql-test/suite/connect/
  mysql-test/suite/connect/r/
  mysql-test/suite/connect/r/dbf.result
  mysql-test/suite/connect/suite.opt
  mysql-test/suite/connect/suite.pm
  mysql-test/suite/connect/t/
  mysql-test/suite/connect/t/dbf.test
2013-01-30 16:14:11 +04:00
0af4b6c6ee 5.5 merge 2013-01-29 15:10:47 +01:00
f65e5841d7 Fix for MDEV-3948, and backport of the following collection of fixes and backports
from MariaDB 10.0.
  
The bug in mdev-3948 was an instance of the problem fixed by Sergey's patch
in 10.0 - namely that the range optimizer could change table->[read | write]_set,
and not restore it.
  
revno: 3471
committer: Sergey Petrunya <psergey@askmonty.org>
branch nick: 10.0-serg-fix-imerge
timestamp: Sat 2012-11-03 12:24:36 +0400
message:
  # MDEV-3817: Wrong result with index_merge+index_merge_intersection, InnoDB table, join, AND and OR conditions
  Reconcile the fixes from:
  #
  # guilhem.bichot@oracle.com-20110805143029-ywrzuz15uzgontr0
  # Fix for BUG#12698916 - "JOIN QUERY GIVES WRONG RESULT AT 2ND EXEC. OR
  # AFTER FLUSH TABLES [-INT VS NULL]"
  #
  # guilhem.bichot@oracle.com-20111209150650-tzx3ldzxe1yfwji6
  # Fix for BUG#12912171 - ASSERTION FAILED: QUICK->HEAD->READ_SET == SAVE_READ_SET
  # and
  #
  and related fixes from: BUG#1006164, MDEV-376:
  
  Now, ROR-merged QUICK_RANGE_SELECT objects make no assumptions about the values
  of table->read_set and table->write_set.
  Each QUICK_ROR_SELECT has (and had before) its own column bitmap, but now, all 
  QUICK_ROR_SELECT's functions that care: reset(), init_ror_merged_scan(), and 
  get_next()  will set table->read_set when invoked and restore it back to what 
  it was before the call before they return.

  This allows to avoid the mess when somebody else modifies table->read_set for 
  some reason.
2013-01-28 15:13:39 +02:00
87de27e46b 5.3 merge 2013-01-28 13:36:05 +01:00
34e84c227f 5.2 merge 2013-01-28 09:12:23 +01:00
0791692bdc MDEV-3875 Wrong result (missing row) on a DISTINCT query with the same subquery in the SELECT list and GROUP BY
fix remove_dup_with_hash_index() and remove_dup_with_compare() to take NULLs into account
2013-01-26 22:33:18 +01:00
772bd60a1b Automatic merge 2013-01-26 01:59:27 +02:00
ea1d5943c5 Fixed MDEV-3890: Server crash inserting record on a temporary table after truncating it
The problem was that a temporary table was re-created as a non-temporary table.


mysql-test/suite/maria/truncate.result:
  Added test cases
mysql-test/suite/maria/truncate.test:
  Added test cases
sql/sql_truncate.cc:
  Mark that table to be created is a temporary table
storage/maria/ha_maria.cc:
  Ensure that temporary tables are not transactional.
2013-01-25 21:40:42 +02:00
e400450f2d 5.1 merge 2013-01-25 17:22:21 +01:00
298008dc4f The problem was that expression with field after transformation (on the first execution)
reached by fix_fields() (via reference) before row which it belongs to (on the second execution)
and fix_field for row did not follow usual protocol for Items with argument
(first check that the item fixed then call fix_fields).

Item_row::fix_field fixed.
2013-01-25 16:56:57 +02:00
7f208d3c35 MDEV-729 lp:998028 - Server crashes on normal shutdown in closefrm after executing a query from MyISAM table
don't write a key value into the record buffer - a key length can be larger then the record length.
2013-01-25 14:29:46 +01:00
326d2d56fe MDEV-759 lp:998340 - Valgrind complains on simple selects containing expression DAY(FROM_UNIXTIME(-1))
check item->null_value before using the result of item->val_int()
2013-01-25 12:26:35 +01:00
672b293860 5.3 merge
client/mysqltest.cc:
  make --error to work for --change_user errors
2013-01-25 11:24:42 +01:00
de10e21411 5.2 merge 2013-01-25 10:20:45 +01:00
fa7d0c4fdf MDEV-3909 remote user enumeration
instead of returning Access denied on the incorrect user name,
emulate the complete failed logic procedure, possibly with
the change plugin packet.
2013-01-25 09:41:26 +01:00
82c022f2d5 report "using password: YES/NO" correctly for the COM_CHANGE_USER failures 2013-01-25 00:20:53 +01:00
bfc71e63a7 MDEV-3915 COM_CHANGE_USER allows fast password brute-forcing
allow only three failed change_user per connection.
successful change_user do NOT reset the counter

tests/mysql_client_test.c:
  make --error to work for --change_user errors
2013-01-25 00:17:39 +01:00