- 21 Apr, 2021 38 commits
-
-
Alexey Botchkov authored
MDEV-25259 JSON_TABLE: Illegal mix of collations upon executing query with combination of charsets via view. now the ::print printed too much. Limit it for fields with no CHARSET possible.
-
Alexey Botchkov authored
MDEV-25259 JSON_TABLE: Illegal mix of collations upon executing query with combination of charsets via view. The ::print method didn't print the explicitly specified charset.
-
Alexey Botchkov authored
test crashing after any_db assinged nonzero lenght fixed.
-
Alexey Botchkov authored
test crashing after any_db assinged nonzero lenght fixed.
-
Sergei Petrunia authored
Table_function_json_table::m_dep_tables attempts to cache the value of m_json->used_tables(), poorly. Remove the cache and use the value directly.
-
Sergei Petrunia authored
The query used a subquery of this form: SELECT ... WHERE EXISTS( SELECT ... FROM JSON_TABLE(outer_ref, ..) as JT WHERE trivial_correlation_cond) EXISTS-to-IN conversion code was unable to see that the subquery will still be correlated after the trivial_correlation is removed, which eventually caused a crash due to inability to construct a query plan. Fixed by making Item_subselect::walk() also walk arguments of Table Functions.
-
Sergei Petrunia authored
Use a function instead of lambda (TODO: squash this with previous patch for MDEV-25346)
-
Alexey Botchkov authored
add_table_to_list - remove the table_function argument.
-
Sergei Petrunia authored
mysql_derived_prepare() sets Name_resolution_context::outer_context=NULL for the WHERE clause's context. Do the same for all ON expressions, too.
-
Sergei Petrunia authored
Add testcase
-
Sergei Petrunia authored
Followup: also handle NATURAL JOIN, extend the new approach with Name_resolution_context::ignored_tables
-
Alexey Botchkov authored
tests updated.
-
Sergei Petrunia authored
- Address review input. No functional changes.
-
Sergei Petrunia authored
Post-rebase fix, JSON_TABLE touched the parser.
-
Sergei Petrunia authored
(Also fixes MDEV-25254). Re-work Name Resolution for the argument of JSON_TABLE(json_doc, ....) function. The json_doc argument can refer to other tables, but it can only refer to the tables that precede[*] the JSON_TABLE(...) call. [*] - For queries with RIGHT JOINs, the "preceding" is determined after the query is normalized by converting RIGHT JOIN into left one. The implementation is as follows: - Table function arguments use their own Name_resolution_context. - The Name_resolution_context now has a bitmap of tables that should be ignored when searching for a field. - get_disallowed_table_deps() walks the TABLE_LIST::nested_join tree and computes a bitmap of tables that do not "precede" the given JSON_TABLE(...) invocation (according the above definition of "preceding").
-
Alexey Botchkov authored
should not abort on field::set().
-
Alexey Botchkov authored
More informative messages added. Do not issue additional messages if already handled.
-
Alexey Botchkov authored
feature_json variable incremented.
-
Alexey Botchkov authored
Field reset added.
-
Alexey Botchkov authored
syntax fixed.
-
Alexey Botchkov authored
calling members of NULL object crashes on some platforms.
-
Alexey Botchkov authored
-
Alexey Botchkov authored
No plugin for the JSON_TABLE so get the storage type name directly.
-
Alexey Botchkov authored
MDEV-25230 JSON_TABLE: CREATE VIEW with 2nd level NESTED PATH ends up with invalid frm, Assertion `m_status == DA_ERROR || m_status == DA_OK || m_status == DA_OK_BULK' failed. Handle multiple NESTED paths.
-
Alexey Botchkov authored
JSON_TABLE shojldn't be counted in the query_cache.
-
Alexey Botchkov authored
MDEV-25189 SON_TABLE: Assertion `l_offset >= 0 && table->s->rec_buff_length - l_offset > 0' failed upon CREATE .. SELECT. fixed already, so just the testcase.
-
Alexey Botchkov authored
MDEV-25188 JSON_TABLE: ASAN use-after-poison in Field_long::reset / Table_function_json_table::setup or malloc(): invalid size. MDEV-25192 JSON_TABLE: ASAN use-after-poison in field_conv_memcpy / Create_tmp_table::finalize upon query with derived table.
-
Alexey Botchkov authored
MDEV-25186 JSON_TABLE: ASAN global-buffer-overflow in my_strnncoll_binary upon inserting query with join into query cache.
-
Alexey Botchkov authored
MDEV-25178 JSON_TABLE: ASAN use-after-poison in my_fill_8bit Json_table_column::On_response::respond. table record buffer size was smaller than required when the charset changes.
-
Alexey Botchkov authored
Wrong comma was added after the single column.
-
Alexey Botchkov authored
Field length can increase after the change_charset(), so need to set field->ptr properly. also sensitive parts of the test moved to json_not_embedded.test.
-
Alexey Botchkov authored
access rights checking fixed.
-
Alexey Botchkov authored
should return some error code from ha_json_table::rnd_pos() not just 1.
-
Sergei Petrunia authored
-
Sergei Petrunia authored
-
Sergei Petrunia authored
- Don't touch simplify_joins() - All dependencies caused by JSON_TABLE(...) are now added by add_table_function_dependencies().
-
Sergei Petrunia authored
Fix for for the problem with - Cross-outer-join dependency - dead-end join prefix - join order pruning See the comments in the patch for detailed description
-
Alexey Botchkov authored
The specific table handler for the table functions was introduced, and used to implement JSON_TABLE.
-
- 20 Apr, 2021 1 commit
-
-
Oleksandr Byelkin authored
Also increase user name up to 128. The work was started by Rucha Deodhar <rucha.deodhar@mariadb.com>, contains audit plugin fixes by Alexey Botchkov <holyfoot@askmonty.org>.
-
- 19 Apr, 2021 1 commit
-
-
Marko Mäkelä authored
Having both readers and writers use a single lock word in futex system calls caused performance regression compared to SRW_LOCK_DUMMY (mutex and 2 condition variables). A contributing factor is that we did not accurately keep track of the number of waiting threads and thus had to invoke system calls to wake up any waiting threads. SUX_LOCK_GENERIC: Renamed from SRW_LOCK_DUMMY. This is the original implementation, with rw_lock (std::atomic<uint32_t>), a mutex and two condition variables. Using a separate writer mutex (as described below) is not possible, because the mutex ownership in a buf_block_t::lock must be able to transfer from a write submitter thread to an I/O completion thread, and pthread_mutex_lock() may assume that the submitter thread is recursively acquiring the mutex that it already holds, while in reality the I/O completion thread is the real owner. POSIX does not define an interface for requesting a mutex to be non-recursive. On Microsoft Windows, srw_lock_low will remain a simple wrapper of SRWLOCK. On 32-bit Microsoft Windows, sizeof(SRWLOCK)=4 while sizeof(srw_lock_low)=8. On other platforms, srw_lock_low is an alias of ssux_lock_low, the Simple (non-recursive) Shared/Update/eXclusive lock. In the futex-based implementation of ssux_lock_low (Linux, OpenBSD, Microsoft Windows), we shall use a dedicated mutex for exclusive requests (writer), and have a WRITER flag in the 'readers' lock word to inform that a writer is holding the lock or waiting for the lock to be granted. When the WRITER flag is set, all lock requests must acquire the writer mutex. Normally, shared (S) lock requests simply perform a compare-and-swap on the 'readers' word. Update locks are implemented as a combination of writer mutex and a normal counter in the 'readers' lock word. The conflict between U and X locks is guaranteed by the writer mutex. Unlike SUX_LOCK_GENERIC, wr_u_downgrade() will not wake up any pending rd_lock() waits. They will wait until u_unlock() releases the writer mutex. The ssux_lock_low is always wrapped by sux_lock (with a recursion count of U and X locks), used for dict_index_t::lock and buf_block_t::lock. Their memory footprint for the futex-based implementation will increase by sizeof(srw_mutex), or 4 bytes. This change addresses a performance regression in read-only benchmarks, such as sysbench oltp_read_only. Also write performance was improved. On 32-bit Linux and OpenBSD, lock_sys_t::hash_table will allocate two hash table elements for each srw_lock (14 instead of 15 hash table cells per 64-byte cache line on IA-32). On Microsoft Windows, sizeof(SRWLOCK)==sizeof(void*) and there is no change. Reviewed by: Vladislav Vaintroub Tested by: Axel Schwenke and Vladislav Vaintroub
-