cvs: php-src /ext/fbsql php_fbsql.c
| From: | Frank M. Kromann | Date: | Mon, 11 Apr 2005 19:22:02 +0000 |
| Subject: | cvs: php-src /ext/fbsql php_fbsql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-31357@lists.php.net to get a copy of this message | ||
fmk Mon Apr 11 15:22:02 2005 EDT
Modified files:
/php-src/ext/fbsql php_fbsql.c
Log:
Don't truncate the .options file when a database is started without the optional options
parameter.
http://cvs.php.net/diff.php/php-src/ext/fbsql/php_fbsql.c?r1=1.112&r2=1.113&ty=u
Index: php-src/ext/fbsql/php_fbsql.c
diff -u php-src/ext/fbsql/php_fbsql.c:1.112 php-src/ext/fbsql/php_fbsql.c:1.113
--- php-src/ext/fbsql/php_fbsql.c:1.112 Wed Feb 9 14:32:03 2005
+++ php-src/ext/fbsql/php_fbsql.c Mon Apr 11 15:22:01 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_fbsql.c,v 1.112 2005/02/09 19:32:03 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.113 2005/04/11 19:22:01 fmk Exp $ */
/* TODO:
*
@@ -1555,7 +1555,7 @@
zval **fbsql_link_index = NULL, **database_name, **database_options = NULL;
int id;
int i, status;
- char *databaseName, *databaseOptions;
+ char *databaseName, *databaseOptions = NULL;
switch (ZEND_NUM_ARGS()) {
case 1:
@@ -1762,7 +1762,16 @@
if (status == FBStopped)
{
- if (!fbcehStartDatabaseNamedWithOptions(phpLink->execHandler, databaseName, databaseOptions))
+ int dbstarted;
+ if (databaseOptions != NULL)
+ {
+ dbstarted = fbcehStartDatabaseNamedWithOptions(phpLink->execHandler, databaseName,
databaseOptions);
+ }
+ else
+ {
+ dbstarted = fbcehStartDatabaseNamed(phpLink->execHandler, databaseName);
+ }
+ if (!dbstarted)
{
char* error = fbechErrorMessage(phpLink->execHandler);
if (FB_SQL_G(generateWarnings))