~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/transaction_log/tests/t/null_values.inc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
2
# Tests inserting/deleting/updating null values 
 
3
#
 
4
 
 
5
--disable_warnings
 
6
DROP TABLE IF EXISTS t1, t2, t3, t4;
 
7
--enable_warnings
 
8
 
 
9
CREATE TABLE t1 (a INT NOT NULL, b CHAR(1000), PRIMARY KEY (a));
 
10
 
 
11
INSERT INTO t1 VALUES (1,"update me");
 
12
INSERT INTO t1 VALUES (2,'');
 
13
INSERT INTO t1 VALUES (3,NULL);
 
14
 
 
15
UPDATE t1 SET b= "updated" WHERE a= 2;
 
16
UPDATE t1 SET a= 4 WHERE b IS NULL;
 
17
UPDATE t1 SET b= NULL WHERE a= 1;
 
18
 
 
19
DELETE FROM t1 where b is NULL;
 
20
 
 
21
CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b INT, PRIMARY KEY(a));
 
22
INSERT INTO t2 (b) VALUES(NULL);
 
23
INSERT INTO t2 (b) VALUES(0);
 
24
 
 
25
CREATE TABLE t3 (a INT NOT NULL, b ENUM ('1','2'), PRIMARY KEY(a));
 
26
INSERT INTO t3 VALUES (1,'1');
 
27
INSERT INTO t3 VALUES (2,NULL);
 
28
 
 
29
CREATE TABLE t4 (id INT NOT NULL, col0_int INT DEFAULT NULL, col1_int INT DEFAULT NULL, PRIMARY KEY (id));
 
30
INSERT INTO t4 VALUES (1, NULL, 1);
 
31
UPDATE t4 SET col0_int= 0 WHERE col1_int != 2;
 
32
UPDATE t4 SET col0_int= NULL WHERE col1_int != 2;
 
33
 
 
34
DROP TABLE t1, t2, t3, t4;