Commit graph

86658 commits

Author SHA1 Message Date
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
unknown
db453a99ce MDEV-5282: mysql_install_db fails to create mysql.gtid_slave_pos
Patch by Elena.

Move the table creation to the end of the file, so
mysql.innodb_stats_table has been created and the statement
does not fail.
2013-11-13 15:40:46 +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
Sergey Petrunya
2cba9e0cdc MDEV-407: Print EXPLAIN [ANALYZE] in the slow query log
- Address input from the mail list: change how EXPLAIN is 
  formatted in the slow query log.
2013-11-12 17:13:11 +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
Sergei Golubchik
ea78785b8b MDEV-4723 "State" column of SHOW PROCESSLIST returns wrong values (non-ascii chars) for some states
allocate thd_proc_info string in thd memroot, not on the stack, so that it
won't be overwritten while another thread might be printing it
2013-11-11 22:53:40 +01: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
Sergei Golubchik
1585652862 MDEV-5236 Status variables are not all listed alphabetically
sort Com_ counters. No simple fix for Binlog_ variables.
2013-11-11 17:20:18 +01:00
Sergei Golubchik
fb46f35f05 mark ft-index cmake variables as advanced 2013-11-11 17:20:10 +01: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
Alexander Barkov
f76beb080c MDEV-5241: Collation incompatibilities with MySQL-5.6
A clean-up: removing the code catching collation incompatibilities
from handler::check_collation_compatibility(), as the collation IDs
are already replaced at this point by TABLE_SHARE::init_from_binary_frm_image.
2013-11-11 16:21:31 +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
feea10a453 MDEV-5101 INFORMATION_SCHEMA.PROCESSLIST reports an incorrect value for Time for connecting threads
by convention query execution time should be 0 if its start_time is 0
(this was lost when fixing MDEV-4578)
2013-11-11 09:31:17 +01:00
Sergei Golubchik
41fc2493ed MDEV-5186 /usr/bin/mysqld_safe doesn't have NUMA options support
port mysqld_safe numa extensions from percona-server: --flush-caches and --numa-interleave
2013-11-11 09:31:13 +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
6971eaf3f0 MDEV-5030 RPM installation not running mysql_install_db if datadir exists
before running mysql_install_db check for the existence
of $datadir/mysql, not simply $datadir ($datadir might be mounted on
a separate device - exists, but empty)
2013-11-11 09:31:05 +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
db635ab590 MDEV-5124 cmake failure when fullhostname is not resolved
expand fullhostname inside the string, to have an empty string, not nothing,
when fullhostname is not defined
2013-11-11 09:30:48 +01:00
Sergei Golubchik
3d57c343e5 MDEV-5038 put tokudb into the server package 2013-11-11 09:30:35 +01:00
Elena Stepanova
668a5a4ab8 MDEV-5272 MTR/mysqltest overlays for included files do not work on Windows 2013-11-11 00:15:42 +04:00
Elena Stepanova
1f13733b50 MDEV-5272 MTR/mysqltest overlays for included files do not work on Windows
Modified according to the review comment
2013-11-10 23:19:21 +04:00
Sergei Golubchik
07d3fc5220 MDEV-201 - Assertion `!thd->spcont' failed in net_send_error on server shutdown
restore sergii@pisem.net-20120327141644-xue6r05x1giswwsm
that was lost in a merge
2013-11-10 17:51:26 +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
f3c63615d8 MDEV-4734 Adding ending / to a directory can fail when the directory ends with 0
+1 typo fixed
2013-11-10 17:51:13 +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
5e2b5510a4 MDEV-5260 discovery with sql is too restrictive
allow ENGINE=FOOBAR in the discovering create table statement,
as long as the discovering engine is FOOBAR too
2013-11-10 17:51:01 +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
Sergei Golubchik
ab2bf1ad0b merge with 10.0.5 2013-11-09 11:05:51 +01:00
Sergei Golubchik
af22c45ec7 mariadb-tokudb-engine-10.0.deb 2013-11-09 11:04:54 +01: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
8f0be1ad7c Merge 5.5 -> 10.0-base 2013-11-09 00:16:42 +04:00
Alexander Barkov
ef43b71fd2 Merge 5.3 -> 5.5 2013-11-08 23:14:26 +04:00