Skip to content

FB8-267: porting Add exponential backoff for smart restart #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 503 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
503 commits
Select commit Hold shift + click to select a range
b891812
Porting gradual write throttling and configurable throttle dimensions…
Rahul-Singhal Mar 18, 2021
70d32a4
2x integer key decoding perf
yizhang82 Oct 18, 2020
fec83cd
Faster value decoding
yizhang82 Oct 24, 2020
e055715
Improve count(*) performance and fix index merge bug
yizhang82 Dec 13, 2020
66cce4a
Skip decoding completely during count and improve SK count perf by 20x
yizhang82 Feb 5, 2021
c2c79ad
Fix memory bloat in my_core::handler
atish2196 Mar 22, 2021
b6d3698
allow install/uninstall plugin when enable_super_log_bin_read_only is…
luqun Mar 20, 2021
0b9b1b1
fix raft change string metadata event
luqun Apr 1, 2021
f8320c8
Integrate rocksdb fault injection framework with myrocks
atish2196 Mar 23, 2021
0b209cd
Setting read only during shutdown
abhinav04sharma Jan 23, 2021
e55d65b
Add exponential backoff for smart restart
li-chi Mar 26, 2021
f8c4915
Check for errors during inplace_populate_sk
lth Mar 10, 2021
1532190
Return stats from storage engine directly without table open
yizhang82 Feb 24, 2021
7128abc
Allocate a server extension structure for slave_stats_daemon
Rahul-Singhal Mar 31, 2021
4dda232
always release data_lock mutex to avoid deadlock
luqun Apr 6, 2021
523dfe6
Add locking when reading index cardinality in InnoDB
lth Apr 2, 2021
ca3710f
Track RAM usage in temptable shared block
atish2196 Apr 1, 2021
bd75e35
fix Is_semi_sync_slave value in show slave HOSTS
luqun Apr 8, 2021
ffff3d8
correctly calculate binlog index path during binlog_change_to_binlog
luqun Apr 12, 2021
8e83ada
Adds capability to set different BottommostLevelCompaction option for…
rahku Apr 8, 2021
0839ceb
Fix contention in MDL_key::ACL_CACHE
yizhang82 Apr 13, 2021
3941ed7
MySQL Privacy Plugin: Add function to return query attributes
Apr 15, 2021
063e25d
Call thd_wait_* callbacks for admitting new query in thread pool plugin
george-reynya Mar 31, 2021
4ade93b
Avoid deleting plugin connection handler
george-reynya May 6, 2021
a9f6518
Fix --repeat to avoid adding the same options multiple times
george-reynya May 20, 2021
9116a7b
Port COMMIT wait event and admission_control_multiquery_filter to 8.0
george-reynya Jun 2, 2021
2436e1f
Port MTR tests for COMMIT wait event and admission_control_multiquery…
george-reynya Jun 7, 2021
e401725
Fix thread pool tests
george-reynya May 14, 2021
e2e3f95
Add dbug support and worker pool test
george-reynya Jun 17, 2021
d702e53
Add required headers for thread pool plugin
george-reynya May 6, 2021
aa7a2c2
Fix valgrind suppression for thread pool
lth Jul 19, 2021
24fa2ca
Add retry when opening doulewrite buffer
lth Apr 15, 2021
1d76efb
Increase timeout for shutting down the server in rocksdb tests to 60s
Apr 19, 2021
efa755e
Fixing calculation seconds behind master when IO thread is caught up
Dec 1, 2017
f537d2d
INDEX_STATISTICS in MySQL 8.0
iRitwik Apr 5, 2021
f1bf13b
add rename table and database statment as supported high pri
atish2196 Mar 9, 2020
5b06c23
Added new SQL function GET_INDEX_SIZE_BY_PREFIX
Pushapgl Apr 7, 2021
3e04d5c
Add config to disable perfschema table events_statements_summary_by_t…
atish2196 Apr 6, 2021
9da018b
Fix before image when binlog entries are written during idempotent re…
abhinav04sharma Apr 22, 2021
cdae172
Replication lag timestamp occassionally gets updated to now()
Apr 23, 2021
f1f9c05
Changes required for MySQL privacy plugin
Apr 21, 2021
b2ab742
Fix possible asan reported error on rpl_mts.rpl_find_binlog_by_gtid
Apr 26, 2021
bb3333b
Bug#32141711: CAN'T WRITE; DUPLICATE KEY IN TABLE / DUPLICATE ENTRY '…
Jan 8, 2021
effa86c
Skip reading binlog files during show binary logs
Apr 30, 2021
dfde3a2
Make MySQL error code consistent between 5.6.35 and 8.0.20
May 5, 2021
063e23b
Fix export of headers for plugins
george-reynya May 6, 2021
977e3a8
Support showing query digest in SHOW PROCESS LIST
yizhang82 Oct 28, 2020
bb693a4
Support show_query_digest with SHOW ENGINE STATUS
yizhang82 Feb 14, 2021
3734e3a
amend MySQL to support the PPF SQL cache
mzait May 6, 2021
83d6709
Add error message for purpose policy check fail
May 7, 2021
04706c0
Add new THD function to populate query response attribute
May 12, 2021
b0452e8
Fix incorrect bloom filter full key check
yizhang82 Mar 20, 2021
25acebd
Adding --malloc-conf option in mysqld_safe
yoshinorim May 14, 2021
2c21817
Update Rocksdb submodule to 6.25.fb
inikep Oct 22, 2021
97b927d
Fix SELECT COUNT(*) FOR UPDATE
yizhang82 May 16, 2021
b43aed1
Allocate PFS_table_io_stat on-demand instead of always MAX_INDEXES + 1
yizhang82 May 1, 2021
e8e211f
Support gap lock logging in sql_findings
mzait May 14, 2021
ff0bcfe
Consolidate rnd_init/rnd_next/rnd_end into index_* functions
lth Aug 25, 2020
7b550c7
Add variable to prevent serializing legacy json types
lth May 19, 2021
5228381
Enforce --order-by-primary-key if --rocksdb-bulk-load is specified
Pushapgl Apr 29, 2021
cdb6165
Merge index scan with index reads
lth Aug 26, 2020
faa6b0f
Add variable to enable/disable PFS_histogram for MT stats
yizhang82 May 18, 2021
30c0093
Aborting process on all RDB_IO_ERROR_TX_COMMIT errors on commit()
yoshinorim May 21, 2021
7b4f043
Combine rnd_next/index_next/position_to_correct_key codepaths
lth Aug 28, 2020
a1f5532
Reset iterator after point lookup
lth Aug 28, 2020
442f6f1
Propagate initial max_db_connections value
george-reynya May 23, 2021
45009c3
Tells raft mode in binlog
li-chi May 25, 2021
d585a73
Gracefully exit mysqld_safe loop during backoff
li-chi May 21, 2021
285d0c8
properly set write throttling params when set via command line
Rahul-Singhal May 25, 2021
760bbf6
add mrr partition support
luqun Dec 24, 2020
cc6c837
Using RocksDB Env API to create / access the corruption marker file.
yang3116 May 21, 2021
8d1d2a6
fix flaky raft testcase
luqun May 28, 2021
a0d4e8e
Fix heap overflow in group_relay_log_name handling
abhinav04sharma May 28, 2021
6fc2f3a
This is the 8.0 port of D28735624
mzait May 28, 2021
bda0df0
Use DBUG_TRACE instead of DBUG_ENTER
luqun Jun 1, 2021
58c9a53
Add bounds checks to response attributes
abal147 May 25, 2021
9b30bde
Delete garbage temp sst files using RocksDB Env API
yang3116 May 25, 2021
2e33d93
check for sql_bin_log = 0 with write throttling
May 26, 2021
06c4aa2
fix memory during MYSQL_BIN_LOG::open_existing_binlog
luqun Jun 2, 2021
d7014eb
add more timeout for asandebug shutdown
luqun Jun 3, 2021
9190496
Using locks in Dump_log methods only when raft is enabled
abhinav04sharma Jun 4, 2021
1c5d66a
Port D27349016 Add low HLC boundary support for transactions to 8.0.20
maxgeorg Jun 1, 2021
fd77bb7
Porting D28003281 "Upper HLC bound support" to 8.0.20.
maxgeorg Jun 1, 2021
46e2288
leader election to be a sync point in the new leader
bhatvinay Jun 5, 2021
70894bf
Track out of order hlc value during slave apply
luqun May 24, 2021
b7cf49d
Add integer_digits.h to installed extra headers
george-reynya Jun 5, 2021
71df384
Add optimizer hint to force group by plans
lth Jun 1, 2021
0ebdafb
add new test fault macros reset_hlc_for_tests
luqun Jun 6, 2021
b917047
Error out SQL thread on out of order opids in raft logs
abhinav04sharma Apr 28, 2021
9faa46f
Consider limit when costing group-by plans
lth Jun 4, 2021
bb93361
Support commit order deadlocks resolution in dependency replication
abhinav04sharma Jun 8, 2021
2ecd0aa
Fallback to TBL mode instead of syncing trxs when errors are encounte…
abhinav04sharma Jun 8, 2021
618c362
Limit memory allocated for FTS table sync messages
Apr 28, 2021
bbf4902
SHOW SLAVE STATUS shows real error
yizhang82 Jun 6, 2021
072a466
Add variable to disable events_wait_summary_by_thread_by_event_name t…
yizhang82 May 22, 2021
1cc5c78
Support SELECT FOR UPDATE SKIP LOCKED / NOWAIT
yizhang82 Jun 6, 2021
edbb05b
Add RENAME TABLE test for x-database RENAME and DROP DATABASE
yizhang82 Jun 6, 2021
b4068f1
Reduce flakiness of rocksdb.optimize_table
Jun 10, 2021
d0cad7f
Add bounds checks to all resp attr code
abal147 Jun 2, 2021
492d0dd
Add MTR tests for privacy plugin
May 14, 2021
676ee8a
MyRocks crashes on pure virtual function when querying rocksdb_trx list
Jun 14, 2021
7101fd6
Use Get for secondary key point lookups
lth Jan 5, 2021
a21e46a
Implement iterator class
lth Jan 4, 2021
e65a8ad
Support parsing index comments for partial indexes
lth Jan 13, 2021
bf8b16b
port dscp_on_socket to 8.0
li-chi Jun 18, 2021
8fc9a6d
remove rpl_dscp_on_socket
li-chi Jun 21, 2021
6bfcb28
Fix two bugs in bypass
lth Jun 21, 2021
13fd01c
Suppress valgrind issue with rocksdb CacheEntryStats
yizhang82 Jun 21, 2021
472a3fa
always use lz4_pic.a for libmysqlclient
luqun Jun 23, 2021
82c9ec7
Add partial index iterator
lth Jan 13, 2021
55ce356
Prematerialize partial indexes during bulk loading
lth Mar 25, 2021
3ecfe97
Move myrocks settings to my.cnf
yizhang82 Jun 24, 2021
7efdf29
Fix sending server_cpu as part of query response attributes
Jun 28, 2021
1f5f2d8
Generate code coverage using suite option
Jun 18, 2021
d23b03e
add GET_COMMITTED_GTIDS for raft
luqun Jul 8, 2021
695d142
raft: skip mts_recovery_groups during start slave
luqun Jun 30, 2021
29c146b
Revert SHARED_LIB_MAJOR_VERSION back
luqun Jun 24, 2021
04faac6
Port mysql_change_user_nonblocking from 8.0.17 to 8.0.20
Jun 28, 2021
5b7a47b
Supporting cancelling manual compactions
yoshinorim Jul 19, 2021
1ce2d35
Fix table names in COLUMN_STATISTICS
iRitwik Jul 12, 2021
f2eadae
Add TABLE_INSTANCE to COLUMN_STATISTICS
iRitwik Aug 19, 2021
934d713
Discount pattern matches that are not prefix matches
iRitwik Aug 4, 2021
35edd61
Fix valgrind error on rpl.rpl_io_thd_wait_for_disk_space
lth Jul 19, 2021
c2df239
Fix invalid MDL wait timeout in replication threads
lth Jul 21, 2021
9c8bcb3
Use iterator interface in bypass
lth Jun 21, 2021
1145704
update RaftListenerCallbackArg struct
luqun Jul 29, 2021
080b18a
Acquire refcount with lock when opening InnoDB tables
lth Jul 28, 2021
d5ce0e3
always check mi during raft_reset_slave
luqun Jul 28, 2021
994f7ab
Fix sample_sqltext built-in memory tracking
yizhang82 Aug 2, 2021
b29a2c1
raft mtr: update rpl_end_raft.inc for disable-raft
luqun Aug 2, 2021
b95f393
Validate expected schema provided from client
lth Jul 27, 2021
0795c91
Fix incorrect test privacy_configerator_policy_fail_open_pes_check_pass
Aug 5, 2021
2acb4e8
include new state function
jkedgar Aug 6, 2021
cb6d0e7
Continue in mysql_real_connect_nonblocking while more to be done
jkedgar Aug 5, 2021
bba5518
Reserve errno for discovery failures
abal147 Aug 10, 2021
fd37236
Suppress mtr warnings around SO_SNDBUF
Aug 11, 2021
4acce75
fix master_uuid
li-chi Aug 11, 2021
21adc5d
Add ctest_preload option to mysql-test-run.pl
Aug 12, 2021
8b8c8c5
move the new error from messages_to_error_log.txt to messages_to_clie…
mzait Aug 18, 2021
08d99bb
Avoid considering skip scan keys in queries with large IN lists
lth Aug 19, 2021
28e8160
Stabilize rocksdb.drop_table3 and rocksdb.truncate_table3
lth Aug 19, 2021
9926d16
Force primary index if all keys of have equality predicates
Aug 19, 2021
7d55f60
Adding MTR test for verify result attributes set for Privacy
aditya-jalan Aug 19, 2021
9b2f86e
Adding new option to slave_type_conversions to allow non-truncated co…
abhinav04sharma Aug 25, 2021
669b605
Optimize sql_id hash calculation for write throttling
Rahul-Singhal Aug 17, 2021
5234c8e
Return the list of read and write tables in the query response attrib…
mzait Aug 24, 2021
eb042a3
fix flaky rocksdb.rocksdb_table_stats_sampling_pct_change
luqun Aug 24, 2021
2a58eed
incorrect File_size value in show raft logs result
luqun Aug 4, 2021
ec16651
Add initial support for skycastle
yizhang82 Aug 27, 2021
601ccd7
MTR tests for privacy plugin to have a global enable/disable sysvar
aditya-jalan Aug 23, 2021
0413b62
Add support for swapping index in FORCE INDEX via variable
lth Aug 26, 2021
779350a
add cmd_line flag to dscp_on_socket
li-chi Aug 27, 2021
bc00b53
fix broken mtr test because of dscp_on_socket
inikep Oct 29, 2021
4270972
Exclude automation queries so they cannot be throttled by replication…
Rahul-Singhal Aug 26, 2021
6fb8627
Add gtid_purged_for_tailing
li-chi Jun 24, 2021
d5d345f
Fixes to commit order deadlock handling
abhinav04sharma Aug 30, 2021
5916064
Avoiding unnecessary reseeks in primary key iterator
lth Aug 31, 2021
9e1cda6
Disable concurrency ticket when ACL CACHE lock is acquired in exclusi…
Pushapgl Aug 31, 2021
bd2b5ec
Not counting BI inconsistency when the string values for the cols are…
abhinav04sharma Sep 1, 2021
64cea79
Crash mysqld in case of page corruption
Pushapgl Sep 2, 2021
c21f916
Add another bypass PK lookup scenario
yizhang82 Jun 22, 2021
9997d06
Fixes read-only check in per_user_session_var_default_val
yizhang82 Jul 17, 2021
a0eaede
Fix BKA when using RocksDB MultiGet
lth Sep 10, 2021
a5a4071
disable skip_setup_replica_if_unnecessary
luqun Sep 8, 2021
4d5826b
Add options include-gtids-from-file and exclude-gtids-from-file to my…
Aug 28, 2021
d2ed012
Fix fb_json handling of integers
Sep 17, 2021
3f467fb
Fix flakiness in perfschema.threads_innodb
Sep 17, 2021
ad6591c
Added the sql_text table
Pushapgl Sep 9, 2021
9b7e361
Remove sql storage from PFS_statements_digest_stat
Pushapgl Sep 8, 2021
709776d
Fixed crash in json_extract::val_json
Pushapgl Sep 17, 2021
dd94c3e
latency histograms for raft trx wait
bhatvinay Sep 21, 2021
0aa5ac3
handle cases where clean shutdown in raft aborts trxs
bhatvinay Sep 21, 2021
ad79505
Fix end range handling when prefetching in InnoDB
lth Sep 20, 2021
8ed8daa
30x Faster twis_by_index_usage / 10x faster twis_by_by_table using ha…
yizhang82 Sep 2, 2021
a138e9d
Add support for memory size limits on SQL findings
mzait Sep 26, 2021
ba5a61d
Replace object name (schema, user) in the pfs digest data-structure b…
Pushapgl Sep 10, 2021
708a771
add new variable disable_instant_ddl
luqun Sep 24, 2021
b414738
Disable XA transactions
yizhang82 Sep 23, 2021
11fdf27
SHOW INNODB ENGINE STATUS show query digest for deadlock queries
yizhang82 Sep 24, 2021
1aa2b27
fix crash during binlog purging
bhatvinay Sep 30, 2021
daab451
Used name_id map everywhere instead of id_name map
Pushapgl Sep 29, 2021
a4aa3b2
Reduce overhead of query_sample_text from PFS_statements_digest_stat
Pushapgl Sep 29, 2021
a6221ed
Stop digest stat update if full
Pushapgl Oct 1, 2021
9f6a501
Support disabling deprecation warnings
yizhang82 Oct 1, 2021
61916b5
Only log current row to row_query
Oct 1, 2021
5532db1
Include async_id as a valid attribute to parse
yizhang82 Oct 1, 2021
1f11e36
add basic disable_instant_ddl MTR
luqun Oct 1, 2021
30f521a
Remove check - 0.8% CPU in security_context::has_global_grant in mt_c…
Rahul-Singhal Oct 5, 2021
22ceab1
Make the size of query_sample_text configurable using a server variable
preritj24 Oct 5, 2021
042dc42
Allow duplicate setting in optimizer_switch
Oct 5, 2021
3abfa4e
Fix dlpathlen so that dlpath could be excluded from errmsg
george-reynya Sep 28, 2021
1760bbd
Fixing --skip-flush-master-info perf and relay log info flushing policy
yoshinorim Oct 5, 2021
b74ac44
Support for truncating performance_schema.sql_findings
preritj24 Oct 6, 2021
5e5b842
update flaky rpl_raft_purged_gtids_dump_threads
luqun Sep 8, 2021
cff0345
optimize Rows_query_log_event::has_trx_meta_data()
bhatvinay Oct 7, 2021
0606dc4
Added the test case for multi-query prepared statement
Pushapgl Oct 7, 2021
05dbd2b
Don't crash when setting dscp through service API
abal147 Sep 29, 2021
0b55587
Add CompactionJobStats info into information_schema.rocksdb_compactio…
Oct 6, 2021
7afa09c
Backported Bug#32686116: MYSQL CRASH from mysql-8.0.26
Pushapgl Oct 8, 2021
9ec4613
fix various porting issues in mysql8 (raft) crash recovery
bhatvinay Oct 9, 2021
932a7de
show_raft_status should take LOCK_status
anirbanr-fb Sep 30, 2021
3f932d0
Disallowing reset master on raft replicasets
anirbanr-fb Sep 30, 2021
5f87c5e
Add histograms for binlog fsync and group commit
emersonford Sep 27, 2021
5b8da1b
Setting topology config in MTR
abhinav04sharma Oct 11, 2021
2625f1b
Do not allow sql thread start when raft is doing a stop->{}->start tr…
anirbanr-fb Sep 30, 2021
350a63e
Make FB added client errors consistent across versions
jkedgar Sep 23, 2021
66678e1
add instant flag
luqun Jun 6, 2021
cc173cf
Registering raft followers on mysql side
abhinav04sharma Oct 12, 2021
293f38e
update region for twshared
luqun Oct 13, 2021
5cdbe0b
add db to its default collation cache
luqun Oct 10, 2021
d80164e
Print reserved port range to make port conflict debugging easier
yizhang82 Oct 8, 2021
629d64b
Fixing the clock_gettime regression in slave sql thread.
Pushapgl Oct 12, 2021
f091622
Reduce max backoff time from 24h to 30mins
li-chi Oct 14, 2021
256ae3f
Add MYSQL_OPT_TOS to surface traffic class socket option
Sep 24, 2021
7abab16
Add group commit / engine commit latency histogram
preritj24 Oct 8, 2021
4fef3ab
Reuse computed hash from digest storage as sql-id
preritj24 Oct 15, 2021
1a93578
Add a server variable to bypass admin check to skip throttling write …
Rahul-Singhal Oct 14, 2021
cdfd98b
skip prepare_inner() function when bypass sql is enabled
Oct 6, 2021
3ffbe59
Add query attribute response_attrs_contain_server_cpu
Oct 13, 2021
6145c68
Fix tests for scheduler based thread pool
george-reynya Oct 7, 2021
a1459ad
Stop calling Security_context::has_global_grant() from read queries
yoshinorim Oct 18, 2021
9c42d66
Setting up mysql repl auth info during change master
abhinav04sharma Oct 18, 2021
41899ad
Support disabling events_statements_current
yizhang82 Oct 13, 2021
691701a
Track savepoints in session state changes
yichenshen Oct 14, 2021
409ba3b
Fix destroy_thd() to reset thread local pointer to deleted PSI thread
george-reynya Oct 18, 2021
a3aac25
Better bulk loading tracing
yizhang82 Oct 13, 2021
4b2e1c5
optimize THD::gen_trx_metadata()
bhatvinay Oct 20, 2021
f4b27c8
Disable the clock_gettime call by default for optimizer cputime pfs m…
Pushapgl Oct 15, 2021
1a7388b
Validate inputs for rocksdb_force_flush_memtable_now and force_flush_…
Oct 13, 2021
9b63e42
Extend command api to support OK Metadata
abal147 Sep 30, 2021
4433fbe
Return Session trackers through command API
abal147 Sep 30, 2021
7288656
Improve rpl.rpl_binlog_wait_for_hlc for valgrind testing
Oct 21, 2021
cda2335
Fix deadlocks in Raft due to the upstream behavior change on how linf…
anirbanr-fb Oct 20, 2021
bbecdd9
fixes for raft recovery
bhatvinay Oct 24, 2021
0c5cf94
Bug#32552332 - CAN'T WRITE; DUPLICATE KEY IN TABLE '/TMP/#SQL...'
Aug 25, 2021
c27d7ee
Added wallclock time option to compute command execution time
Pushapgl Oct 22, 2021
fb8e191
Allow configuring doublewriter buffer flush slots
yizhang82 Oct 13, 2021
97b65d9
Fix mysqldump options enum
Oct 25, 2021
f51877f
Avoid string construction in store_server_cpu_in_resp_attrs
yizhang82 Oct 27, 2021
c2f5d70
use zlib 1.2.11 pic
luqun Oct 27, 2021
745188f
Make replica_statistics work with raft
abhinav04sharma Oct 27, 2021
f048195
Optimizations in open_table and optimize_cond
lth Oct 26, 2021
11df3d1
Allow changing dd cache size for abstract_table
yizhang82 Oct 22, 2021
e80951f
Raft Cur log ext was not being set in binlog_change_to_binlog
anirbanr-fb Oct 28, 2021
8312f2d
Add force-index option for mysqldump
Oct 27, 2021
afcb322
Fix engine substitution for partitioned tables
lth Oct 28, 2021
005b716
Update RocksDB submodule to 6.26.fb
Oct 29, 2021
bf8faa8
Overriding stop/start logic for mtr with override_enable_raft_check
anirbanr-fb Nov 2, 2021
ad88e92
Introduce base select parser class
Oct 22, 2021
cb01cf0
FB8-267: porting Add exponential backoff for smart restart
avbelov23 Nov 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,6 @@ SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Auto
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
Expand Down
3 changes: 3 additions & 0 deletions .skycastleworkspace.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[repository]
name = mysql-5.6
type = git
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,13 @@ IF(MY_COMPILER_IS_CLANG OR MY_COMPILER_IS_GNU)
SET(MY_COMPILER_IS_GNU_OR_CLANG 1)
ENDIF()

INCLUDE(CTest)
# Explicitly disabling BUILD_TESTING set by just included CTest, since other
# code is not ready to handle BUILD_TESTING set. If you try to remove the
# directive and CMake configuration and reconfiguration finishes successfully,
# remove the hack.
SET(BUILD_TESTING OFF)

# Maintainer mode is default on only for debug builds using GCC/G++
IF(CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG" OR WITH_DEBUG)
IF(MY_COMPILER_IS_GNU)
Expand Down Expand Up @@ -570,6 +577,7 @@ INCLUDE(mysql_add_executable)
INCLUDE(curl)
INCLUDE(rapidjson)
INCLUDE(fprofile)
INCLUDE(prepend_append_cflags_if_supported)
INCLUDE(gloves)


Expand Down Expand Up @@ -1158,7 +1166,9 @@ ENDIF()
# Enable debug sync for debug builds.
FOREACH(LANG C CXX)
STRING_PREPEND(CMAKE_${LANG}_FLAGS_DEBUG "-DENABLED_DEBUG_SYNC ")
STRING_PREPEND(CMAKE_${LANG}_FLAGS_DEBUG "-DSAFE_MUTEX ")
IF (NOT DISABLE_SAFE_MUTEX)
STRING_PREPEND(CMAKE_${LANG}_FLAGS_DEBUG "-DSAFE_MUTEX ")
ENDIF()
ENDFOREACH()


Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ jobs:
-DWITH_BOOST=$(BOOST_DIR)
-DMYSQL_MAINTAINER_MODE=ON
-DWITH_SYSTEM_LIBS=ON
-DWITH_LZ4=bundled
-DWITH_ZSTD=bundled
-DWITH_MECAB=system
-DWITH_NUMA=ON
$SANITIZER_DEFINES
Expand Down
2 changes: 1 addition & 1 deletion client/check/mysqlcheck_core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ static int use_db(const string &database) {
return 1;
if (mysql_get_server_version(sock) >= FIRST_PERFORMANCE_SCHEMA_VERSION &&
!my_strcasecmp(&my_charset_latin1, database.c_str(),
PERFORMANCE_SCHEMA_DB_NAME))
PERFORMANCE_SCHEMA_DB_NAME_MACRO))
return 1;
if (mysql_select_db(sock, database.c_str())) {
DBError(sock, "when selecting the database");
Expand Down
7 changes: 6 additions & 1 deletion client/client_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ enum options_client {
OPT_SSL_CRLPATH,
OPT_MYSQLBINLOG_SKIP_GTIDS,
OPT_MYSQLBINLOG_INCLUDE_GTIDS,
OPT_MYSQLBINLOG_INCLUDE_GTIDS_FROM_FILE,
OPT_MYSQLBINLOG_EXCLUDE_GTIDS,
OPT_MYSQLBINLOG_EXCLUDE_GTIDS_FROM_FILE,
OPT_REMOTE_PROTO,
OPT_CONFIG_ALL,
OPT_REWRITE_DB,
Expand Down Expand Up @@ -195,6 +197,9 @@ enum options_client {
OPT_MINIMUM_HLC,
OPT_CHECKSUM,
OPT_THREAD_PRIORITY,
OPT_COMPRESS_DATA,
OPT_COMPRESS_DATA_CHUNK_SIZE,
OPT_ORDER_BY_PRIMARY_FORCE_INDEX,
/* Add new option above this */
OPT_MAX_CLIENT_OPTION
};
Expand All @@ -217,7 +222,7 @@ enum options_client {
/**
Name of the performance schema database.
*/
#define PERFORMANCE_SCHEMA_DB_NAME "performance_schema"
#define PERFORMANCE_SCHEMA_DB_NAME_MACRO "performance_schema"

/**
First mysql version supporting the sys schema.
Expand Down
2 changes: 1 addition & 1 deletion client/dump/mysqldump_tool_chain_maker_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void Mysqldump_tool_chain_maker_options::process_positional_options(
m_object_filter.m_databases_excluded.push_back(
std::make_pair("", INFORMATION_SCHEMA_DB_NAME));
m_object_filter.m_databases_excluded.push_back(
std::make_pair("", PERFORMANCE_SCHEMA_DB_NAME));
std::make_pair("", PERFORMANCE_SCHEMA_DB_NAME_MACRO));
m_object_filter.m_databases_excluded.push_back(
std::make_pair("", "ndbinfo"));
m_object_filter.m_databases_excluded.push_back(std::make_pair("", "sys"));
Expand Down
6 changes: 5 additions & 1 deletion client/mysql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4676,6 +4676,11 @@ static int sql_real_connect(char *host, char *database, char *user,
static bool init_connection_options(MYSQL *mysql) {
bool handle_expired = (opt_connect_expired_password || !status.batch);

// Using the compression_lib connection attribute requires connection
// attributes be reset early. Parsing the command arguments could add a new
// connection attribute
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, nullptr);

if (opt_init_command)
mysql_options(mysql, MYSQL_INIT_COMMAND, opt_init_command);

Expand Down Expand Up @@ -4747,7 +4752,6 @@ static bool init_connection_options(MYSQL *mysql) {
mysql_options(mysql, MYSQL_ENABLE_CLEARTEXT_PLUGIN,
(char *)&opt_enable_cleartext_plugin);

mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, nullptr);
mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "program_name", "mysql");
if (current_os_user)
mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "os_user",
Expand Down
125 changes: 115 additions & 10 deletions client/mysqlbinlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,8 @@ enum Exit_status {
Options that will be used to filter out events.
*/
static char *opt_include_gtids_str = nullptr, *opt_exclude_gtids_str = nullptr,
*opt_include_gtids_from_file_str = nullptr,
*opt_exclude_gtids_from_file_str = nullptr,
*opt_start_gtid_str = nullptr, *opt_find_gtid_str = nullptr,
*opt_stop_gtid_str = nullptr;
static char *opt_index_file_str = nullptr;
Expand Down Expand Up @@ -2384,11 +2386,21 @@ static struct my_option my_long_options[] = {
"were provided.",
&opt_include_gtids_str, &opt_include_gtids_str, nullptr, GET_STR_ALLOC,
REQUIRED_ARG, 0, 0, 0, nullptr, 0, nullptr},
{"include-gtids-from-file", OPT_MYSQLBINLOG_INCLUDE_GTIDS_FROM_FILE,
"Print events whose Global Transaction Identifiers "
"were provided.",
&opt_include_gtids_from_file_str, &opt_include_gtids_from_file_str,
nullptr, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, nullptr, 0, nullptr},
{"exclude-gtids", OPT_MYSQLBINLOG_EXCLUDE_GTIDS,
"Print all events but those whose Global Transaction "
"Identifiers were provided.",
&opt_exclude_gtids_str, &opt_exclude_gtids_str, nullptr, GET_STR_ALLOC,
REQUIRED_ARG, 0, 0, 0, nullptr, 0, nullptr},
{"exclude-gtids-from-file", OPT_MYSQLBINLOG_EXCLUDE_GTIDS_FROM_FILE,
"Print all events but those whose Global Transaction "
"Identifiers were provided.",
&opt_exclude_gtids_from_file_str, &opt_exclude_gtids_from_file_str,
nullptr, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, nullptr, 0, nullptr},
{"print-table-metadata", OPT_PRINT_TABLE_METADATA,
"Print metadata stored in Table_map_log_event", &opt_print_table_metadata,
&opt_print_table_metadata, nullptr, GET_BOOL, NO_ARG, 0, 0, 0, nullptr, 0,
Expand Down Expand Up @@ -3512,6 +3524,41 @@ static Exit_status dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
return retval;
}

/* Read gtids file and store the value in the argument 'buffer'.
*
* @params gtids_file name of the gtids file
* @params buffer[OUT] output buffer to store the gtids string
*
* @returns FALSE if the reading of the gtids file is successful.
* TRUE otherwise.
*/
static bool read_gtids_file(char *gtids_file, char **buffer) {
MY_STAT stat_arg;
int fd;
/* get the size of the gtids file in bytes */
if (!my_stat(gtids_file, &stat_arg, MYF(MY_WME))) return true;

/* open the gtids file */
if ((fd = my_open(gtids_file, O_RDONLY, MYF(MY_WME))) < 0) return true;

/* allocate buffer */
if (!((*buffer) = (char *)my_malloc(
PSI_NOT_INSTRUMENTED, (size_t)stat_arg.st_size + 1, MYF(MY_WME)))) {
return true;
}

/* read the contents of the file and store in buffer */
if (my_read(fd, (uchar *)(*buffer), (size_t)stat_arg.st_size,
MYF(MY_FNABP))) {
return true;
}

(*buffer)[stat_arg.st_size] = '\0';
(void)my_close(fd, MYF(0));

return false;
}

/* Post processing of arguments to check for conflicts and other setups */
static int args_post_process(void) {
DBUG_TRACE;
Expand All @@ -3535,17 +3582,21 @@ static int args_post_process(void) {
return ERROR_STOP;
}

if (opt_include_gtids_str != nullptr) {
error("You cannot use --include-gtids and --raw together.");
if (opt_include_gtids_str != nullptr ||
opt_include_gtids_from_file_str != nullptr) {
error("You cannot use --include-gtids%s and --raw together.",
opt_include_gtids_from_file_str ? "-from-file" : "");
return ERROR_STOP;
}

if (opt_remote_proto == BINLOG_DUMP_NON_GTID &&
opt_exclude_gtids_str != nullptr) {
(opt_exclude_gtids_str != nullptr ||
opt_exclude_gtids_from_file_str != nullptr)) {
error(
"You cannot use both of --exclude-gtids and --raw together "
"You cannot use both of --exclude-gtids%s and --raw together "
"with one of --read-from-remote-server or "
"--read-from-remote-master=BINLOG-DUMP-NON-GTID.");
"--read-from-remote-master=BINLOG-DUMP-NON-GTID.",
opt_exclude_gtids_from_file_str ? "-from-file" : "");
return ERROR_STOP;
}

Expand All @@ -3562,8 +3613,11 @@ static int args_post_process(void) {
}
}

if (opt_start_gtid_str != nullptr && opt_exclude_gtids_str != nullptr) {
error("--start-gtid and --exclude-gtids should not be used together");
if (opt_start_gtid_str != nullptr &&
(opt_exclude_gtids_str != nullptr ||
opt_exclude_gtids_from_file_str != nullptr)) {
error("--start-gtid and --exclude-gtids%s should not be used together",
opt_exclude_gtids_from_file_str ? "-from-file" : "");
return ERROR_STOP;
}

Expand All @@ -3572,7 +3626,10 @@ static int args_post_process(void) {
if (opt_include_gtids_str != nullptr) {
if (gtid_set_included->add_gtid_text(opt_include_gtids_str) !=
RETURN_STATUS_OK) {
error("Could not configure --include-gtids '%s'", opt_include_gtids_str);
error("Could not configure --include-gtids%s '%s'",
opt_include_gtids_from_file_str ? "-from-file" : "",
opt_include_gtids_from_file_str ? opt_include_gtids_from_file_str
: opt_include_gtids_str);
global_sid_lock->unlock();
return ERROR_STOP;
}
Expand All @@ -3581,7 +3638,10 @@ static int args_post_process(void) {
if (opt_exclude_gtids_str != nullptr) {
if (gtid_set_excluded->add_gtid_text(opt_exclude_gtids_str) !=
RETURN_STATUS_OK) {
error("Could not configure --exclude-gtids '%s'", opt_exclude_gtids_str);
error("Could not configure --exclude-gtids%s '%s'",
opt_exclude_gtids_from_file_str ? "-from-file" : "",
opt_exclude_gtids_from_file_str ? opt_exclude_gtids_from_file_str
: opt_exclude_gtids_str);
global_sid_lock->unlock();
return ERROR_STOP;
}
Expand Down Expand Up @@ -3897,7 +3957,8 @@ int main(int argc, char **argv) {
parse_args(&argc, &argv);

if (!argc && opt_find_gtid_str == nullptr && opt_start_gtid_str == nullptr &&
opt_exclude_gtids_str == nullptr) {
(opt_exclude_gtids_str == nullptr ||
opt_exclude_gtids_from_file_str != NULL)) {
usage();
my_end(my_end_arg);
return EXIT_FAILURE;
Expand All @@ -3915,6 +3976,50 @@ int main(int argc, char **argv) {
return EXIT_FAILURE;
}

if (opt_include_gtids_str != nullptr &&
opt_include_gtids_from_file_str != nullptr) {
error(
"--include-gtids and --include-gtids-from-file should not be used "
"together");
return EXIT_FAILURE;
}

/* if '--include-gtids-from-file' is specified then read the gtids string
* value from the file and store it in 'opt_include_gtids_str'
*/
if (opt_include_gtids_str == nullptr &&
opt_include_gtids_from_file_str != nullptr) {
if (strlen(opt_include_gtids_from_file_str) > 0 &&
read_gtids_file(opt_include_gtids_from_file_str,
&opt_include_gtids_str)) {
error("Could not read include-gtids-from-file %s",
opt_include_gtids_from_file_str);
return EXIT_FAILURE;
}
}

if (opt_exclude_gtids_str != nullptr &&
opt_exclude_gtids_from_file_str != nullptr) {
error(
"--exclude-gtids and --exclude-gtids-from-file should not be used "
"together");
return ERROR_STOP;
}

/* if '--exclude-gtids-from-file' is specified then read the gtids string
* value from the file and store it in 'opt_exclude_gtids_str'
*/
if (opt_exclude_gtids_str == nullptr &&
opt_exclude_gtids_from_file_str != nullptr) {
if (strlen(opt_exclude_gtids_from_file_str) > 0 &&
read_gtids_file(opt_exclude_gtids_from_file_str,
&opt_exclude_gtids_str)) {
error("Could not read exclude-gtids-from-file %s",
opt_exclude_gtids_from_file_str);
return EXIT_FAILURE;
}
}

umask(((~my_umask) & 0666));
/* Check for argument conflicts and do any post-processing */
if (args_post_process() == ERROR_STOP) return EXIT_FAILURE;
Expand Down
Loading