summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.9' into 10.10mariadb-10.10.2Oleksandr Byelkin2022-11-031-0/+12
|\
| * Merge branch '10.8' into 10.9Oleksandr Byelkin2022-11-021-0/+12
| |\
| | * Merge branch '10.7' into 10.8Oleksandr Byelkin2022-11-021-0/+12
| | |\
| | | * Merge branch '10.6' into 10.7Oleksandr Byelkin2022-11-021-0/+12
| | | |\
| | | | * Merge branch '10.5' into 10.6Oleksandr Byelkin2022-11-021-0/+12
| | | | |\
| | | | | * Merge branch '10.4' into 10.5Oleksandr Byelkin2022-10-261-0/+12
| | | | | |\
| | | | | | * MDEV-28545 MyISAM reorganize partition corrupt older table formatAlexander Barkov2022-10-251-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ALTER related code cannot do at the same time both: - modify partitions - change column data types Explicit changing of a column data type together with a partition change is prohibited by the parter, so this is not allowed and returns a syntax error: ALTER TABLE t MODIFY ts BIGINT, DROP PARTITION p1; This fix additionally disables implicit data type upgrade (e.g. from "MariaDB 5.3 TIME" to "MySQL 5.6 TIME", or the other way around according to the current mysql56_temporal_format) in case of an ALTER modifying partitions, e.g.: ALTER TABLE t DROP PARTITION p1; In such commands now only the partition change happens, while the data types stay unchanged. One can additionally run: ALTER TABLE t FORCE; either before or after the ALTER modifying partitions to upgrade data types according to mysql56_temporal_format.
* | | | | | | Merge 10.9 into 10.10Marko Mäkelä2022-10-131-1/+49
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge 10.8 into 10.9Marko Mäkelä2022-10-131-1/+49
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge 10.7 into 10.8Marko Mäkelä2022-10-131-1/+49
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge 10.6 into 10.7Marko Mäkelä2022-10-131-1/+49
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | Merge 10.5 into 10.6Marko Mäkelä2022-10-121-1/+49
| | | | |\ \ \ | | | | | |/ /
| | | | | * | MDEV-28576 RENAME COLUMN with NOCOPY algorithm leads to corrupt partitioned ↵Aleksey Midenkov2022-10-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | table 10.5 part: test cases and comments. The code is in the merge commit 74fe1c44aa1 When f.ex. table is partitioned by HASH(a) and we rename column `a' to `b' partitioning filter stays unchanged: HASH(a). That's the wrong behavior. The patch updates partitioning filter in accordance to the new columns names. That includes partition/subpartition expression and partition/subpartition field list.
| | | | | * | Merge 10.4 into 10.5Aleksey Midenkov2022-10-071-0/+43
| | | | | |\ \ | | | | | | |/
| | | | | | * Merge 10.3 into 10.4Aleksey Midenkov2022-10-061-0/+48
| | | | | | |\
| | | | | | | * MDEV-29697 Assertion failure in Diagnostics_area::set_ok_statusAleksey Midenkov2022-10-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | upon CREATE OR REPLACE causing ER_UPDATE_TABLE_USED Missed set return status to 1.
| | | | | | | * MDEV-28576 RENAME COLUMN with NOCOPY algorithm leads to corrupt partitioned ↵Aleksey Midenkov2022-10-051-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | table When f.ex. table is partitioned by HASH(a) and we rename column `a' to `b' partitioning filter stays unchanged: HASH(a). That's the wrong behavior. The patch updates partitioning filter in accordance to the new columns names. That includes partition/subpartition expression and partition/subpartition field list.
* | | | | | | | Merge branch '10.9' into 10.10Oleksandr Byelkin2022-10-041-2/+9
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | Merge branch '10.8' into 10.9Oleksandr Byelkin2022-10-041-2/+9
| |\ \ \ \ \ \ \ | | |/ / / / / /
| | * | | | | | Merge branch '10.7' into 10.8Oleksandr Byelkin2022-10-041-2/+9
| | |\ \ \ \ \ \ | | | |/ / / / /
| | | * | | | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-10-041-1/+9
| | | |\ \ \ \ \ | | | | |/ / / /
| | | | * | | | Merge branch '10.5' into 10.6Sergei Golubchik2022-10-021-0/+8
| | | | |\ \ \ \ | | | | | |/ / /
| | | | | * | | Merge branch '10.4' into 10.5Sergei Golubchik2022-10-021-0/+8
| | | | | |\ \ \ | | | | | | |/ /
| | | | | | * | MDEV-20760 Add Type_handler::KEY_pack_flags()Alexander Barkov2022-09-301-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backporting from 10.5 to 10.4 This is needed to fix MDEV-28727 easier.
| | | | | | * | MDEV-29672 Add MTR tests covering key and key segment flags and typesAlexander Barkov2022-09-301-0/+8
| | | | | | | |
| | | | * | | | Merge 10.5 into 10.6Marko Mäkelä2022-09-261-1/+1
| | | | |\ \ \ \ | | | | | |/ / /
| | | | | * | | Merge 10.4 into 10.5Marko Mäkelä2022-09-261-1/+1
| | | | | |\ \ \ | | | | | | |/ /
| | | | | | * | Fix build without either ENABLED_DEBUG_SYNC or DBUG_OFFMarko Mäkelä2022-09-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are separate flags DBUG_OFF for disabling the DBUG facility and ENABLED_DEBUG_SYNC for enabling the DEBUG_SYNC facility. Let us allow debug builds without DEBUG_SYNC. Note: For CMAKE_BUILD_TYPE=Debug, CMakeLists.txt will continue to define ENABLED_DEBUG_SYNC.
* | | | | | | | Merge 10.9 into 10.10Jan Lindström2022-09-061-0/+1
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | Merge 10.8 into 10.9Jan Lindström2022-09-061-0/+1
| |\ \ \ \ \ \ \ | | |/ / / / / /
| | * | | | | | Merge 10.7 into 10.8Jan Lindström2022-09-051-0/+1
| | |\ \ \ \ \ \ | | | |/ / / / /
| | | * | | | | Merge 10.6 into 10.7Jan Lindström2022-09-051-0/+1
| | | |\ \ \ \ \ | | | | |/ / / /
| | | | * | | | Merge 10.5 into 10.6Jan Lindström2022-09-051-0/+1
| | | | |\ \ \ \ | | | | | |/ / /
| | | | | * | | Merge 10.4 into 10.5Jan Lindström2022-09-051-0/+1
| | | | | |\ \ \ | | | | | | |/ /
| | | | | | * | Reduce compilation dependencies on wsrep_mysqld.hDaniele Sciascia2022-08-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Making changes to wsrep_mysqld.h causes large parts of server code to be recompiled. The reason is that wsrep_mysqld.h is included by sql_class.h, even tough very little of wsrep_mysqld.h is needed in sql_class.h. This commit introduces a new header file, wsrep_on.h, which is meant to be included from sql_class.h, and contains only macros and variable declarations used to determine whether wsrep is enabled. Also, header wsrep.h should only contain definitions that are also used outside of sql/. Therefore, move WSREP_TO_ISOLATION* and WSREP_SYNC_WAIT macros to wsrep_mysqld.h. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | | | | | | Merge 10.9 into 10.10Marko Mäkelä2022-08-301-1/+1
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | Merge 10.8 into 10.9Marko Mäkelä2022-08-301-1/+1
| |\ \ \ \ \ \ \ | | |/ / / / / /
| | * | | | | | Merge 10.7 into 10.8Marko Mäkelä2022-08-301-1/+1
| | |\ \ \ \ \ \ | | | |/ / / / /
| | | * | | | | Merge 10.6 into 10.7Marko Mäkelä2022-08-301-1/+1
| | | |\ \ \ \ \ | | | | |/ / / /
| | | | * | | | Merge 10.5 into 10.6Marko Mäkelä2022-08-301-1/+1
| | | | |\ \ \ \ | | | | | |/ / /
| * | | | | | | Merge branch '10.8' into 10.9Oleksandr Byelkin2022-08-091-7/+11
| |\ \ \ \ \ \ \ | | |/ / / / / /
| | * | | | | | Merge branch '10.7' into 10.8Oleksandr Byelkin2022-08-091-7/+11
| | |\ \ \ \ \ \ | | | |/ / / / /
* | | | | | | | cleanup: consolidate binlog-related THD::*_used into one bitmapSergei Golubchik2022-08-101-7/+5
| | | | | | | |
* | | | | | | | Merge branch '10.8' into 10.9Oleksandr Byelkin2022-08-081-7/+11
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | |
| * | | | | | | Merge branch '10.7' into 10.8Oleksandr Byelkin2022-08-081-7/+11
| |\ \ \ \ \ \ \ | | |/ / / / / / | |/| / / / / / | | |/ / / / /
| | * | | | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-08-081-6/+10
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge branch '10.5' into bb-10.6-releaseOleksandr Byelkin2022-08-031-6/+10
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | MDEV-29075 Changing explicit_defaults_for_timestamp within stored procedure ↵Sergei Golubchik2022-08-021-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | works inconsistently
| | | | * | | MDEV-29225 make explicit_defaults_for_timestamps SESSION variableSergei Golubchik2022-08-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | make @@explicit_defaults_for_timestamp session variable
| | * | | | | MDEV-29159 Patch for MDEV-28918 introduces more inconsistency than it ↵Alexander Barkov2022-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | solves, breaks usability 1. Store assignment failures on incompatible data types now raise errors if: - STRICT_ALL_TABLES or STRICT_TRANS_TABLES sql_mode is used, and - IGNORE is not used Otherwise, only a warning is raised and the statement continues. 2. Changing the error/warning test as follows: -ERROR HY000: Illegal parameter data types inet6 and int for operation 'SET' +ERROR HY000: Cannot cast 'int' as 'inet6' in assignment of `db`.`t`.`col` so in case of a big table it's easier to see which column has the problem. The new error text is also applied to SP variables.