File: restore_sysvars.inc

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (40 lines) | stat: -rw-r--r-- 1,284 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# ==== Purpose ====
#
# The purpose of this utility script is to restore the values of given
# configuration variables previously save by `include/save_sysvars.inc`.
#
# IMPORTANT NOTE: The `include/destroy_json_functions.inc` must be included
# by the test including this script (since there is no knowledge if JSON
# functions are being used prior to invoking this script, JSON functions
# can't be cleared within this script). If using replication
# infra-structure, `include/destroy_json_functions.inc` will be already
# included by `include/rpl_end.inc`.
#
# ==== Usage ====
#
# --source include/restore_sysvars.inc
#
if (!$sysvar_stack) {
  --die ERROR: `include/save_sysvars.inc` must be included prior to `include/restore_sysvars.inc`
}

--let $include_filename = restore_sysvars.inc
--source include/begin_include_file.inc

--let $json_label = saved_sysvars_values
--source include/create_json_iterator.inc

--disable_query_log
--let $json_array = $sysvar_stack
--source $json_saved_sysvars_values_start
--eval SET$json_saved_sysvars_values_value
--enable_query_log

--let $sysvar_stack = escape(\',$sysvar_stack)
--let $sysvar_stack = `SELECT JSON_REMOVE('$sysvar_stack', '$[0]')`

if ($sysvar_stack == []) {
  --let $sysvar_stack =
}

--source include/end_include_file.inc