mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 12:43:03 +01:00
Always use the dialect 3 for system SQL queries
This commit is contained in:
parent
b0142102ac
commit
32baf214bb
@ -187,7 +187,8 @@ void PreparedStatement::init(thread_db* tdbb, Attachment* attachment, jrd_tra* t
|
||||
try
|
||||
{
|
||||
const Database& dbb = *tdbb->getDatabase();
|
||||
const int dialect = dbb.dbb_flags & DBB_DB_SQL_dialect_3 ? SQL_DIALECT_V6 : SQL_DIALECT_V5;
|
||||
const int dialect = isInternalRequest || (dbb.dbb_flags & DBB_DB_SQL_dialect_3) ?
|
||||
SQL_DIALECT_V6 : SQL_DIALECT_V5;
|
||||
|
||||
DSQL_prepare(tdbb, transaction, &request, text.length(), text.c_str(), dialect,
|
||||
0, NULL, 0, NULL, isInternalRequest);
|
||||
|
@ -2238,7 +2238,7 @@ static bool modify_index(thread_db* tdbb, SSHORT phase, DeferredWork* work, jrd_
|
||||
sql << "select"
|
||||
<< sql("rel.rdb$relation_name,", rdbRelationName)
|
||||
<< sql("rel.rdb$relation_type", rdbRelationType)
|
||||
<< "from rdb$indices idx join rdb$relations rel on rel.rdb$relation_name = idx.rdb$relation_name"
|
||||
<< "from rdb$indices idx join rdb$relations rel using (rdb$relation_name)"
|
||||
<< "where idx.rdb$index_name = " << work->dfw_name;
|
||||
AutoPreparedStatement ps(attachment->prepareStatement(tdbb, dbb->dbb_sys_trans, sql));
|
||||
AutoResultSet rs(ps->executeQuery(tdbb, dbb->dbb_sys_trans));
|
||||
|
Loading…
Reference in New Issue
Block a user