~ubuntu-branches/ubuntu/natty/mysql-5.1/natty-proposed

« back to all changes in this revision

Viewing changes to mysql-test/suite/binlog/r/binlog_row_binlog.result

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 08:30:45 UTC
  • mfrom: (1.4.1)
  • Revision ID: package-import@ubuntu.com-20120222083045-2rd53r4bnyx7qus4
Tags: 5.1.61-0ubuntu0.11.04.1
* SECURITY UPDATE: Update to 5.1.61 to fix multiple security issues
  (LP: #937869)
  - http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
  - CVE-2011-2262
  - CVE-2012-0075
  - CVE-2012-0112
  - CVE-2012-0113
  - CVE-2012-0114
  - CVE-2012-0115
  - CVE-2012-0116
  - CVE-2012-0117
  - CVE-2012-0118
  - CVE-2012-0119
  - CVE-2012-0120
  - CVE-2012-0484
  - CVE-2012-0485
  - CVE-2012-0486
  - CVE-2012-0487
  - CVE-2012-0488
  - CVE-2012-0489
  - CVE-2012-0490
  - CVE-2012-0491
  - CVE-2012-0492
  - CVE-2012-0493
  - CVE-2012-0494
  - CVE-2012-0495
  - CVE-2012-0496

Show diffs side-by-side

added added

removed removed

Lines of Context:
1330
1330
#       #       Write_rows      1       #       table_id: # flags: STMT_END_F
1331
1331
#       #       Query   1       #       COMMIT
1332
1332
DROP TABLE t1;
 
1333
 
 
1334
# BUG#54903 BINLOG statement toggles session variables
 
1335
# ----------------------------------------------------------------------
 
1336
# This test verify that BINLOG statement doesn't change current session's
 
1337
# variables foreign_key_checks and unique_checks.
 
1338
 
 
1339
CREATE TABLE t1 (c1 INT KEY);
 
1340
SET @@SESSION.foreign_key_checks= ON;
 
1341
SET @@SESSION.unique_checks= ON;
 
1342
# INSERT INTO t1 VALUES (1)
 
1343
# foreign_key_checks=0 and unique_checks=0
 
1344
BINLOG '
 
1345
dfLtTBMBAAAAKQAAANcAAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
 
1346
dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA==
 
1347
';
 
1348
SELECT * FROM t1;
 
1349
c1
 
1350
1
 
1351
# Their values should be ON
 
1352
SHOW SESSION VARIABLES LIKE "%_checks";
 
1353
Variable_name   Value
 
1354
foreign_key_checks      ON
 
1355
unique_checks   ON
 
1356
 
 
1357
SET @@SESSION.foreign_key_checks= OFF;
 
1358
SET @@SESSION.unique_checks= OFF;
 
1359
# INSERT INTO t1 VALUES(2)
 
1360
# foreign_key_checks=1 and unique_checks=1
 
1361
BINLOG '
 
1362
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
 
1363
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
 
1364
';
 
1365
SELECT * FROM t1;
 
1366
c1
 
1367
1
 
1368
2
 
1369
# Their values should be OFF
 
1370
SHOW SESSION VARIABLES LIKE "%_checks";
 
1371
Variable_name   Value
 
1372
foreign_key_checks      OFF
 
1373
unique_checks   OFF
 
1374
# INSERT INTO t1 VALUES(2)
 
1375
# foreign_key_checks=1 and unique_checks=1
 
1376
# It should not change current session's variables, even error happens
 
1377
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
 
1378
BINLOG '
 
1379
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
 
1380
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
 
1381
';
 
1382
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
 
1383
SELECT * FROM t1;
 
1384
c1
 
1385
1
 
1386
2
 
1387
# Their values should be OFF
 
1388
SHOW SESSION VARIABLES LIKE "%_checks";
 
1389
Variable_name   Value
 
1390
foreign_key_checks      OFF
 
1391
unique_checks   OFF
 
1392
DROP TABLE t1;