File: begin_include_file.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 (101 lines) | stat: -rw-r--r-- 3,524 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# ==== Purpose ====
#
# This is an auxiliary file that facilitates writing include/*.inc
# files. It has three purposes:
#
#  1. Store mtr's state at the beginning of the .inc file and restore
#     the state at the end. The following status is restored:
#
#     disable_warnings
#     disable_query_log
#     disable_result_log
#     disable_abort_on_errors
#     Current connection
#
#  2. This file also prints the name of the .inc file that sources
#     it. Only the name of the top-level .inc file is printed: if
#     file_1.inc sources file_2.inc, then this file only prints
#     file_1.inc.
#
#  3.  If the mysqltest variable $rpl_debug is set, then
#      this file will print:
#
#        ==== BEGIN include/<filename> ====
#
#      and end_include_file.inc will print
#
#        ==== END include/<filename> ====
#
#      These printouts are indented to make it easier to read the
#      result log.
#
#
# ==== Usage ====
#
# # At the beginning of include/my_file.inc:
# --let $include_filename= my_file.inc
# [--let $include_silent= 1]
# [--let $rpl_debug= 1]
# --source include/begin_include_file.inc
#
# # At the end of include/my_file.inc:
# --let $include_filename= my_file.inc
# --source include/end_include_file.inc
#
# Parameters:
#   $include_filename
#     The basename of the file: a file named /path/to/my_file.inc
#     should set $include_filename=my_file.inc.  This parameter
#     must be provided both for begin_include_file.inc and
#     end_include_file.inc.
#
#   $include_silent
#     By default, the following string is printed to the result file:
#       include/$include_filename
#     If this variable is set, this printout is inhibited.
#
#   $rpl_debug
#     If set, this script will print the following text:
#      ==== BEGIN include/$include_filename.inc ====


# Print 'include/$include_filename', but only when invoked from
# the top-level. We don't want to print
# 'include/$include_filename' from all files included
# recursively.
if (!$_include_file_depth)
{
  if (!$include_silent)
  {
    --echo include/$include_filename
  }
  --let $_include_file_depth= 0
}
--inc $_include_file_depth
if ($rpl_debug)
{
  --echo $_include_file_indent==== BEGIN include/$include_filename ====
  # Print this text (just once) to prevent checking in result files containing
  # debug info.
  if (!$printed_this_should_not_be_checked_in)
  {
    --echo DO_NOT_CHECK_IN_THIS_LINE: \$rpl_debug should only be used for debugging. Never check in a test that has \$rpl_debug=1.
    --let $printed_this_should_not_be_checked_in= 1
  }
}

--let $_include_file_disable_warnings_list  = $DISABLED_WARNINGS_LIST|$_include_file_disable_warnings_list
--let $_include_file_enable_warnings_list   = $ENABLED_WARNINGS_LIST|$_include_file_enable_warnings_list
--let $_include_file_enabled_warnings       = $ENABLE_WARNINGS$_include_file_enabled_warnings
--let $_include_file_enabled_query_log      = $ENABLE_QUERY_LOG$_include_file_enabled_query_log
--let $_include_file_enabled_result_log     = $ENABLE_RESULT_LOG$_include_file_enabled_result_log
--let $_include_file_enabled_abort_on_error = $ENABLE_ABORT_ON_ERROR$_include_file_enabled_abort_on_error
--let $_include_file_connection             = $CURRENT_CONNECTION,$_include_file_connection

if ($rpl_debug)
{
  --echo $_include_file_indent con='$CURRENT_CONNECTION' warn='$ENABLE_WARNINGS' qlog='$ENABLE_QUERY_LOG' rlog='$ENABLE_RESULT_LOG' aborterr='$ENABLE_ABORT_ON_ERROR'
}

--let $include_filename=
--let $_include_file_indent= .$_include_file_indent