From a2a674fa3a2c9bde9007aba361af5d03b19a4b4c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 6 Aug 2016 10:54:33 +0200 Subject: [PATCH] debugging db creation in Travis for postgres --- .travis.yml | 1 + api/src/Db.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9240b1b5da..76b694ec39 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,6 +73,7 @@ script: postgres) php doc/rpm-build/post_install.php --db_type pgsql --db_port 5432 --db_user postgres --db_pass '' --db_root postgres --db_root_pw '' --source_dir `pwd` --start_db '' --autostart_db '' --start_webserver '' --webserver_user '' + ; psql -U postgres -c '\l' ;; *) php doc/rpm-build/post_install.php diff --git a/api/src/Db.php b/api/src/Db.php index 9eab22ccc3..788755f96c 100644 --- a/api/src/Db.php +++ b/api/src/Db.php @@ -1063,14 +1063,15 @@ class Db $sqls[] = "GRANT ALL ON `$currentDatabase`.* TO $currentUser@'$grant_host' IDENTIFIED BY ".$this->quote($currentPassword); break; default: - echo "

db::create_database(user='$adminname',\$pw) not yet implemented for DB-type '$this->Type'

\n"; - break; + throw new Exception\WrongParameter(__METHOD__."(user=$adminname, \$pw) not yet implemented for DB-type '$this->Type'"); } + error_log(__METHOD__."() this->Type=$this->Type: sqls=".array2string($sqls)); foreach($sqls as $sql) { $this->query($sql,__LINE__,__FILE__); } $this->disconnect(); + error_log(__METHOD__."() this->Type=$this->Type: sqls run, disconnecting now as admin"); $this->User = $currentUser; $this->Password = $currentPassword;