summaryrefslogtreecommitdiff
path: root/sql/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-19632 Replication aborts with ER_SLAVE_CONVERSION_FAILED upon CREATE ↵Alexander Barkov2020-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... SELECT in ORACLE mode - Adding optional qualifiers to data types: CREATE TABLE t1 (a schema.DATE); Qualifiers now work only for three pre-defined schemas: mariadb_schema oracle_schema maxdb_schema These schemas are virtual (hard-coded) for now, but may turn into real databases on disk in the future. - mariadb_schema.TYPE now always resolves to a true MariaDB data type TYPE without sql_mode specific translations. - oracle_schema.DATE translates to MariaDB DATETIME. - maxdb_schema.TIMESTAMP translates to MariaDB DATETIME. - Fixing SHOW CREATE TABLE to use a qualifier for a data type TYPE if the current sql_mode translates TYPE to something else. The above changes fix the reported problem, so this script: SET sql_mode=ORACLE; CREATE TABLE t2 AS SELECT mariadb_date_column FROM t1; is now replicated as: SET sql_mode=ORACLE; CREATE TABLE t2 (mariadb_date_column mariadb_schema.DATE); and the slave can unambiguously treat DATE as the true MariaDB DATE without ORACLE specific translation to DATETIME. Similar, SET sql_mode=MAXDB; CREATE TABLE t2 AS SELECT mariadb_timestamp_column FROM t1; is now replicated as: SET sql_mode=MAXDB; CREATE TABLE t2 (mariadb_timestamp_column mariadb_schema.TIMESTAMP); so the slave treats TIMESTAMP as the true MariaDB TIMESTAMP without MAXDB specific translation to DATETIME.
* Merge 10.2 into 10.3Marko Mäkelä2019-12-271-8/+11
|\
| * Merge 10.1 into 10.2Marko Mäkelä2019-12-231-4/+6
| |\
| | * CMake,Windows - cleanup data directory prior to bootstrap for ↵Vladislav Vaintroub2019-12-121-2/+4
| | | | | | | | | | | | nitial_database target
* | | Merge 10.2 into 10.3Marko Mäkelä2019-09-101-33/+14
|\ \ \ | |/ /
| * | Windows, cmake : Fix occasional link error when switching between debug to ↵Vladislav Vaintroub2019-09-091-33/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | optimized compilation For Visual Studio generator, use a per-config .def/.lib files with symbols exported from mysqld.exe Functions exported from mysqld.exe may differ between debug/optimized compilation, e.g dbug functions are missing in release config.
* | | Merge 10.2 (up to commit ef00ac4c86daf3294c46a45358da636763fb0049) into 10.3Alexander Barkov2019-09-041-1/+1
|\ \ \ | |/ /
| * | MDEV-18156 Assertion `0' failed or `btr_validate_index(index, 0, false)' in ↵Alexander Barkov2019-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with PAD_CHAR_TO_FULL_LENGTH This change takes into account a column's GENERATED ALWAYS AS expression dependcy on sql_mode's PAD_CHAR_TO_FULL_LENGTH and NO_UNSIGNED_SUBTRACTION flags. Indexed virtual columns as well as persistent generated columns are now not allowed to have such dependencies to avoid inconsistent data or index files on sql_mode changes. So an error is now returned in cases like this: CREATE OR REPLACE TABLE t1 ( a CHAR(5), v VARCHAR(5) AS (a) PERSISTENT -- CHAR->VARCHAR or CHAR->TEXT = ERROR ); Functions RPAD() and RTRIM() can now remove dependency on PAD_CHAR_TO_FULL_LENGTH. So this can be used instead: CREATE OR REPLACE TABLE t1 ( a CHAR(5), v VARCHAR(5) AS (RTRIM(a)) PERSISTENT ); Note, unlike CHAR->VARCHAR and CHAR->TEXT this still works, not RPAD(a) is needed: CREATE OR REPLACE TABLE t1 ( a CHAR(5), v CHAR(5) AS (a) PERSISTENT -- CHAR->CHAR is OK ); More sql_mode flags may affect values of generated columns. They will be addressed separately. See comments in sql_mode.h for implementation details.
* | | Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
|\ \ \ | |/ /
| * | Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| |\ \ | | |/
| | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | |\
| | | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | * Update wrong zip-code
| * | | Merge 10.1 into 10.2Marko Mäkelä2019-02-031-1/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | Temporarily disable a test for commit 2175bfce3e9da8332f10ab0e0286dc93915533a2 because fixing it in 10.2 requires updating libmariadb.
| | * | Merge 10.1 into 10.1Marko Mäkelä2019-02-021-1/+1
| | |\ \ | | | | | | | | | | | | | | | This is joint work with Oleksandr Byelkin.
| | | * \ Merge branch '5.5' into 10.0Oleksandr Byelkin2019-01-281-1/+1
| | | |\ \ | | | | |/
| | | | * Backport MDEV-17504 to 5.5Vladislav Vaintroub2019-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | mysql_install_db.exe should not remove datadir, if it was not created by it.
* | | | | MDEV-16448 mysql_upgrade_service remove my.ini variables that are no more validVladislav Vaintroub2018-11-151-1/+3
| | | | | | | | | | | | | | | | | | | | MDEV-16447 incorporate Innodb slow shutdown into mysql_upgrade_service.exe
* | | | | Merge 10.2 into 10.3Marko Mäkelä2018-11-061-1/+1
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | main.derived_cond_pushdown: Move all 10.3 tests to the end, trim trailing white space, and add an "End of 10.3 tests" marker. Add --sorted_result to tests where the ordering is not deterministic. main.win_percentile: Add --sorted_result to tests where the ordering is no longer deterministic.
| * | | | Merge 10.1 into 10.2Marko Mäkelä2018-11-061-1/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.0' into 10.1Sergei Golubchik2018-10-301-2/+2
| | |\ \ \ | | | |/ /
| | | * | Merge branch '5.5' into 10.0Sergei Golubchik2018-10-271-2/+2
| | | |\ \ | | | | |/
| | | | * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2018-10-231-1/+1
| | | | |\
| | | | | * Bug #26275510 BUNDLED ZLIB DOESN'T INCLUDE FIXES FOR SOME VULNERABILITIESAditya A2018-07-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Upgrading the zlib lib to 1.2.11
| | | | | * Bug#26585560 - MYSQL DAEMON SHOULD CREATE ITS PID FILE ASShishir Jaiswal2017-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ROOT DESCRIPTION =========== If the .pid file is created at a world-writable location, it can be compromised by replacing the server's pid with another running server's (or some other non-mysql process) PID causing abnormal behaviour. ANALYSIS ======== In such a case, user should be warned that .pid file is being created at a world-writable location. FIX === A new function is_file_or_dir_world_writable() is defined and it is called in create_pid_file() before .pid file creation. If the location is world-writable, a relevant warning is thrown. NOTE ==== 1. PID file is always created with permission bit 0664, so for outside world its read-only. 2. Ignoring the case when permission is denied to get the dir stats since the .pid file creation would fail anyway in such a case.
| | | | * | cmake: fix usage of GET_TARGET_PROPERTYSergei Golubchik2018-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | and followup fixes
* | | | | | MDEV-17504 : add diagnostics if creation of directories fail in ↵wlad2018-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql_install_db.exe In addition,don't remove datadir if it was not created or was not empty.
* | | | | | MDEV-17009 PIE issue on FreeBSD after 10.3.9 updateSergei Golubchik2018-09-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup for 96b8909062c. Only link mysqld with ${INTERFACE_LIBS} using LINK_PUBLIC, everything else should be using LINK_PRIVATE. This restores pre-96b8909062c behavior. Also fixes MDEV-17010 Multiple definition issue on FreeBSD after 10.3.9 update
* | | | | | MDEV-16662 CMake warnings: CMP0026Sergei Golubchik2018-08-121-15/+10
| | | | | |
* | | | | | MDEV-16662 CMake warnings: CMP0022Sergei Golubchik2018-08-121-2/+1
| | | | | |
* | | | | | MDEV-16424 replace cmake/bison.cmake with cmake's builtin FindBison moduleVladislav Vaintroub2018-06-081-46/+43
| | | | | |
* | | | | | MDEV-12645 - mysql_install_db: no install test db optionSergey Vojtovich2018-04-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added --skip-test-db option to mysql_install_db. If specified, no test database created and relevant grants issued. Removed --skip-auth-anonymous-user option of mysql_install_db. Now it is covered by --skip-test-db. Dropped some Debian patches that did the same. Removed unused make_win_bin_dist.1, make_win_bin_dist and mysql_install_db.pl.in.
* | | | | | dead code - related to vtmdSergei Golubchik2018-04-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | (will be added back when it'll be used)
* | | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2018-02-151-1/+1
|\ \ \ \ \ \
| * \ \ \ \ \ Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2018-02-081-1/+1
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge branch 'github/10.1' into 10.2Sergei Golubchik2018-02-061-1/+1
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge branch 'github/10.0' into 10.1Sergei Golubchik2018-02-021-1/+1
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | Merge remote-tracking branch '5.5' into 10.0Vicențiu Ciorbaru2018-01-241-1/+1
| | | | |\ \ \ | | | | | |/ /
| | | | | * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2018-01-181-1/+1
| | | | | |\ \ | | | | | | |/
| | | | | | * Backport patch for Bug#16877045 5.6-CLUSTER-7.3 WIN32 SQL_YACC.CC BUILD PROBLEMTor Didriksen2017-10-091-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building with ninja shows the problem: cmake .. -G Ninja ninja ninja: error: dependency cycle: sql/GenServerSource -> sql/CMakeFiles/GenServerSource -> sql/sql_builtin.cc -> cmake_order_depends_target_sq sql/GenServerSource Bug#16877045 5.6-CLUSTER-7.3 WIN32 SQL_YACC.CC BUILD PROBLEM - Somewhat circular dependency caused by the configured files sql_builtin.cc being included as part of the files to generate in sql/ - Move sql_builtin.cc out of GEN_SOURCES variable. - Create new variable CONF_SOURCES to be used for configured files.
* | | | | | | Changed database, tablename and alias to be LEX_CSTRINGMonty2018-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was done in, among other things: - thd->db and thd->db_length - TABLE_LIST tablename, db, alias and schema_name - Audit plugin database name - lex->db - All db and table names in Alter_table_ctx - st_select_lex db Other things: - Changed a lot of functions to take const LEX_CSTRING* as argument for db, table_name and alias. See init_one_table() as an example. - Changed some function arguments from LEX_CSTRING to const LEX_CSTRING - Changed some lists from LEX_STRING to LEX_CSTRING - threads_mysql.result changed because process list_db wasn't always correctly updated - New append_identifier() function that takes LEX_CSTRING* as arguments - Added new element tmp_buff to Alter_table_ctx to separate temp name handling from temporary space - Ensure we store the length after my_casedn_str() of table/db names - Removed not used version of rename_table_in_stat_tables() - Changed Natural_join_column::table_name and db_name() to never return NULL (used for print) - thd->get_db() now returns db as a printable string (thd->db.str or "")
* | | | | | | System Versioning 1.0 pre8Aleksey Midenkov2018-01-101-0/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Merge branch '10.3' into trunk
| * | | | | | | This is a full cost-based implementation of the optimization that employsIgor Babaev2017-12-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | splitting technique for equi-joins of materialized derived tables/views/CTEs. (see mdev-13369 and mdev-13389).
* | | | | | | | System Versioning 1.0 pre7Aleksey Midenkov2017-12-211-2/+4
|\ \ \ \ \ \ \ \ | |/ / / / / / / | | | | | | | | | | | | | | | | Merge branch '10.3' into trunk
| * | | | | | | MDEV-13073. This part patch weeds out RUN_HOOK from the server as semisyncAndrei Elkin2017-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is defined statically. Consequently the observer interfaces are removed as well.
| * | | | | | | MDEV-13073 This part merges the Ali semisync related changesAndrei Elkin2017-12-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and specifically the ack receiving functionality. Semisync is turned to be static instead of plugin so its functions are invoked at the same points as RUN_HOOKS. The RUN_HOOKS and the observer interface remain to be removed by later patch. Todo: React on killed status by repl_semisync_master.wait_after_sync(). Currently Repl_semi_sync_master::commit_trx does not check the killed status. There were few bugfixes found that are present in mysql and its unclear whether/how they are covered. Those include: Bug#15985893: GTID SKIPPED EVENTS ON MASTER CAUSE SEMI SYNC TIME-OUTS Bug#17932935 CALLING IS_SEMI_SYNC_SLAVE() IN EACH FUNCTION CALL HAS BAD PERFORMANCE Bug#20574628: SEMI-SYNC REPLICATION PERFORMANCE DEGRADES WITH A HIGH NUMBER OF THREADS
| * | | | | | | Moved semisync from a plugin to normal serverMonty2017-12-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of MDEV-13073 AliSQL Optimize performance of semisync Did the following renames to match other similar variables key_ss_mutex_LOCK_binlog_ > key_LOCK_bing key_ss_cond_COND_binlog_send_ -> key_COND_binlog_send COND_binlog_send_ -> COND_binlog_send LOCK_binlog_ -> LOCK_binlog debian/mariadb-server-10.2.install does not install semisync libs.
* | | | | | | | System Versioning pre1.0Aleksey Midenkov2017-11-131-0/+1
|\ \ \ \ \ \ \ \ | |/ / / / / / / | | | | | | | | | | | | | | | | Merge branch '10.3' into trunk
| * | | | | | | Merge remote-tracking branch 'shagalla/10.3-mdev12172' into 10.3Igor Babaev2017-11-011-0/+1
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a result of this merge the code for the following tasks appears in 10.3: - MDEV-12172 Implement tables specified by table value constructors - MDEV-12176 Transform [NOT] IN predicate with long list of values INTO [NOT] IN subquery.
| | * | | | | | | New structure Table Value Constructor added in grammar.Galina Shalygina2017-06-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TVC can be used in UNION-statement, in view and in subquery. Files where TVC is defined and its methods are stored added. Methods exec and prepare for TVC added. Tests for TVC added.
* | | | | | | | | System Versioning pre0.12Aleksey Midenkov2017-11-071-0/+2
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | Merge remote-tracking branch 'origin/archive/2017-10-17' into 10.3