- 05 Oct, 2022 1 commit
-
-
Marko Mäkelä authored
dict_load_foreigns(): Remove the constant parameter uncommitted=false. The parameter only had to be added to dict_load_foreign(). Spotted by Alexey Midenkov
-
- 03 Oct, 2022 2 commits
-
-
Oleksandr Byelkin authored
-
Rucha Deodhar authored
Underlying causes of all bugs mentioned below are same. This patch fixes all of them: 1) MDEV-25028: ASAN use-after-poison in base_list_iterator::next or Assertion `sl->join == 0' upon INSERT .. RETURNING via PS 2) MDEV-25187: Assertion `inited == NONE || table->open_by_handler' failed or Direct leak in init_dynamic_array2 upon INSERT .. RETURNING and memory leak in init_dynamic_array2 3) MDEV-28740: crash in INSERT RETURNING subquery in prepared statements 4) MDEV-27165: crash in base_list_iterator::next 5) MDEV-29686: Assertion `slave == 0' failed in st_select_lex_node::attach_single Analysis: consider this statement: INSERT(1)...SELECT(2)...(SELECT(3)...) RETURNING (SELECT(4)...) When RETURNING is encountered, add_slave() changes how selects are linked. It makes the builtin_select(1) slave of SELECT(2). This causes losing of already existing slave(3) (which is nested select of SELECT of INSERT...SELECT). When really, builtin_select (1) shouldn't be slave to SELECT(2) because it is not nested within it. Also, push_select() to use correct context also changed how select are linked. During reinit_stmt_before_use(), we expect the selects to be cleaned-up and have join=0. Since these selects are not linked correctly, clean-up doesn't happen correctly so join is not NULL. Hence the crash. Fix: IF we are parsing RETURNING, make is_parsing_returning= true for current select. get rid of add_slave(). In place of push_select(), used push_context() to have correct context (the context of builtin_select) to resolve items in item_list. And add these items to item_list of builtin_select.
-
- 02 Oct, 2022 2 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
- 01 Oct, 2022 3 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
extended initializers are only allowed since c++11
-
- 30 Sep, 2022 8 commits
-
-
Sergei Golubchik authored
after d7d3ad69 debug_sync waits are no longer interrupted by soft kills that server shutdown is using. Luckily in this test there's no need to wait, it wants the commit to be properly completed, fully committed in both engines.
-
Alexander Barkov authored
Backporting from 10.5 to 10.4 This is needed to fix MDEV-28727 easier.
-
Sergei Golubchik authored
-
Oleksandr Byelkin authored
MDEV-17124: mariadb 10.1.34, views and prepared statements: ERROR 1615 (HY000): Prepared statement needs to be re-prepared The problem is that if table definition cache (TDC) is full of real tables which are in tables cache, view definition can not stay there so will be removed by its own underlying tables. In situation above old mechanism of detection matching definition in PS and current version always require reprepare and so prevent executing the PS. One work around is to increase TDC, other - improve version check for views/triggers (which is done here). Now in suspicious cases we check: - timestamp (microseconds) of the view to be sure that version really have changed; - time (microseconds) of creation of a trigger related to time (microseconds) of statement preparation.
-
Oleksandr Byelkin authored
-
Alexander Barkov authored
-
Anel Husakovic authored
- Added missing information about database of corresponding table for various types of commands - Update some typos - Reviewed by: <vicentiu@mariadb.org>
-
Marko Mäkelä authored
We do not need a non-inline wrapper for the function destroy_background_thd().
-
- 29 Sep, 2022 3 commits
-
-
Sergei Golubchik authored
thd_get_ha_data() can be used without a lock, but only from the current thd thread, when calling from anoher thread it *must* be protected by thd->LOCK_thd_data * fix group commit code to take thd->LOCK_thd_data * remove innobase_close_connection() from the innodb background thread, it's not needed after 87775402 and was failing the assert with current_thd==0
-
Sergei Golubchik authored
KILL QUERY ID 0 was sometimes finding con3 that was still in the process of disconnecting and had query_id==0 (as it didn't run any queries)
-
Igor Babaev authored
This patch resolves the problem of improper name resolution of table references to embedded CTEs for some queries. This improper binding could lead to - infinite sequence of calls of recursive functions - crashes due to resolution of null pointers - wrong result sets returned by queries - bogus error messages If the definition of a CTE contains with clauses then such CTE is called embedding CTE while CTEs from the with clauses are called embedded CTEs. If a table reference used in the definition of an embedded CTE cannot be resolved within the unit that contains this reference it still may be resolved against a CTE definition from the with clause with one of the embedding CTEs. A table reference can be resolved against a CTE definition if it used in the the scope of this definition and it refers to the name of the CTE. Table reference t is in the scope of the CTE definition of CTE cte if - the definition of cte is an element of a with clause declared as RECURSIVE and the reference t belongs either to the unit to which this with clause is attached or to one of the elements of this clause - the definition of cte is an element of a with clause without RECURSIVE specifier and the reference t belongs either to the unit to which this with clause is attached or to one of the elements from this clause that are placed before the definition of cte. If a table reference can be resolved against several CTE definitions then it is bound to the most embedded. The code before this patch not always resolved table references used in embedded CTE according to the above rules. Approved by Oleksandr Byelkin <sanja@mariadb.com>
-
- 28 Sep, 2022 5 commits
-
-
Sergei Golubchik authored
MDEV-29368 Assertion `trx->mysql_thd == thd' failed in innobase_kill_query from process_timers/timer_handler and use-after-poison in innobase_kill_query This is a 10.5 version of 9b750dcb, fix for MDEV-23536 Race condition between KILL and transaction commit InnoDB needs to remove trx from thd before destroying it (trx), otherwise a concurrent KILL might get a pointer from thd to a destroyed trx. ha_close_connection() should allow engines to clear ha_data in hton->on close_connection(). To prevent the engine from being unloaded while hton->close_connection() is running, we remove the lock from ha_data and unlock the plugin manually.
-
Sergei Golubchik authored
split it into debug and non-debug tests
-
Sergei Golubchik authored
only "hard" kills will now interrupt debug_sync waits. this is needed to have debug_sync points that work during disconnect
-
Mikhail Chalov authored
Continue with similar changes as done in 19af1890 to replace sprintf(buf, ...) with snprintf(buf, sizeof(buf), ...), specifically in the "easy" cases where buf is allocated with a size known at compile time. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
-
Daniel Black authored
rather than mariadb/mariadb-check
-
- 27 Sep, 2022 3 commits
-
-
Alexey Botchkov authored
When the partition table is cloned, the handlers for the partitions that were not opened should anyway be created (but not opened).
-
Oleksandr Byelkin authored
Nowdays subquery in a UNION's ORDER BY placed correctly in fake select, the only problem was incorrect Name_resolution_contect is fixed by this patch in parsing, so we do not need scanning/reseting of ORDER BY of a union.
-
Marko Mäkelä authored
This reverts commit bdc5548c that introduced a work-around to ha_innobase::delete_table() for avoiding failures when trying to remove table partitions. This work-around (of not removing statistics in case of a locking conflict) would occasionally cause a failure of the test parts.part_supported_sql_func_innodb: mysqltest: In included file "./suite/parts/inc/partition_supported_sql_funcs.inc": included from ./suite/parts/inc/part_supported_sql_funcs_main.inc at line 91: included from /buildbot/amd64-ubuntu-2004-msan/build/mysql-test/suite/parts/t/part_supported_sql_func_innodb.test at line 44: At line 234: query 'alter table t66 reorganize partition s1 into (partition p0 values less than ($valsqlfunc), partition p1 values less than maxvalue)' failed: ER_DUP_KEY (1022): Can't write; duplicate key in table 'mysql.innodb_table_stats'
-
- 26 Sep, 2022 13 commits
-
-
Nayuta Yanagisawa authored
The warning "maybe-uninitialized" raises on spd_sys_table.cc and ha_spider.cc when the sever is compiled with CMAKE_CXX_FLAGS=-Og.
-
Sergei Golubchik authored
show error messages from mysqldump/mysqlimport
-
Sergei Golubchik authored
-
Sergei Golubchik authored
give every bootstrap server its own tmpdir, by default it's var/tmp, which is shared in --parallel
-
Andrew Hutchings authored
There are currently two things causing ASAN hits on CONNECT engine when the plugin is used as a dynamic module. These are libxml2 and libodbc. libxml2 has some quirks when not the first and last thing called in the main thread of an application, some of the global memory isn't cleaned up correctly. The same is assumed of libodbc but this does not have explicit API for this. This is being fixed in two ways. First we are removing the libxml2 cleanup call. This is because the current one is messy and whatever it fixed has gone away. But also because if this is called and libxml2 is used again this can cause issues. For example if two different plugins to MariaDB both happen to use libxml2. The second fix is a hack that exploits `STB_GNU_UNIQUE` so that when compiled with ASAN the plugin will remain in memory after dlclose(). This allows libodbc to cleanup and has the added advatage that we will get clean stacks from ASAN for CONNECT when the leak is detected at the end of execution. Details of the `STB_GNU_UNIQUE` method can be found here: https://web.archive.org/web/20100730094324/http://www.redhat.com/archives/posix-c++-wg/2009-August/msg00002.html
-
Marko Mäkelä authored
ha_innobase::delete_table(): If locking the InnoDB persistent statistics tables mysql.innodb_table_stats or mysql.innodb_index_stats fails for a table partition, proceed to drop the partition. On DROP TABLE of a partitioned table, each partition is being dropped in a separate InnoDB DDL transaction. The only practical way to create an illusion of atomicity is to avoid failures.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Sergei Golubchik authored
krb5-config (used by FindGSSAPI) returns `-lkrb5 -lk5crypto -lcom_err` but only libkrb5 is actually used by the gssapi plugin. The other two result in unneeded dependencies unless they're tagged optional when linked with --as-needed. Some distributions use --as-needed automatically, which causes our builds to differ from srpm builds, introducing failures in buildbot. Let's always use --as-needed for gssapi plugin
-
Sergei Golubchik authored
-
Anel authored
-