mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
Don't truncate the .options file when a database is started without the optional options parameter.
This commit is contained in:
parent
2a83dbdf1c
commit
81837f718b
@ -1555,7 +1555,7 @@ PHP_FUNCTION(fbsql_create_db)
|
||||
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 @@ PHP_FUNCTION(fbsql_start_db)
|
||||
|
||||
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))
|
||||
|
Loading…
Reference in New Issue
Block a user