Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Console View


Categories: connectors experimental galera main
Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

connectors experimental galera main
Aleksey Midenkov
mysqltest: result_format fix

--result_format 2 command fails with assertion:

DbugExit (why=0x7fffffff49e0 "missing DBUG_RETURN or DBUG_VOID_RETURN
macro in function \"do_result_format_version\"\n") at
../src/dbug/dbug.c:2045
Thirunarayanan Balathandayuthapani
MDEV-36032 Check whether a table can be a sequence when ALTERed with SEQUENCE=1

To check the rows, the table needs to be opened. To that end, and like
MDEV-36038, we force COPY algorithm on ALTER TABLE ... SEQUENCE=1.
This also results in checking the sequence state / metadata.

The table structure was already validated before this patch.

(cherry picked from commit 6f8ef26885073e1d0e3f69145d88c9452c0f4cf6)
Marko Mäkelä
MDEV-36863 InnoDB: Failing assertion: !block->n_hash_helps after failing to shrink innodb_buffer_pool_size

buf_pool_t::resize(): After failing to shrink the buffer pool,
clear any adaptive hash index fields for blocks that were restored
from buf_pool.withdrawn to buf_pool.free, so that they will be in
the expected state when the blocks will be allocated later.
This fixes a logic conflict between
commit 4dcb1b575b6cc533f68b98ea1f83cec275534972 (MDEV-35049) and
commit b6923420f326ac030e4f3ef89a2acddb45eccb30 (MDEV-29445).
Thirunarayanan Balathandayuthapani
MDEV-36771 Assertion 'bulk_insert == TRX_NO_BULK' failed in trx_t::assert_freed

- InnoDB fails to reset bulk_insert of a transaction while freeing
the transaction during shutting down of a server.
Marko Mäkelä
MDEV-36868: Inconsistency when shrinking innodb_buffer_pool_size

buf_pool_t::resize(): After successfully shrinking the buffer pool,
announce the success. The size had already been updated in shrunk().
After failing to shrink the buffer pool, re-enable the adaptive
hash index if it had been enabled.

Reviewed by: Debarun Banerjee
Thirunarayanan Balathandayuthapani
MDEV-36017 Alter table aborts when temporary directory is full

Problem:
=======
- In 10.11, During Copy algorithm, InnoDB does use bulk insert
for row by row insert operation. When temporary directory
ran out of memory, row_mysql_handle_errors() fails to handle
DB_TEMP_FILE_WRITE_FAIL.

- During inplace algorithm, concurrent DML fails to write
the log operation into the temporary file. InnoDB fail to
mark the error for the online log.

- ddl_log_write() releases the global ddl lock prematurely before
release the log memory entry

Fix:
===
row_mysql_handle_errors(): Rollback the transaction when
InnoDB encounters DB_TEMP_FILE_WRITE_FAIL

convert_error_code_to_mysql(): Report an aborted transaction
when InnoDB encounters DB_TEMP_FILE_WRITE_FAIL during
alter table algorithm=copy or innodb bulk insert operation

row_log_online_op(): Mark the error in online log when
InnoDB ran out of temporary space

fil_space_extend_must_retry(): Mark the os_has_said_disk_full
as true if os_file_set_size() fails

btr_cur_pessimistic_update(): Return error code when
btr_cur_pessimistic_insert() fails

ddl_log_write(): Release the global ddl lock after releasing
the log memory entry when error was encountered

btr_cur_optimistic_update(): Relax the assertion that
blob pointer can be null during rollback because InnoDB can
ran out of space while allocating the external page

ha_innobase::extra(): Rollback the transaction during DDL before
calling convert_error_code_to_mysql().

row_undo_mod_upd_exist_sec(): Remove the assertion which says
that InnoDB should fail to build index entry when rollbacking
an incomplete transaction after crash recovery. This scenario
can happen when InnoDB ran out of space.

row_upd_changes_ord_field_binary_func(): Relax the assertion to
make that externally stored field can be null when InnoDB ran out
of space.
Aleksey Midenkov
Test sysvars_server failure fix
Hemant Dangi
MDEV-36117: MDL BF-BF conflict on ALTER and UPDATE with multi-level foreign key parents

Issue:
Mariadb acquires additional MDL locks on UPDATE/INSERT/DELETE statements
on table with foreign keys. For example, table t1 references t2, an
UPDATE to t1 will MDL lock t2 in addition to t1.
A replica may deliver an ALTER t1 and UPDATE t2 concurrently for
applying. Then the UPDATE may acquire MDL lock for t1, followed by a
conflict when the ALTER attempts to MDL lock on t1. Causing a BF-BF
conflict.

Solution:
Additional keys for the referenced/foreign table needs to be added
to avoid potential MDL conflicts with concurrent update and DDLs.

Signed-off-by: Julius Goryavsky <[email protected]>
Daniel Black
MDEV-36337: udf_example UDF pointers need unsigned is_null/error

This is required to match the sql/sql_udf.h
Vladislav Vaintroub
Merge branch '10.6' into 10.11
Daniel Black
MDEV-36337 auth_ed25519 correct UDF pointers for is_null/error

Shows up on test plugins.auth_ed25519.

There isn't the import to define uchar so left as unsigned char.
Dmitry Shulga
MDEV-35617: DROP USER should leave no active session for that user

On handling the DROP USER statement it is counted a number of sessions
established on behalf every user being dropped. In case the DROP USER
statement is executed in sql_mode = oracle the error
  ER_CANNOT_USER
if there are active connections for any of the users listed at
the DROP USER statement. For sql_mode != oracle the warning
  ER_ACTIVE_CONNECTIONS_FOR_USER_TO_DROP
if there are active connections.

Every user being dropped is marked with flag that disallow establishing
a new connections on behalf this user. In case the user tries to establish
a new session while the DROP USER is executed for this account,
connection establishing is failed with the error
  ER_CONNECT_WHILE_DROP_USER_IN_PROGRESS
Vladislav Vaintroub
Compiling - fix warnings with MSVC 17.14

New warnings come from 3 places

1. Warning C5287: Warning comes from json_lib.c from code like
  compile_time_assert((int) JSON_VALUE_NULL == (int) JSV_NULL);
2. Warning C5287: Similar warning come from wc_static_assert() from code
  in wolfSSL's header file
3. Warning C5286 in WolfSSL code, -enum_value

  (i.e multiplying enum with -1)is used

To fix:
- Disable warnings in WolfSSL code, using /wd<num> flag.
- workaround warning for users of WolfSSL, disable
  wc_static_assert() with -DWC_NO_STATIC_ASSERT compile flag
- Rewrite some compile_time_assert in json_lib.c to avoid warning.
- add target_link_libraries(vio ${SSL_LIBRARIES}) so that
  vio picks up -DWC_NO_STATIC_ASSERT
Jan Lindström
MDEV-36620 post-fix: galera_toi_ddl_nonconflicting test failure

Add wait_condition to wait until all inserted rows are replicated
so that show create table is deterministic.

Signed-off-by: Julius Goryavsky <[email protected]>
Aleksey Midenkov
MDEV-29155 CREATE OR REPLACE with self-referencing CHECK hangs
  forever, cannot be killed

mysql_rm_table_no_locks() does TDC_RT_REMOVE_ALL which waits while
share is closed. The table normally is open only as OPEN_STUB, this is
what parser does for CREATE TABLE. But for SELECT the table is opened
not as a stub. If it is the same table name we anyway have two
TABLE_LIST objects: stub and not stub. So for "not stub"
TDC_RT_REMOVE_ALL sees open count and decides to wait until it is
closed. And it hangs because that was opened in the same thread.

The fix disables subqueries in CHECK expression at parser
level. Thanks to Sergei Golubchik <[email protected]> for the patch.
Marko Mäkelä
MDEV-36301 SET GLOBAL innodb_log_file_disabled, ...

innodb_log_file_disabled: A new Boolean settable global parameter,
for disabling the InnoDB redo log. When set, the server is not
crash safe.

innodb_log_group_home_dir: Allow the value to be changed with
SET GLOBAL, as long as the log remains in the same file system
or innodb_log_file_disabled=ON was set.

innodb_log_update(): A common function for implementing
SET GLOBAL innodb_log_file_size, innodb_log_file_disabled,
innodb_log_checkpoint_now, innodb_log_group_home_dir.

log_sys.buf_size_requested: The configured innodb_log_buffer_size.
While the log is disabled, we may set log_sys.buf_size
(the actual size of log_sys.buf) differently.

log_sys.disabled: The current setting of innodb_log_file_disabled.

log_t::append_prepare(): Instead of referring to file_size or
capacity() for mmap=true, always refer to buf_size.
When log_sys.disabled holds, log_sys.buf may be much smaller than
log_sys.file_size. Its size is always reflected by log_sys.buf_size.

log_t::attach(): Handle log_sys.disabled.

log_t::disable(): Implements SET innodb_log_file_disabled=ON.
Even if the log used to be in persistent memory, here we will
set up dummy log_sys.buf and log_sys.flush_buf so that the dummy
writes will appear to use file based writes.

log_t::skip_write_buf(): A dummy log writer implementation that is
used when log_sys.disabled holds and the log is not being resized.

log_t::resize_abort(): When the log remains disabled,
"persist" all the log and advance the group_lock and flush_lock
to the current LSN, just like log_t::disable() does.

log_t::resize_start(): Handle log_sys.disabled, that is,
SET GLOBAL innodb_log_file_disabled=OFF when the redo log had
previously been disabled.  If we are on persistent memory,
we will "fake" the dummy log_sys.buf to appear as memory-mapped
as well, so that log_t::resize_write() and log_t::resize_write_buf()
can assume that both log files are of the same type (memory-mapped
or file-based).  The dummy log_sys.flush_buf will be stored in
log_sys.resize_flush_buf in that case.  When moving from memory-mapped
to a regular log file, we will allocate log_sys.checkpoint_buf.
It will be freed in log_t::close().

log_t::resize_rename(): When innodb_log_group_home_dir
is changed between file systems, handle the non-atomic
replacement of the log file in a special way.  For a moment,
a recoverable ib_logfile0 will exist in both locations.

log_t::resize_write(): Detect memory-mapped log by
!resize_log.is_opened().  If the memory-mapped log is being re-enabled,
log_sys.resize_flush_buf may temporarily store the value of a dummy
log_sys.flush_buf.  During any log resizing or disabling or enabling,
both buf and resize_buf must appear to be either file-based or
memory-mapped.

log_t::write_buf(), log_write_up_to(): Handle the special case that
disable() executed or resize_start() started re-enabling the log while
we were waiting for flush_lock or write_lock. In the latter case,
log_sys.writer will be changed from log_t::skip_write_buf to
log_writer_resizing during the execution of log_write_up_to().

log_t::persist(): Skip the writes if the log is disabled, that is,
a memory-mapped log is in the process being re-enabled. In this case,
we cannot trust log_sys.file_size, and the pmem_persist() could be
invoked on an invalid address range.

log_resize_acquire_group(): Acquier the group locks for write and flush.

log_resize_release_group(): Release the group locks for write and flush.

log_resize_acquire(): Return whether the group locks were elided.

log_write_and_flush_prepare(), log_write_and_flush(): Protect also the
log_sys.is_mmap() case with write_lock and flush_lock, in order to
prevent a race condition between mtr_t::commit_file() and
log_t::disable().

log_t::persist(): Remove the assertions about not holding write_lock or
flush_lock.  We will hold them during DDL operations.
Thirunarayanan Balathandayuthapani
MDEV-36017 Alter table aborts when temporary directory is full

Problem:
=======
- During inplace algorithm, concurrent DML fails to write
the log operation into the temporary file. InnoDB fail to
mark the error for the online log.

- ddl_log_write() releases the global ddl lock prematurely before
release the log memory entry

Fix:
===
row_log_online_op(): Mark the error in online log when
InnoDB ran out of temporary space

fil_space_extend_must_retry(): Mark the os_has_said_disk_full
as true if os_file_set_size() fails

btr_cur_pessimistic_update(): Return error code when
btr_cur_pessimistic_insert() fails

ddl_log_write(): Release the global ddl lock after releasing the
log memory entry when error was encountered

btr_cur_optimistic_update(): Relax the assertion that
blob pointer can be null during rollback because InnoDB can
ran out of space while allocating the external page

row_undo_mod_upd_exist_sec(): Remove the assertion which says
that InnoDB should fail to build index entry when rollbacking
an incomplete transaction after crash recovery. This scenario
can happen when InnoDB ran out of space.

row_upd_changes_ord_field_binary_func(): Relax the assertion to
make that externally stored field can be null when InnoDB ran out
of space.
Aleksey Midenkov
MDEV-25158 Segfault on INTERSECT ALL with UNION in Oracle mode

Oracle mode has different set operator precedence and handling (not by
standard). In Oracle mode the below test case is handled as-is, in
plain order from left to right. In MariaDB default mode follows SQL
standard and makes INTERSECT prioritized, so UNION is taken from
derived table which is INTERSECT result (here and below the same
applies for EXCEPT).

Non-distinct set operator (UNION ALL/INTERSECT ALL) works via unique
key release but it can be done only once. We cannot add index to
non-empty heap table (see heap_enable_indexes()). So every UNION ALL
before rightmost UNION DISTINCT works as UNION DISTINCT. That is
common syntax, MySQL, MSSQL and Oracle work that way.

There is union_distinct property which indicates the rightmost
distinct UNION (at least, so the algorithm works simple: it releases
the unique key after union_distinct in the loop
(st_select_lex_unit::exec()).

INTERSECT ALL code (implemented by MDEV-18844 in a896beb) does not
know about Oracle mode and treats union_distinct as the last
operation, that's why it releases unique key on union_distinct
operation. INTERSECT ALL requires unique key for it to work, so before
any INTERSECT ALL unique key must not be released (see
select_unit_ext::send_data()).

The patch tweaks INTERSECT ALL code for Oracle mode. In
disable_index_if_needed() it does not allow unique key release before
the last operation and it allows unfold on the last operation. Test
case with UNION DISTINCT following INTERSECT ALL at least does not
include invalid data, but in fact the whole INTERSECT ALL code could
be refactored for better semantical triggers.

The patch fixes typo in st_select_lex_unit::prepare() where
have_except_all_or_intersect_all masked eponymous data member which
wrongly triggered unique key release in st_select_lex_unit::prepare().

The patch fixes unknown error in case ha_disable_indexes() fails.

Note: optimize_bag_operation() does some operator substitutions, but
it does not run under PS. So if there is difference in test with --ps
that means non-optimized (have_except_all_or_intersect_all == true)
code path is not good.

Note 2: VIEW is stored and executed in normal mode (see
Sql_mode_save_for_frm_handling) hence when SELECT order is different
in Oracle mode (defined by parsed_select_expr_cont()) it must be
covered by --disable_view_protocol.
Jan Lindström
MDEV-36622 : Hang during galera_evs_suspect_timeout test

Test changes only. Add wait_condition so that all nodes
are in the expected state and add debug output if issue
does reproduce.

Signed-off-by: Julius Goryavsky <[email protected]>
Marko Mäkelä
MDEV-36868: Inconsistency when shrinking innodb_buffer_pool_size

buf_pool_t::resize(): After successfully shrinking the buffer pool,
announce the success. The size had already been updated in shrunk().
After failing to shrink the buffer pool, re-enable the adaptive
hash index if it had been enabled.

Reviewed by: Debarun Banerjee
Jan Lindström
MDEV-36512 : galera_3nodes.GCF-354: certification position less than last committed

Test changes only. Both warnings are expected and
should be suppressed because we intentionally inject
different inconsistencies on two nodes and then join
them back with membership change.

Signed-off-by: Julius Goryavsky <[email protected]>
Monty
Fixed compiler issues when compiling with UBSAN

Updated also BUILD/compile-pentium64-ubsan to use -Wno-unused-parameter
to get rid of compiler warnings
Alexander Barkov
MDEV-20022 sql_mode="oracle" does not support TO_NUMBER() function

In progress
Apostolis Stamatis
MDEV-29499 Improving the 'Can't execute init_slave query' error message with the actual failure

Currently, there are multiple error codes reported for the issue
'Can't execute init_slave query'. Those error codes are the underlying
reason the init_slave query cannot be executed, but this makes it
difficult to detect the issue in an automated way.

This patch introduces a new error code, ER_INIT_SLAVE_ERROR, to unify
all the errors related to the init_slave query. The ER_INIT_SLAVE_ERROR
error is raised for any issue related to the init_slave query, and the
underlying error code and message are included in the Last_SQL_Error
field.

Reviewed by:
Jimmy Hu <[email protected]>
Brandon Nesterenko <[email protected]>
Alexander Barkov
MDEV-20022 sql_mode="oracle" does not support TO_NUMBER() function

In progress
Marko Mäkelä
MDEV-36886 log_t::get_lsn_approx() isn't lower bound

If the execution of the two reads in log_t::get_lsn_approx() is
interleaved with concurrent writes of those fields in
log_t::write_buf() or log_t::persist(), the returned approximation
will be an upper bound. If log_t::append_prepare_wait() is pending,
the approximation could be a lower bound.

We must adjust each caller of log_t::get_lsn_approx() for the
possibility that the return value is larger than
MAX(oldest_modification) in buf_pool.flush_list.

af_needed_for_redo(): Add a comment that explains why the glitch
is not a problem.

page_cleaner_flush_pages_recommendation(): Revise the logic for
the unlikely case cur_lsn < oldest_lsn.  The original logic would have
invoked af_get_pct_for_lsn() with a very large age value, which
would likely cause an overflow of the local variable lsn_age_factor,
and make pct_for_lsn a "random number".  Based on that value,
total_ratio would be normalized to something between 0.0 and 1.0.
Nothing extremely bad should have happened in this case;
the innodb_io_capacity_max should not be exceeded.
Oleksandr Byelkin
Make it compiling with last gcc
Jan Lindström
MDEV-36627 : galera.MDEV-29142: certification position less than last commited

After the membership change on a newly synced node, then this is just a
warning and safe to suppress.

Signed-off-by: Julius Goryavsky <[email protected]>
Marko Mäkelä
Merge 10.6 into 10.11
Daniel Black
MDEV-36337: mroonga_* udf correct ptr types for is_null/error

Shows up in mroonga UDF tests under clang with UBSAN:

UndefinedBehaviorSanitizer: function-type-mismatch

Accepted upstream: https://github.com/mroonga/mroonga/pull/902
Alexander Barkov
MDEV-20022 sql_mode="oracle" does not support TO_NUMBER() function

In progress
Aleksey Midenkov
MDEV-36817 Server crashes in do_mark_index_columns instead of
  ER_DUP_ENTRY on partitioned table

Now as c1492f3d077 (MDEV-36115) restores m_last_part table->file
points to partition p0 while the error happens in p1, so error index
does not match ib_table in innobase_get_mysql_key_number_for_index().

This case is handled by separate code block in
innobase_get_mysql_key_number_for_index() which was wrong on using
secondary index for dict_index_is_auto_gen_clust() and it was not
covered by the tests.
Aleksey Midenkov
MDEV-33675 Assertion(reclength < vreclength) in setup_vcols_for_repair()

When table2myisam() prepares recinfo structures BIT field was skipped
because pack_length_in_rec() returns 0. Instead of BIT field
DB_ROW_HASH_1 field was taken into recinfo structure and its length
was added to reclength. This is wrong because not stored fields must
not be prepared as record columns (MI_COLUMNDEF) in storage
layer. 0-length fields are prepared in "reserve space for null bits"
branch.

The problem only occurs with tables where there is no data for the
main record outside of the null bits.

The fix updates minpos condition so we avoid fields after
stored_rec_length and these are not stored by
definition. share->reclength already includes not stored lengths from
CREATE TABLE so we cannot use it as minpos starting point.

In Aria there is no "reserve space for null bits" and it does not
create column definition for BIT. Also there is no
setup_vcols_for_repair() to reproduce the issue. But nonetheless it
creates column definition for not stored fields redundantly, so we
patch table2maria() as well. The test case for Aria tries to
demonstrate BIT field works, it does not reproduce any issues (as
redundant column definition for not stored field seem to not cause any
problems).
Daniel Black
MDEV-36337: connect UDF pointers need unsigned char* for is_null/error

This is required to match the sql/sql_udf.h
Thirunarayanan Balathandayuthapani
MDEV-36487  Fix ha_innobase::check() for sequences

InnoDB does the following check for sequence table during check
table command:
- There should be only one index should exist on sequence table
- There should be only one row should exist on sequence table
- The leaf page must be the root page for the sequence table
- Delete marked record should not exist
- DB_TRX_ID and DB_ROLL_PTR of the record should be 0 and 1U << 55