8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 19:23:03 +01:00

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.

This commit is contained in:
robocop 2009-12-28 11:59:36 +00:00
parent 7f9e48956e
commit c6931dba93

View File

@ -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;