~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
stop slave;
2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
3
reset master;
4
reset slave;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
6
start slave;
7
==== Initialization ====
8
[on master]
9
SET @m_pseudo_thread_id=         @@global.pseudo_thread_id;
10
SET @m_auto_increment_increment= @@global.auto_increment_increment;
11
SET @m_auto_increment_offset=    @@global.auto_increment_offset;
12
SET @m_character_set_client=     @@global.character_set_client;
13
SET @m_collation_connection=     @@global.collation_connection;
14
SET @m_collation_server=         @@global.collation_server;
15
SET @m_time_zone=                @@global.time_zone;
16
SET @m_lc_time_names=            @@global.lc_time_names;
17
SET @m_collation_database=       @@global.collation_database;
18
[on slave]
19
SET @s_pseudo_thread_id=         @@global.pseudo_thread_id;
20
SET @s_auto_increment_increment= @@global.auto_increment_increment;
21
SET @s_auto_increment_offset=    @@global.auto_increment_offset;
22
SET @s_character_set_client=     @@global.character_set_client;
23
SET @s_collation_connection=     @@global.collation_connection;
24
SET @s_collation_server=         @@global.collation_server;
25
SET @s_time_zone=                @@global.time_zone;
26
SET @s_lc_time_names=            @@global.lc_time_names;
27
SET @s_collation_database=       @@global.collation_database;
28
SET @@global.pseudo_thread_id= 4711;
29
SET @@global.auto_increment_increment=19;
30
SET @@global.auto_increment_offset=4;
31
SET @@global.character_set_client='latin2';
32
SET @@global.collation_connection='latin2_bin';
33
SET @@global.collation_server='geostd8_general_ci';
34
SET @@global.time_zone='Japan';
35
SET @@global.lc_time_names='sv_SE';
36
SET @@global.collation_database='geostd8_bin';
37
[on master]
38
CREATE TABLE tstmt (id INT AUTO_INCREMENT PRIMARY KEY,
39
num INT,
40
text VARCHAR(100));
41
CREATE TABLE tproc LIKE tstmt;
42
CREATE TABLE tfunc LIKE tstmt;
43
CREATE TABLE ttrig LIKE tstmt;
44
CREATE TABLE tprep LIKE tstmt;
45
CREATE TABLE trigger_table (text CHAR(4));
46
==== Insert variables directly ====
47
SET @@pseudo_thread_id= 4712;
48
INSERT INTO tstmt(num)  VALUES (@@session.pseudo_thread_id);
49
SET @@pseudo_thread_id= 4713;
50
INSERT INTO tstmt(num)  VALUES (@@session.pseudo_thread_id);
51
SET @@foreign_key_checks= 0;
52
INSERT INTO tstmt(num)  VALUES (@@session.foreign_key_checks);
53
SET @@foreign_key_checks= 1;
54
INSERT INTO tstmt(num)  VALUES (@@session.foreign_key_checks);
55
SET @@sql_auto_is_null= 0;
56
INSERT INTO tstmt(num)  VALUES (@@session.sql_auto_is_null);
57
SET @@sql_auto_is_null= 1;
58
INSERT INTO tstmt(num)  VALUES (@@session.sql_auto_is_null);
59
SET @@unique_checks= 0;
60
INSERT INTO tstmt(num)  VALUES (@@session.unique_checks);
61
SET @@unique_checks= 1;
62
INSERT INTO tstmt(num)  VALUES (@@session.unique_checks);
63
SET @@auto_increment_increment= 11;
64
INSERT INTO tstmt(num)  VALUES (@@session.auto_increment_increment);
65
SET @@auto_increment_increment= 19;
66
INSERT INTO tstmt(num)  VALUES (@@session.auto_increment_increment);
67
SET @@auto_increment_offset= 13;
68
INSERT INTO tstmt(num)  VALUES (@@session.auto_increment_offset);
69
SET @@auto_increment_offset= 17;
70
INSERT INTO tstmt(num)  VALUES (@@session.auto_increment_offset);
71
SET @@auto_increment_increment= 1;
72
SET @@auto_increment_offset= 1;
73
SET @@character_set_client= 'cp1257';
74
INSERT INTO tstmt(text) VALUES (@@session.character_set_client);
75
SET @@character_set_client= 'cp1256';
76
INSERT INTO tstmt(text) VALUES (@@session.character_set_client);
77
SET @@collation_connection= 'cp1251_ukrainian_ci';
78
INSERT INTO tstmt(text) VALUES (@@session.collation_connection);
79
INSERT INTO tstmt(text) VALUES (@@session.character_set_connection);
80
SET @@collation_connection= 'cp1251_bulgarian_ci';
81
INSERT INTO tstmt(text) VALUES (@@session.collation_connection);
82
INSERT INTO tstmt(text) VALUES (@@session.character_set_connection);
83
SET @@collation_server= 'latin7_bin';
84
INSERT INTO tstmt(text) VALUES (@@session.collation_server);
85
INSERT INTO tstmt(text) VALUES (@@session.character_set_server);
86
SET @@collation_server= 'latin7_general_cs';
87
INSERT INTO tstmt(text) VALUES (@@session.collation_server);
88
INSERT INTO tstmt(text) VALUES (@@session.character_set_server);
89
SET @@time_zone= 'Europe/Moscow';
90
INSERT INTO tstmt(text) VALUES (@@session.time_zone);
91
SET @@time_zone= 'Universal';
92
INSERT INTO tstmt(text) VALUES (@@session.time_zone);
93
SET @@lc_time_names= 'sv_FI';
94
INSERT INTO tstmt(text) VALUES (@@session.lc_time_names);
95
SET @@lc_time_names= 'no_NO';
96
INSERT INTO tstmt(text) VALUES (@@session.lc_time_names);
97
SET @@collation_database= 'latin7_general_ci';
98
INSERT INTO tstmt(text) VALUES (@@session.collation_database);
99
INSERT INTO tstmt(text) VALUES (@@session.character_set_database);
100
SET @@collation_database= 'latin7_estonian_cs';
101
INSERT INTO tstmt(text) VALUES (@@session.collation_database);
102
INSERT INTO tstmt(text) VALUES (@@session.character_set_database);
103
SET @@timestamp= 47114711;
104
INSERT INTO tstmt(text) VALUES (@@session.timestamp);
105
SET @@timestamp= 47124712;
106
INSERT INTO tstmt(text) VALUES (@@session.timestamp);
107
SET @@last_insert_id= 1616;
108
INSERT INTO tstmt(text) VALUES (@@session.last_insert_id);
109
SET @@last_insert_id= 1717;
110
INSERT INTO tstmt(text) VALUES (@@session.last_insert_id);
111
==== Insert variables from a stored procedure ====
112
CREATE PROCEDURE proc()
113
BEGIN
114
SET @@pseudo_thread_id= 4712;
115
INSERT INTO tproc(num)  VALUES (@@session.pseudo_thread_id);
116
SET @@pseudo_thread_id= 4713;
117
INSERT INTO tproc(num)  VALUES (@@session.pseudo_thread_id);
118
SET @@foreign_key_checks= 0;
119
INSERT INTO tproc(num)  VALUES (@@session.foreign_key_checks);
120
SET @@foreign_key_checks= 1;
121
INSERT INTO tproc(num)  VALUES (@@session.foreign_key_checks);
122
SET @@sql_auto_is_null= 0;
123
INSERT INTO tproc(num)  VALUES (@@session.sql_auto_is_null);
124
SET @@sql_auto_is_null= 1;
125
INSERT INTO tproc(num)  VALUES (@@session.sql_auto_is_null);
126
SET @@unique_checks= 0;
127
INSERT INTO tproc(num)  VALUES (@@session.unique_checks);
128
SET @@unique_checks= 1;
129
INSERT INTO tproc(num)  VALUES (@@session.unique_checks);
130
SET @@auto_increment_increment= 11;
131
INSERT INTO tproc(num)  VALUES (@@session.auto_increment_increment);
132
SET @@auto_increment_increment= 19;
133
INSERT INTO tproc(num)  VALUES (@@session.auto_increment_increment);
134
SET @@auto_increment_offset= 13;
135
INSERT INTO tproc(num)  VALUES (@@session.auto_increment_offset);
136
SET @@auto_increment_offset= 17;
137
INSERT INTO tproc(num)  VALUES (@@session.auto_increment_offset);
138
# reset these as they affect the index column
139
SET @@auto_increment_increment= 1;
140
SET @@auto_increment_offset= 1;
141
SET @@character_set_client= 'cp1257';
142
INSERT INTO tproc(text) VALUES (@@session.character_set_client);
143
SET @@character_set_client= 'cp1256';
144
INSERT INTO tproc(text) VALUES (@@session.character_set_client);
145
SET @@collation_connection= 'cp1251_ukrainian_ci';
146
INSERT INTO tproc(text) VALUES (@@session.collation_connection);
147
INSERT INTO tproc(text) VALUES (@@session.character_set_connection);
148
SET @@collation_connection= 'cp1251_bulgarian_ci';
149
INSERT INTO tproc(text) VALUES (@@session.collation_connection);
150
INSERT INTO tproc(text) VALUES (@@session.character_set_connection);
151
SET @@collation_server= 'latin7_bin';
152
INSERT INTO tproc(text) VALUES (@@session.collation_server);
153
INSERT INTO tproc(text) VALUES (@@session.character_set_server);
154
SET @@collation_server= 'latin7_general_cs';
155
INSERT INTO tproc(text) VALUES (@@session.collation_server);
156
INSERT INTO tproc(text) VALUES (@@session.character_set_server);
157
SET @@time_zone= 'Europe/Moscow';
158
INSERT INTO tproc(text) VALUES (@@session.time_zone);
159
SET @@time_zone= 'Universal';
160
INSERT INTO tproc(text) VALUES (@@session.time_zone);
161
SET @@lc_time_names= 'sv_FI';
162
INSERT INTO tproc(text) VALUES (@@session.lc_time_names);
163
SET @@lc_time_names= 'no_NO';
164
INSERT INTO tproc(text) VALUES (@@session.lc_time_names);
165
SET @@collation_database= 'latin7_general_ci';
166
INSERT INTO tproc(text) VALUES (@@session.collation_database);
167
INSERT INTO tproc(text) VALUES (@@session.character_set_database);
168
SET @@collation_database= 'latin7_estonian_cs';
169
INSERT INTO tproc(text) VALUES (@@session.collation_database);
170
INSERT INTO tproc(text) VALUES (@@session.character_set_database);
171
SET @@timestamp= 47114711;
172
INSERT INTO tproc(text) VALUES (@@session.timestamp);
173
SET @@timestamp= 47124712;
174
INSERT INTO tproc(text) VALUES (@@session.timestamp);
175
SET @@last_insert_id= 1616;
176
INSERT INTO tproc(text) VALUES (@@session.last_insert_id);
177
SET @@last_insert_id= 1717;
178
INSERT INTO tproc(text) VALUES (@@session.last_insert_id);
179
END|
180
CALL proc();
181
==== Insert variables from a stored function ====
182
CREATE FUNCTION func()
183
RETURNS INT
184
BEGIN
185
SET @@pseudo_thread_id= 4712;
186
INSERT INTO tfunc(num)  VALUES (@@session.pseudo_thread_id);
187
SET @@pseudo_thread_id= 4713;
188
INSERT INTO tfunc(num)  VALUES (@@session.pseudo_thread_id);
189
SET @@foreign_key_checks= 0;
190
INSERT INTO tfunc(num)  VALUES (@@session.foreign_key_checks);
191
SET @@foreign_key_checks= 1;
192
INSERT INTO tfunc(num)  VALUES (@@session.foreign_key_checks);
193
SET @@sql_auto_is_null= 0;
194
INSERT INTO tfunc(num)  VALUES (@@session.sql_auto_is_null);
195
SET @@sql_auto_is_null= 1;
196
INSERT INTO tfunc(num)  VALUES (@@session.sql_auto_is_null);
197
SET @@unique_checks= 0;
198
INSERT INTO tfunc(num)  VALUES (@@session.unique_checks);
199
SET @@unique_checks= 1;
200
INSERT INTO tfunc(num)  VALUES (@@session.unique_checks);
201
SET @@auto_increment_increment= 11;
202
INSERT INTO tfunc(num)  VALUES (@@session.auto_increment_increment);
203
SET @@auto_increment_increment= 19;
204
INSERT INTO tfunc(num)  VALUES (@@session.auto_increment_increment);
205
SET @@auto_increment_offset= 13;
206
INSERT INTO tfunc(num)  VALUES (@@session.auto_increment_offset);
207
SET @@auto_increment_offset= 17;
208
INSERT INTO tfunc(num)  VALUES (@@session.auto_increment_offset);
209
# reset these as they affect the index column
210
SET @@auto_increment_increment= 1;
211
SET @@auto_increment_offset= 1;
212
SET @@character_set_client= 'cp1257';
213
INSERT INTO tfunc(text) VALUES (@@session.character_set_client);
214
SET @@character_set_client= 'cp1256';
215
INSERT INTO tfunc(text) VALUES (@@session.character_set_client);
216
SET @@collation_connection= 'cp1251_ukrainian_ci';
217
INSERT INTO tfunc(text) VALUES (@@session.collation_connection);
218
INSERT INTO tfunc(text) VALUES (@@session.character_set_connection);
219
SET @@collation_connection= 'cp1251_bulgarian_ci';
220
INSERT INTO tfunc(text) VALUES (@@session.collation_connection);
221
INSERT INTO tfunc(text) VALUES (@@session.character_set_connection);
222
SET @@collation_server= 'latin7_bin';
223
INSERT INTO tfunc(text) VALUES (@@session.collation_server);
224
INSERT INTO tfunc(text) VALUES (@@session.character_set_server);
225
SET @@collation_server= 'latin7_general_cs';
226
INSERT INTO tfunc(text) VALUES (@@session.collation_server);
227
INSERT INTO tfunc(text) VALUES (@@session.character_set_server);
228
SET @@time_zone= 'Europe/Moscow';
229
INSERT INTO tfunc(text) VALUES (@@session.time_zone);
230
SET @@time_zone= 'Universal';
231
INSERT INTO tfunc(text) VALUES (@@session.time_zone);
232
SET @@lc_time_names= 'sv_FI';
233
INSERT INTO tfunc(text) VALUES (@@session.lc_time_names);
234
SET @@lc_time_names= 'no_NO';
235
INSERT INTO tfunc(text) VALUES (@@session.lc_time_names);
236
SET @@collation_database= 'latin7_general_ci';
237
INSERT INTO tfunc(text) VALUES (@@session.collation_database);
238
INSERT INTO tfunc(text) VALUES (@@session.character_set_database);
239
SET @@collation_database= 'latin7_estonian_cs';
240
INSERT INTO tfunc(text) VALUES (@@session.collation_database);
241
INSERT INTO tfunc(text) VALUES (@@session.character_set_database);
242
SET @@timestamp= 47114711;
243
INSERT INTO tfunc(text) VALUES (@@session.timestamp);
244
SET @@timestamp= 47124712;
245
INSERT INTO tfunc(text) VALUES (@@session.timestamp);
246
SET @@last_insert_id= 1616;
247
INSERT INTO tfunc(text) VALUES (@@session.last_insert_id);
248
SET @@last_insert_id= 1717;
249
INSERT INTO tfunc(text) VALUES (@@session.last_insert_id);
250
RETURN 0;
251
END|
252
SELECT func();
253
func()
254
0
255
==== Insert variables from a trigger ====
256
CREATE TRIGGER trig
257
BEFORE INSERT ON trigger_table
258
FOR EACH ROW
259
BEGIN
260
SET @@pseudo_thread_id= 4712;
261
INSERT INTO ttrig(num)  VALUES (@@session.pseudo_thread_id);
262
SET @@pseudo_thread_id= 4713;
263
INSERT INTO ttrig(num)  VALUES (@@session.pseudo_thread_id);
264
SET @@foreign_key_checks= 0;
265
INSERT INTO ttrig(num)  VALUES (@@session.foreign_key_checks);
266
SET @@foreign_key_checks= 1;
267
INSERT INTO ttrig(num)  VALUES (@@session.foreign_key_checks);
268
SET @@sql_auto_is_null= 0;
269
INSERT INTO ttrig(num)  VALUES (@@session.sql_auto_is_null);
270
SET @@sql_auto_is_null= 1;
271
INSERT INTO ttrig(num)  VALUES (@@session.sql_auto_is_null);
272
SET @@unique_checks= 0;
273
INSERT INTO ttrig(num)  VALUES (@@session.unique_checks);
274
SET @@unique_checks= 1;
275
INSERT INTO ttrig(num)  VALUES (@@session.unique_checks);
276
SET @@auto_increment_increment= 11;
277
INSERT INTO ttrig(num)  VALUES (@@session.auto_increment_increment);
278
SET @@auto_increment_increment= 19;
279
INSERT INTO ttrig(num)  VALUES (@@session.auto_increment_increment);
280
SET @@auto_increment_offset= 13;
281
INSERT INTO ttrig(num)  VALUES (@@session.auto_increment_offset);
282
SET @@auto_increment_offset= 17;
283
INSERT INTO ttrig(num)  VALUES (@@session.auto_increment_offset);
284
# reset these as they affect the index column
285
SET @@auto_increment_increment= 1;
286
SET @@auto_increment_offset= 1;
287
SET @@character_set_client= 'cp1257';
288
INSERT INTO ttrig(text) VALUES (@@session.character_set_client);
289
SET @@character_set_client= 'cp1256';
290
INSERT INTO ttrig(text) VALUES (@@session.character_set_client);
291
SET @@collation_connection= 'cp1251_ukrainian_ci';
292
INSERT INTO ttrig(text) VALUES (@@session.collation_connection);
293
INSERT INTO ttrig(text) VALUES (@@session.character_set_connection);
294
SET @@collation_connection= 'cp1251_bulgarian_ci';
295
INSERT INTO ttrig(text) VALUES (@@session.collation_connection);
296
INSERT INTO ttrig(text) VALUES (@@session.character_set_connection);
297
SET @@collation_server= 'latin7_bin';
298
INSERT INTO ttrig(text) VALUES (@@session.collation_server);
299
INSERT INTO ttrig(text) VALUES (@@session.character_set_server);
300
SET @@collation_server= 'latin7_general_cs';
301
INSERT INTO ttrig(text) VALUES (@@session.collation_server);
302
INSERT INTO ttrig(text) VALUES (@@session.character_set_server);
303
SET @@time_zone= 'Europe/Moscow';
304
INSERT INTO ttrig(text) VALUES (@@session.time_zone);
305
SET @@time_zone= 'Universal';
306
INSERT INTO ttrig(text) VALUES (@@session.time_zone);
307
SET @@lc_time_names= 'sv_FI';
308
INSERT INTO ttrig(text) VALUES (@@session.lc_time_names);
309
SET @@lc_time_names= 'no_NO';
310
INSERT INTO ttrig(text) VALUES (@@session.lc_time_names);
311
SET @@collation_database= 'latin7_general_ci';
312
INSERT INTO ttrig(text) VALUES (@@session.collation_database);
313
INSERT INTO ttrig(text) VALUES (@@session.character_set_database);
314
SET @@collation_database= 'latin7_estonian_cs';
315
INSERT INTO ttrig(text) VALUES (@@session.collation_database);
316
INSERT INTO ttrig(text) VALUES (@@session.character_set_database);
317
SET @@timestamp= 47114711;
318
INSERT INTO ttrig(text) VALUES (@@session.timestamp);
319
SET @@timestamp= 47124712;
320
INSERT INTO ttrig(text) VALUES (@@session.timestamp);
321
SET @@last_insert_id= 1616;
322
INSERT INTO ttrig(text) VALUES (@@session.last_insert_id);
323
SET @@last_insert_id= 1717;
324
INSERT INTO ttrig(text) VALUES (@@session.last_insert_id);
325
END|
326
INSERT INTO trigger_table VALUES ('bye.');
327
==== Insert variables from a prepared statement ====
328
PREPARE p1 FROM 'SET @@pseudo_thread_id= 4712';
329
PREPARE p2 FROM 'INSERT INTO tprep(num)  VALUES (@@session.pseudo_thread_id)';
330
PREPARE p3 FROM 'SET @@pseudo_thread_id= 4713';
331
PREPARE p4 FROM 'INSERT INTO tprep(num)  VALUES (@@session.pseudo_thread_id)';
332
PREPARE p5 FROM 'SET @@foreign_key_checks= 0';
333
PREPARE p6 FROM 'INSERT INTO tprep(num)  VALUES (@@session.foreign_key_checks)';
334
PREPARE p7 FROM 'SET @@foreign_key_checks= 1';
335
PREPARE p8 FROM 'INSERT INTO tprep(num)  VALUES (@@session.foreign_key_checks)';
336
PREPARE p9 FROM 'SET @@sql_auto_is_null= 0';
337
PREPARE p10 FROM 'INSERT INTO tprep(num)  VALUES (@@session.sql_auto_is_null)';
338
PREPARE p11 FROM 'SET @@sql_auto_is_null= 1';
339
PREPARE p12 FROM 'INSERT INTO tprep(num)  VALUES (@@session.sql_auto_is_null)';
340
PREPARE p13 FROM 'SET @@unique_checks= 0';
341
PREPARE p14 FROM 'INSERT INTO tprep(num)  VALUES (@@session.unique_checks)';
342
PREPARE p15 FROM 'SET @@unique_checks= 1';
343
PREPARE p16 FROM 'INSERT INTO tprep(num)  VALUES (@@session.unique_checks)';
344
PREPARE p17 FROM 'SET @@auto_increment_increment= 11';
345
PREPARE p18 FROM 'INSERT INTO tprep(num)  VALUES (@@session.auto_increment_increment)';
346
PREPARE p19 FROM 'SET @@auto_increment_increment= 19';
347
PREPARE p20 FROM 'INSERT INTO tprep(num)  VALUES (@@session.auto_increment_increment)';
348
PREPARE p21 FROM 'SET @@auto_increment_offset= 13';
349
PREPARE p22 FROM 'INSERT INTO tprep(num)  VALUES (@@session.auto_increment_offset)';
350
PREPARE p23 FROM 'SET @@auto_increment_offset= 17';
351
PREPARE p24 FROM 'INSERT INTO tprep(num)  VALUES (@@session.auto_increment_offset)';
352
PREPARE p25 FROM 'SET @@auto_increment_increment= 1';
353
PREPARE p26 FROM 'SET @@auto_increment_offset= 1';
354
PREPARE p27 FROM 'SET @@character_set_client= \'cp1257\'';
355
PREPARE p28 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_client)';
356
PREPARE p29 FROM 'SET @@character_set_client= \'cp1256\'';
357
PREPARE p30 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_client)';
358
PREPARE p31 FROM 'SET @@collation_connection= \'cp1251_ukrainian_ci\'';
359
PREPARE p32 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_connection)';
360
PREPARE p33 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_connection)';
361
PREPARE p34 FROM 'SET @@collation_connection= \'cp1251_bulgarian_ci\'';
362
PREPARE p35 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_connection)';
363
PREPARE p36 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_connection)';
364
PREPARE p37 FROM 'SET @@collation_server= \'latin7_bin\'';
365
PREPARE p38 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_server)';
366
PREPARE p39 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_server)';
367
PREPARE p40 FROM 'SET @@collation_server= \'latin7_general_cs\'';
368
PREPARE p41 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_server)';
369
PREPARE p42 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_server)';
370
PREPARE p43 FROM 'SET @@time_zone= \'Europe/Moscow\'';
371
PREPARE p44 FROM 'INSERT INTO tprep(text) VALUES (@@session.time_zone)';
372
PREPARE p45 FROM 'SET @@time_zone= \'Universal\'';
373
PREPARE p46 FROM 'INSERT INTO tprep(text) VALUES (@@session.time_zone)';
374
PREPARE p47 FROM 'SET @@lc_time_names= \'sv_FI\'';
375
PREPARE p48 FROM 'INSERT INTO tprep(text) VALUES (@@session.lc_time_names)';
376
PREPARE p49 FROM 'SET @@lc_time_names= \'no_NO\'';
377
PREPARE p50 FROM 'INSERT INTO tprep(text) VALUES (@@session.lc_time_names)';
378
PREPARE p51 FROM 'SET @@collation_database= \'latin7_general_ci\'';
379
PREPARE p52 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_database)';
380
PREPARE p53 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_database)';
381
PREPARE p54 FROM 'SET @@collation_database= \'latin7_estonian_cs\'';
382
PREPARE p55 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_database)';
383
PREPARE p56 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_database)';
384
PREPARE p57 FROM 'SET @@timestamp= 47114711';
385
PREPARE p58 FROM 'INSERT INTO tprep(text) VALUES (@@session.timestamp)';
386
PREPARE p59 FROM 'SET @@timestamp= 47124712';
387
PREPARE p60 FROM 'INSERT INTO tprep(text) VALUES (@@session.timestamp)';
388
PREPARE p61 FROM 'SET @@last_insert_id= 1616';
389
PREPARE p62 FROM 'INSERT INTO tprep(text) VALUES (@@session.last_insert_id)';
390
PREPARE p63 FROM 'SET @@last_insert_id= 1717';
391
PREPARE p64 FROM 'INSERT INTO tprep(text) VALUES (@@session.last_insert_id)';
392
EXECUTE p1;
393
EXECUTE p2;
394
EXECUTE p3;
395
EXECUTE p4;
396
EXECUTE p5;
397
EXECUTE p6;
398
EXECUTE p7;
399
EXECUTE p8;
400
EXECUTE p9;
401
EXECUTE p10;
402
EXECUTE p11;
403
EXECUTE p12;
404
EXECUTE p13;
405
EXECUTE p14;
406
EXECUTE p15;
407
EXECUTE p16;
408
EXECUTE p17;
409
EXECUTE p18;
410
EXECUTE p19;
411
EXECUTE p20;
412
EXECUTE p21;
413
EXECUTE p22;
414
EXECUTE p23;
415
EXECUTE p24;
416
EXECUTE p25;
417
EXECUTE p26;
418
EXECUTE p27;
419
EXECUTE p28;
420
EXECUTE p29;
421
EXECUTE p30;
422
EXECUTE p31;
423
EXECUTE p32;
424
EXECUTE p33;
425
EXECUTE p34;
426
EXECUTE p35;
427
EXECUTE p36;
428
EXECUTE p37;
429
EXECUTE p38;
430
EXECUTE p39;
431
EXECUTE p40;
432
EXECUTE p41;
433
EXECUTE p42;
434
EXECUTE p43;
435
EXECUTE p44;
436
EXECUTE p45;
437
EXECUTE p46;
438
EXECUTE p47;
439
EXECUTE p48;
440
EXECUTE p49;
441
EXECUTE p50;
442
EXECUTE p51;
443
EXECUTE p52;
444
EXECUTE p53;
445
EXECUTE p54;
446
EXECUTE p55;
447
EXECUTE p56;
448
EXECUTE p57;
449
EXECUTE p58;
450
EXECUTE p59;
451
EXECUTE p60;
452
EXECUTE p61;
453
EXECUTE p62;
454
EXECUTE p63;
455
EXECUTE p64;
456
==== Results ====
457
SELECT * FROM tstmt ORDER BY id;
458
id	num	text
459
1	4712	NULL
460
2	4713	NULL
461
3	0	NULL
462
4	1	NULL
463
5	0	NULL
464
6	1	NULL
465
7	0	NULL
466
8	1	NULL
467
12	11	NULL
468
20	19	NULL
469
32	13	NULL
470
36	17	NULL
471
37	NULL	cp1257
472
38	NULL	cp1256
473
39	NULL	cp1251_ukrainian_ci
474
40	NULL	cp1251
475
41	NULL	cp1251_bulgarian_ci
476
42	NULL	cp1251
477
43	NULL	latin7_bin
478
44	NULL	latin7
479
45	NULL	latin7_general_cs
480
46	NULL	latin7
481
47	NULL	Europe/Moscow
482
48	NULL	Universal
483
49	NULL	sv_FI
484
50	NULL	no_NO
485
51	NULL	latin7_general_ci
486
52	NULL	latin7
487
53	NULL	latin7_estonian_cs
488
54	NULL	latin7
489
55	NULL	47114711
490
56	NULL	47124712
491
57	NULL	1616
492
58	NULL	1717
493
Comparing tables master:test.tstmt and master:test.tproc
494
Comparing tables master:test.tstmt and master:test.tfunc
495
Comparing tables master:test.tstmt and master:test.ttrig
496
Comparing tables master:test.tstmt and master:test.tprep
497
Comparing tables master:test.tstmt and slave:test.tstmt
498
Comparing tables master:test.tstmt and slave:test.tproc
499
Comparing tables master:test.tstmt and slave:test.tfunc
500
Comparing tables master:test.tstmt and slave:test.ttrig
501
Comparing tables master:test.tstmt and slave:test.tprep
502
==== Clean up ====
503
[on master]
504
DROP PROCEDURE proc;
505
DROP FUNCTION func;
506
DROP TRIGGER trig;
507
DROP TABLE tstmt, tproc, tfunc, ttrig, tprep, trigger_table;
508
SET @@global.pseudo_thread_id=         @m_pseudo_thread_id;
509
SET @@global.auto_increment_increment= @m_auto_increment_increment;
510
SET @@global.auto_increment_offset=    @m_auto_increment_offset;
511
SET @@global.character_set_client=     @m_character_set_client;
512
SET @@global.collation_connection=     @m_collation_connection;
513
SET @@global.collation_server=         @m_collation_server;
514
SET @@global.time_zone=                @m_time_zone;
515
SET @@global.lc_time_names=            @m_lc_time_names;
516
SET @@global.collation_database=       @m_collation_database;
517
[on slave]
518
SET @@global.pseudo_thread_id=         @s_pseudo_thread_id;
519
SET @@global.auto_increment_increment= @s_auto_increment_increment;
520
SET @@global.auto_increment_offset=    @s_auto_increment_offset;
521
SET @@global.character_set_client=     @s_character_set_client;
522
SET @@global.collation_connection=     @s_collation_connection;
523
SET @@global.collation_server=         @s_collation_server;
524
SET @@global.time_zone=                @s_time_zone;
525
SET @@global.lc_time_names=            @s_lc_time_names;
526
SET @@global.collation_database=       @s_collation_database;