summaryrefslogtreecommitdiff
path: root/libmysqld
Commit message (Collapse)AuthorAgeFilesLines
* Add new option NOT_EMBEDDED, for pluginsVladislav Vaintroub2021-11-091-2/+2
| | | | Means, plugin will not be available in embedded, even if compiled-in
* Fixed max length calculation for embedded serverMonty2021-09-211-5/+7
| | | | | The old code did not take into account unsigned numbers when calculating max_lengths of fields.
* Merge branch bb-10.3-release into bb-10.4-releaseNikita Malyavin2021-05-051-2/+2
|\
| * Fix of ppc64 by Wladmariadb-10.3.29Oleksandr Byelkin2021-05-051-2/+2
| |
* | Merge branch 'bb-10.3-release' into bb-10.4-releaseSergei Golubchik2021-02-121-1/+2
|\ \ | |/ | | | | | | Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution" was null-merged. 10.4 version of the fix is coming up separately
| * Merge branch '10.2' into 10.3Sergei Golubchik2021-02-011-1/+2
| |\
| | * cleanup: fix and generalize handle_manager threadSergei Golubchik2021-01-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * provide an argument to the callback * don't ignore a callback request if it's already present in the queue * initialize mutex/cond/in_use flag before starting the thread, in case the first callback queueing request arrives before handle_manager had time to initialize * set/check abort_manager under a mutex, otherwise handle_manager thread might destroy LOCK_manager before stop_handle_manager released it * signal COND on queueing a callback, stop cond_wait on callback request * always start the thread, even if flush_time is 0 * but keep the old behavior in embedded (no replication, no galera) * style cleanups (e.g. remove volatile for a variable protected by a mutex)
* | | Merge 10.3 into 10.4Marko Mäkelä2020-11-031-1/+2
|\ \ \ | |/ /
| * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-10-301-1/+2
| |\ \ | | |/
| | * MDEV-19838: followup, fix for PS & embeddedOleksandr Byelkin2020-10-291-1/+2
| | | | | | | | | | | | Use 9 byte (min length packet)
* | | Merge 10.3 into 10.4Marko Mäkelä2020-10-291-1/+1
|\ \ \ | |/ /
| * | cleanup: use predefined CMAKE_DL_LIBSSergei Golubchik2020-10-231-1/+1
| | | | | | | | | | | | instead of, say, MY_SEARCH_LIBS(dlopen dl LIBDL)
* | | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-08-031-0/+1
|\ \ \ | |/ /
| * | 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 remote-tracking branch 'origin/10.3' into 10.4Monty2020-07-031-0/+1
|\ \ \ | |/ /
| * | Fixed errors found by MSANMonty2020-07-021-0/+1
| | |
* | | Merge 10.3 into 10.4Marko Mäkelä2020-07-021-0/+2
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2020-07-021-0/+2
| |\ \ | | |/
| | * MDEV-20377: Make WITH_MSAN more usableMarko Mäkelä2020-07-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MemorySanitizer (clang -fsanitize=memory) requires that all code be compiled with instrumentation enabled. The only exception is the C runtime library. Failure to use instrumented libraries will cause bogus messages about memory being uninitialized. In WITH_MSAN builds, we must avoid calling getservbyname(), because even though it is a standard library function, it is not instrumented, not even in clang 10. Note: Before MariaDB Server 10.5, ./mtr will typically fail due to the old PCRE library, which was updated in MDEV-14024. The following cmake options were tested on 10.5 in commit 94d0bb4dbeb28a94d1f87fdd55f4297ff3df0157: cmake \ -DCMAKE_C_FLAGS='-march=native -O2' \ -DCMAKE_CXX_FLAGS='-stdlib=libc++ -march=native -O2' \ -DWITH_EMBEDDED_SERVER=OFF -DWITH_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug \ -DWITH_INNODB_{BZIP2,LZ4,LZMA,LZO,SNAPPY}=OFF \ -DPLUGIN_{ARCHIVE,TOKUDB,MROONGA,OQGRAPH,ROCKSDB,CONNECT,SPIDER}=NO \ -DWITH_SAFEMALLOC=OFF \ -DWITH_{ZLIB,SSL,PCRE}=bundled \ -DHAVE_LIBAIO_H=0 \ -DWITH_MSAN=ON MEM_MAKE_DEFINED(): An alias for VALGRIND_MAKE_MEM_DEFINED() and __msan_unpoison(). MEM_GET_VBITS(), MEM_SET_VBITS(): Aliases for VALGRIND_GET_VBITS(), VALGRIND_SET_VBITS(), __msan_copy_shadow(). InnoDB: Replace the UNIV_MEM_ macros with corresponding MEM_ macros. ut_crc32_8_hw(), ut_crc32_64_low_hw(): Use the compiler built-in functions instead of inline assembler when building WITH_MSAN. This will require at least -msse4.2 when building for IA-32 or AMD64. The inline assembler would not be instrumented, and would thus cause bogus failures.
* | | Merge branch '10.3' into 10.4Sergei Golubchik2019-09-062-4/+15
|\ \ \ | |/ /
| * | Merge 10.2 (up to commit ef00ac4c86daf3294c46a45358da636763fb0049) into 10.3Alexander Barkov2019-09-041-0/+1
| |\ \ | | |/
| | * MDEV-18156 Assertion `0' failed or `btr_validate_index(index, 0, false)' in ↵Alexander Barkov2019-09-031-0/+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 branch '10.2' into 10.3Monty2019-09-031-4/+14
| |\ \ | | |/
| | * embedded client now writes errors to stderr during init_embedded_serverMonty2019-09-011-3/+14
| | | | | | | | | | | | | | | This was done to be able to get any information why the embedded server doesn't start.
* | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-1913-13/+13
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2019-05-1413-13/+13
| |\ \ | | |/
| | * Merge 10.1 into 10.2Marko Mäkelä2019-05-1313-13/+13
| | |\
| | | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-1111-11/+11
| | | |\
| | | | * Update FSF AddressVicențiu Ciorbaru2019-05-1111-11/+11
| | | | | | | | | | | | | | | | | | | | * Update wrong zip-code
* | | | | Merge 10.3 into 10.4Marko Mäkelä2019-05-051-1/+0
|\ \ \ \ \ | |/ / / /
| * | | | Cleanup session tracker redundancySergey Vojtovich2019-05-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - m_enabled is initialised by the base class constructor - removed unused schema_track_inited - moved Transaction_state_tracker constructor to declaration - common enable() - removed unused Session_sysvars_tracker::check_str() - classes are "private" by default - don't even try to compile for embedded Part of MDEV-14984 - regression in connect performance
* | | | | Just move, no code changes otherwise.Sergey Vojtovich2019-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | Part of MDEV-7974 - backport fix for mysql bug#12161 (XA and binlog)
* | | | | MDEV-19125 Change Send_field::type from enum_field_types to Type_handler*Alexander Barkov2019-04-021-1/+1
| | | | |
* | | | | MDEV-18408 Assertion `0' failed in Item::val_native_result / ↵Alexander Barkov2019-02-251-93/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null upon mysqld_list_fields after crash recovery The problem happened because Item_ident_for_show did not implement val_native(). Solution: - Removing class Item_ident_for_show - Implementing a new method Protocol::send_list_fields() instead, which accepts a List<Field> instead of List<Item> as input. Now no any Item creation is done during mysqld_list_fields(). Adding helper methods, to reuse the code easier: - Moved a part of Protocol::send_result_set_metadata(), responsible for sending an individual field metadata, into a new method Protocol_text::store_field_metadata(). Reusing it in both send_list_fields() and send_result_set_metadata(). - Adding Protocol_text::store_field_metadata() - Adding Protocol_text::store_field_metadata_for_list_fields() Note, this patch also automatically fixed another bug: MDEV-18685 mysql_list_fields() returns DEFAULT 0 instead of DEFAULT NULL for view columns The reason for this bug was that Item_ident_for_show::val_xxx() and get_date() did not check field->is_null() before calling field->val_xxx()/get_date(). Now the default value is correctly sent by Protocol_text::store(Field*).
* | | | | Merge branch '10.4' into bb-10.4-mdev16188bb-10.4-mdev16188Sergei Golubchik2019-02-151-0/+1
|\ \ \ \ \
| * | | | | A cleanup for MDEV-13916 Enforce check constraint on JSON typeAlexander Barkov2019-02-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Renaming Type_handler_json to Type_handler_json_longtext There will be other JSON handlers soon, e.g. Type_handler_json_varchar. 2. Making the code more symmetric for data types: - Adding a new virtual method Type_handler::Column_definition_validate_check_constraint() - Moving JSON-specific code from sql_yacc.yy to Type_handler_json_longtext::Column_definition_validate_check_constraint() 3. Adding new files sql_type_json.cc and sql_type_json.h and moving Type_handler+JSON related code into these files.
* | | | | | Merge branch '10.4' into bb-10.4-mdev16188Igor Babaev2019-02-141-1/+3
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge branch '10.4' into bb-10.4-mdev17096Igor Babaev2019-02-121-0/+1
| |\ \ \ \ \
| | * | | | | MDEV-6111 Optimizer TraceVarun Gupta2019-02-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This task involves the implementation for the optimizer trace. This feature produces a trace for any SELECT/UPDATE/DELETE/, which contains information about decisions taken by the optimizer during the optimization phase (choice of table access method, various costs, transformations, etc). This feature would help to tell why some decisions were taken by the optimizer and why some were rejected. Trace is session-local, controlled by the @@optimizer_trace variable. To enable optimizer trace we need to write: set @@optimizer_trace variable= 'enabled=on'; To display the trace one can run: SELECT trace FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE; This task also involves: MDEV-18489: Limit the memory used by the optimizer trace introduces a switch optimizer_trace_max_mem_size which limits the memory used by the optimizer trace. This was implemented by Sergei Petrunia.
| * | | | | | Merge branch '10.4' into bb-10.4-mdev17096Igor Babaev2019-02-064-13/+9
| |\ \ \ \ \ \ | | |/ / / / /
| * | | | | | MDEV-17096 Pushdown of simple derived tables to storage enginesIgor Babaev2019-02-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-17631 select_handler for a full query pushdown Interfaces + Proof of Concept for federatedx with test cases. The interfaces have been developed for integration of ColumnStore engine.
* | | | | | | Fixed a merge problem: missing reference to rowid_filter.cc in a cmake fileIgor Babaev2019-02-041-0/+1
| |/ / / / / |/| | | | |
* | | | | | Move THD list handling to THD_listSergey Vojtovich2019-01-281-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented and integrated THD_list as a replacement for the global thread list. It uses own mutex instead of LOCK_thread_count for THD list protection. Removed unused first_global_thread() and next_global_thread(). delayed_insert_threads is now protected by LOCK_delayed_insert. Although this patch doesn't fix very wrong synchronization of this variable. After this patch there are only 2 legitimate uses of LOCK_thread_count left, both in mysqld.cc: thread_count and ready_to_exit. Aim is to reduce usage of LOCK_thread_count and COND_thread_count. Part of MDEV-15135.
* | | | | | Merge 10.3 into 10.4Marko Mäkelä2019-01-241-1/+1
|\ \ \ \ \ \ | | |/ / / / | |/| | | |
| * | | | | Merge 10.2 into 10.3Marko Mäkelä2019-01-241-1/+1
| |\ \ \ \ \ | | | |/ / / | | |/| | |
| | * | | | Merge 10.1 into 10.2Marko Mäkelä2019-01-241-1/+1
| | |\ \ \ \ | | | | |/ / | | | |/| |
| | | * | | Merge 10.0 into 10.1Marko Mäkelä2019-01-241-1/+1
| | | |\ \ \
| | | | * | | MDEV-17868 mysqltest fails to link with system PCRE librariesSergei Golubchik2019-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pcre needs symbols from pcreposix (but this is only an issue when linking with system static libraries)
* | | | | | | Added syntax and implementation for BACKUP STAGE'sMonty2018-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of MDEV-5336 Implement LOCK FOR BACKUP - Changed check of Global_only_lock to also include BACKUP lock. - We store latest MDL_BACKUP_DDL lock in thd->mdl_backup_ticket to be able to downgrade lock during copy_data_between_tables()
* | | | | | | MDEV-17740 Extend EXTRACT(x AS DAY*) to understand long time intervalsAlexander Barkov2018-11-171-1/+2
| | | | | | |