Merge lp:~mmcm/akiban-client-tools/always-identity-test into lp:~akiban-technologies/akiban-client-tools/trunk

Proposed by Mike McMahon
Status: Merged
Approved by: Nathan Williams
Approved revision: 24
Merged at revision: 24
Proposed branch: lp:~mmcm/akiban-client-tools/always-identity-test
Merge into: lp:~akiban-technologies/akiban-client-tools/trunk
Diff against target: 23 lines (+16/-0)
1 file modified
src/test/resources/com/akiban/client/dump/sequences.sql (+16/-0)
To merge this branch: bzr merge lp:~mmcm/akiban-client-tools/always-identity-test
Reviewer Review Type Date Requested Status
Nathan Williams Approve
Review via email: mp+159018@code.launchpad.net

Description of the change

Add a test for the special handling of ALWAYS IDENTITY, which creates the sequence after loading the data so that primary keys are preserved.

To post a comment you must log in.
Revision history for this message
Nathan Williams (nwilliams) wrote :

Why is the START WITH 6 and not 5?

review: Needs Information
Revision history for this message
Mike McMahon (mmcm) wrote :

Just to show that it reproduces the state of the sequence, which may not be derivable from the rows stored.

Revision history for this message
Nathan Williams (nwilliams) wrote :

Gotcha.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/test/resources/com/akiban/client/dump/sequences.sql'
2--- src/test/resources/com/akiban/client/dump/sequences.sql 2012-10-09 00:41:23 +0000
3+++ src/test/resources/com/akiban/client/dump/sequences.sql 2013-04-15 21:16:29 +0000
4@@ -13,3 +13,19 @@
5
6
7
8+--- t4
9+
10+DROP TABLE IF EXISTS t4;
11+
12+CREATE TABLE t4(
13+ id INT NOT NULL PRIMARY KEY,
14+ s VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_bin
15+);
16+
17+
18+
19+INSERT INTO t4 VALUES(3, 'barf'),
20+ (4, 'two');
21+
22+ALTER TABLE t4 ALTER COLUMN id SET GENERATED ALWAYS AS IDENTITY (START WITH 6, INCREMENT BY 1);
23+

Subscribers

People subscribed via source and target branches