From f83b854cdaed51b63e168ce2c814bb7542aa0591 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 23 Mar 2024 21:02:06 +0100 Subject: [PATCH] feat: implement optional id and Aurora MySQL --- src/rust/aurora_mysql.rs | 150 +++++++++++++++++------------------ src/rust/data.rs | 3 +- src/rust/mariadb.rs | 54 ++++++------- src/rust/merged_ultraslim.rs | 2 + src/rust/mysql.rs | 90 ++++++++++----------- src/rust/search.rs | 4 +- 6 files changed, 153 insertions(+), 150 deletions(-) diff --git a/src/rust/aurora_mysql.rs b/src/rust/aurora_mysql.rs index 438f9f10..a7f3c09d 100644 --- a/src/rust/aurora_mysql.rs +++ b/src/rust/aurora_mysql.rs @@ -30,7 +30,7 @@ fn process_table_row(tr: Node) -> KbParsedEntry { cli: None, default: None, dynamic: None, - id: variable_id.clone(), + id: None, name: Some(row_value.text().trim().to_string()), scope: None, r#type: match row_description_text { @@ -150,7 +150,7 @@ mod tests { default: None, dynamic: None, name: Some("AuroraDb_commits".to_string()), - id: "AuroraDb_commits".to_string(), + id: None, scope: None, r#type: Some("integer".to_string()), valid_values: None, @@ -161,7 +161,7 @@ mod tests { default: None, dynamic: None, name: Some("AuroraDb_commit_latency".to_string()), - id: "AuroraDb_commit_latency".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -174,7 +174,7 @@ mod tests { default: None, dynamic: None, name: Some("AuroraDb_ddl_stmt_duration".to_string()), - id: "AuroraDb_ddl_stmt_duration".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -187,7 +187,7 @@ mod tests { default: None, dynamic: None, name: Some("AuroraDb_select_stmt_duration".to_string()), - id: "AuroraDb_select_stmt_duration".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -200,7 +200,7 @@ mod tests { default: None, dynamic: None, name: Some("AuroraDb_insert_stmt_duration".to_string()), - id: "AuroraDb_insert_stmt_duration".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -213,7 +213,7 @@ mod tests { default: None, dynamic: None, name: Some("AuroraDb_update_stmt_duration".to_string()), - id: "AuroraDb_update_stmt_duration".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -226,7 +226,7 @@ mod tests { default: None, dynamic: None, name: Some("AuroraDb_delete_stmt_duration".to_string()), - id: "AuroraDb_delete_stmt_duration".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -239,7 +239,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_binlog_io_cache_allocated".to_string()), - id: "Aurora_binlog_io_cache_allocated".to_string(), + id: None, range: None, scope: None, r#type: Some("byte".to_string()), @@ -252,7 +252,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_binlog_io_cache_read_requests".to_string()), - id: "Aurora_binlog_io_cache_read_requests".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -265,7 +265,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_binlog_io_cache_reads".to_string()), - id: "Aurora_binlog_io_cache_reads".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -278,7 +278,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_enhanced_binlog".to_string()), - id: "Aurora_enhanced_binlog".to_string(), + id: None, range: None, scope: None, r#type: Some("boolean".to_string()), @@ -291,7 +291,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_external_connection_count".to_string()), - id: "Aurora_external_connection_count".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -304,7 +304,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fast_insert_cache_hits".to_string()), - id: "Aurora_fast_insert_cache_hits".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -317,7 +317,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fast_insert_cache_misses".to_string()), - id: "Aurora_fast_insert_cache_misses".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -330,7 +330,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_master_dml_stmt_count".to_string()), - id: "Aurora_fwd_master_dml_stmt_count".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -343,7 +343,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_master_dml_stmt_duration".to_string()), - id: "Aurora_fwd_master_dml_stmt_duration".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -356,7 +356,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_master_errors_rpc_timeout".to_string()), - id: "Aurora_fwd_master_errors_rpc_timeout".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -369,7 +369,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_master_errors_session_limit".to_string()), - id: "Aurora_fwd_master_errors_session_limit".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -382,7 +382,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_master_errors_session_timeout".to_string()), - id: "Aurora_fwd_master_errors_session_timeout".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -395,7 +395,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_master_open_sessions".to_string()), - id: "Aurora_fwd_master_open_sessions".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -408,7 +408,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_master_select_stmt_count".to_string()), - id: "Aurora_fwd_master_select_stmt_count".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -421,7 +421,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_master_select_stmt_duration".to_string()), - id: "Aurora_fwd_master_select_stmt_duration".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -434,7 +434,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_writer_dml_stmt_count".to_string()), - id: "Aurora_fwd_writer_dml_stmt_count".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -447,7 +447,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_writer_dml_stmt_duration".to_string()), - id: "Aurora_fwd_writer_dml_stmt_duration".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -460,7 +460,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_writer_errors_rpc_timeout".to_string()), - id: "Aurora_fwd_writer_errors_rpc_timeout".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -473,7 +473,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_writer_errors_session_limit".to_string()), - id: "Aurora_fwd_writer_errors_session_limit".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -486,7 +486,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_writer_errors_session_timeout".to_string()), - id: "Aurora_fwd_writer_errors_session_timeout".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -499,7 +499,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_writer_open_sessions".to_string()), - id: "Aurora_fwd_writer_open_sessions".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -512,7 +512,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_writer_select_stmt_count".to_string()), - id: "Aurora_fwd_writer_select_stmt_count".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -525,7 +525,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_fwd_writer_select_stmt_duration".to_string()), - id: "Aurora_fwd_writer_select_stmt_duration".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -538,7 +538,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_lockmgr_memory_used".to_string()), - id: "Aurora_lockmgr_memory_used".to_string(), + id: None, range: None, scope: None, r#type: Some("byte".to_string()), @@ -551,7 +551,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_ml_actual_request_cnt".to_string()), - id: "Aurora_ml_actual_request_cnt".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -564,7 +564,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_ml_actual_response_cnt".to_string()), - id: "Aurora_ml_actual_response_cnt".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -577,7 +577,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_ml_cache_hit_cnt".to_string()), - id: "Aurora_ml_cache_hit_cnt".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -590,7 +590,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_ml_logical_request_cnt".to_string()), - id: "Aurora_ml_logical_request_cnt".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -603,7 +603,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_ml_logical_response_cnt".to_string()), - id: "Aurora_ml_logical_response_cnt".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -616,7 +616,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_ml_retry_request_cnt".to_string()), - id: "Aurora_ml_retry_request_cnt".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -629,7 +629,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_ml_single_request_cnt".to_string()), - id: "Aurora_ml_single_request_cnt".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -642,7 +642,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_bytes_returned".to_string()), - id: "Aurora_pq_bytes_returned".to_string(), + id: None, range: None, scope: None, r#type: Some("byte".to_string()), @@ -655,7 +655,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_max_concurrent_requests".to_string()), - id: "Aurora_pq_max_concurrent_requests".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -668,7 +668,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_pages_pushed_down".to_string()), - id: "Aurora_pq_pages_pushed_down".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -681,7 +681,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_attempted".to_string()), - id: "Aurora_pq_request_attempted".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -694,7 +694,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_executed".to_string()), - id: "Aurora_pq_request_executed".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -707,7 +707,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_failed".to_string()), - id: "Aurora_pq_request_failed".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -720,7 +720,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_in_progress".to_string()), - id: "Aurora_pq_request_in_progress".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -733,7 +733,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen".to_string()), - id: "Aurora_pq_request_not_chosen".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -746,7 +746,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_below_min_rows".to_string()), - id: "Aurora_pq_request_not_chosen_below_min_rows".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -759,7 +759,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_column_bit".to_string()), - id: "Aurora_pq_request_not_chosen_column_bit".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -772,7 +772,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_column_geometry".to_string()), - id: "Aurora_pq_request_not_chosen_column_geometry".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -785,7 +785,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_column_lob".to_string()), - id: "Aurora_pq_request_not_chosen_column_lob".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -798,7 +798,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_column_virtual".to_string()), - id: "Aurora_pq_request_not_chosen_column_virtual".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -811,7 +811,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_custom_charset".to_string()), - id: "Aurora_pq_request_not_chosen_custom_charset".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -824,7 +824,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_fast_ddl".to_string()), - id: "Aurora_pq_request_not_chosen_fast_ddl".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -839,7 +839,7 @@ mod tests { name: Some( "Aurora_pq_request_not_chosen_few_pages_outside_buffer_pool".to_string() ), - id: "Aurora_pq_request_not_chosen_few_pages_outside_buffer_pool".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -852,7 +852,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_full_text_index".to_string()), - id: "Aurora_pq_request_not_chosen_full_text_index".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -865,7 +865,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_high_buffer_pool_pct".to_string()), - id: "Aurora_pq_request_not_chosen_high_buffer_pool_pct".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -878,7 +878,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_index_hint".to_string()), - id: "Aurora_pq_request_not_chosen_index_hint".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -891,7 +891,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_innodb_table_format".to_string()), - id: "Aurora_pq_request_not_chosen_innodb_table_format".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -904,7 +904,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_long_trx".to_string()), - id: "Aurora_pq_request_not_chosen_long_trx".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -917,7 +917,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_no_where_clause".to_string()), - id: "Aurora_pq_request_not_chosen_no_where_clause".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -930,7 +930,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_range_scan".to_string()), - id: "Aurora_pq_request_not_chosen_range_scan".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -943,7 +943,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_row_length_too_long".to_string()), - id: "Aurora_pq_request_not_chosen_row_length_too_long".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -956,7 +956,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_small_table".to_string()), - id: "Aurora_pq_request_not_chosen_small_table".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -969,7 +969,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_temporary_table".to_string()), - id: "Aurora_pq_request_not_chosen_temporary_table".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -982,7 +982,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_tx_isolation".to_string()), - id: "Aurora_pq_request_not_chosen_tx_isolation".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -995,7 +995,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_update_delete_stmts".to_string()), - id: "Aurora_pq_request_not_chosen_update_delete_stmts".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -1008,7 +1008,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_unsupported_access".to_string()), - id: "Aurora_pq_request_not_chosen_unsupported_access".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -1021,7 +1021,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_not_chosen_unsupported_storage_type".to_string()), - id: "Aurora_pq_request_not_chosen_unsupported_storage_type".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -1034,7 +1034,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_pq_request_throttled".to_string()), - id: "Aurora_pq_request_throttled".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -1047,7 +1047,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_repl_bytes_received".to_string()), - id: "Aurora_repl_bytes_received".to_string(), + id: None, range: None, scope: None, r#type: Some("byte".to_string()), @@ -1060,7 +1060,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_reserved_mem_exceeded_incidents".to_string()), - id: "Aurora_reserved_mem_exceeded_incidents".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -1073,7 +1073,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_thread_pool_thread_count".to_string()), - id: "Aurora_thread_pool_thread_count".to_string(), + id: None, range: None, scope: None, r#type: Some("integer".to_string()), @@ -1086,7 +1086,7 @@ mod tests { default: None, dynamic: None, name: Some("Aurora_tmz_version".to_string()), - id: "Aurora_tmz_version".to_string(), + id: None, range: None, scope: None, r#type: Some("string".to_string()), @@ -1099,7 +1099,7 @@ mod tests { default: None, dynamic: None, name: Some("server_aurora_das_running".to_string()), - id: "server_aurora_das_running".to_string(), + id: None, range: None, scope: None, r#type: Some("boolean".to_string()), diff --git a/src/rust/data.rs b/src/rust/data.rs index a525a6ae..77d569ee 100644 --- a/src/rust/data.rs +++ b/src/rust/data.rs @@ -100,7 +100,8 @@ pub struct KbParsedEntry { pub default: Option, #[serde(skip_serializing_if = "Option::is_none")] pub dynamic: Option, - pub id: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub id: Option, #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, #[serde(skip_serializing_if = "skip_serialize_range")] diff --git a/src/rust/mariadb.rs b/src/rust/mariadb.rs index 1d36474a..68ab9893 100644 --- a/src/rust/mariadb.rs +++ b/src/rust/mariadb.rs @@ -433,7 +433,7 @@ fn process_block(header_node: Node) -> KbParsedEntry { cli: None, default: None, dynamic: None, - id: header_node.attr("id").unwrap().to_string(), + id: Some(header_node.attr("id").unwrap().to_string()), name: Some(header_node.text().trim().to_string()), scope: None, r#type: None, @@ -532,7 +532,7 @@ mod tests { cli: Some("--query-cache-size=#".to_string()), default: Some("1M (>= MariaDB, 10.1.7), 0 (<= MariaDB 10.1.6), (although frequently given a default value in some setups)".to_string()), dynamic: Some(true), - id: "query_cache_size".to_string(), + id: Some("query_cache_size".to_string()), name: Some("query_cache_size".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("integer".to_string()), @@ -558,7 +558,7 @@ mod tests { cli: Some("query-cache-strip-comments".to_string()), default: Some("OFF".to_string()), dynamic: Some(true), - id: "query_cache_strip_comments".to_string(), + id: Some("query_cache_strip_comments".to_string()), name: Some("query_cache_strip_comments".to_string()), scope: Some(vec!["session".to_string(), "global".to_string()]), r#type: Some("boolean".to_string()), @@ -583,7 +583,7 @@ mod tests { cli: None, default: None, dynamic: None, - id: "ssl_accept_renegotiates".to_string(), + id: Some("ssl_accept_renegotiates".to_string()), name: Some("Ssl_accept_renegotiates".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("integer".to_string()), @@ -609,7 +609,7 @@ mod tests { cli: Some("--server-audit-events=value".to_string()), default: Some("Empty string".to_string()), dynamic: Some(true), - id: "server_audit_events".to_string(), + id: Some("server_audit_events".to_string()), name: Some("server_audit_events".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("string".to_string()), @@ -644,7 +644,7 @@ mod tests { cli: Some("--server-audit-excl-users=value".to_string()), default: Some("Empty string".to_string()), dynamic: Some(true), - id: "server_audit_excl_users".to_string(), + id: Some("server_audit_excl_users".to_string()), name: Some("server_audit_excl_users".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("string".to_string()), @@ -669,7 +669,7 @@ mod tests { has_description: true, is_removed: false, dynamic: Some(false), - id: "tokudb_version".to_string(), + id: Some("tokudb_version".to_string()), name: Some("tokudb_version".to_string()), r#type: Some("string".to_string()), cli: None, @@ -683,7 +683,7 @@ mod tests { is_removed: false, default: Some("1000".to_string()), dynamic: Some(true), - id: "tokudb_write_status_frequency".to_string(), + id: Some("tokudb_write_status_frequency".to_string()), name: Some("tokudb_write_status_frequency".to_string()), range: Some(Range { to_upwards: None, @@ -717,7 +717,7 @@ mod tests { cli: Some("--rpl-semi-sync-slave-trace_level[=#]".to_string()), default: Some("32".to_string()), dynamic: Some(true), - id: "rpl_semi_sync_slave_trace_level".to_string(), + id: Some("rpl_semi_sync_slave_trace_level".to_string()), name: Some("rpl_semi_sync_slave_trace_level".to_string()), range: Some(Range { to_upwards: None, @@ -735,7 +735,7 @@ mod tests { is_removed: true, cli: Some("--rpl-semi-sync-master=value".to_string()), default: Some("ON".to_string()), - id: "rpl_semi_sync_master".to_string(), + id: Some("rpl_semi_sync_master".to_string()), name: Some("rpl_semi_sync_master".to_string()), r#type: Some("enumeration".to_string()), valid_values: Some(vec![ @@ -767,7 +767,7 @@ mod tests { dynamic: None, cli: Some("--wsrep-provider=value".to_string()), default: Some("None".to_string()), - id: "wsrep_provider".to_string(), + id: Some("wsrep_provider".to_string()), name: Some("wsrep_provider".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("string".to_string()), @@ -792,7 +792,7 @@ mod tests { cli: Some("--tls-version=value".to_string()), default: Some("TLSv1.1,TLSv1.2,TLSv1.3".to_string()), dynamic: Some(false), - id: "tls_version".to_string(), + id: Some("tls_version".to_string()), name: Some("tls_version".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("enumeration".to_string()), @@ -822,7 +822,7 @@ mod tests { cli: Some("--connect-work-size=#".to_string()), default: Some("67108864".to_string()), dynamic: Some(true), - id: "connect_work_size".to_string(), + id: Some("connect_work_size".to_string()), name: Some("connect_work_size".to_string()), scope: Some(vec!["global".to_string(), "session".to_string()]), r#type: Some("integer".to_string()), @@ -853,7 +853,7 @@ mod tests { cli: Some("--wsrep-sync-wait=#".to_string()), default: Some("0".to_string()), dynamic: Some(true), - id: "wsrep_sync_wait".to_string(), + id: Some("wsrep_sync_wait".to_string()), name: Some("wsrep_sync_wait".to_string()), scope: Some(vec!["global".to_string(), "session".to_string()]), r#type: Some("integer".to_string()), @@ -887,7 +887,7 @@ mod tests { .to_string() ), dynamic: Some(true), - id: "lock_wait_timeout".to_string(), + id: Some("lock_wait_timeout".to_string()), name: Some("lock_wait_timeout".to_string()), scope: Some(vec!["global".to_string(), "session".to_string()]), r#type: Some("integer".to_string()), @@ -918,7 +918,7 @@ mod tests { cli: None, default: None, dynamic: None, - id: "wsrep_cert_index_size".to_string(), + id: Some("wsrep_cert_index_size".to_string()), name: Some("wsrep_cert_index_size".to_string()), scope: None, r#type: Some("integer".to_string()), @@ -943,7 +943,7 @@ mod tests { cli: Some("--system-versioning-insert-history[={0|1}]".to_string()), default: Some("OFF".to_string()), dynamic: Some(true), - id: "system_versioning_insert_history".to_string(), + id: Some("system_versioning_insert_history".to_string()), name: Some("system_versioning_insert_history".to_string()), scope: Some(vec!["global".to_string(), "session".to_string()]), r#type: Some("boolean".to_string()), @@ -968,7 +968,7 @@ mod tests { cli: Some("--gtid-pos-auto-engines=value".to_string()), default: Some("empty".to_string()), dynamic: Some(true), - id: "gtid_pos_auto_engines".to_string(), + id: Some("gtid_pos_auto_engines".to_string()), name: Some("gtid_pos_auto_engines".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("string".to_string()), @@ -993,7 +993,7 @@ mod tests { cli: Some("--handlersocket-wrlock-timeout=\"value\"".to_string()), default: None, dynamic: Some(false), - id: "handlersocket_wrlock_timeout".to_string(), + id: Some("handlersocket_wrlock_timeout".to_string()), name: Some("handlersocket_wrlock_timeout".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("integer".to_string()), @@ -1024,7 +1024,7 @@ mod tests { cli: Some("--innodb-fast-shutdown[=#]".to_string()), default: Some("1".to_string()), dynamic: Some(true), - id: "innodb_fast_shutdown".to_string(), + id: Some("innodb_fast_shutdown".to_string()), name: Some("innodb_fast_shutdown".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("integer".to_string()), @@ -1055,7 +1055,7 @@ mod tests { cli: Some("--innodb-fill-factor=#".to_string()), default: Some("100".to_string()), dynamic: Some(true), - id: "innodb_fill_factor".to_string(), + id: Some("innodb_fill_factor".to_string()), name: Some("innodb_fill_factor".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("integer".to_string()), @@ -1087,7 +1087,7 @@ mod tests { cli: Some("innodb-buffer-pool-restore-at-startup".to_string()), default: Some("0".to_string()), dynamic: Some(true), - id: "innodb_buffer_pool_restore_at_startup".to_string(), + id: Some("innodb_buffer_pool_restore_at_startup".to_string()), name: Some("innodb_buffer_pool_restore_at_startup".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("integer".to_string()), @@ -1104,7 +1104,7 @@ mod tests { cli: Some("--myisam-mmap-size=#".to_string()), default: Some("18446744073709547520".to_string()), dynamic: Some(true), - id: "myisam_mmap_size".to_string(), + id: Some("myisam_mmap_size".to_string()), name: Some("myisam_mmap_size".to_string()), range: Some(Range { from: Some(7,), @@ -1139,7 +1139,7 @@ mod tests { cli: Some("--spider-max-connections".to_string()), default: None, dynamic: Some(true), - id: "spider_max_connections".to_string(), + id: Some("spider_max_connections".to_string()), name: Some("spider_max_connections".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("integer".to_string()), @@ -1158,7 +1158,7 @@ mod tests { cli: Some("--master-verify-checksum=[0|1]".to_string()), default: Some("OFF (0)".to_string()), dynamic: Some(true), - id: "master_verify_checksum".to_string(), + id: Some("master_verify_checksum".to_string()), name: Some("master_verify_checksum".to_string()), range: None, scope: Some(vec!["global".to_string()]), @@ -1171,7 +1171,7 @@ mod tests { cli: Some("--ft-min-word-len=#".to_string()), default: Some("4".to_string()), dynamic: Some(false), - id: "ft_min_word_len".to_string(), + id: Some("ft_min_word_len".to_string()), name: Some("ft_min_word_len".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("integer".to_string()), @@ -1190,7 +1190,7 @@ mod tests { cli: Some("--handlersocket-epoll=\"value\"".to_string()), default: Some("1".to_string()), dynamic: Some(false), - id: "handlersocket_epoll".to_string(), + id: Some("handlersocket_epoll".to_string()), name: Some("handlersocket_epoll".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("integer".to_string()), diff --git a/src/rust/merged_ultraslim.rs b/src/rust/merged_ultraslim.rs index a2b845b8..3f5aae95 100644 --- a/src/rust/merged_ultraslim.rs +++ b/src/rust/merged_ultraslim.rs @@ -8,6 +8,7 @@ use serde_repr::Deserialize_repr; pub enum DataType { MySQL = 1, MariaDB = 2, + AuroraMySQL = 3, } #[derive(Deserialize)] @@ -40,6 +41,7 @@ pub enum SearchType { Any = -1, MySQL = 1, MariaDB = 2, + AuroraMySQL = 3, } #[derive(Debug)] diff --git a/src/rust/mysql.rs b/src/rust/mysql.rs index a930447e..f7c2c94c 100644 --- a/src/rust/mysql.rs +++ b/src/rust/mysql.rs @@ -209,7 +209,7 @@ fn process_table(table_node: Node) -> KbParsedEntry { cli: None, default: None, dynamic: None, - id: find_table_archor(table_node), + id: Some(find_table_archor(table_node)), name: None, scope: None, r#type: None, @@ -427,7 +427,7 @@ mod tests { cli: Some("--ndbcluster".to_string()), default: Some("FALSE (Version: NDB 7.5-7.6)".to_string()), dynamic: Some(false), - id: "option_mysqld_ndbcluster".to_string(), + id: Some("option_mysqld_ndbcluster".to_string()), name: Some("ndbcluster".to_string()), scope: None, r#type: None, @@ -440,7 +440,7 @@ mod tests { cli: Some("--ndb-allow-copying-alter-table=[ON|OFF]".to_string()), default: Some("ON (Version: NDB 7.5-7.6)".to_string()), dynamic: Some(true), - id: "option_mysqld_ndb-allow-copying-alter-table".to_string(), + id: Some("option_mysqld_ndb-allow-copying-alter-table".to_string()), name: Some("ndb-allow-copying-alter-table".to_string()), scope: Some(vec!["global".to_string(), "session".to_string()]), r#type: None, @@ -466,7 +466,7 @@ mod tests { cli: Some("--binlog-gtid-simple-recovery[={OFF|ON}]".to_string()), default: Some("ON".to_string()), dynamic: Some(false), - id: "sysvar_binlog_gtid_simple_recovery".to_string(), + id: Some("sysvar_binlog_gtid_simple_recovery".to_string()), name: Some("binlog_gtid_simple_recovery".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("boolean".to_string()), @@ -479,7 +479,7 @@ mod tests { cli: Some("--enforce-gtid-consistency[=value]".to_string()), default: Some("OFF".to_string()), dynamic: Some(true), - id: "sysvar_enforce_gtid_consistency".to_string(), + id: Some("sysvar_enforce_gtid_consistency".to_string()), name: Some("enforce_gtid_consistency".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("enumeration".to_string()), @@ -494,7 +494,7 @@ mod tests { has_description: false, is_removed: false, dynamic: Some(false), - id: "sysvar_gtid_executed".to_string(), + id: Some("sysvar_gtid_executed".to_string()), name: Some("gtid_executed".to_string()), scope: Some(vec!["global".to_string(), "session".to_string()]), r#type: Some("string".to_string()), @@ -509,7 +509,7 @@ mod tests { cli: Some("--gtid-executed-compression-period=#".to_string()), default: Some("1000".to_string()), dynamic: Some(true), - id: "sysvar_gtid_executed_compression_period".to_string(), + id: Some("sysvar_gtid_executed_compression_period".to_string()), name: Some("gtid_executed_compression_period".to_string()), range: Some(Range { to_upwards: None, @@ -528,7 +528,7 @@ mod tests { cli: Some("--gtid-mode=MODE".to_string()), default: Some("OFF".to_string()), dynamic: Some(true), - id: "sysvar_gtid_mode".to_string(), + id: Some("sysvar_gtid_mode".to_string()), name: Some("gtid_mode".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("enumeration".to_string()), @@ -545,7 +545,7 @@ mod tests { is_removed: false, default: Some("AUTOMATIC".to_string()), dynamic: Some(true), - id: "sysvar_gtid_next".to_string(), + id: Some("sysvar_gtid_next".to_string()), name: Some("gtid_next".to_string()), scope: Some(vec!["session".to_string()]), r#type: Some("enumeration".to_string()), @@ -561,7 +561,7 @@ mod tests { has_description: false, is_removed: false, dynamic: Some(false), - id: "sysvar_gtid_owned".to_string(), + id: Some("sysvar_gtid_owned".to_string()), name: Some("gtid_owned".to_string()), scope: Some(vec!["global".to_string(), "session".to_string()]), r#type: Some("string".to_string()), @@ -574,7 +574,7 @@ mod tests { has_description: false, is_removed: false, dynamic: Some(true), - id: "sysvar_gtid_purged".to_string(), + id: Some("sysvar_gtid_purged".to_string()), name: Some("gtid_purged".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("string".to_string()), @@ -601,7 +601,7 @@ mod tests { cli: None, default: Some("TRUE (Version: 5.1.51-ndb-7.2.0)".to_string()), dynamic: Some(true), - id: "sysvar_ndb_join_pushdown".to_string(), + id: Some("sysvar_ndb_join_pushdown".to_string()), name: Some("ndb_join_pushdown".to_string()), scope: Some(vec!["global".to_string(), "session".to_string()]), r#type: None, @@ -623,7 +623,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndbcluster".to_string(), + id: Some("option_mysqld_ndbcluster".to_string()), name: Some("ndbcluster".to_string()), cli: Some("--ndbcluster".to_string()), dynamic: Some(false), @@ -636,7 +636,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-allow-copying-alter-table".to_string(), + id: Some("option_mysqld_ndb-allow-copying-alter-table".to_string()), name: Some("ndb-allow-copying-alter-table".to_string()), cli: Some("--ndb-allow-copying-alter-table=[ON|OFF]".to_string()), scope: Some(vec!["global".to_string(), "session".to_string()]), @@ -649,7 +649,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-batch-size".to_string(), + id: Some("option_mysqld_ndb-batch-size".to_string()), name: Some("ndb-batch-size".to_string()), cli: Some("--ndb-batch-size=#".to_string()), scope: Some(vec!["global".to_string()]), @@ -662,7 +662,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-cluster-connection-pool".to_string(), + id: Some("option_mysqld_ndb-cluster-connection-pool".to_string()), name: Some("ndb-cluster-connection-pool".to_string()), cli: Some("--ndb-cluster-connection-pool=#".to_string()), scope: Some(vec!["global".to_string()]), @@ -675,7 +675,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-cluster-connection-pool-nodeids".to_string(), + id: Some("option_mysqld_ndb-cluster-connection-pool-nodeids".to_string()), name: Some("ndb-cluster-connection-pool-nodeids".to_string()), cli: Some("--ndb-cluster-connection-pool-nodeids=list".to_string()), scope: Some(vec!["global".to_string()]), @@ -688,7 +688,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-blob-read-batch-bytes".to_string(), + id: Some("option_mysqld_ndb-blob-read-batch-bytes".to_string()), name: Some("ndb-blob-read-batch-bytes".to_string()), cli: Some("--ndb-blob-read-batch-bytes=bytes".to_string()), scope: Some(vec!["global".to_string(), "session".to_string()]), @@ -701,7 +701,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-blob-write-batch-bytes".to_string(), + id: Some("option_mysqld_ndb-blob-write-batch-bytes".to_string()), name: Some("ndb-blob-write-batch-bytes".to_string()), cli: Some("--ndb-blob-write-batch-bytes=bytes".to_string()), scope: Some(vec!["global".to_string(), "session".to_string()]), @@ -714,7 +714,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-connectstring".to_string(), + id: Some("option_mysqld_ndb-connectstring".to_string()), name: Some("ndb-connectstring".to_string()), cli: Some("--ndb-connectstring=connection_string".to_string()), dynamic: Some(false), @@ -727,7 +727,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-default-column-format".to_string(), + id: Some("option_mysqld_ndb-default-column-format".to_string()), name: Some("ndb-default-column-format".to_string()), cli: Some("--ndb-default-column-format=[FIXED|DYNAMIC]".to_string()), scope: Some(vec!["global".to_string()]), @@ -740,7 +740,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-deferred-constraints".to_string(), + id: Some("option_mysqld_ndb-deferred-constraints".to_string()), name: Some("ndb-deferred-constraints".to_string()), cli: Some("--ndb-deferred-constraints=[0|1]".to_string()), scope: Some(vec!["global".to_string(), "session".to_string()]), @@ -753,7 +753,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-distribution".to_string(), + id: Some("option_mysqld_ndb-distribution".to_string()), name: Some("ndb-distribution".to_string()), cli: Some("--ndb-distribution=[KEYHASH|LINHASH]".to_string()), scope: Some(vec!["global".to_string()]), @@ -766,7 +766,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-log-apply-status".to_string(), + id: Some("option_mysqld_ndb-log-apply-status".to_string()), name: Some("ndb-log-apply-status".to_string()), cli: Some("--ndb-log-apply-status".to_string()), scope: Some(vec!["global".to_string()]), @@ -779,7 +779,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-log-empty-epochs".to_string(), + id: Some("option_mysqld_ndb-log-empty-epochs".to_string()), name: Some("ndb-log-empty-epochs".to_string()), cli: Some("--ndb-log-empty-epochs=[ON|OFF]".to_string()), scope: Some(vec!["global".to_string()]), @@ -792,7 +792,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-log-empty-update".to_string(), + id: Some("option_mysqld_ndb-log-empty-update".to_string()), name: Some("ndb-log-empty-update".to_string()), cli: Some("--ndb-log-empty-update=[ON|OFF]".to_string()), scope: Some(vec!["global".to_string()]), @@ -805,7 +805,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-log-exclusive-reads".to_string(), + id: Some("option_mysqld_ndb-log-exclusive-reads".to_string()), name: Some("ndb-log-exclusive-reads".to_string()), cli: Some("--ndb-log-exclusive-reads=[0|1]".to_string()), scope: Some(vec!["global".to_string(), "session".to_string()]), @@ -818,7 +818,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-log-orig".to_string(), + id: Some("option_mysqld_ndb-log-orig".to_string()), name: Some("ndb-log-orig".to_string()), cli: Some("--ndb-log-orig".to_string()), scope: Some(vec!["global".to_string()]), @@ -831,7 +831,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-log-transaction-id".to_string(), + id: Some("option_mysqld_ndb-log-transaction-id".to_string()), name: Some("ndb-log-transaction-id".to_string()), cli: Some("--ndb-log-transaction-id".to_string()), scope: Some(vec!["global".to_string()]), @@ -844,7 +844,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-log-update-minimal".to_string(), + id: Some("option_mysqld_ndb-log-update-minimal".to_string()), name: Some("ndb-log-update-minimal".to_string()), cli: Some("--ndb-log-update-minimal".to_string()), scope: Some(vec!["global".to_string()]), @@ -857,7 +857,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-mgmd-host".to_string(), + id: Some("option_mysqld_ndb-mgmd-host".to_string()), name: Some("ndb-mgmd-host".to_string()), cli: Some("--ndb-mgmd-host=host[:port]".to_string()), dynamic: Some(false), @@ -870,7 +870,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-nodeid".to_string(), + id: Some("option_mysqld_ndb-nodeid".to_string()), name: Some("ndb-nodeid".to_string()), cli: Some("--ndb-nodeid=#".to_string()), scope: Some(vec!["global".to_string()]), @@ -883,7 +883,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-optimization-delay".to_string(), + id: Some("option_mysqld_ndb-optimization-delay".to_string()), name: Some("ndb-optimization-delay".to_string()), cli: Some("--ndb-optimization-delay=milliseconds".to_string()), scope: Some(vec!["global".to_string()]), @@ -896,7 +896,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-recv-thread-activation-threshold".to_string(), + id: Some("option_mysqld_ndb-recv-thread-activation-threshold".to_string()), name: Some("ndb-recv-thread-activation-threshold".to_string()), cli: Some("--ndb-recv-thread-activation-threshold=threshold".to_string()), dynamic: Some(false), @@ -910,7 +910,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-recv-thread-cpu-mask".to_string(), + id: Some("option_mysqld_ndb-recv-thread-cpu-mask".to_string()), name: Some("ndb-recv-thread-cpu-mask".to_string()), cli: Some("--ndb-recv-thread-cpu-mask=bitmask".to_string()), dynamic: Some(false), @@ -923,7 +923,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-wait-connected".to_string(), + id: Some("option_mysqld_ndb-wait-connected".to_string()), name: Some("ndb-wait-connected".to_string()), cli: Some("--ndb-wait-connected=seconds".to_string()), scope: Some(vec!["global".to_string()]), @@ -936,7 +936,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_ndb-wait-setup".to_string(), + id: Some("option_mysqld_ndb-wait-setup".to_string()), name: Some("ndb-wait-setup".to_string()), cli: Some("--ndb-wait-setup=seconds".to_string()), scope: Some(vec!["global".to_string()]), @@ -949,7 +949,7 @@ mod tests { KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_skip-ndbcluster".to_string(), + id: Some("option_mysqld_skip-ndbcluster".to_string()), name: Some("skip-ndbcluster".to_string()), cli: Some("--skip-ndbcluster".to_string()), dynamic: Some(false), @@ -965,7 +965,7 @@ mod tests { cli: Some("--ndb-transid-mysql-connection-map[=state]".to_string()), default: Some("ON".to_string()), dynamic: None, - id: "option_mysqld_ndb-transid-mysql-connection-map".to_string(), + id: Some("option_mysqld_ndb-transid-mysql-connection-map".to_string()), name: Some("ndb_transid_mysql_connection_map".to_string()), r#type: Some("enumeration".to_string()), valid_values: Some(vec!["ON".to_string(), "OFF".to_string(), "FORCE".to_string()]), @@ -987,7 +987,7 @@ mod tests { vec![KbParsedEntry { has_description: false, is_removed: false, - id: "option_mysqld_mysqlx".to_string(), + id: Some("option_mysqld_mysqlx".to_string()), cli: Some("--mysqlx[=value]".to_string()), r#type: Some("enumeration".to_string()), default: Some("ON".to_string()), @@ -1020,7 +1020,7 @@ mod tests { cli: Some("--auto-increment-increment=#".to_string()), default: Some("1".to_string()), dynamic: Some(true), - id: "sysvar_auto_increment_increment".to_string(), + id: Some("sysvar_auto_increment_increment".to_string()), name: Some("auto_increment_increment".to_string()), range: Some(Range { to_upwards: None, @@ -1039,7 +1039,7 @@ mod tests { cli: Some("--auto-increment-offset=#".to_string()), default: Some("1".to_string()), dynamic: Some(true), - id: "sysvar_auto_increment_offset".to_string(), + id: Some("sysvar_auto_increment_offset".to_string()), name: Some("auto_increment_offset".to_string()), range: Some(Range { to_upwards: None, @@ -1071,7 +1071,7 @@ mod tests { cli: Some("--server-id=#".to_string()), default: Some("1".to_string()), dynamic: Some(true), - id: "sysvar_server_id".to_string(), + id: Some("sysvar_server_id".to_string()), name: Some("server_id".to_string()), range: Some(Range { to_upwards: None, @@ -1090,7 +1090,7 @@ mod tests { cli: None, default: None, dynamic: Some(false), - id: "sysvar_server_uuid".to_string(), + id: Some("sysvar_server_uuid".to_string()), name: Some("server_uuid".to_string()), range: None, scope: Some(vec!["global".to_string()]), @@ -1115,7 +1115,7 @@ mod tests { cli: Some("--basedir=dir_name".to_string()), default: Some("parent of mysqld installation directory".to_string()), dynamic: Some(false), - id: "sysvar_basedir".to_string(), + id: Some("sysvar_basedir".to_string()), name: Some("basedir".to_string()), scope: Some(vec!["global".to_string()]), r#type: Some("directory name".to_string()), diff --git a/src/rust/search.rs b/src/rust/search.rs index 3ca32249..37031a3d 100644 --- a/src/rust/search.rs +++ b/src/rust/search.rs @@ -57,13 +57,13 @@ mod tests { .as_str() ); assert_eq!( - "https://mariadb.com/kb/en/library/documentation/gtid/#server_id", + "https://mariadb.com/kb/en/gtid/#server_id", data.get_by_name("server_id", SearchType::MariaDB) .unwrap() .as_str() ); assert_eq!( - "https://mariadb.com/kb/en/library/documentation/gtid/#server_id", + "https://mariadb.com/kb/en/gtid/#server_id", data.get_by_name("server_id", SearchType::Any) .unwrap() .as_str()