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

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
2
 
# Simple test of the transaction log and the errors
3
 
# which should be produced when a table is inserted
4
 
# into when the transaction log is enabled but the
5
 
# table does not have primary keys.
6
 
7
 
# We create a table without a primary key and insert 
8
 
# a record into it.  An error should be produced.
9
 
#
10
 
 
11
 
--disable_warnings
12
 
DROP TABLE IF EXISTS t1;
13
 
--enable_warnings
14
 
 
15
 
CREATE TABLE t1 (
16
 
  id INT NOT NULL
17
 
, padding VARCHAR(200) NOT NULL
18
 
);
19
 
 
20
 
# The below should produce an error because the CREATE TABLE
21
 
# above does not have a primary key.
22
 
--error ER_NO_PRIMARY_KEY_ON_REPLICATED_TABLE
23
 
INSERT INTO t1 VALUES (1, "I love testing.");
24
 
 
25
 
DROP TABLE t1;