Commit graph

33281 commits

Author SHA1 Message Date
Alexander Barkov
d240a0418c Merge 10.0-connect -> 10.0 2013-12-03 14:12:53 +04:00
Alexander Barkov
5bb01fa1ac MDEV-5357 REGEXP word boundaries don't work
Applied a patch from Philip Hazel implementing the non-standard
syntax for word boundaries in PCRE, for compatibility with the
old Henry Spencer's regex library.
2013-12-02 14:39:08 +04:00
Alexander Barkov
d25d7ec589 Fixing malformed data in mysql-test/std_data/Index.xml 2013-11-26 10:53:21 +04:00
Sergey Vojtovich
e5a80a307c MDEV-5277 - Ensure that all MySQL 5.6 options are supported by the
MariaDB 10.0 server
2013-11-25 18:49:40 +04:00
Sergey Vojtovich
1da6d6880b MDEV-5220 - [PATCH] MariaDB 10.0.4 doesn't compile without perfschema
Fixed the following compilation errors and test failures:
- maria SE: "stage_waiting_for_a_resource" wasn't declared w/o PFS
- sql_repl.h: PSI_mutex_key is not available in non-PFS builds
- mysqld.cc: pfs_param is not available in non-PFS builds
- mysqld.cc: init_show_explain_psi_keys() is not available in non-PFS builds
- mysqld.cc: call net_before_header_psi, net_after_header_psi even if PFS
  is not available so that thread enters stage_init at proper time. Fixes
  sp-threads and a few tests in funcs_1.
- myisam_file_io.opt: added missing loose prefix
2013-11-14 18:00:00 +04:00
Alexey Botchkov
b69ed7d621 MDEV-4437 ALTER TABLE .. ADD UNIQUE INDEX IF NOT EXISTS causes syntax error.
Added the IF NOT EXISTS option to the CONSTRAINT keyword.
2013-11-14 14:31:30 +04:00
Sergei Golubchik
4157185f24 10.0-base merge 2013-11-13 23:03:48 +01:00
Sergei Golubchik
c155890af9 MDEV-5248 Serious incompatibility and data corruption of DATETIME and DATE types due to get_innobase_type_from_mysql_type refactor combined with InnoDB Online DDL
restore old innodb get_innobase_type_from_mysql_type() function,
record all mysql_type->innodb_type mapping
(as generated by mysql-5.6).
add safety code to disable online alter when internal types don't match

storage/innobase/dict/dict0stats.cc:
  revert to 5.6 state
2013-11-13 22:58:19 +01:00
Sergei Golubchik
80137baf2f MDEV-5275 Problems upgrading from MySQL 5.1 to MariaDB
correct bugs in mysql_system_tables_fix.sql.
Update system_mysql_db_fix* tests
2013-11-13 22:58:10 +01:00
Sergei Golubchik
bdd883ed9a 5.5. merge 2013-11-13 14:07:58 +01:00
Sergei Golubchik
f3a78f392d 5.3 merge 2013-11-13 13:38:37 +01:00
Sergei Golubchik
b468cd4749 MDEV-5284 Assertion `!(*expr)->fixed' fails in replace_where_subcondition with IN suquery 2013-11-13 12:43:39 +01:00
Sergey Petrunya
86b8ed3eab Merge 2013-11-13 08:29:12 +04:00
Sergey Petrunya
229aa1d4bf MDEV-5056: Wrong result (extra rows) with materialization+semijoin, IN subqueries
Apply fix suggested by Igor:
- When eliminate_item_equal() generates pair-wise equalities from a 
  multi-equality,  do generate a "bridge" equality between the first 
  field inside SJM nest and the field that's first in the overall multi-equality.
2013-11-13 07:40:46 +04:00
Sergei Golubchik
441192bfb0 MDEV-5113 Wrong result (extra row) and valgrind warnings in Item_maxmin_subselect::any_value on 2nd execution of PS with SELECT subquery
When setting Item_func_not_all::test_sum_item or Item_func_not_all::test_sub_item,
reset the other one to NULL - they can never be set both. When a PS is reexecuted,
different executions might be optimized differently and a wrong test_su*_item
might stay set from the previous execution.
2013-11-12 15:02:25 +01:00
Sergey Petrunya
88bf8b9c8f MDEV-5257: MIN/MAX Optimization (Select tables optimized away) does not work for DateTime
- MIN/MAX optimizer does a check whether a "field CMP const" comparison uses a constant 
  that's longer than the field it is compared to.  Make this check only for string columns,
  also compare character lengths, not byte lengths.
2013-11-12 17:37:32 +04:00
Alexander Barkov
fad7371191 Merging xxx_unicode_520_ci and xxx_vietnamese_ci from MySQL-5.6. 2013-11-12 16:48:57 +04:00
Igor Babaev
e0d9a25690 Fixed bug mdev-5160.
The used_tables attribute must be recalculated for the HAVING condition
if the condition is applied to the rows read from a temporary table.
2013-11-11 22:21:39 -08:00
unknown
55de9b0468 merge 10-base->10.0 2013-11-11 23:40:53 +02:00
unknown
3a75900b91 merge 5.5->10.0-base 2013-11-11 22:47:04 +02:00
Alexander Barkov
383de0fd1f Merge 10.0-monty -> 10.0 2013-11-11 22:46:14 +04:00
unknown
dfed447888 merge 5.3->5.5 2013-11-11 20:38:04 +02:00
Alexey Botchkov
06a91b18d7 MDEV-4436 CHANGE COLUMN IF EXISTS does not work and throws wrong warning.
Use sql_field->change parameter as the name of the field.
2013-11-11 19:45:55 +04:00
unknown
c98a054fde MDEV-5153: Server crashes in Item_ref::fix_fields on 2nd execution of PS with LEFT JOIN and MERGE view or SELECT SQ
1. Transformation of row IN subquery made the same as single value.
2. replace_where_subcondition() made working on several layers of OR/AND because it called on expression before fix_fields().
2013-11-11 17:28:14 +02:00
Sergei Golubchik
f486f49e8d MDEV-4824 userstats - wrong user statistics
(and valgrind warnings)

* move thd userstat initialization to the same function
  that was adding thd userstat to global counters.
* initialize thd->start_bytes_received in THD::init
  (when thd->userstat_running is set)
2013-11-11 16:17:32 +01:00
unknown
c85db2c494 MDEV-5103: server crashed on singular Item_equal
Singular Item_equal support added.

The problem was that during constant table substitution Item_equal become containing only one constant which was not supported internally.
2013-11-11 16:40:46 +02:00
Alexey Botchkov
3cf7e283a6 MDEV-4435 Server crashes in my_strcasecmp_utf8 on ADD KEY IF NOT EXISTS with implicit name when the key exists.
Use field name as a key name if the key name wasn't specified.
2013-11-11 18:23:53 +04:00
Sergei Golubchik
80a523dbfb MDEV-5116 MariaDB upgrade breaks replication
mysql_upgrade should do --skip-write-binlog by default
2013-11-11 09:31:20 +01:00
Sergei Golubchik
e10d42d93b MDEV-5022 Strange message or wrong errno on mismatching versions of plugin and server
1. use an appropriate errno code
2. put a comma between the errno and the error message text
2013-11-11 09:31:09 +01:00
Sergei Golubchik
d042e61f8e MDEV-5054 Failing test(s): main.mysqld--help sys_vars.character_sets_dir_basic
fix tests where a path was used as a regex.
revert changes to sys_vars.character_sets_dir_basic - we don't run it on windows anyway
2013-11-11 09:31:02 +01:00
Sergei Golubchik
e780bd9efa MDEV-4977 ./mysql-test/mysql-test-run.pl not identifying mariadb version
quote the path when using it in a regex - the path might contain wildcards (e.g. +)
2013-11-11 09:30:58 +01:00
Sergei Golubchik
5ffa6904d2 MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA instead of ER_TABLE_MUST_HAVE_COLUMNS 2013-11-10 17:51:20 +01:00
Sergei Golubchik
1c6394e503 MDEV-4931 Can't use SHUTDOWN in stored programs
keywords that a statement could start from can only be
in the 'keyword' list, never in the 'keyword_sp'
2013-11-10 17:51:06 +01:00
Sergei Golubchik
09b63917be MDEV-5238 Server crashes in find_role_grant_pair on SHOW GRANTS for an anonymous user 2013-11-10 17:50:52 +01:00
Elena Stepanova
700397a8e2 Fix for overlayed include files on Windows and a test case 2013-11-10 14:37:32 +04:00
Michael Widenius
192678e7bf MDEV-5241: Collation incompatibilities with MySQL-5.6
- Character set code & tests from Alexander Barkov
- Integration with ALTER TABLE, REPAIR and open_table from Monty

The problem was that MySQL 5.6 added some croatian and vitanamese character set collations that are incompatible with MariaDB.

The fix is to move the MariaDB conflicting collation numbers out of the region that MySQL is likely to use.
mysql_upgrade, REPAIR TABLE or ALTER TABLE will fix the collations.
If one tries to access and old incompatible table, one will get the error "Table upgrade required...."
After this patch, MariaDB supports all the MySQL character set collations and the old MariaDB croatian collations, which are closer to the latest standard than the MySQL versions.

New character sets:
ucs2_croatian_mysql561_uca_ci
utf8_croatian_mysql561_uca_ci
utf16_croatian_mysql561_uca_ci
utf32_croatian_mysql561_uca_ci
utf8mb4_croatian_mysql561_uca_ci

Other things:
- Fixed some compiler warnings
- mysql_upgrade prints information about repaired tables.
- Increased version number

VERSION:
  Increased VERSION number
client/mysqlcheck.c:
  Print repaired table name when using --verbose
include/m_ctype.h:
  Add new MariaDB collation regions that are not likely to conflict with MySQL
include/my_base.h:
  Added flag to detect if table was opened for ALTER TABLE
mysql-test/r/ctype_ldml.result:
  Updated result
mysql-test/r/ctype_uca.result:
  Updated result
mysql-test/r/ctype_upgrade.result:
  Updated result
mysql-test/r/ctype_utf16_uca.result:
  Updated result
mysql-test/r/ctype_utf32_uca.result:
  Updated result
mysql-test/r/ctype_utf8mb4_uca.result:
  Updated result
mysql-test/std_data/ctype_upgrade:
  Test files for testing upgrading of conflicting collations
mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result:
  New collations added
mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result:
  New collations added
mysql-test/suite/innodb/r/innodb_ctype_ldml.result:
  Updated test result
mysql-test/suite/innodb/t/innodb_ctype_ldml.test:
  Updated test result
mysql-test/suite/plugins/r/show_all_plugins.result:
  Updated version number
mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result:
  Updated version number
mysql-test/t/ctype_ldml.test:
  Updated test
mysql-test/t/ctype_uca.test:
  Testing of new collations
mysql-test/t/ctype_upgrade.test:
  Testing of upgrading tables with old collations
  The test ensures that:
  - We will get an error if we try to open a table with old collations.
  - CHECK TABLE will detect that the table needs to be upgraded.
  - ALTER TABLE and REPAIR will fix the table.
  - mysql_upgrade works as expected
mysql-test/t/ctype_utf16_uca.test:
  Testing of new collations
mysql-test/t/ctype_utf32_uca.test:
  Testing of new collations
mysql-test/t/ctype_utf8mb4_uca.test:
  Testing of new collations
mysys/charset-def.c:
  Added new character sets
mysys/charset.c:
  Always give an error, if requested, if a character set didn't exist
sql/handler.cc:
  - Added upgrade_collation() to check if collation is compatible with old version
  - check_collation_compatibility() checks if we are using an old collation from MariaDB 5.5 or MySQL 5.6
  - ha_check_for_upgrade() returns HA_ADMIN_NEEDS_ALTER if we have an incompatible collation
sql/handler.h:
  Added new prototypes
sql/sql_table.cc:
  - Mark that tables are opened for ALTER TABLE
  - If table needs to be upgraded, ensure we are not using online alter table.
sql/table.cc:
  - If we are using an old incompatible collation, change to use the new one and mark table as incompatible.
  - Give an error if we try to open an incompatible table.
sql/table.h:
  Added error that table needs to be rebuild
storage/connect/ha_connect.cc:
  Fixed compiler warning
strings/ctype-uca.c:
  New character sets
2013-11-09 00:20:07 +02:00
Alexander Barkov
e02ad98c63 Merge 5.5 -> 10.0-base 2013-11-08 20:59:08 +04:00
Alexander Barkov
d79d0c4045 merge 5.3 -> 5.5 2013-11-08 14:30:35 +04:00
Alexander Barkov
a33bb00144 MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32 2013-11-08 14:18:16 +04:00
Sergei Golubchik
80112232d1 misc fixes for buildbot 2013-11-07 14:30:21 +01:00
Elena Stepanova
ae62e19f27 Various changes coming from 5.6 2013-11-08 23:25:06 +04:00
Elena Stepanova
54b443b9aa Some system tables have InnoDB engine 2013-11-08 23:24:27 +04:00
Elena Stepanova
317efa2a45 Semantics of ALTER ONLINE changed to mirror ALTER .. LOCK=NONE 2013-11-08 23:23:35 +04:00
Elena Stepanova
aefded6302 Duplicate warnings were removed 2013-11-08 23:21:58 +04:00
Elena Stepanova
66ed34d6ed More comprehensive error messages and codes 2013-11-08 23:21:26 +04:00
unknown
273bcb92c1 Merge 10.0-base to 10.0 2013-11-07 07:52:40 +01:00
Elena Stepanova
eddc1325cb Undefined engine is not necessarily an error, removed the prefix 2013-11-07 03:49:13 +04:00
Elena Stepanova
71c56e6e45 .frm file is intact, so the absence of the error message seems
to be correct
2013-11-07 03:45:56 +04:00
Elena Stepanova
cdecd86a53 More verbose error messages 2013-11-07 03:36:53 +04:00
Alexander Barkov
3e1ae7a0be Recording correct test results:
mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result
  mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result
2013-11-06 17:55:22 +04:00