2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
7
==== Initialization ====
9
SET @m_default_week_format= @@global.default_week_format;
10
SET @m_init_slave= @@global.init_slave;
11
SET @m_lc_time_names= @@global.lc_time_names;
12
SET @m_low_priority_updates= @@global.low_priority_updates;
13
SET @m_relay_log_purge= @@global.relay_log_purge;
14
SET @m_slave_exec_mode= @@global.slave_exec_mode;
15
SET @m_sql_mode= @@global.sql_mode;
16
SET @m_sync_binlog= @@global.sync_binlog;
18
SET @s_default_week_format= @@global.default_week_format;
19
SET @s_init_slave= @@global.init_slave;
20
SET @s_lc_time_names= @@global.lc_time_names;
21
SET @s_low_priority_updates= @@global.low_priority_updates;
22
SET @s_relay_log_purge= @@global.relay_log_purge;
23
SET @s_slave_exec_mode= @@global.slave_exec_mode;
24
SET @s_sql_mode= @@global.sql_mode;
25
SET @s_sync_binlog= @@global.sync_binlog;
26
SET @@global.relay_log_purge = OFF;
27
SET @@global.sync_binlog = 1000000;
28
SET @@global.slave_exec_mode = 'STRICT';
29
SET @@sql_big_selects = OFF;
30
SET @@last_insert_id = 10;
31
SET @@global.low_priority_updates = OFF;
32
SET @@local.low_priority_updates = OFF;
33
SET @@global.default_week_format = 1;
34
SET @@local.default_week_format = 2;
35
SET @@global.lc_time_names = 'zh_HK';
36
SET @@local.lc_time_names = 'zh_TW';
37
SET @@global.sql_mode = 'ALLOW_INVALID_DATES';
38
SET @@local.sql_mode = 'ANSI_QUOTES,ERROR_FOR_DIVISION_BY_ZERO,HIGH_NOT_PRECEDENCE';
40
SET @user_text = 'Alunda';
42
**** Resetting master and slave ****
48
SET @@global.init_slave = 'ant';
50
CREATE TABLE tstmt (id INT AUTO_INCREMENT PRIMARY KEY,
54
CREATE TABLE tproc LIKE tstmt;
55
CREATE TABLE tfunc LIKE tstmt;
56
CREATE TABLE ttrig LIKE tstmt;
57
CREATE TABLE tprep LIKE tstmt;
58
CREATE TABLE trigger_table (text CHAR(4));
59
==== Insert variables directly ====
60
---- global variables ----
61
SET @@global.relay_log_purge = ON;
62
INSERT INTO tstmt(truth) VALUES (@@global.relay_log_purge);
63
SET @@global.relay_log_purge = OFF;
64
INSERT INTO tstmt(truth) VALUES (@@global.relay_log_purge);
65
SET @@global.sync_binlog = 2000000;
66
INSERT INTO tstmt(num) VALUES (@@global.sync_binlog);
67
SET @@global.sync_binlog = 3000000;
68
INSERT INTO tstmt(num) VALUES (@@global.sync_binlog);
69
SET @@global.init_slave = 'bison';
70
INSERT INTO tstmt(text) VALUES (@@global.init_slave);
71
SET @@global.init_slave = 'cat';
72
INSERT INTO tstmt(text) VALUES (@@global.init_slave);
73
SET @@global.slave_exec_mode = 'IDEMPOTENT';
74
INSERT INTO tstmt(text) VALUES (@@global.slave_exec_mode);
75
SET @@global.slave_exec_mode = 'STRICT';
76
INSERT INTO tstmt(text) VALUES (@@global.slave_exec_mode);
77
---- session variables ----
78
SET @@sql_big_selects = ON;
79
INSERT INTO tstmt(truth) VALUES (@@sql_big_selects);
80
SET @@sql_big_selects = OFF;
81
INSERT INTO tstmt(truth) VALUES (@@sql_big_selects);
82
SET @@last_insert_id = 20;
83
INSERT INTO tstmt(num) VALUES (@@last_insert_id);
84
SET @@last_insert_id = 30;
85
INSERT INTO tstmt(num) VALUES (@@last_insert_id);
86
---- global and session variables ----
87
SET @@global.low_priority_updates = ON;
88
SET @@local.low_priority_updates = OFF;
89
INSERT INTO tstmt(truth) VALUES (@@global.low_priority_updates);
90
INSERT INTO tstmt(truth) VALUES (@@local.low_priority_updates);
91
SET @@global.low_priority_updates = OFF;
92
SET @@local.low_priority_updates = ON;
93
INSERT INTO tstmt(truth) VALUES (@@global.low_priority_updates);
94
INSERT INTO tstmt(truth) VALUES (@@local.low_priority_updates);
95
SET @@global.default_week_format = 3;
96
SET @@local.default_week_format = 4;
97
INSERT INTO tstmt(num) VALUES (@@global.default_week_format);
98
INSERT INTO tstmt(num) VALUES (@@local.default_week_format);
99
SET @@global.default_week_format = 5;
100
SET @@local.default_week_format = 6;
101
INSERT INTO tstmt(num) VALUES (@@global.default_week_format);
102
INSERT INTO tstmt(num) VALUES (@@local.default_week_format);
103
SET @@global.lc_time_names = 'sv_SE';
104
SET @@local.lc_time_names = 'sv_FI';
105
INSERT INTO tstmt(text) VALUES (@@global.lc_time_names);
106
INSERT INTO tstmt(text) VALUES (@@local.lc_time_names);
107
SET @@global.lc_time_names = 'ar_TN';
108
SET @@local.lc_time_names = 'ar_IQ';
109
INSERT INTO tstmt(text) VALUES (@@global.lc_time_names);
110
INSERT INTO tstmt(text) VALUES (@@local.lc_time_names);
111
SET @@global.sql_mode = '';
112
SET @@local.sql_mode = 'IGNORE_SPACE,NO_AUTO_CREATE_USER';
113
INSERT INTO tstmt(text) VALUES (@@global.sql_mode);
114
INSERT INTO tstmt(text) VALUES (@@local.sql_mode);
115
SET @@global.sql_mode = 'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION';
116
SET @@local.sql_mode = 'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS';
117
INSERT INTO tstmt(text) VALUES (@@global.sql_mode);
118
INSERT INTO tstmt(text) VALUES (@@local.sql_mode);
119
---- user variables ----
121
INSERT INTO tstmt(num) VALUES (@user_num);
123
INSERT INTO tstmt(num) VALUES (@user_num);
124
SET @user_text = 'Bergsbrunna';
125
INSERT INTO tstmt(text) VALUES (@user_text);
126
SET @user_text = 'Centrum';
127
INSERT INTO tstmt(text) VALUES (@user_text);
128
==== Insert variables from a stored procedure ====
129
CREATE PROCEDURE proc()
133
SET @@global.relay_log_purge = ON;
134
INSERT INTO tproc(truth) VALUES (@@global.relay_log_purge);
135
SET @@global.relay_log_purge = OFF;
136
INSERT INTO tproc(truth) VALUES (@@global.relay_log_purge);
138
SET @@global.sync_binlog = 2000000;
139
INSERT INTO tproc(num) VALUES (@@global.sync_binlog);
140
SET @@global.sync_binlog = 3000000;
141
INSERT INTO tproc(num) VALUES (@@global.sync_binlog);
143
SET @@global.init_slave = 'bison';
144
INSERT INTO tproc(text) VALUES (@@global.init_slave);
145
SET @@global.init_slave = 'cat';
146
INSERT INTO tproc(text) VALUES (@@global.init_slave);
148
SET @@global.slave_exec_mode = 'IDEMPOTENT';
149
INSERT INTO tproc(text) VALUES (@@global.slave_exec_mode);
150
SET @@global.slave_exec_mode = 'STRICT';
151
INSERT INTO tproc(text) VALUES (@@global.slave_exec_mode);
154
SET @@sql_big_selects = ON;
155
INSERT INTO tproc(truth) VALUES (@@sql_big_selects);
156
SET @@sql_big_selects = OFF;
157
INSERT INTO tproc(truth) VALUES (@@sql_big_selects);
159
SET @@last_insert_id = 20;
160
INSERT INTO tproc(num) VALUES (@@last_insert_id);
161
SET @@last_insert_id = 30;
162
INSERT INTO tproc(num) VALUES (@@last_insert_id);
165
SET @@global.low_priority_updates = ON;
166
SET @@local.low_priority_updates = OFF;
167
INSERT INTO tproc(truth) VALUES (@@global.low_priority_updates);
168
INSERT INTO tproc(truth) VALUES (@@local.low_priority_updates);
169
SET @@global.low_priority_updates = OFF;
170
SET @@local.low_priority_updates = ON;
171
INSERT INTO tproc(truth) VALUES (@@global.low_priority_updates);
172
INSERT INTO tproc(truth) VALUES (@@local.low_priority_updates);
174
SET @@global.default_week_format = 3;
175
SET @@local.default_week_format = 4;
176
INSERT INTO tproc(num) VALUES (@@global.default_week_format);
177
INSERT INTO tproc(num) VALUES (@@local.default_week_format);
178
SET @@global.default_week_format = 5;
179
SET @@local.default_week_format = 6;
180
INSERT INTO tproc(num) VALUES (@@global.default_week_format);
181
INSERT INTO tproc(num) VALUES (@@local.default_week_format);
183
SET @@global.lc_time_names = 'sv_SE';
184
SET @@local.lc_time_names = 'sv_FI';
185
INSERT INTO tproc(text) VALUES (@@global.lc_time_names);
186
INSERT INTO tproc(text) VALUES (@@local.lc_time_names);
187
SET @@global.lc_time_names = 'ar_TN';
188
SET @@local.lc_time_names = 'ar_IQ';
189
INSERT INTO tproc(text) VALUES (@@global.lc_time_names);
190
INSERT INTO tproc(text) VALUES (@@local.lc_time_names);
192
SET @@global.sql_mode = '';
193
SET @@local.sql_mode = 'IGNORE_SPACE,NO_AUTO_CREATE_USER';
194
INSERT INTO tproc(text) VALUES (@@global.sql_mode);
195
INSERT INTO tproc(text) VALUES (@@local.sql_mode);
196
SET @@global.sql_mode = 'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION';
197
SET @@local.sql_mode = 'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS';
198
INSERT INTO tproc(text) VALUES (@@global.sql_mode);
199
INSERT INTO tproc(text) VALUES (@@local.sql_mode);
203
INSERT INTO tproc(num) VALUES (@user_num);
205
INSERT INTO tproc(num) VALUES (@user_num);
207
SET @user_text = 'Bergsbrunna';
208
INSERT INTO tproc(text) VALUES (@user_text);
209
SET @user_text = 'Centrum';
210
INSERT INTO tproc(text) VALUES (@user_text);
213
==== Insert variables from a stored function ====
214
CREATE FUNCTION func()
219
SET @@global.relay_log_purge = ON;
220
INSERT INTO tfunc(truth) VALUES (@@global.relay_log_purge);
221
SET @@global.relay_log_purge = OFF;
222
INSERT INTO tfunc(truth) VALUES (@@global.relay_log_purge);
224
SET @@global.sync_binlog = 2000000;
225
INSERT INTO tfunc(num) VALUES (@@global.sync_binlog);
226
SET @@global.sync_binlog = 3000000;
227
INSERT INTO tfunc(num) VALUES (@@global.sync_binlog);
229
SET @@global.init_slave = 'bison';
230
INSERT INTO tfunc(text) VALUES (@@global.init_slave);
231
SET @@global.init_slave = 'cat';
232
INSERT INTO tfunc(text) VALUES (@@global.init_slave);
234
SET @@global.slave_exec_mode = 'IDEMPOTENT';
235
INSERT INTO tfunc(text) VALUES (@@global.slave_exec_mode);
236
SET @@global.slave_exec_mode = 'STRICT';
237
INSERT INTO tfunc(text) VALUES (@@global.slave_exec_mode);
240
SET @@sql_big_selects = ON;
241
INSERT INTO tfunc(truth) VALUES (@@sql_big_selects);
242
SET @@sql_big_selects = OFF;
243
INSERT INTO tfunc(truth) VALUES (@@sql_big_selects);
245
SET @@last_insert_id = 20;
246
INSERT INTO tfunc(num) VALUES (@@last_insert_id);
247
SET @@last_insert_id = 30;
248
INSERT INTO tfunc(num) VALUES (@@last_insert_id);
251
SET @@global.low_priority_updates = ON;
252
SET @@local.low_priority_updates = OFF;
253
INSERT INTO tfunc(truth) VALUES (@@global.low_priority_updates);
254
INSERT INTO tfunc(truth) VALUES (@@local.low_priority_updates);
255
SET @@global.low_priority_updates = OFF;
256
SET @@local.low_priority_updates = ON;
257
INSERT INTO tfunc(truth) VALUES (@@global.low_priority_updates);
258
INSERT INTO tfunc(truth) VALUES (@@local.low_priority_updates);
260
SET @@global.default_week_format = 3;
261
SET @@local.default_week_format = 4;
262
INSERT INTO tfunc(num) VALUES (@@global.default_week_format);
263
INSERT INTO tfunc(num) VALUES (@@local.default_week_format);
264
SET @@global.default_week_format = 5;
265
SET @@local.default_week_format = 6;
266
INSERT INTO tfunc(num) VALUES (@@global.default_week_format);
267
INSERT INTO tfunc(num) VALUES (@@local.default_week_format);
269
SET @@global.lc_time_names = 'sv_SE';
270
SET @@local.lc_time_names = 'sv_FI';
271
INSERT INTO tfunc(text) VALUES (@@global.lc_time_names);
272
INSERT INTO tfunc(text) VALUES (@@local.lc_time_names);
273
SET @@global.lc_time_names = 'ar_TN';
274
SET @@local.lc_time_names = 'ar_IQ';
275
INSERT INTO tfunc(text) VALUES (@@global.lc_time_names);
276
INSERT INTO tfunc(text) VALUES (@@local.lc_time_names);
278
SET @@global.sql_mode = '';
279
SET @@local.sql_mode = 'IGNORE_SPACE,NO_AUTO_CREATE_USER';
280
INSERT INTO tfunc(text) VALUES (@@global.sql_mode);
281
INSERT INTO tfunc(text) VALUES (@@local.sql_mode);
282
SET @@global.sql_mode = 'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION';
283
SET @@local.sql_mode = 'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS';
284
INSERT INTO tfunc(text) VALUES (@@global.sql_mode);
285
INSERT INTO tfunc(text) VALUES (@@local.sql_mode);
289
INSERT INTO tfunc(num) VALUES (@user_num);
291
INSERT INTO tfunc(num) VALUES (@user_num);
293
SET @user_text = 'Bergsbrunna';
294
INSERT INTO tfunc(text) VALUES (@user_text);
295
SET @user_text = 'Centrum';
296
INSERT INTO tfunc(text) VALUES (@user_text);
302
==== Insert variables from a trigger ====
304
BEFORE INSERT ON trigger_table
309
SET @@global.relay_log_purge = ON;
310
INSERT INTO ttrig(truth) VALUES (@@global.relay_log_purge);
311
SET @@global.relay_log_purge = OFF;
312
INSERT INTO ttrig(truth) VALUES (@@global.relay_log_purge);
314
SET @@global.sync_binlog = 2000000;
315
INSERT INTO ttrig(num) VALUES (@@global.sync_binlog);
316
SET @@global.sync_binlog = 3000000;
317
INSERT INTO ttrig(num) VALUES (@@global.sync_binlog);
319
SET @@global.init_slave = 'bison';
320
INSERT INTO ttrig(text) VALUES (@@global.init_slave);
321
SET @@global.init_slave = 'cat';
322
INSERT INTO ttrig(text) VALUES (@@global.init_slave);
324
SET @@global.slave_exec_mode = 'IDEMPOTENT';
325
INSERT INTO ttrig(text) VALUES (@@global.slave_exec_mode);
326
SET @@global.slave_exec_mode = 'STRICT';
327
INSERT INTO ttrig(text) VALUES (@@global.slave_exec_mode);
330
SET @@sql_big_selects = ON;
331
INSERT INTO ttrig(truth) VALUES (@@sql_big_selects);
332
SET @@sql_big_selects = OFF;
333
INSERT INTO ttrig(truth) VALUES (@@sql_big_selects);
335
SET @@last_insert_id = 20;
336
INSERT INTO ttrig(num) VALUES (@@last_insert_id);
337
SET @@last_insert_id = 30;
338
INSERT INTO ttrig(num) VALUES (@@last_insert_id);
341
SET @@global.low_priority_updates = ON;
342
SET @@local.low_priority_updates = OFF;
343
INSERT INTO ttrig(truth) VALUES (@@global.low_priority_updates);
344
INSERT INTO ttrig(truth) VALUES (@@local.low_priority_updates);
345
SET @@global.low_priority_updates = OFF;
346
SET @@local.low_priority_updates = ON;
347
INSERT INTO ttrig(truth) VALUES (@@global.low_priority_updates);
348
INSERT INTO ttrig(truth) VALUES (@@local.low_priority_updates);
350
SET @@global.default_week_format = 3;
351
SET @@local.default_week_format = 4;
352
INSERT INTO ttrig(num) VALUES (@@global.default_week_format);
353
INSERT INTO ttrig(num) VALUES (@@local.default_week_format);
354
SET @@global.default_week_format = 5;
355
SET @@local.default_week_format = 6;
356
INSERT INTO ttrig(num) VALUES (@@global.default_week_format);
357
INSERT INTO ttrig(num) VALUES (@@local.default_week_format);
359
SET @@global.lc_time_names = 'sv_SE';
360
SET @@local.lc_time_names = 'sv_FI';
361
INSERT INTO ttrig(text) VALUES (@@global.lc_time_names);
362
INSERT INTO ttrig(text) VALUES (@@local.lc_time_names);
363
SET @@global.lc_time_names = 'ar_TN';
364
SET @@local.lc_time_names = 'ar_IQ';
365
INSERT INTO ttrig(text) VALUES (@@global.lc_time_names);
366
INSERT INTO ttrig(text) VALUES (@@local.lc_time_names);
368
SET @@global.sql_mode = '';
369
SET @@local.sql_mode = 'IGNORE_SPACE,NO_AUTO_CREATE_USER';
370
INSERT INTO ttrig(text) VALUES (@@global.sql_mode);
371
INSERT INTO ttrig(text) VALUES (@@local.sql_mode);
372
SET @@global.sql_mode = 'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION';
373
SET @@local.sql_mode = 'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS';
374
INSERT INTO ttrig(text) VALUES (@@global.sql_mode);
375
INSERT INTO ttrig(text) VALUES (@@local.sql_mode);
379
INSERT INTO ttrig(num) VALUES (@user_num);
381
INSERT INTO ttrig(num) VALUES (@user_num);
383
SET @user_text = 'Bergsbrunna';
384
INSERT INTO ttrig(text) VALUES (@user_text);
385
SET @user_text = 'Centrum';
386
INSERT INTO ttrig(text) VALUES (@user_text);
388
INSERT INTO trigger_table VALUES ('bye.');
389
==== Insert variables from a prepared statement ====
390
PREPARE p1 FROM 'SET @@global.relay_log_purge = ON';
391
PREPARE p2 FROM 'INSERT INTO tprep(truth) VALUES (@@global.relay_log_purge)';
392
PREPARE p3 FROM 'SET @@global.relay_log_purge = OFF';
393
PREPARE p4 FROM 'INSERT INTO tprep(truth) VALUES (@@global.relay_log_purge)';
394
PREPARE p5 FROM 'SET @@global.sync_binlog = 2000000';
395
PREPARE p6 FROM 'INSERT INTO tprep(num) VALUES (@@global.sync_binlog)';
396
PREPARE p7 FROM 'SET @@global.sync_binlog = 3000000';
397
PREPARE p8 FROM 'INSERT INTO tprep(num) VALUES (@@global.sync_binlog)';
398
PREPARE p9 FROM 'SET @@global.init_slave = \'bison\'';
399
PREPARE p10 FROM 'INSERT INTO tprep(text) VALUES (@@global.init_slave)';
400
PREPARE p11 FROM 'SET @@global.init_slave = \'cat\'';
401
PREPARE p12 FROM 'INSERT INTO tprep(text) VALUES (@@global.init_slave)';
402
PREPARE p13 FROM 'SET @@global.slave_exec_mode = \'IDEMPOTENT\'';
403
PREPARE p14 FROM 'INSERT INTO tprep(text) VALUES (@@global.slave_exec_mode)';
404
PREPARE p15 FROM 'SET @@global.slave_exec_mode = \'STRICT\'';
405
PREPARE p16 FROM 'INSERT INTO tprep(text) VALUES (@@global.slave_exec_mode)';
406
PREPARE p17 FROM 'SET @@sql_big_selects = ON';
407
PREPARE p18 FROM 'INSERT INTO tprep(truth) VALUES (@@sql_big_selects)';
408
PREPARE p19 FROM 'SET @@sql_big_selects = OFF';
409
PREPARE p20 FROM 'INSERT INTO tprep(truth) VALUES (@@sql_big_selects)';
410
PREPARE p21 FROM 'SET @@last_insert_id = 20';
411
PREPARE p22 FROM 'INSERT INTO tprep(num) VALUES (@@last_insert_id)';
412
PREPARE p23 FROM 'SET @@last_insert_id = 30';
413
PREPARE p24 FROM 'INSERT INTO tprep(num) VALUES (@@last_insert_id)';
414
PREPARE p25 FROM 'SET @@global.low_priority_updates = ON';
415
PREPARE p26 FROM 'SET @@local.low_priority_updates = OFF';
416
PREPARE p27 FROM 'INSERT INTO tprep(truth) VALUES (@@global.low_priority_updates)';
417
PREPARE p28 FROM 'INSERT INTO tprep(truth) VALUES (@@local.low_priority_updates)';
418
PREPARE p29 FROM 'SET @@global.low_priority_updates = OFF';
419
PREPARE p30 FROM 'SET @@local.low_priority_updates = ON';
420
PREPARE p31 FROM 'INSERT INTO tprep(truth) VALUES (@@global.low_priority_updates)';
421
PREPARE p32 FROM 'INSERT INTO tprep(truth) VALUES (@@local.low_priority_updates)';
422
PREPARE p33 FROM 'SET @@global.default_week_format = 3';
423
PREPARE p34 FROM 'SET @@local.default_week_format = 4';
424
PREPARE p35 FROM 'INSERT INTO tprep(num) VALUES (@@global.default_week_format)';
425
PREPARE p36 FROM 'INSERT INTO tprep(num) VALUES (@@local.default_week_format)';
426
PREPARE p37 FROM 'SET @@global.default_week_format = 5';
427
PREPARE p38 FROM 'SET @@local.default_week_format = 6';
428
PREPARE p39 FROM 'INSERT INTO tprep(num) VALUES (@@global.default_week_format)';
429
PREPARE p40 FROM 'INSERT INTO tprep(num) VALUES (@@local.default_week_format)';
430
PREPARE p41 FROM 'SET @@global.lc_time_names = \'sv_SE\'';
431
PREPARE p42 FROM 'SET @@local.lc_time_names = \'sv_FI\'';
432
PREPARE p43 FROM 'INSERT INTO tprep(text) VALUES (@@global.lc_time_names)';
433
PREPARE p44 FROM 'INSERT INTO tprep(text) VALUES (@@local.lc_time_names)';
434
PREPARE p45 FROM 'SET @@global.lc_time_names = \'ar_TN\'';
435
PREPARE p46 FROM 'SET @@local.lc_time_names = \'ar_IQ\'';
436
PREPARE p47 FROM 'INSERT INTO tprep(text) VALUES (@@global.lc_time_names)';
437
PREPARE p48 FROM 'INSERT INTO tprep(text) VALUES (@@local.lc_time_names)';
438
PREPARE p49 FROM 'SET @@global.sql_mode = \'\'';
439
PREPARE p50 FROM 'SET @@local.sql_mode = \'IGNORE_SPACE,NO_AUTO_CREATE_USER\'';
440
PREPARE p51 FROM 'INSERT INTO tprep(text) VALUES (@@global.sql_mode)';
441
PREPARE p52 FROM 'INSERT INTO tprep(text) VALUES (@@local.sql_mode)';
442
PREPARE p53 FROM 'SET @@global.sql_mode = \'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION\'';
443
PREPARE p54 FROM 'SET @@local.sql_mode = \'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS\'';
444
PREPARE p55 FROM 'INSERT INTO tprep(text) VALUES (@@global.sql_mode)';
445
PREPARE p56 FROM 'INSERT INTO tprep(text) VALUES (@@local.sql_mode)';
446
PREPARE p57 FROM 'SET @user_num = 20';
447
PREPARE p58 FROM 'INSERT INTO tprep(num) VALUES (@user_num)';
448
PREPARE p59 FROM 'SET @user_num = 30';
449
PREPARE p60 FROM 'INSERT INTO tprep(num) VALUES (@user_num)';
450
PREPARE p61 FROM 'SET @user_text = \'Bergsbrunna\'';
451
PREPARE p62 FROM 'INSERT INTO tprep(text) VALUES (@user_text)';
452
PREPARE p63 FROM 'SET @user_text = \'Centrum\'';
453
PREPARE p64 FROM 'INSERT INTO tprep(text) VALUES (@user_text)';
519
SELECT * FROM tstmt ORDER BY id;
527
7 NULL NULL IDEMPOTENT
546
26 NULL NULL IGNORE_SPACE,NO_AUTO_CREATE_USER
547
27 NULL NULL NO_DIR_IN_CREATE,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_ENGINE_SUBSTITUTION
548
28 NULL NULL NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS
551
31 NULL NULL Bergsbrunna
553
Comparing tables master:test.tstmt and master:test.tproc
554
Comparing tables master:test.tstmt and master:test.tfunc
555
Comparing tables master:test.tstmt and master:test.ttrig
556
Comparing tables master:test.tstmt and master:test.tprep
557
Comparing tables master:test.tstmt and slave:test.tstmt
558
Comparing tables master:test.tstmt and slave:test.tproc
559
Comparing tables master:test.tstmt and slave:test.tfunc
560
Comparing tables master:test.tstmt and slave:test.ttrig
561
Comparing tables master:test.tstmt and slave:test.tprep
567
DROP TABLE tstmt, tproc, tfunc, ttrig, tprep, trigger_table;
568
SET @@global.default_week_format= @m_default_week_format;
569
SET @@global.init_slave= @m_init_slave;
570
SET @@global.lc_time_names= @m_lc_time_names;
571
SET @@global.low_priority_updates= @m_low_priority_updates;
572
SET @@global.relay_log_purge= @m_relay_log_purge;
573
SET @@global.slave_exec_mode= @m_slave_exec_mode;
574
SET @@global.sql_mode= @m_sql_mode;
575
SET @@global.sync_binlog= @m_sync_binlog;
577
SET @@global.default_week_format= @s_default_week_format;
578
SET @@global.init_slave= @s_init_slave;
579
SET @@global.lc_time_names= @s_lc_time_names;
580
SET @@global.low_priority_updates= @s_low_priority_updates;
581
SET @@global.relay_log_purge= @s_relay_log_purge;
582
SET @@global.slave_exec_mode= @s_slave_exec_mode;
583
SET @@global.sql_mode= @s_sql_mode;
584
SET @@global.sync_binlog= @s_sync_binlog;