mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-28201: Server crashes upon SHOW ANALYZE/EXPLAIN FORMAT=JSON
- Describe the lifetime of EXPLAIN data structures in sql_explain.h:ExplainDataStructureLifetime. - Make Item_field::set_field() call set_refers_to_temp_table() when it refers to a temp. table. - Introduce QT_DONT_ACCESS_TMP_TABLES flag for Item::print. It directs Item_field::print to not try access its the temp table. - Introduce Explain_query::notify_tables_are_closed() and call it right before the query closes its tables. - Make Explain data stuctures' print_explain_json() methods accept "no_tmp_tbl" parameter which means pass QT_DONT_ACCESS_TMP_TABLES when printing items. - Make Show_explain_request::call_in_target_thread() not call set_current_thd(). This wasn't needed as the code inside lex->print_explain() uses output->thd anyway. output->thd refers to the SHOW command's THD object.
This commit is contained in:
@ -128,11 +128,11 @@ relative_event_id relative_end_event_id event_name comment nesting_event_type re
|
||||
11 11 stage/sql/Executing (stage) STATEMENT 0
|
||||
12 12 stage/sql/End of update loop (stage) STATEMENT 0
|
||||
13 13 stage/sql/Query end (stage) STATEMENT 0
|
||||
14 14 stage/sql/Commit (stage) STATEMENT 0
|
||||
15 15 stage/sql/closing tables (stage) STATEMENT 0
|
||||
16 16 stage/sql/Starting cleanup (stage) STATEMENT 0
|
||||
17 18 stage/sql/Freeing items (stage) STATEMENT 0
|
||||
18 18 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 17
|
||||
14 15 stage/sql/Commit (stage) STATEMENT 0
|
||||
15 15 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 14
|
||||
16 16 stage/sql/closing tables (stage) STATEMENT 0
|
||||
17 17 stage/sql/Starting cleanup (stage) STATEMENT 0
|
||||
18 18 stage/sql/Freeing items (stage) STATEMENT 0
|
||||
19 19 wait/io/socket/sql/client_connection send STATEMENT 0
|
||||
20 21 stage/sql/Reset for next command (stage) STATEMENT 0
|
||||
21 21 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 20
|
||||
@ -152,11 +152,11 @@ relative_event_id relative_end_event_id event_name comment nesting_event_type re
|
||||
35 35 stage/sql/Executing (stage) STATEMENT 24
|
||||
36 36 stage/sql/End of update loop (stage) STATEMENT 24
|
||||
37 37 stage/sql/Query end (stage) STATEMENT 24
|
||||
38 38 stage/sql/Commit (stage) STATEMENT 24
|
||||
39 39 stage/sql/closing tables (stage) STATEMENT 24
|
||||
40 40 stage/sql/Starting cleanup (stage) STATEMENT 24
|
||||
41 42 stage/sql/Freeing items (stage) STATEMENT 24
|
||||
42 42 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 41
|
||||
38 39 stage/sql/Commit (stage) STATEMENT 24
|
||||
39 39 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 38
|
||||
40 40 stage/sql/closing tables (stage) STATEMENT 24
|
||||
41 41 stage/sql/Starting cleanup (stage) STATEMENT 24
|
||||
42 42 stage/sql/Freeing items (stage) STATEMENT 24
|
||||
43 43 wait/io/socket/sql/client_connection send STATEMENT 24
|
||||
44 45 stage/sql/Reset for next command (stage) STATEMENT 24
|
||||
45 45 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 44
|
||||
@ -176,11 +176,11 @@ relative_event_id relative_end_event_id event_name comment nesting_event_type re
|
||||
59 59 stage/sql/Executing (stage) STATEMENT 48
|
||||
60 60 stage/sql/End of update loop (stage) STATEMENT 48
|
||||
61 61 stage/sql/Query end (stage) STATEMENT 48
|
||||
62 62 stage/sql/Commit (stage) STATEMENT 48
|
||||
63 63 stage/sql/closing tables (stage) STATEMENT 48
|
||||
64 64 stage/sql/Starting cleanup (stage) STATEMENT 48
|
||||
65 66 stage/sql/Freeing items (stage) STATEMENT 48
|
||||
66 66 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 65
|
||||
62 63 stage/sql/Commit (stage) STATEMENT 48
|
||||
63 63 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 62
|
||||
64 64 stage/sql/closing tables (stage) STATEMENT 48
|
||||
65 65 stage/sql/Starting cleanup (stage) STATEMENT 48
|
||||
66 66 stage/sql/Freeing items (stage) STATEMENT 48
|
||||
67 67 wait/io/socket/sql/client_connection send STATEMENT 48
|
||||
68 69 stage/sql/Reset for next command (stage) STATEMENT 48
|
||||
69 69 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 68
|
||||
@ -203,12 +203,12 @@ select "With a third part to make things complete" as payload NULL NULL
|
||||
84 84 stage/sql/Executing (stage) STATEMENT 72
|
||||
85 85 stage/sql/End of update loop (stage) STATEMENT 72
|
||||
86 86 stage/sql/Query end (stage) STATEMENT 72
|
||||
87 87 stage/sql/Commit (stage) STATEMENT 72
|
||||
88 88 stage/sql/closing tables (stage) STATEMENT 72
|
||||
89 89 stage/sql/Starting cleanup (stage) STATEMENT 72
|
||||
90 92 stage/sql/Freeing items (stage) STATEMENT 72
|
||||
91 91 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 90
|
||||
92 92 wait/io/socket/sql/client_connection send STAGE 90
|
||||
87 88 stage/sql/Commit (stage) STATEMENT 72
|
||||
88 88 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 87
|
||||
89 89 stage/sql/closing tables (stage) STATEMENT 72
|
||||
90 90 stage/sql/Starting cleanup (stage) STATEMENT 72
|
||||
91 92 stage/sql/Freeing items (stage) STATEMENT 72
|
||||
92 92 wait/io/socket/sql/client_connection send STAGE 91
|
||||
93 110 statement/sql/select select "And this is the second part of a multi query" as payload;
|
||||
select "With a third part to make things complete" as payload NULL NULL
|
||||
94 96 stage/sql/starting (stage) STATEMENT 93
|
||||
@ -222,12 +222,12 @@ select "With a third part to make things complete" as payload NULL NULL
|
||||
102 102 stage/sql/Executing (stage) STATEMENT 93
|
||||
103 103 stage/sql/End of update loop (stage) STATEMENT 93
|
||||
104 104 stage/sql/Query end (stage) STATEMENT 93
|
||||
105 105 stage/sql/Commit (stage) STATEMENT 93
|
||||
106 106 stage/sql/closing tables (stage) STATEMENT 93
|
||||
107 107 stage/sql/Starting cleanup (stage) STATEMENT 93
|
||||
108 110 stage/sql/Freeing items (stage) STATEMENT 93
|
||||
109 109 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 108
|
||||
110 110 wait/io/socket/sql/client_connection send STAGE 108
|
||||
105 106 stage/sql/Commit (stage) STATEMENT 93
|
||||
106 106 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 105
|
||||
107 107 stage/sql/closing tables (stage) STATEMENT 93
|
||||
108 108 stage/sql/Starting cleanup (stage) STATEMENT 93
|
||||
109 110 stage/sql/Freeing items (stage) STATEMENT 93
|
||||
110 110 wait/io/socket/sql/client_connection send STAGE 109
|
||||
111 129 statement/sql/select select "With a third part to make things complete" as payload NULL NULL
|
||||
112 113 stage/sql/starting (stage) STATEMENT 111
|
||||
113 113 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 112
|
||||
@ -239,11 +239,11 @@ select "With a third part to make things complete" as payload NULL NULL
|
||||
119 119 stage/sql/Executing (stage) STATEMENT 111
|
||||
120 120 stage/sql/End of update loop (stage) STATEMENT 111
|
||||
121 121 stage/sql/Query end (stage) STATEMENT 111
|
||||
122 122 stage/sql/Commit (stage) STATEMENT 111
|
||||
123 123 stage/sql/closing tables (stage) STATEMENT 111
|
||||
124 124 stage/sql/Starting cleanup (stage) STATEMENT 111
|
||||
125 126 stage/sql/Freeing items (stage) STATEMENT 111
|
||||
126 126 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 125
|
||||
122 123 stage/sql/Commit (stage) STATEMENT 111
|
||||
123 123 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 122
|
||||
124 124 stage/sql/closing tables (stage) STATEMENT 111
|
||||
125 125 stage/sql/Starting cleanup (stage) STATEMENT 111
|
||||
126 126 stage/sql/Freeing items (stage) STATEMENT 111
|
||||
127 127 wait/io/socket/sql/client_connection send STATEMENT 111
|
||||
128 129 stage/sql/Reset for next command (stage) STATEMENT 111
|
||||
129 129 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 128
|
||||
@ -263,11 +263,11 @@ select "With a third part to make things complete" as payload NULL NULL
|
||||
143 143 stage/sql/Executing (stage) STATEMENT 132
|
||||
144 144 stage/sql/End of update loop (stage) STATEMENT 132
|
||||
145 145 stage/sql/Query end (stage) STATEMENT 132
|
||||
146 146 stage/sql/Commit (stage) STATEMENT 132
|
||||
147 147 stage/sql/closing tables (stage) STATEMENT 132
|
||||
148 148 stage/sql/Starting cleanup (stage) STATEMENT 132
|
||||
149 150 stage/sql/Freeing items (stage) STATEMENT 132
|
||||
150 150 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 149
|
||||
146 147 stage/sql/Commit (stage) STATEMENT 132
|
||||
147 147 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 146
|
||||
148 148 stage/sql/closing tables (stage) STATEMENT 132
|
||||
149 149 stage/sql/Starting cleanup (stage) STATEMENT 132
|
||||
150 150 stage/sql/Freeing items (stage) STATEMENT 132
|
||||
151 151 wait/io/socket/sql/client_connection send STATEMENT 132
|
||||
152 153 stage/sql/Reset for next command (stage) STATEMENT 132
|
||||
153 153 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 152
|
||||
|
Reference in New Issue
Block a user