mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
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.
This commit is contained in:
parent
a9253b0e22
commit
9294074c09
@ -6,8 +6,7 @@ PDO_Firebird: Feature 72583 Fetch integers as php integers not as strings
|
||||
<?php
|
||||
require 'testdb.inc';
|
||||
|
||||
@$dbh->exec('drop table atable');
|
||||
$dbh->exec('create table atable (aint integer, asmi smallint)');
|
||||
$dbh->exec('recreate table atable (aint integer, asmi smallint)');
|
||||
$dbh->exec('insert into atable values (1, -1)');
|
||||
$S = $dbh->prepare('select aint, asmi from atable');
|
||||
$S->execute();
|
||||
|
@ -6,8 +6,7 @@ PDO_Firebird: Bug 72931 Insert returning fails on Firebird 3
|
||||
<?php
|
||||
require 'testdb.inc';
|
||||
|
||||
@$dbh->exec('drop table tablea');
|
||||
$dbh->exec('create table tablea (id integer)');
|
||||
$dbh->exec('recreate table tablea (id integer)');
|
||||
$S = $dbh->prepare('insert into tablea (id) values (1) returning id');
|
||||
$S->execute();
|
||||
$D = $S->fetch(PDO::FETCH_NUM);
|
||||
|
@ -6,8 +6,7 @@ PDO_Firebird: bug 73087 segfault binding blob parameter
|
||||
<?php
|
||||
require 'testdb.inc';
|
||||
|
||||
@$dbh->exec('drop table atable');
|
||||
$dbh->exec('create table atable (id integer not null, content blob sub_type 1 segment size 80)');
|
||||
$dbh->exec('recreate table atable (id integer not null, content blob sub_type 1 segment size 80)');
|
||||
$S = $dbh->prepare('insert into atable (id, content) values (:id, :content)');
|
||||
for ($I = 1; $I < 10; $I++) {
|
||||
$Params = [
|
||||
|
@ -6,8 +6,7 @@ PDO_Firebird: Bug #74462 Returns only NULLs for boolean fields
|
||||
<?php
|
||||
require 'testdb.inc';
|
||||
|
||||
@$dbh->exec('drop table atable');
|
||||
$dbh->exec('create table atable (id integer not null, abool boolean)');
|
||||
$dbh->exec('recreate table atable (id integer not null, abool boolean)');
|
||||
$dbh->exec('insert into atable (id, abool) values (1, true)');
|
||||
$dbh->exec('insert into atable (id, abool) values (2, false)');
|
||||
$dbh->exec('insert into atable (id, abool) values (3, null)');
|
||||
|
Loading…
Reference in New Issue
Block a user