Skip to content

Commit 9294074

Browse files
committed
PDO Firebird: Use recreate table
Firebird does not have "if exists", and the switch to exception error mode broke the suppressed exec calls. Firebird does have a "recreate table" command that effective perform a "drop table if exists" beforehand.
1 parent a9253b0 commit 9294074

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

ext/pdo_firebird/tests/bug_72583.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ PDO_Firebird: Feature 72583 Fetch integers as php integers not as strings
66
<?php
77
require 'testdb.inc';
88

9-
@$dbh->exec('drop table atable');
10-
$dbh->exec('create table atable (aint integer, asmi smallint)');
9+
$dbh->exec('recreate table atable (aint integer, asmi smallint)');
1110
$dbh->exec('insert into atable values (1, -1)');
1211
$S = $dbh->prepare('select aint, asmi from atable');
1312
$S->execute();

ext/pdo_firebird/tests/bug_72931.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ PDO_Firebird: Bug 72931 Insert returning fails on Firebird 3
66
<?php
77
require 'testdb.inc';
88

9-
@$dbh->exec('drop table tablea');
10-
$dbh->exec('create table tablea (id integer)');
9+
$dbh->exec('recreate table tablea (id integer)');
1110
$S = $dbh->prepare('insert into tablea (id) values (1) returning id');
1211
$S->execute();
1312
$D = $S->fetch(PDO::FETCH_NUM);

ext/pdo_firebird/tests/bug_73087.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ PDO_Firebird: bug 73087 segfault binding blob parameter
66
<?php
77
require 'testdb.inc';
88

9-
@$dbh->exec('drop table atable');
10-
$dbh->exec('create table atable (id integer not null, content blob sub_type 1 segment size 80)');
9+
$dbh->exec('recreate table atable (id integer not null, content blob sub_type 1 segment size 80)');
1110
$S = $dbh->prepare('insert into atable (id, content) values (:id, :content)');
1211
for ($I = 1; $I < 10; $I++) {
1312
$Params = [

ext/pdo_firebird/tests/bug_74462.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ PDO_Firebird: Bug #74462 Returns only NULLs for boolean fields
66
<?php
77
require 'testdb.inc';
88

9-
@$dbh->exec('drop table atable');
10-
$dbh->exec('create table atable (id integer not null, abool boolean)');
9+
$dbh->exec('recreate table atable (id integer not null, abool boolean)');
1110
$dbh->exec('insert into atable (id, abool) values (1, true)');
1211
$dbh->exec('insert into atable (id, abool) values (2, false)');
1312
$dbh->exec('insert into atable (id, abool) values (3, null)');

0 commit comments

Comments
 (0)