summaryrefslogtreecommitdiff
path: root/mysql-test/std_data
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-18323 Convert MySQL JSON type to MariaDB TEXT in mysql_upgradeVicențiu Ciorbaru2020-10-289-0/+0
| | | | | | | | | | | | | | | | | This patch solves two key problems. 1. There is a type number clash between MySQL and MariaDB. The number 245, used for MariaDB Virtual Fields is the same as MySQL's JSON. This leads to corrupt FRM errors if unhandled. The code properly checks frm table version number and if it matches 5.7+ (until 10.0+) it will assume it is dealing with a MySQL table with the JSON datatype. 2. MySQL JSON datatype uses a proprietary format to pack JSON data. The patch introduces a datatype plugin which parses the format and convers it to its string representation. The intended conversion path is to only use the JSON datatype within ALTER TABLE <table> FORCE, to force a table recreate. This happens during mysql_upgrade or via a direct ALTER TABLE <table> FORCE.
* Merge 10.4 to 10.5Marko Mäkelä2020-10-223-0/+0
|\
| * Merge 10.3 into 10.4Marko Mäkelä2020-10-223-0/+0
| |\
| | * Merge 10.2 into 10.3Marko Mäkelä2020-10-223-0/+0
| | |\
| | | * MDEV-23201: mysql_upgrade order mysql.user for 5.7 cross-upgradeDaniel Black2020-10-153-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As MariaDB tables are expected in a fixed order, the cross upgrade previously placed roles, default_role and max_statement_time after now unused mysql-5.7 columns. Test: $ cp -a /usr/local/mysql-5.7.31/data/ /tmp/m57data $ sql/mysqld --no-defaults --skip-networking --datadir=/tmp/m57data --socket=/tmp/${PWD##*/}.sock --verbose --lc-messages-dir=$PWD/sql/share 2020-10-02 11:02:05 140135193212864 [Note] sql/mysqld (mysqld 10.2.34-MariaDB) starting as process 1457667 ... 2020-10-02 11:02:05 140135193212864 [Note] InnoDB: Mutexes and rw_locks use GCC atomic built $ client/mysql_upgrade --no-defaults -u root -pbob -S /tmp/build-mariadb-server-10.2.sock MySQL upgrade detected Phase 1/7: Checking and upgrading mysql database Processing databases mysql mysql.columns_priv OK mysql.db OK mysql.engine_cost OK mysql.event OK mysql.func OK mysql.gtid_executed OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK mysql.server_cost OK mysql.servers OK mysql.slave_master_info OK mysql.slave_relay_log_info OK mysql.slave_worker_info OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK Upgrading from a version before MariaDB-10.1 Phase 2/7: Installing used storage engines Result: | user | CREATE TABLE `user` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', `ssl_cipher` blob NOT NULL, `x509_issuer` blob NOT NULL, `x509_subject` blob NOT NULL, `max_questions` int(11) unsigned NOT NULL DEFAULT 0, `max_updates` int(11) unsigned NOT NULL DEFAULT 0, `max_connections` int(11) unsigned NOT NULL DEFAULT 0, `max_user_connections` int(11) NOT NULL DEFAULT 0, `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '', `authentication_string` text COLLATE utf8_bin NOT NULL, `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000, `password_last_changed` timestamp NULL DEFAULT NULL, `password_lifetime` smallint(5) unsigned DEFAULT NULL, `account_locked` enum('N','Y') COLLATE utf8_bin NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`User`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' | MariaDB [(none)]> CREATE ROLE `aRole`; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> SET ROLE `aRole`; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> SET ROLE `aRole`; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> SELECT `User`, `is_role` FROM `mysql`.`user`; +---------------+---------+ | User | is_role | +---------------+---------+ | root | N | | mysql.session | N | | mysql.sys | N | | dan | N | | aRole | Y | +---------------+---------+ 5 rows in set (0.00 sec) Reviewer: Anel Husakovic
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-08-011-9/+9
|\ \ \ \ | |/ / /
| * | | MDEV-21905: Galera test galera_var_notify_cmd causes hangmkaruza2020-07-241-9/+9
| | | | | | | | | | | | | | | | | | | | Fixed wsrep_notify.sh script so it only reports status changes on 'joined', 'synced', 'donor'.
* | | | MDEV-7947 strcmp() takes 0.37% in OLTP ROMonty2020-07-231-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch ensures that all identical character sets shares the same cs->csname. This allows us to replace strcmp() in my_charset_same() with comparisons of pointers. This fixes a long standing performance issue that could cause as strcmp() for every item sent trough the protocol class to the end user. One consequence of this patch is that we don't allow one to add a character definition in the Index.xml file that changes the csname of an existing character set. This is by design as changing character set names of existing ones is extremely dangerous, especially as some storage engines just records character set numbers. As we now have a hash over character set's csname, we can in the future use that for faster access to a specific character set. This could be done by changing the hash to non unique and use the hash to find the next character set with same csname.
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-07-021-1/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-07-021-1/+1
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2020-07-021-1/+1
| | |\ \ | | | |/
| | | * Merge 10.1 into 10.2bb-10.2-mergeMarko Mäkelä2020-07-011-1/+1
| | | |\
| | | | * mtr: use env for perlDaniel Black2020-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On FreeBSD, perl isn't in /usr/bin, its in /usr/local/bin or elsewhere in the path. Like storage/{maria/unittest/,}ma_test_* , we use /usr/bin/env to find perl and run it.
* | | | | MDEV-22249 Upgrade testing between major versions in MTRElena Stepanova2020-06-016-0/+5302
| | | | |
* | | | | Fix perfschema.statement_program_concurrencyMarko Mäkelä2020-03-111-0/+100000
| | | | |
* | | | | MDEV-19906 Port show_old_temporals from MySQL 5.6Alexander Barkov2020-01-173-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old temporal data types (created with a pre-10.0 version of MariaDB) are now displayed with a /* mariadb-5.3 */ comment in: - SHOW CREATE TABLE - DESCRIBE - INFORMATION_SCHEMA.COLUMNS.COLUMN_TYPE For example: CREATE TABLE `t1` ( `t0` datetime /* mariadb-5.3 */ DEFAULT NULL, `t6` datetime(6) /* mariadb-5.3 */ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 Note, new temporal data types are displayed without a format comment.
* | | | | A cleanup for MDEV-17088 Provide tools to encode/decode mysql-encoded file ↵Alexander Barkov2019-12-053-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | system names - Load and convert the entire input file at once, rather than reading string-by-string using fgets(). This change makes it possible to convert from UCS2, UTF16, UTF32 data. - Adding the --delimiter command, to treat the specified characters as delimiters rather than data to convert. Useful in combination with `-f filename` or `-t filename`. The delimiter characters are not converted, they are copied from the input to the output as is. - Adding diagnostics with line number and position if: * an illegal input byte sequence was found * a character cannot be converted to the target character set
* | | | | Merge 10.4 into 10.5Marko Mäkelä2019-10-111-0/+0
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4Marko Mäkelä2019-10-101-0/+0
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.2 into 10.3Marko Mäkelä2019-10-091-0/+0
| | |\ \ \ | | | |/ /
| | | * | MDEV-20574 Position of events reported by mysqlbinlog is wrong with ↵Sachin Setiya2019-10-081-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | encrypted binlogs, SHOW BINLOG EVENTS reports the correct one. Analysis Mysqlbinlog output for encrypted binary log #Q> insert into tab1 values (3,'row 003') #190912 17:36:35 server id 10221 end_log_pos 980 CRC32 0x53bcb3d3 Table_map: `test`.`tab1` mapped to number 19 # at 940 #190912 17:36:35 server id 10221 end_log_pos 1026 CRC32 0xf2ae5136 Write_rows: table id 19 flags: STMT_END_F Here we can see Table_map_log_event ends at 980 but Next event starts at 940. And the reason for that is we do not send START_ENCRYPTION_EVENT to the slave Solution:- Send Start_encryption_log_event as Ignorable_log_event to slave(mysqlbinlog), So that mysqlbinlog can update its log_pos. Since Slave can request multiple FORMAT_DESCRIPTION_EVENT while master does not have so We only update slave master pos when master actually have the FORMAT_DESCRIPTION_EVENT. Similar logic should be applied for START_ENCRYPTION_EVENT. Also added the test case when new server reads the data from old server which does not send START_ENCRYPTION_EVENT to slave. Master Slave Upgrade Scenario. When Slave is updated first, Slave will have extra logic of handling START_ENCRYPTION_EVENT But master willnot be sending START_ENCRYPTION_EVENT. So there will be no issue. When Master is updated first, It will send START_ENCRYPTION_EVENT to slave , But slave will ignore this event in queue_event.
* | | | | Merge 10.4 into 10.5Marko Mäkelä2019-09-066-0/+0
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.3' into 10.4Sergei Golubchik2019-09-066-0/+0
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.2 (up to commit ef00ac4c86daf3294c46a45358da636763fb0049) into 10.3Alexander Barkov2019-09-046-0/+0
| | |\ \ \ | | | |/ /
| | | * | Part2: MDEV-18156 Assertion `0' failed or `btr_validate_index(index, 0, ↵Alexander Barkov2019-09-036-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with PAD_CHAR_TO_FULL_LENGTH This patch allows the server to open old tables that have "bad" generated columns (i.e. indexed virtual generated columns, persistent generated columns) that depend on sql_mode, for general things like SELECT, INSERT, DROP, etc. Warning are issued in such cases. Only these commands are now disallowed and return an error: - CREATE TABLE introducing a "bad" generated column - ALTER TABLE introducing a "bad" generated column - CREATE INDEX introdicing a "bad" generated column (i.e. adding an index on a virtual generated column that depends on sql_mode). Note, these commands are allowed: - ALTER TABLE removing a "bad" generate column - ALTER TABLE removing an index from a "bad" virtual generated column - DROP INDEX removing an index from a "bad" virtual generated column but only if the table does not have any "bad" columns as a result.
* | | | | Merge 10.4 into 10.5Marko Mäkelä2019-08-135-0/+142
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4Marko Mäkelä2019-07-255-0/+142
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.2 into 10.3Eugene Kosov2019-07-165-0/+142
| | |\ \ \ | | | |/ /
| | | * | Update Galera failing test list and record correct resultsJan Lindström2019-07-045-0/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for passing ones. Changes to be committed: new file: mysql-test/std_data/galera-cert.pem new file: mysql-test/std_data/galera-key.pem new file: mysql-test/std_data/galera-upgrade-ca-cert.pem new file: mysql-test/std_data/galera-upgrade-server-cert.pem new file: mysql-test/std_data/galera-upgrade-server-key.pem modified: mysql-test/suite/galera/disabled.def modified: mysql-test/suite/galera/r/MW-416.result modified: mysql-test/suite/galera/r/MW-44.result modified: mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff modified: mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result modified: mysql-test/suite/galera/t/MW-416.test modified: mysql-test/suite/galera/t/galera_kill_applier.test
* | | | | Switch Perl DBI scripts from DBD::mysql to DBD::MariaDB driverbb-10.5-MDEV-18565Pali2019-07-191-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Perl DBD::MariaDB driver is available CPAN and is already used in production environment.
* | | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2019-06-031-0/+108
|\ \ \ \ \ | |/ / / /
| * | | | Added new file client-certkey.pem for testing CONC-386:Georg Richter2019-06-021-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | | client-certkey.pem contains both certificate and corresponding private key.
* | | | | Merge 10.4 into 10.5Marko Mäkelä2019-05-234-83/+83
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-194-83/+83
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.2 into 10.3Marko Mäkelä2019-05-142-2/+2
| | |\ \ \ | | | |/ /
| | | * | Merge 10.1 into 10.2Marko Mäkelä2019-05-132-2/+2
| | | |\ \ | | | | |/
| | | | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-112-2/+2
| | | | |\
| | | | | * Update FSF AddressVicențiu Ciorbaru2019-05-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Update wrong zip-code
| | * | | | Merge branch '10.2' into 10.3Oleksandr Byelkin2019-05-122-81/+81
| | |\ \ \ \ | | | |/ / /
| | | * | | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-05-042-81/+81
| | | |\ \ \ | | | | |/ /
| | | | * | MDEV-18131 MariaDB does not verify IP addresses from subject alternativeVladislav Vaintroub2019-04-2810-466/+466
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | names Added a call to X509_check_ip_asc() in case server_hostname represents an IP address.
* | | | | | MDEV-17841 S3 storage engineMonty2019-05-231-0/+0
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A read-only storage engine that stores it's data in (aws) S3 To store data in S3 one could use ALTER TABLE: ALTER TABLE table_name ENGINE=S3 libmarias3 integration done by Sergei Golubchik libmarias3 created by Andrew Hutchings
* | | | | Merge 10.3 into 10.4Marko Mäkelä2019-05-051-0/+0
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2019-04-271-0/+0
| |\ \ \ \ | | |/ / /
| | * | | MDEV-16518 MYSQL57_GENERATED_FIELD: The code in ↵Alexander Barkov2019-04-261-0/+0
| | | | | | | | | | | | | | | | | | | | TABLE_SHARE::init_from_binary_frm_image() is not safe
| * | | | Merge 10.2 into 10.3Marko Mäkelä2019-03-0432-961/+686
| |\ \ \ \ | | |/ / /
| | * | | SSL test fixesSergei Golubchik2019-03-0132-961/+686
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix CRL tests to work * regenerate certificates to be at least 2048 bit (fixes buster and rhel8 in buildbot) * update generate-ssl-cert.sh to generate crl files * make all SSL tests to use certificates generated in generate-ssl-cert.sh, remove unused certificates Backport from 10.4 9c60535f8676
| | * | | Backporting MDEV-15597 Add class Load_data_outvar and avoid using ↵Alexander Barkov2019-02-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Item::STRING_ITEM for Item_user_var_as_out_param detection This is a part of "MDEV-18045 Backporting the MDEV-15497 changes to 10.2 branch"
| | * | | Backporting MDEV-15497 Wrong empty value in a GEOMETRY column on LOAD DATAAlexander Barkov2019-02-231-0/+1
| | | | | | | | | | | | | | | | | | | | This is a part of "MDEV-18045 Backporting the MDEV-15497 changes to 10.2 branch"
| | * | | Backporting MDEV-14628 Wrong autoinc value assigned by LOAD XML in the ↵Alexander Barkov2019-02-232-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NO_AUTO_VALUE_ON_ZERO mode This is a part of "MDEV-18045 Backporting the MDEV-15497 changes to 10.2 branch"