File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,9 +11,13 @@ function init_db()
1111{
1212 global $ test_base , $ user , $ password ;
1313
14- $ test_db = ibase_query (IBASE_CREATE ,
15- sprintf ("CREATE SCHEMA '%s' USER '%s' PASSWORD '%s' DEFAULT CHARACTER SET %s " ,$ test_base ,
16- $ user , $ password , ($ charset = ini_get ('ibase.default_charset ' )) ? $ charset : 'NONE ' ));
14+ $ sql = sprintf ("CREATE SCHEMA '%s' USER '%s' PASSWORD '%s' DEFAULT CHARACTER SET %s " ,
15+ $ test_base , $ user , $ password ,
16+ ($ charset = ini_get ('ibase.default_charset ' )) ? $ charset : 'NONE '
17+ );
18+
19+ $ test_db = ibase_query (IBASE_CREATE , $ sql );
20+
1721 $ tr = ibase_trans ($ test_db );
1822 ibase_query ($ tr ,"create table test1 (i integer, c varchar(100)) " );
1923 ibase_commit_ret ($ tr );
@@ -26,8 +30,9 @@ function cleanup_db()
2630{
2731 global $ test_base ;
2832
29- $ r = ibase_connect ($ test_base );
30- ibase_drop_db ($ r );
33+ if ($ r = ibase_connect ($ test_base )){
34+ ibase_drop_db ($ r );
35+ }
3136}
3237
3338function get_fb_version (): float
You can’t perform that action at this time.
0 commit comments