From c6931dba936bebea653eff5a6b5c03f291cf0b3a Mon Sep 17 00:00:00 2001 From: robocop Date: Mon, 28 Dec 2009 11:59:36 +0000 Subject: [PATCH] Prevent isql from creating a db when we want to create a schema or worse, that it drops a db when we want to drop a schema. Of course, in the new ODS 12. Probably the change should be backported to avoid disasters with FB2.5 isql working with FB3.0 server. --- src/isql/isql.epp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/isql/isql.epp b/src/isql/isql.epp index 2337135aab..5acf1a94d6 100644 --- a/src/isql/isql.epp +++ b/src/isql/isql.epp @@ -4645,18 +4645,24 @@ static processing_state frontend(const TEXT* statement) break; case FrontOptions::create: - if (!strcmp(parms[1], "DATABASE") || !strcmp(parms[1], "SCHEMA")) + if (!strcmp(parms[1], "DATABASE") || + !strcmp(parms[1], "SCHEMA") && isqlGlob.major_ods < ODS_VERSION12) + { ret = create_db(cmd, lparms[2]); + } else ret = CONT; break; case FrontOptions::drop: - if (!strcmp(parms[1], "DATABASE") || !strcmp(parms[1], "SCHEMA")) + if (!strcmp(parms[1], "DATABASE") || + !strcmp(parms[1], "SCHEMA") && isqlGlob.major_ods < ODS_VERSION12) + { if (*parms[2]) ret = ps_ERR; else ret = drop_db(); + } else ret = CONT; break;