mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 15:23:02 +01:00
Make dialect 3 default when creating database using OO API. Keep legacy behavior in ISC API.
This commit is contained in:
parent
1de6b3de52
commit
7583535db5
@ -2405,12 +2405,9 @@ JAttachment* FB_CARG JProvider::createDatabase(IStatus* user_status, const char*
|
||||
|
||||
switch (options.dpb_sql_dialect)
|
||||
{
|
||||
case 0:
|
||||
// This can be issued by QLI, GDEF and old BDE clients.
|
||||
// In this case assume dialect 1
|
||||
options.dpb_sql_dialect = SQL_DIALECT_V5;
|
||||
case SQL_DIALECT_V5:
|
||||
break;
|
||||
case 0:
|
||||
case SQL_DIALECT_V6:
|
||||
dbb->dbb_flags |= DBB_DB_SQL_dialect_3;
|
||||
break;
|
||||
|
@ -1618,6 +1618,14 @@ ISC_STATUS API_ROUTINE isc_create_database(ISC_STATUS* userStatus, USHORT fileLe
|
||||
if (!status.isSuccess())
|
||||
return status[1];
|
||||
|
||||
ClumpletWriter newDpb(ClumpletReader::dpbList, MAX_DPB_SIZE, dpb, dpbLength);
|
||||
if (!newDpb.find(isc_dpb_sql_dialect))
|
||||
{
|
||||
newDpb.insertInt(isc_dpb_sql_dialect, 1); // legacy behavior in legacy interface
|
||||
dpb = newDpb.getBuffer();
|
||||
dpbLength = newDpb.getBufferLength();
|
||||
}
|
||||
|
||||
YAttachment* attachment = dispatcher->createDatabase(&status, pathName.c_str(),
|
||||
dpbLength, reinterpret_cast<const UCHAR*>(dpb));
|
||||
if (!status.isSuccess())
|
||||
|
Loading…
Reference in New Issue
Block a user