Merge 5.5 -> 10.0-base
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
mariadb-tokudb-engine-10.0.deb
merge with 10.0.5
- BUG fixed: When updating, to avoid skipped update, force the table
  handler to retrieve write-only fields to be able to compare
  records and detect data change.

modified:
  storage/connect/ha_connect.cc

- Preparing UPDATE ad DELETE on ODBC tables
  (new function added but not used yet)

modified:
  storage/connect/tabodbc.cpp
  storage/connect/tabodbc.h
Fix for overlayed include files on Windows and a test case
MDEV-5238 Server crashes in find_role_grant_pair on SHOW GRANTS for an anonymous user
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
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'
MDEV-4734 Adding ending / to a directory can fail when the directory ends with 0

+1 typo fixed
MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA instead of ER_TABLE_MUST_HAVE_COLUMNS
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
MDEV-5272 MTR/mysqltest overlays for included files do not work on Windows

Modified according to the review comment
MDEV-5272 MTR/mysqltest overlays for included files do not work on Windows
MDEV-5038 put tokudb into the server package
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
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. +)
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
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)
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