~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-03-18 12:12:31 UTC
  • Revision ID: james.westby@ubuntu.com-20100318121231-k6g1xe6cshbwa0f8
Tags: upstream-2010.03.1347
ImportĀ upstreamĀ versionĀ 2010.03.1347

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;