diff --git a/src/jrd/jrd.cpp b/src/jrd/jrd.cpp index d657a3b4c8..2ba1414abf 100644 --- a/src/jrd/jrd.cpp +++ b/src/jrd/jrd.cpp @@ -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; diff --git a/src/yvalve/why.cpp b/src/yvalve/why.cpp index f888df44fd..e77d4dd4ea 100644 --- a/src/yvalve/why.cpp +++ b/src/yvalve/why.cpp @@ -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(dpb)); if (!status.isSuccess())