This repository has been archived by the owner on Feb 10, 2023. It is now read-only.
forked from percona/percona-server
-
Notifications
You must be signed in to change notification settings - Fork 69
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reviewed by: Pavan <pavan.naik@oracle.com> over the IM
…SISTENCY_VIOLATION' Description ----------- The assertion with failing condition `!thd->has_gtid_consistency_violation`, in file `sql/rpl_gtid_execution.cc:91`, function `bool set_gtid_next(THD*, const Gtid_specification&)`, is generated while executing a DDL statement, on a temporary table, imediately after `XA PREPARE`. Analysis -------- In `gtid_pre_statement_post_implicit_commit_checks()`, a GTID consistency violation is identified and the appropriate flags and counters are updated. However, if the statement fails to execute, the given flags and counters remain untouched, as if the statement successfully executed. Fix --- When a statement fails to execute, the `THD::has_gtid_consistency_violation` the GTID violation counters should be restored to the values prior to the execution attempt, by invoking `gtid_state->end_gtid_violating_transaction` after the failure.
If we look at mysqld_exit(), we will see that shutdown_performance_schema() is always invoked before exit(), what means global mutexes like tokudb_map_mutex are always destroyed after perfomance schema shutdown, what causes SIGFAULT on some platforms(debian wheeze in particular). There are two cases: 1) global mutexes in TokuDB storage engine The fix is in deinitialization of global mutexes explicitly from storage engine shutdown function, which is always invoked before PFS shutdown. 2) global mutexes in PerconaFT There also must be separate patch for PerconaFT to fix it. The fix is in invoking ydb-layer deinitialization function explicitly from storage engine shutdown function.
…ncrypt_tables Problem: -------- Optimizer temporary tables (aka Intrinsic temp table) encryption attribute is based on innodb_encrypt_tables. So when innodb_encrypt_tables is ON and innodb_temp_tablespace_encrypt is OFF, queries that use disk temp storage engine will fail. For example statements that use GROUP BY, ORDER BY, INSERT SELECT, etc will fail. Fix: ---- Intrinsic temp tables should derive encryption attribute from temporary tablespace property and not rely on innodb_encrypt_tables
PS-4727 - intrinsic temp table behaviour shouldn't depend on innodb_e…
…d false are valid. - s/TRUE/true s/FALSE/false and minor conditional corrections for true bool types (no my_bool changes).
PS-4711: crash on TokuDB PFS-instrumented mutexes deinitialization
Problem: It is regression of Bug #27753193 fix. If the table holds innodb generated GEN_CLUST_INDEX and duplicate entry for other column. And then alter statement add primary key (on column having duplicate entry) and a fts index then m_prebuilt->trx->error_key_num is set to ZERO and DB_DUPLICATE_KEY error is return from row_merge_read_clustered_index(). And when key_info_buffer is accessed through m_prebuilt->trx->error_key_num as index, it leads to segmentation fault. Fix: Added a check if m_prebuilt->trx->error_key_num equal to ZERO. RB: #20221 Reviewed by : jimmy.yang@oracle.com
Merge branch 'mysql-5.6' into mysql-5.7
…D_COMPILE_FLAGS".' Build was broken for gcc-8 and misc WITH_XXX=system. The fix is to always include compile_flags.cmake Change-Id: Id6a85a7f379530f4284c2188ff9279d4adffffa2
…PL_MEMBER_CHANGE MSG Problem: COMMA GETS ADDED FOR OFFLINE MEMBERS Description: While displaying active members of the group during view change only ONLINE or RECOVERING members are considered for display. Members are separated by COMMA. When member is not ONLINE or RECOVERING member is not considered to display as group member but COMMA still gets added to the string output. Resolution: Removed condition to display information of all members in error log message.
…OFF IN MULTI MASTER MODE Problem: Group_member_info does not initliaze conflict_detection_enable correctly Description: conflict_detection_enable is used during changes in group w.r.t primary membership. Before actual usage functions: void Certifier::enable_conflict_detection() and void Certifier::disable_conflict_detection() initializes the variable conflict_detection_enable with correct value. So the variable working and init during object creation does not impact the working of GR. This changes just correct the initialization though the variable is not accessed. Resolution: Group_member_info initialization made same as done in certifier.
[PS-4546] Set unlimited TimeoutSec for ubuntu/debian
PS-4561: Read after free at Binlog_crypt_data::load_latest_binlog_key()
PS-4722: Use clang-format-5.0 for TravisCI (5.7)
…AKS (post-fix) Problem ------- The method Gcs_xcom_state_exchange::process_member_state overwrites an owned pointer without deleting it first, so it leaks. Solution -------- If it exists, delete the existing pointer before overwriting it. Reviewed-by: Andre Negrao <andre.negrao@oracle.com> Reviewed-by: Tiago Jorge <tiago.jorge@oracle.com> RB: 20141
…undefined - Fix various places where macros are redefined or used when undefined-
Rewrite some innodb tests to ignore ASAN failures. This is a backport from 8.0 Change-Id: I6229bd5a3b6ed60851b87f0ebae5fbc307a67222
1. Remove `osx_image: xcode9.3` to use default version of XCode (which is 9.4 now for Travis, and 10.0 is in beta). 2. Add `allow_failures:` for the `clang-format` job. When only `clang-format` will fail the whole build still will be green. 3. Use `timeout` command to stop Travis build at 46/116 min (developers/percona) to allow to write `ccached` files.
Rn 5.5.62 38.14 5.7
Ps 5.7 5033 5034
PS-4532 : Replace obsolete HAVE_purify with HAVE_VALGRIND in ha_rocks…
https://jira.percona.com/browse/PS-4709 *** Updated man pages from MySQL Server 5.7.24 source tarball. *** Updated 'scripts/fill_help_tables.sql' from MySQL Server 5.7.24 source tarball.
Release 5.7.23 25
[BLD-1013] SELinux messages for Percona Server 5.7
- This is not a simple test failure, it is a regression introduced as a part of the native partitioning implementation. The handler::delete_table method takes in a 'database.table' name in the expanded/converted format of the file system character set or fscs. The character set has file system special characters expanded into '@xxxx' format so a '.' in a database or table name is represented as a '@002e' in the expanded name. The delete_table method needs to determine if the table is partitioned or not. It does this through the helper function native_part::get_part_str_for_table in sql/partitioning/partition_base.cc by parsing, then building the filename of the .frm file so that it can open and read partition info. This parsing makes use of the function build_table_filename in sql/sql_table.cc. The build_table_filename function expects that the given database and table names are in system charset and again, encodes these into the fscs, therefore double encoding the database and table name into something that does not exist and can not be opened or read from. This results in delete_table returning ERR_TABLE_CORRUPT to the server which then complains that it can't DROP the database because it can't properly remove all of the tables within. - Since there seems to be no other obvious helper function to take the database.table name in fscs encoding and turn it into a proper fully qualified path to the .frm file, we need to extend the flag set and functionality of build_table_filename that allows us to compose the full path but without the additional encoding. - This is already covered by the test which revealed the issue within rocksdb.show_table_status so no new test is implemented.
…ged during runtime audit_log_rotations and audit_log_rotate_on_size were messed up when set at runtime.
* 5.6-ps-4950: PS-4950: Invalid audit log file size when audit_log_rotations is changed during runtime
Fix PS-4950 in 5.7
https://jira.percona.com/browse/PS-4709 *** Our fix in for PS-3937 "Some file operations in mf_iocache2.c are not instrumented" (https://jira.percona.com/browse/PS-3937) (commit b9deeac) left intact as it is identical to the upstream fix for Bug #27788907 / #90264 "Some file operations in mf_iocache2.c are not instrumented" (https://bugs.mysql.com/bug.php?id=90264) (commit mysql/mysql-server@bac287c). Only formatting changes. *** Our fix for PS-1134 "LP #1739734: Federated table returns error 1430 from storage engine" (https://jira.percona.com/browse/PS-1134) (commit 78a728f) left intact as it is identical to the upstream fix for Bug #27493633 / #89537 "Regression in FEDERATED storage engine after GCC 7 fixes" (https://bugs.mysql.com/bug.php?id=89537) (commit mysql/mysql-server@b15b4ac). Only formatting changes. *** The fix for Oracle's Bug #27799513 "POTENTIAL DOUBLE FREE OR CORRUPTION OF HEAP INFO (HP_INFO)" (commit mysql/mysql-server@22e99fc) re-applied to Percona's extended Heap Storage Engine. 'main.heap_btree' MTR test case extended with additional checks for this issue. *** Our fix for PS-4513 "Inconsistent SELECT...ORDER BY results with euckr charset / euckr_bin collation" (https://jira.percona.com/browse/PS-4513) (commit 919b2c8) left intact as it is identical to the upstream fix for Bug #28104394 / #91032 "InnoDB 5.7 Primary key scan lack data" (https://bugs.mysql.com/bug.php?id=91032) (commit mysql/mysql-server@94208bc) and Bug #91091 "Inconsistent SELECT...ORDER BY results with euckr charset / euckr_bin collation" (https://bugs.mysql.com/bug.php?id=91091). Our MTR test case 'innodb.bug91091' left as is. *** Reverted 'xdr_utils.h' part of our fix for PS-3767 "LP #1738417: Fix compilation warnings/errors with clang" (https://jira.percona.com/browse/PS-3767) (commit 320473c) in favor of the upstream fix for the Bug #28099963 / #91071 (https://bugs.mysql.com/bug.php?id=91071) (commit mysql/mysql-server@1f610f7). *** Re-recorded 'innodb.xtradb_compressed_columns_mysqldump' and 'innodb.xtradb_compressed_columns_with_dictionaries' MTR test cases because of the changed error code values. *** Re-recorded 'main.mysqlshow' MTR test case: added missing 'INNODB_TABLESPACES_SCRUBBING' into the list of known tables. This should have been done when 'scrubbing' was merged. *** Fixed and re-recorded 'main.percona_heap_blob' MTR test case because of the new warning added in the fix for the upstream Bug #27788685 / #90266 "No warning when truncating a string with data loss" (https://bugs.mysql.com/bug.php?id=90266) (commit mysql/mysql-server@1501557). *** Re-recorded 'innodb.general_ts_encrypt' and 'innodb.percona_force_encryption' MTR test cases because of the new warning introduced in WL #11571 "Deprecate Shared tablespaces in partitioned table" (commit mysql/mysql-server@e08dee47). *** Re-recorded 'main.mysqldump' MTR test case because of the rocksdb-related changes done previously. *** Added 'innodb.bug88747' MTR test case for Bug #27216817 / #88747 "InnoDB: Failing assertion: prebuilt->table->n_mysql_handles_opened == 1" fixed in 5.5.60, 5.6.40, 5.7.22, 8.0.11 (commit mysql/mysql-server@c0b4d74). Adding a unique index to an InnoDB table on which multiple locks were held could raise an assertion. *** Added 'main.bug88781' MTR test case for Bug #26881798 / #88781 "handle_fatal_signal (sig=11) in replace_db_table" fixed in 5.5.60, 5.6.40, 5.7.22, 8.0.4 (commit mysql/mysql-server@9e1035c). Dropping an index from a system table could cause a server exit. *** Added 'innodb.bug88782' MTR test case for Bug #27225649, #27229072 / #88782 "Failing assertion: prebuilt->sql_stat_start || prebuilt->select_lock_type != LOC" fixed in 5.5.60, 5.6.40, 5.7.22, 8.0.11 (commit mysql/mysql-server@ddaf0f1). InnoDB: A REPLACE operation on a temporary table raised an assertion. *** Added 'main.bug88800' MTR test case for Bug #27230925 / #88800 "handle_fatal_signal (sig=11) in show_routine_grants" fixed in 5.5.61, 5.6.41, 5.7.23, 8.0.12 (commit mysql/mysql-server@6d570d7). Mishandling of internal privilege structures could cause a server exit. *** Added 'main.bug83739' MTR test case for Bug #25062396 / #83739 "Assertion `cur_shape != Gcalc_function::shape_point' failed." fixed in 5.6.39, 5.7.21, 8.0.4 (commit mysql/mysql-server@b5323d156da) (commit mysql/mysql-server@180adbe271e). For geometry calculations, invalid input parameters could lead to an incorrect result buffer and cause an assertion to be raised or a server exit. *** Added 'innodb.bug79821' MTR test case for Bug #22486025 / #79821 "InnoDB: Failing assertion: key_len != 0 || find_flag != HA_READ_KEY_EXACT" fixed in 5.7.21, 8.0.4 (commit mysql/mysql-server@1a13f7f) A "wrong key column" error was added to address an unsupported index creation scenario. *** VERSION raised to "5.7.24-26". univ.i version raised to "26". *** This merge also fixes PS-1017 "LP #1631816: slave replication breaks after bug #74145 happens in master" (https://jira.percona.com/browse/PS-1017) as corresponding upstream Bug #24786290 / #83232 "replication breaks after bug #74145 happens in master" (https://bugs.mysql.com/bug.php?id=83232) was fixed in 5.7.24 (commit mysql/mysql-server@4a3761a) (commit mysql/mysql-server@093c654). Replication: When FLUSH statements for specific log types (such as FLUSH SLOW LOGS) resulted in an error, the statements were still written to the binary log. This stopped replication because the error had occurred on the master, but did not occur on the slave. MySQL Server now checks on the outcome of these FLUSH statements, and if an error occurred, the statement is not written to the binary log.
https://jira.percona.com/browse/PS-4709 Reverted mysql/mysql-server@e93e8db "Bug#28505638 REWRITE INNODB TESTS TO IGNORE EXPECTED ASAN ERRORS" because it just suppresses ASan errors instead of fixing them. See Bug #93164 "Memory leak in innochecksum utility detected by ASan" (https://bugs.mysql.com/bug.php?id=93164), Bug #93165 "Memory leak in sync_latch_meta_init() after mysqld shutdown detected by ASan" (https://bugs.mysql.com/bug.php?id=93165) and Bug #92131 "ASan: Direct leak of 272 byte(s) in main.mysqlpump_partial_bkp MTR test case" (https://bugs.mysql.com/bug.php?id=92131).
Merge upstream 5.7.24 into Percona Server
PS-5035 : rocksdb.show_table_status: 1051: Unknown table 'db_new'
- Regression introduced by PS-4811 at commit 23c0a72 Fixed minor regression and introduced test case that exposed it. - Will be cherry-picked to 8.0, GCA point is earlier than commit introducing regression.
PS-4951: Post push fix. Many libc-related Valgrind errors on CentOS7 (5.7)
Fix issue in `innodb_buffer_pool_size_validate` when ```srv_buf_pool_size == static_cast<ulint>(intbuf)``` leads to ```*static_cast<longlong *>(save) = requested_buf_pool_size;``` is not called at all. Then there is an uninitialized read of var->save_result in innodb_buffer_pool_size_update.
PS-5084: innodb_buffer_pool_size is an uninitialized variable (5.7)
PS-5056 : handle_fatal_signal (sig=11) in ha_tokudb::write_row
Merge remote-tracking branch 'percona/releaes-5.7.24-26'
TCeason
pushed a commit
to TCeason/tokudb
that referenced
this pull request
Jun 17, 2019
…E TO A SERVER Problem ======================================================================== Running the GCS tests with ASAN seldomly reports a user-after-free of the server reference that the acceptor_learner_task uses. Here is an excerpt of ASAN's output: ==43936==ERROR: AddressSanitizer: heap-use-after-free on address 0x63100021c840 at pc 0x000000530ff8 bp 0x7fc0427e8530 sp 0x7fc0427e8520 WRITE of size 8 at 0x63100021c840 thread T3 #0 0x530ff7 in server_detected /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:962 #1 0x533814 in buffered_read_bytes /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:1249 #2 0x5481af in buffered_read_msg /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:1399 xelabs#3 0x51e171 in acceptor_learner_task /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:4690 xelabs#4 0x562357 in task_loop /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/task.c:1140 xelabs#5 0x5003b2 in xcom_taskmain2 /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:1324 xelabs#6 0x6a278a in Gcs_xcom_proxy_impl::xcom_init(unsigned short, node_address*) /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xcom_proxy.cc:164 xelabs#7 0x59b3c1 in xcom_taskmain_startup /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xcom_control_interface.cc:107 xelabs#8 0x7fc04a2e4dd4 in start_thread (/lib64/libpthread.so.0+0x7dd4) xelabs#9 0x7fc047ff2bfc in __clone (/lib64/libc.so.6+0xfebfc) 0x63100021c840 is located 64 bytes inside of 65688-byte region [0x63100021c800,0x63100022c898) freed by thread T3 here: #0 0x7fc04a5d7508 in __interceptor_free (/lib64/libasan.so.4+0xde508) #1 0x52cf86 in freesrv /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:836 #2 0x52ea78 in srv_unref /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:868 xelabs#3 0x524c30 in reply_handler_task /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:4914 xelabs#4 0x562357 in task_loop /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/task.c:1140 xelabs#5 0x5003b2 in xcom_taskmain2 /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:1324 xelabs#6 0x6a278a in Gcs_xcom_proxy_impl::xcom_init(unsigned short, node_address*) /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xcom_proxy.cc:164 xelabs#7 0x59b3c1 in xcom_taskmain_startup /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xcom_control_interface.cc:107 xelabs#8 0x7fc04a2e4dd4 in start_thread (/lib64/libpthread.so.0+0x7dd4) previously allocated by thread T3 here: #0 0x7fc04a5d7a88 in __interceptor_calloc (/lib64/libasan.so.4+0xdea88) #1 0x543604 in mksrv /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:721 #2 0x543b4c in addsrv /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:755 xelabs#3 0x54af61 in update_servers /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:1747 xelabs#4 0x501082 in site_install_action /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:1572 xelabs#5 0x55447c in import_config /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/site_def.c:486 xelabs#6 0x506dfc in handle_x_snapshot /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:5257 xelabs#7 0x50c444 in xcom_fsm /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:5325 xelabs#8 0x516c36 in dispatch_op /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:4510 xelabs#9 0x521997 in acceptor_learner_task /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:4772 xelabs#10 0x562357 in task_loop /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/task.c:1140 xelabs#11 0x5003b2 in xcom_taskmain2 /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:1324 xelabs#12 0x6a278a in Gcs_xcom_proxy_impl::xcom_init(unsigned short, node_address*) /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xcom_proxy.cc:164 xelabs#13 0x59b3c1 in xcom_taskmain_startup /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xcom_control_interface.cc:107 xelabs#14 0x7fc04a2e4dd4 in start_thread (/lib64/libpthread.so.0+0x7dd4) Analysis ======================================================================== The server structure is reference counted by the associated sender_task and reply_handler_task. When they finish, they unreference the server, which leads to its memory being freed. However, the acceptor_learner_task keeps a "naked" reference to the server structure. Under the right ordering of operations, i.e. the sender_task and reply_handler_task terminating after the acceptor_learner_task acquires, but before it uses, the reference to the server structure, leads to the acceptor_learner_task accessing the server structure after it has been freed. Solution ======================================================================== Let the acceptor_learner_task also reference count the server structure so it is not freed while still in use. Reviewed-by: André Negrão <andre.negrao@oracle.com> Reviewed-by: Venkatesh Venugopal <venkatesh.venugopal@oracle.com> RB: 21209
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.