11 use DBIC::SqlMakerTest;
13 plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_oracle')
14 unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_oracle');
16 $ENV{NLS_SORT} = "BINARY";
17 $ENV{NLS_COMP} = "BINARY";
18 $ENV{NLS_LANG} = "AMERICAN";
20 my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_ORA_${_}" } qw/DSN USER PASS/};
23 my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_ORA_EXTRAUSER_${_}" } qw/DSN USER PASS/};
25 plan skip_all => 'Set $ENV{DBICTEST_ORA_DSN}, _USER and _PASS to run this test.'
26 unless ($dsn && $user && $pass);
29 package # hide from PAUSE
30 DBICTest::Schema::ArtistFQN;
32 use base 'DBIx::Class::Core';
35 $ENV{DBICTEST_ORA_USER}
36 ? (uc $ENV{DBICTEST_ORA_USER}) . '.artist'
39 __PACKAGE__->add_columns(
41 data_type => 'integer',
42 is_auto_increment => 1,
45 data_type => 'varchar',
50 data_type => 'integer',
51 is_auto_increment => 1,
53 'default_value_col' => {
54 data_type => 'varchar',
57 retrieve_on_insert => 1,
60 __PACKAGE__->set_primary_key(qw/ artistid autoinc_col /);
65 DBICTest::Schema->load_classes('ArtistFQN');
67 # This is in Core now, but it's here just to test that it doesn't break
68 DBICTest::Schema::Artist->load_components('PK::Auto');
69 # These are compat shims for PK::Auto...
70 DBICTest::Schema::CD->load_components('PK::Auto::Oracle');
71 DBICTest::Schema::Track->load_components('PK::Auto::Oracle');
74 # check if we indeed do support stuff
76 my $v = DBICTest::Schema->connect($dsn, $user, $pass)->storage->_dbh_get_info(18);
78 or die "Unparseable Oracle server version: $v\n";
80 sprintf('%d.%03d', $1, $2);
83 my $test_server_supports_only_orajoins = $v < 9;
85 # TODO find out which version supports the RETURNING syntax
86 # 8i (8.1) has it and earlier docs are a 404 on oracle.com
87 my $test_server_supports_insert_returning = $v >= 8.001;
90 DBICTest::Schema->connect($dsn, $user, $pass)->storage->_use_insert_returning,
91 $test_server_supports_insert_returning,
92 'insert returning capability guessed correctly'
96 # the recyclebin (new for 10g) sometimes comes in the way
97 my $on_connect_sql = $v >= 10 ? ["ALTER SESSION SET recyclebin = OFF"] : [];
99 # iterate all tests on following options
101 { on_connect_do => $on_connect_sql },
102 { quote_char => '"', on_connect_do => $on_connect_sql },
105 # keep a database handle open for cleanup
109 for my $use_insert_returning ($test_server_supports_insert_returning ? (1,0) : (0) ) {
110 for my $force_ora_joins ($test_server_supports_only_orajoins ? (0) : (0,1) ) {
112 no warnings qw/once/;
113 local *DBICTest::Schema::connection = subname 'DBICTest::Schema::connection' => sub {
114 my $s = shift->next::method (@_);
115 $s->storage->_use_insert_returning ($use_insert_returning);
116 $s->storage->sql_maker_class('DBIx::Class::SQLMaker::OracleJoins') if $force_ora_joins;
120 for my $opt (@tryopt) {
121 # clean all cached sequences from previous run
122 for (map { values %{DBICTest::Schema->source($_)->columns_info} } (qw/Artist CD Track/) ) {
123 delete $_->{sequence};
126 my $schema = DBICTest::Schema->connect($dsn, $user, $pass, $opt);
128 $dbh = $schema->storage->dbh;
129 my $q = $schema->storage->sql_maker->quote_char || '';
131 do_creates($dbh, $q);
133 _run_tests($schema, $opt);
139 my ($schema, $opt) = @_;
141 my $q = $schema->storage->sql_maker->quote_char || '';
143 # test primary key handling with multiple triggers
146 my $new_artist = $schema->resultset('Artist')->create({ name => 'foo' });
147 my $new_cd = $schema->resultset('CD')->create({ artist => 1, title => 'EP C', year => '2003' });
150 skip 'not detecting sequences when using INSERT ... RETURNING', 4
151 if $schema->storage->_use_insert_returning;
153 is($new_artist->artistid, 1, "Oracle Auto-PK worked for standard sqlt-like trigger");
154 $seq = $new_artist->result_source->column_info('artistid')->{sequence};
155 $seq = $$seq if ref $seq;
156 like ($seq, qr/\.${q}artist_pk_seq${q}$/, 'Correct PK sequence selected for sqlt-like trigger');
158 is($new_cd->cdid, 1, 'Oracle Auto-PK worked - using scalar ref as table name/custom weird trigger');
159 $seq = $new_cd->result_source->column_info('cdid')->{sequence};
160 $seq = $$seq if ref $seq;
161 like ($seq, qr/\.${q}cd_seq${q}$/, 'Correct PK sequence selected for custom trigger');
164 # test PKs again with fully-qualified table name
165 my $artistfqn_rs = $schema->resultset('ArtistFQN');
166 my $artist_rsrc = $artistfqn_rs->result_source;
168 delete $artist_rsrc->column_info('artistid')->{sequence};
169 $new = $artistfqn_rs->create( { name => 'bar' } );
171 is_deeply( {map { $_ => $new->$_ } $artist_rsrc->primary_columns},
172 { artistid => 2, autoinc_col => 2},
173 "Oracle Multi-Auto-PK worked with fully-qualified tablename" );
176 delete $artist_rsrc->column_info('artistid')->{sequence};
177 $new = $artistfqn_rs->create( { name => 'bar', autoinc_col => 1000 } );
179 is( $new->artistid, 3, "Oracle Auto-PK worked with fully-qualified tablename" );
180 is( $new->autoinc_col, 1000, "Oracle Auto-Inc overruled with fully-qualified tablename");
183 is( $new->default_value_col, 'default_value', $schema->storage->_use_insert_returning
184 ? 'Check retrieve_on_insert on default_value_col with INSERT ... RETURNING'
185 : 'Check retrieve_on_insert on default_value_col without INSERT ... RETURNING'
189 skip 'not detecting sequences when using INSERT ... RETURNING', 1
190 if $schema->storage->_use_insert_returning;
192 $seq = $new->result_source->column_info('artistid')->{sequence};
193 $seq = $$seq if ref $seq;
194 like ($seq, qr/\.${q}artist_pk_seq${q}$/, 'Correct PK sequence selected for sqlt-like trigger');
200 $schema->resultset('Artist')->create({ name => 'Artist ' . $_ });
202 my $it = $schema->resultset('Artist')->search( { name => { -like => 'Artist %' } }, {
205 order_by => 'artistid'
208 is( $it->count, 2, "LIMIT count past end of RS ok" );
209 is( $it->next->name, "Artist 5", "iterator->next ok" );
210 is( $it->next->name, "Artist 6", "iterator->next ok" );
211 is( $it->next, undef, "next past end of resultset ok" );
213 # test identifiers over the 30 char limit
215 my @results = $schema->resultset('CD')->search(undef, {
216 prefetch => 'very_long_artist_relationship',
220 ok( scalar @results > 0, 'limit with long identifiers returned something');
221 } 'limit with long identifiers executed successfully';
224 # test rel names over the 30 char limit
225 my $query = $schema->resultset('Artist')->search({
228 prefetch => 'cds_very_very_very_long_relationship_name'
232 is $query->first->cds_very_very_very_long_relationship_name->first->cdid, 1
233 } 'query with rel name over 30 chars survived and worked';
235 # test rel names over the 30 char limit using group_by and join
237 my @group_cols = ( 'me.name' );
238 my $query = $schema->resultset('Artist')->search({
241 select => \@group_cols,
242 as => [map { /^\w+\.(\w+)$/ } @group_cols],
243 join => [qw( cds_very_very_very_long_relationship_name )],
244 group_by => \@group_cols,
248 my @got = $query->get_column('name')->all();
249 is_deeply \@got, [$new_artist->name];
250 } 'query with rel name over 30 chars worked on join, group_by for me col';
253 is $query->count(), 1
254 } 'query with rel name over 30 chars worked on join, group_by, count for me col';
257 my @group_cols = ( 'cds_very_very_very_long_relationship_name.title' );
258 my $query = $schema->resultset('Artist')->search({
261 select => \@group_cols,
262 as => [map { /^\w+\.(\w+)$/ } @group_cols],
263 join => [qw( cds_very_very_very_long_relationship_name )],
264 group_by => \@group_cols,
268 my @got = $query->get_column('title')->all();
269 is_deeply \@got, [$new_cd->title];
270 } 'query with rel name over 30 chars worked on join, group_by for long rel col';
273 is $query->count(), 1
274 } 'query with rel name over 30 chars worked on join, group_by, count for long rel col';
277 # rel name over 30 char limit with user condition
278 # This requires walking the SQLA data structure.
280 $query = $schema->resultset('Artist')->search({
281 'cds_very_very_very_long_relationship_name.title' => 'EP C'
283 prefetch => 'cds_very_very_very_long_relationship_name'
287 is $query->first->cds_very_very_very_long_relationship_name->first->cdid, 1
288 } 'query with rel name over 30 chars and user condition survived and worked';
292 # test join with row count ambiguity
293 my $cd = $schema->resultset('CD')->next;
294 my $track = $cd->create_related('tracks', { position => 1, title => 'Track1'} );
295 my $tjoin = $schema->resultset('Track')->search({ 'me.title' => 'Track1'}, {
296 join => 'cd', rows => 2
299 ok(my $row = $tjoin->next);
301 is($row->title, 'Track1', "ambiguous column ok");
305 # check count distinct with multiple columns
306 my $other_track = $schema->resultset('Track')->create({ cd => $cd->cdid, position => 1, title => 'Track2' });
308 my $tcount = $schema->resultset('Track')->search(
311 select => [ qw/position title/ ],
315 is($tcount->count, 2, 'multiple column COUNT DISTINCT ok');
317 $tcount = $schema->resultset('Track')->search(
320 columns => [ qw/position title/ ],
324 is($tcount->count, 2, 'multiple column COUNT DISTINCT ok');
326 $tcount = $schema->resultset('Track')->search(
329 group_by => [ qw/position title/ ]
332 is($tcount->count, 2, 'multiple column COUNT DISTINCT using column syntax ok');
336 my $g_rs = $schema->resultset('Track')->search( undef, { columns=>[qw/trackid position/], group_by=> [ qw/trackid position/ ] , rows => 2, offset => 1 });
337 is( scalar $g_rs->all, 1, "Group by with limit OK" );
340 # test with_deferred_fk_checks
342 $schema->storage->with_deferred_fk_checks(sub {
343 $schema->resultset('Track')->create({
344 trackid => 999, cd => 999, position => 1, title => 'deferred FK track'
346 $schema->resultset('CD')->create({
347 artist => 1, cdid => 999, year => '2003', title => 'deferred FK cd'
350 } 'with_deferred_fk_checks code survived';
352 is eval { $schema->resultset('Track')->find(999)->title }, 'deferred FK track',
353 'code in with_deferred_fk_checks worked';
356 $schema->resultset('Track')->create({
357 trackid => 1, cd => 9999, position => 1, title => 'Track1'
359 } qr/constraint/i, 'with_deferred_fk_checks is off';
362 # test auto increment using sequences WITHOUT triggers
364 my $st = $schema->resultset('SequenceTest')->create({ name => 'foo' });
365 is($st->pkid1, $_, "Oracle Auto-PK without trigger: First primary key");
366 is($st->pkid2, $_ + 9, "Oracle Auto-PK without trigger: Second primary key");
367 is($st->nonpkid, $_ + 19, "Oracle Auto-PK without trigger: Non-primary key");
369 my $st = $schema->resultset('SequenceTest')->create({ name => 'foo', pkid1 => 55 });
370 is($st->pkid1, 55, "Oracle Auto-PK without trigger: First primary key set manually");
376 my %binstr = ( 'small' => join('', map { chr($_) } ( 1 .. 127 )) );
377 $binstr{'large'} = $binstr{'small'} x 1024;
379 my $maxloblen = (length $binstr{'large'}) + 5;
380 note "Localizing LongReadLen to $maxloblen to avoid truncation of test data";
381 local $dbh->{'LongReadLen'} = $maxloblen;
383 my $rs = $schema->resultset('BindType');
385 if ($DBD::Oracle::VERSION eq '1.23') {
386 throws_ok { $rs->create({ id => 1, blob => $binstr{large} }) }
388 'throws on blob insert with DBD::Oracle == 1.23';
390 skip 'buggy BLOB support in DBD::Oracle 1.23', 1;
393 # disable BLOB mega-output
394 my $orig_debug = $schema->storage->debug;
395 $schema->storage->debug (0);
397 local $TODO = 'Something is confusing column bindtype assignment when quotes are active'
398 . ': https://rt.cpan.org/Ticket/Display.html?id=64206'
402 foreach my $size (qw( small large )) {
405 my $str = $binstr{$size};
407 $rs->create( { 'id' => $id, blob => "blob:$str", clob => "clob:$str" } )
408 } "inserted $size without dying";
410 my @objs = $rs->search({ blob => "blob:$str", clob => "clob:$str" })->all;
411 is (@objs, 1, 'One row found matching on both LOBs');
412 ok (try { $objs[0]->blob }||'' eq "blob:$str", 'blob inserted/retrieved correctly');
413 ok (try { $objs[0]->clob }||'' eq "clob:$str", 'clob inserted/retrieved correctly');
415 if ($size eq 'large') { # check that prepare_cached was NOT used
416 my $sql = ${ $rs->search({ blob => "blob:$str", clob => "clob:$str" })
419 ok((not exists $schema->storage->_dbh->{CachedKids}{$sql}),
420 'multi-part LOB equality query was not cached');
423 @objs = $rs->search({ clob => { -like => 'clob:%' } })->all;
424 ok (@objs, 'rows found matching CLOB with a LIKE query');
426 ok(my $subq = $rs->search({ blob => "blob:$str", clob => "clob:$str" })
427 ->get_column('id')->as_query);
429 @objs = $rs->search({ id => { -in => $subq } })->all;
430 is (@objs, 1, 'One row found matching on both LOBs as a subquery');
433 $schema->storage->debug ($orig_debug);
436 # test populate (identity, success and error handling)
437 my $art_rs = $schema->resultset('Artist');
439 my $seq_pos = $art_rs->get_column('artistid')->max;
440 ok($seq_pos, 'Starting with something in the artist table');
443 my $pop_rs = $schema->resultset('Artist')->search(
444 { name => { -like => 'pop_art_%' } },
445 { order_by => 'artistid' }
451 map { +{ name => "pop_art_$_" } }
456 [ $pop_rs->get_column('artistid')->all ],
457 [ map { $seq_pos + $_ } (1,2,3) ],
458 'Sequence works after empty-table insertion'
460 } 'Populate without identity does not throw';
464 map { +{ artistid => $_, name => "pop_art_$_" } }
469 [ $pop_rs->get_column('artistid')->all ],
470 [ 1,2,3, map { $seq_pos + $_ } (1,2,3) ],
471 'Explicit id population works'
473 } 'Populate with identity does not throw';
477 map { +{ artistid => $_, name => "pop_art_$_" } }
480 } qr/unique constraint.+populate slice.+name => "pop_art_1"/s, 'Partially failed populate throws';
483 [ $pop_rs->get_column('artistid')->all ],
484 [ 1,2,3, map { $seq_pos + $_ } (1,2,3) ],
485 'Partially failed populate did not alter table contents'
488 # test complex join (exercise orajoins)
490 my @hri = $schema->resultset('CD')->search(
491 { 'artist.name' => 'pop_art_1', 'me.cdid' => { '!=', 999} },
492 { join => 'artist', prefetch => 'tracks', rows => 4, order_by => 'tracks.trackid' }
499 single_track => undef,
504 last_updated_at => undef,
505 last_updated_on => undef,
512 last_updated_at => undef,
513 last_updated_on => undef,
525 'Correct set of data prefetched',
528 } 'complex prefetch ok';
530 # test sequence detection from a different schema
534 'Set DBICTEST_ORA_EXTRAUSER_DSN, _USER and _PASS to a *DIFFERENT* Oracle user',
535 ' to run the cross-schema sequence detection test.'),
536 1) unless $dsn2 && $user2 && $user2 ne $user;
538 skip 'not detecting cross-schema sequence name when using INSERT ... RETURNING', 1
539 if $schema->storage->_use_insert_returning;
541 # Oracle8i Reference Release 2 (8.1.6)
542 # http://download.oracle.com/docs/cd/A87860_01/doc/server.817/a76961/ch294.htm#993
543 # Oracle Database Reference 10g Release 2 (10.2)
544 # http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2107.htm#sthref1297
545 local $TODO = "On Oracle8i all_triggers view is empty, i don't yet know why..."
546 if $schema->storage->_server_info->{normalized_dbms_version} < 9;
548 my $schema2 = $schema->connect($dsn2, $user2, $pass2, $opt);
549 my $dbh2 = $schema2->storage->dbh;
551 # create identically named tables/sequences in the other schema
552 do_creates($dbh2, $q);
554 # grand select privileges to the 2nd user
555 $dbh->do("GRANT INSERT ON ${q}artist${q} TO " . uc $user2);
556 $dbh->do("GRANT SELECT ON ${q}artist${q} TO " . uc $user2);
557 $dbh->do("GRANT SELECT ON ${q}artist_pk_seq${q} TO " . uc $user2);
558 $dbh->do("GRANT SELECT ON ${q}artist_autoinc_seq${q} TO " . uc $user2);
560 # test with a fully qualified table (user1/schema prepended)
561 my $rs2 = $schema2->resultset('ArtistFQN');
562 delete $rs2->result_source->column_info('artistid')->{sequence};
565 my $row = $rs2->create({ name => 'From Different Schema' });
567 } 'used autoinc sequence across schemas';
569 # now quote the sequence name (do_creates always uses an lc name)
574 delete $rs2->result_source->column_info('artistid')->{sequence};
576 CREATE OR REPLACE TRIGGER ${q}artist_insert_trg_pk${q}
577 BEFORE INSERT ON ${q}artist${q}
580 IF :new.${q}artistid${q} IS NULL THEN
581 SELECT $q_seq.nextval
582 INTO :new.${q}artistid${q}
590 my $row = $rs2->create({ name => 'From Different Schema With Quoted Sequence' });
592 } 'used quoted autoinc sequence across schemas';
594 is_deeply $rs2->result_source->column_info('artistid')->{sequence},
595 \( (uc $user) . ".$q_seq"),
596 'quoted sequence name correctly extracted';
598 # try an insert operation on the default user2 artist
599 my $art1 = $schema->resultset('Artist');
600 my $art2 = $schema2->resultset('Artist');
601 my $art1_count = $art1->count || 0;
602 my $art2_count = $art2->count;
604 is( $art2_count, 0, 'No artists created yet in second schema' );
606 delete $art2->result_source->column_info('artistid')->{sequence};
607 my $new_art = $art2->create({ name => '2nd best' });
609 is ($art1->count, $art1_count, 'No new rows in main schema');
610 is ($art2->count, 1, 'One artist create in 2nd schema');
612 is( $new_art->artistid, 1, 'Expected first PK' );
627 $dbh->do("CREATE SEQUENCE ${q}artist_autoinc_seq${q} START WITH 1 MAXVALUE 999999 MINVALUE 0");
628 $dbh->do("CREATE SEQUENCE ${q}artist_pk_seq${q} START WITH 1 MAXVALUE 999999 MINVALUE 0");
629 $dbh->do("CREATE SEQUENCE ${q}cd_seq${q} START WITH 1 MAXVALUE 999999 MINVALUE 0");
630 $dbh->do("CREATE SEQUENCE ${q}track_seq${q} START WITH 1 MAXVALUE 999999 MINVALUE 0");
632 $dbh->do("CREATE SEQUENCE ${q}nonpkid_seq${q} START WITH 20 MAXVALUE 999999 MINVALUE 0");
633 # this one is always quoted as per manually specified sequence =>
634 $dbh->do('CREATE SEQUENCE "pkid1_seq" START WITH 1 MAXVALUE 999999 MINVALUE 0');
635 # this one is always unquoted as per manually specified sequence =>
636 $dbh->do("CREATE SEQUENCE pkid2_seq START WITH 10 MAXVALUE 999999 MINVALUE 0");
638 $dbh->do("CREATE TABLE ${q}artist${q} (${q}artistid${q} NUMBER(12), ${q}name${q} VARCHAR(255),${q}default_value_col${q} VARCHAR(255) DEFAULT 'default_value', ${q}autoinc_col${q} NUMBER(12), ${q}rank${q} NUMBER(38), ${q}charfield${q} VARCHAR2(10))");
639 $dbh->do("ALTER TABLE ${q}artist${q} ADD (CONSTRAINT ${q}artist_pk${q} PRIMARY KEY (${q}artistid${q}))");
641 $dbh->do("CREATE TABLE ${q}sequence_test${q} (${q}pkid1${q} NUMBER(12), ${q}pkid2${q} NUMBER(12), ${q}nonpkid${q} NUMBER(12), ${q}name${q} VARCHAR(255))");
642 $dbh->do("ALTER TABLE ${q}sequence_test${q} ADD (CONSTRAINT ${q}sequence_test_constraint${q} PRIMARY KEY (${q}pkid1${q}, ${q}pkid2${q}))");
644 # table cd will be unquoted => Oracle will see it as uppercase
645 $dbh->do("CREATE TABLE cd (${q}cdid${q} NUMBER(12), ${q}artist${q} NUMBER(12), ${q}title${q} VARCHAR(255), ${q}year${q} VARCHAR(4), ${q}genreid${q} NUMBER(12), ${q}single_track${q} NUMBER(12))");
646 $dbh->do("ALTER TABLE cd ADD (CONSTRAINT ${q}cd_pk${q} PRIMARY KEY (${q}cdid${q}))");
648 $dbh->do("CREATE TABLE ${q}track${q} (${q}trackid${q} NUMBER(12), ${q}cd${q} NUMBER(12) REFERENCES CD(${q}cdid${q}) DEFERRABLE, ${q}position${q} NUMBER(12), ${q}title${q} VARCHAR(255), ${q}last_updated_on${q} DATE, ${q}last_updated_at${q} DATE)");
649 $dbh->do("ALTER TABLE ${q}track${q} ADD (CONSTRAINT ${q}track_pk${q} PRIMARY KEY (${q}trackid${q}))");
651 $dbh->do("CREATE TABLE ${q}bindtype_test${q} (${q}id${q} integer NOT NULL PRIMARY KEY, ${q}bytea${q} integer NULL, ${q}blob${q} blob NULL, ${q}clob${q} clob NULL, ${q}a_memo${q} integer NULL)");
654 CREATE OR REPLACE TRIGGER ${q}artist_insert_trg_auto${q}
655 BEFORE INSERT ON ${q}artist${q}
658 IF :new.${q}autoinc_col${q} IS NULL THEN
659 SELECT ${q}artist_autoinc_seq${q}.nextval
660 INTO :new.${q}autoinc_col${q}
667 CREATE OR REPLACE TRIGGER ${q}artist_insert_trg_pk${q}
668 BEFORE INSERT ON ${q}artist${q}
671 IF :new.${q}artistid${q} IS NULL THEN
672 SELECT ${q}artist_pk_seq${q}.nextval
673 INTO :new.${q}artistid${q}
680 CREATE OR REPLACE TRIGGER ${q}cd_insert_trg${q}
681 BEFORE INSERT OR UPDATE ON cd
690 IF :new.${q}cdid${q} IS NULL THEN
691 SELECT ${q}cd_seq${q}.nextval
695 :new.${q}cdid${q} := tmpVar;
701 CREATE OR REPLACE TRIGGER ${q}track_insert_trg${q}
702 BEFORE INSERT ON ${q}track${q}
705 IF :new.${q}trackid${q} IS NULL THEN
706 SELECT ${q}track_seq${q}.nextval
707 INTO :new.${q}trackid${q}
717 my $dbh = shift || return;
719 for my $q ('', '"') {
721 "DROP TRIGGER ${q}track_insert_trg${q}",
722 "DROP TRIGGER ${q}cd_insert_trg${q}",
723 "DROP TRIGGER ${q}artist_insert_trg_auto${q}",
724 "DROP TRIGGER ${q}artist_insert_trg_pk${q}",
725 "DROP SEQUENCE ${q}nonpkid_seq${q}",
726 "DROP SEQUENCE ${q}pkid2_seq${q}",
727 "DROP SEQUENCE ${q}pkid1_seq${q}",
728 "DROP SEQUENCE ${q}track_seq${q}",
729 "DROP SEQUENCE ${q}cd_seq${q}",
730 "DROP SEQUENCE ${q}artist_autoinc_seq${q}",
731 "DROP SEQUENCE ${q}artist_pk_seq${q}",
732 "DROP TABLE ${q}bindtype_test${q}",
733 "DROP TABLE ${q}sequence_test${q}",
734 "DROP TABLE ${q}track${q}",
735 "DROP TABLE ${q}cd${q}",
736 "DROP TABLE ${q}artist${q}",
738 eval { $dbh -> do ($_) } for @clean;
745 local $SIG{__WARN__} = sub {};