summaryrefslogtreecommitdiff
path: root/sql/share
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2021-04-221-14/+17
|\
| * Merge 10.3 into 10.4st-10.4Marko Mäkelä2021-04-221-14/+17
| |\
| | * Merge 10.2 into 10.3Marko Mäkelä2021-04-221-14/+17
| | |\
| | | * fixed some korean error messagesbb-10.2-danielblack-pr1811-korean-translationLee Keun Won2021-04-211-14/+17
| | | | | | | | | | | | | | | | Closes #1811
* | | | Merge 10.4 to 10.5Marko Mäkelä2020-10-221-2/+3
|\ \ \ \ | |/ / /
| * | | Better German Error message.Oleksandr Byelkin2020-10-071-1/+1
| | | |
| * | | MDEV-23518 Syntax error in ond SP results in misleading message on SHOW ↵Oleksandr Byelkin2020-10-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | CREATE PROCEDURE Add info to the error message how to get details about error which happened.
* | | | Merge branch '10.4' into 10.5Sujatha2020-09-291-1/+9
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4Sujatha2020-09-281-1/+9
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3Sujatha2020-09-281-1/+9
| | |\ \ | | | |/
| | | * Ukrainian error text translations added.bb-10.2-ukOleksandr Byelkin2020-09-221-1/+9
| | | |
* | | | Fix spelling mistake in error messageIan Gilfillan2020-08-211-1/+1
| | | |
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-08-101-19/+19
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-08-101-19/+19
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2020-08-101-19/+19
| | |\ \ | | | |/
| | | * MDEV-23082: ER_TABLEACCESS_DENIED_ERROR error message is truncated,Rucha Deodhar2020-08-041-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and inaccurately Analysis: The list of all privileges is 118 characters wide. However, the format of error message was: "%-.32s command denied to user...". get_length() sets the maximum width to 32 characters. As a result, only first 32 characters of list of privilege are stored. Fix: Changing the format to "%-.100T..." so that get_length() sets width to 100. Hence, first 100 characters of the list of privilege are stored and the type specifier 'T' appends '...' so that truncation can be seen.
| | | * MDEV-22726: Add check that one can't change general or slow log to aVlad Lesin2020-06-241-0/+2
| | | | | | | | | | | | | | | | transactional engine
* | | | Fix spelling errorsOtto Kekäläinen2020-07-301-1/+1
| | | |
* | | | MDEV-22844 JSON_ARRAYAGG is limited by group_concat_max_len.Alexey Botchkov2020-06-151-1/+1
| | | | | | | | | | | | | | | | Warning message and function result fixed
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-05-311-177/+177
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-05-261-177/+177
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2020-05-251-177/+177
| | |\ \ | | | |/
| | | * MDEV-22545: my_vsnprintf behaves not as in C standardOleksandr Byelkin2020-05-241-178/+178
| | | | | | | | | | | | | | | | Added parameter %T for string which should be visibly truncated.
* | | | Aria will now register it's transactionsMonty2020-05-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-22531 Remove maria::implicit_commit() MDEV-22607 Assertion `ha_info->ht() != binlog_hton' failed in MYSQL_BIN_LOG::unlog_xa_prepare From the handler point of view, Aria now looks like a transactional engine. One effect of this is that we don't need to call maria::implicit_commit() anymore. This change also forces the server to call trans_commit_stmt() after doing any read or writes to system tables. This work will also make it easier to later allow users to have system tables in other engines than Aria. To handle the case that Aria doesn't support rollback, a new handlerton flag, HTON_NO_ROLLBACK, was added to engines that has transactions without rollback (for the moment only binlog and Aria). Other things - Moved freeing of MARIA_SHARE to a separate function as the MARIA_SHARE can be still part of a transaction even if the table has closed. - Changed Aria checkpoint to use the new MARIA_SHARE free function. This fixes a possible memory leak when using S3 tables - Changed testing of binlog_hton to instead test for HTON_NO_ROLLBACK - Removed checking of has_transaction_manager() in handler.cc as we can assume that as the transaction was started by the engine, it does support transactions. - Added new class 'start_new_trans' that can be used to start indepdendent sub transactions, for example while reading mysql.proc, using help or status tables etc. - open_system_tables...() and open_proc_table_for_Read() doesn't anymore take a Open_tables_backup list. This is now handled by 'start_new_trans'. - Split thd::has_transactions() to thd::has_transactions() and thd::has_transactions_and_rollback() - Added handlerton code to free cached transactions objects. Needed by InnoDB. squash! 2ed35999f2a2d84f1c786a21ade5db716b6f1bbc
* | | | Merge remote-tracking branch 'origin/10.4' into 10.5Alexander Barkov2020-05-191-0/+2
|\ \ \ \ | |/ / /
* | | | MDEV-17812 Use MariaDB in error messages instead of MySQLRasmus Johansson2020-04-081-66/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed wording in error messages from MySQL to MariaDB. In cases where the word server could be used instead it was done. Tests that have these errors recorded were updated.
* | | | MDEV-21889 Typo fix: ER_KEY_DOES_NOT_EXISTSAleksey Midenkov2020-04-041-1/+1
| | | | | | | | | | | | | | | | libmariadb revision updated.
* | | | MDEV-16978 Application-time periods: WITHOUT OVERLAPSNikita Malyavin2020-03-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The overlaps check is implemented on a handler level per row command. It creates a separate cursor (actually, another handler instance) and caches it inside the original handler, when ha_update_row or ha_insert_row is issued. Cursor closes on unlocking the handler. * Containing the same key in index means unique constraint violation even in usual terms. So we fetch left and right neighbours and check that they have same key prefix, excluding from the key only the period part. If it doesnt match, then there's no such neighbour, and the check passes. Otherwise, we check if this neighbour intersects with the considered key. * The check does not introduce new error and fails with ER_DUPP_KEY error. This might break REPLACE workflow and should be fixed separately
* | | | unify "partitioning cannot do X" error messagesNikita Malyavin2020-03-311-4/+2
| | | |
* | | | Improve update handler (long unique keys on blobs)Monty2020-03-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-21606 Improve update handler (long unique keys on blobs) MDEV-21470 MyISAM and Aria start_bulk_insert doesn't work with long unique MDEV-21606 Bug fix for previous version of this code MDEV-21819 2 Assertion `inited == NONE || update_handler != this' - Move update_handler from TABLE to handler - Move out initialization of update handler from ha_write_row() to prepare_for_insert() - Fixed that INSERT DELAYED works with update handler - Give an error if using long unique with an autoincrement column - Added handler function to check if table has long unique hash indexes - Disable write cache in MyISAM and Aria when using update_handler as if cache is used, the row will not be inserted until end of statement and update_handler would not find conflicting rows. - Removed not used handler argument from check_duplicate_long_entries_update() - Syntax cleanups - Indentation fixes - Don't use single character indentifiers for arguments
* | | | Added support for replication for S3Monty2020-03-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-19964 S3 replication support Added new configure options: s3_slave_ignore_updates "If the slave has shares same S3 storage as the master" s3_replicate_alter_as_create_select "When converting S3 table to local table, log all rows in binary log" This allows on to configure slaves to have the S3 storage shared or independent from the master. Other thing: Added new session variable '@@sql_if_exists' to force IF_EXIST to DDL's.
* | | | MDEV-13362: implement --require_secure_transport optionJulius Goryavsky2020-03-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if a user wants to require TLS for every connection made over the network, then every user account on the system needs to be created with "REQUIRE SSL" or one of the other TLS options. Implementing a require_secure_transport system varuable (which, in particular, can be set using the --require_secure_transport=ON command line option) in the MariaDB Server would make it a lot easier to require TLS (or other secure transport) system-wide. This patch implements this new system variable, adds the ability to set it with SQL statements, from the command line and from the configuration file, and also contains improvements for mtr that allow the user to establish non-secure TCP/IP connections (for example, to verify the operation of the new option).
* | | | MDEV-20500: Bad error msg on disabling local infileRahul Anand2020-03-031-1/+4
| | | |
* | | | Revert "MDEV-17554 Auto-create new partition for system versioned tables ↵Sergei Golubchik2020-02-271-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | with history partitioned by INTERVAL/LIMIT" This reverts commit 9894751a2a61ef952ac6ac556fd683e53fc150e2. This reverts commit f707c83fff4fa3f5291684e6226542fdb75bbdeb.
* | | | MDEV-17554 Auto-create new partition for system versioned tables with ↵Aleksey Midenkov2020-02-251-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | history partitioned by INTERVAL/LIMIT When there are E empty partitions left, auto-create N new empty partitions for SYSTEM_TIME partitioning rotated by INTERVAL/LIMIT and marked by AUTO_INCREMENT keyword. Syntax change: AUTO_INCREMENT keyword (or shorter AUTO may be used instead) after LIMIT/INTERVAL clause. CREATE OR REPLACE TABLE t (x INT) WITH SYSTEM VERSIONING PARTITION BY SYSTEM_TIME LIMIT 100000 AUTO_INCREMENT; CREATE OR REPLACE TABLE t (x INT) WITH SYSTEM VERSIONING PARTITION BY SYSTEM_TIME INTERVAL 1 WEEK AUTO_INCREMENT; The current revision implements hard-coded values of 1 for E and N. As well as auto-creation threshold MinInterval = 1 hour, MinLimit = 1000. The name for newly added partition will be first chosen as "pX", where X is partition number and "p" is hard-coded name prefix. If this name is already occupied, the X will be incremented until the resulting name will be free to use. ALTER TABLE ADD PARTITION is now always fast. If there some history partition overflow occurs manual ALTER TABLE REBUILD PARTITION is needed.
* | | | MDEV-20051: Add new mode to wsrep_OSU_method in which Galera checks storage ↵Jan Lindström2020-02-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | engine of the effected table Introduced a new wsrep_strict_ddl configuration variable in which Galera checks storage engine of the effected table. If table is not InnoDB (only storage engine currently fully supporting Galera replication) DDL-statement will return error code: ER_GALERA_REPLICATION_NOT_SUPPORTED eng "DDL-statement is forbidden as table storage engine does not support Galera replication" However, when wsrep_replicate_myisam=ON we allow DDL-statements to MyISAM tables. If effected table is allowed storage engine Galera will run normal TOI. This new setting should be for now set globally on all nodes in a cluster. When this setting is set following DDL-clauses accessing tables not supporting Galera replication are refused: * CREATE TABLE (e.g. CREATE TABLE t1(a int) engine=Aria * ALTER TABLE * TRUNCATE TABLE * CREATE VIEW * CREATE TRIGGER * CREATE INDEX * DROP INDEX * RENAME TABLE * DROP TABLE Statements on PROCEDURE, EVENT, FUNCTION are allowed as effected tables are known only at execution. Furthermore, USER, ROLE, SERVER, DATABASE statements are also allowed as they do not really have effected table.
* | | | longer regex error messagesSergei Golubchik2019-12-211-7/+7
| | | |
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-12-161-2/+2
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-12-091-2/+2
| |\ \ \ | | |/ /
| | * | Lintian complains on spelling errorFaustin Lammler2019-12-021-2/+2
| | | | | | | | | | | | | | | | | | | | The lintian check complains on spelling error: https://salsa.debian.org/mariadb-team/mariadb-10.3/-/jobs/95739
* | | | MDEV-17553 Enable setting start datetime for interval partitioned history of ↵Aleksey Midenkov2019-11-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | system versioned tables * Explicit STARTS syntax * SHOW CREATE * Default STARTS rounding depending on INTERVAL type * Warn when STARTS timestamp is later than query time * Fix uninitialized Lex->create_last_non_select_table under mysql_unpack_partition() Default STARTS rounding depending on INTERVAL type If STARTS clause is omitted, default one is assigned with value derived from query timestamp. The rounding is done on STARTS value depending on INTERVAL type: SECOND: no rounding is done; MINUTE: timestamp seconds is set to 0; HOUR: timestamp seconds and minutes are set to 0; DAY, WEEK, MONTH and YEAR: timestamp seconds, minutes and hours are set to 0 (the date of rotation is kept as current date).
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-09-121-0/+2
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2019-09-121-0/+2
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2019-09-111-0/+2
| | |\ \ | | | |/
| | | * Merge 10.1 into 10.2Marko Mäkelä2019-09-111-0/+2
| | | |\
| | | | * MDEV-16594 ALTER DATA DIRECTORY in PARTITIONS of InnoDB storage does nothing ↵Alexey Botchkov2019-09-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | silently InnoDB intentionally (it's a documented behavior) ignores changing of DATA DIRECTORY and INDEX DIRECTORY for partitions. Though we should issue warning when this happens.
* | | | | Merge 10.4 into 10.5Marko Mäkelä2019-09-061-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4Marko Mäkelä2019-08-311-1/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.2 into 10.3Marko Mäkelä2019-08-281-1/+1
| | |\ \ \ | | | |/ /
| | | * | MDEV-19925: Column ... cannot be converted from type 'varchar(20)' to type ↵Sujatha2019-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'varchar(20)' Cherry picking: Bug#25135304: RBR: WRONG FIELD LENGTH IN ERROR MESSAGE commit 47bd3f7cf3c8518f62b1580ec65af2ba7ac13b95 Description: ============ In row based replication, when replicating from a table with a field with character set set to UTF8mb3 to the same table with the same field set to character set UTF8mb4 I get a confusing error message: For VARCHAR: VARCHAR(1) 'utf8mb3' to VARCHAR(1) 'utf8mb4' "Column 0 of table 'test.t1' cannot be converted from type 'varchar(3)' to type 'varchar(1)'" Similar issue with CHAR type as well. Issue with respect to BLOB types: For BLOB: LONGBLOB to TINYBLOB - Error message displays incorrect blob type. "Column 0 of table 'test.t1' cannot be converted from type 'tinyblob' to type 'tinyblob'" For BINARY to BINARY - Error message displays incorrect type for master side field. "Column 0 of table 'test.t' cannot be converted from type 'char(1)' to type 'binary(10)'" Similar issue exists for VARBINARY type. It is displayed as 'VARCHAR'. Analysis: ========= In Row based replication charset information is not sent as part of metadata from master to slave. For VARCHAR field its character length is converted into equivalent octets/bytes and stored internally. At the time of displaying the data to user it is converted back to original character length. For example: VARCHAR(2)- utf8mb3 is stored as:2*3 = VARCHAR(6) At the time of displaying it to user VARCHAR(6)- charset utf8mb3:6/3= VARCHAR(2). At present the internally converted octect length is sent from master to slave with out providing the charset information. On slave side if the type conversion fails 'show_sql_type' function is used to get the type specific information from metadata. Since there is no charset information is available the filed type is displayed as VARCHAR(6). This results in confused error message. For CHAR fields CHAR(1)- utf8mb3 - CHAR(3) CHAR(1)- utf8mb4 - CHAR(4) 'show_sql_type' function which retrieves type information from metadata uses (bytes/local charset length) to get actual character length. If slave's chaset is 'utf8mb4' then CHAR(3/4)-->CHAR(0) CHAR(4/4)-->CHAR(1). This results in confused error message. Analysis for BLOB type issue: BLOB's length is represented in two forms. 1. Actual length i.e (length < 256) type= MYSQL_TYPE_TINY_BLOB; (length < 65536) type= MYSQL_TYPE_BLOB; ... 2. packlength - The number of bytes used to represent the length of the blob 1- tinyblob 2- blob ... In row based replication only the packlength is written in the binary log. On the slave side this packlength is interpreted as actual length of the blob. Hence the length is always < 256 and the type is displayed as tiny blob. Analysis for BINARY to BINARY type issue: The character set information is needed to identify a filed's type as char or binary. Since master side character set information is not available on the slave side both binary and char fields are displayed as char. Fix: === For CHAR and VARCHAR fields display their length in octets for both source and target fields. For target field display the charset information if it is relevant. For blob type changed the code to use the packlength and display appropriate blob type in error message. For binary and varbinary fields use the slave side character set as reference to map them to binary or varbinary fields.