2018-07-17 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in rddgmgr(8) that would cause an abort if a '_STACK'
	table was found missing when updating to schema 293.
This commit is contained in:
Fred Gleason
2018-07-17 15:23:48 +00:00
parent 3c9e8ccb9b
commit 7e9aa59c94
4 changed files with 54 additions and 31 deletions

View File

@@ -371,6 +371,22 @@ void MainObject::WriteSchemaVersion(int ver) const
}
bool MainObject::TableExists(const QString &tbl_name) const
{
QString sql;
RDSqlQuery *q;
bool ret=false;
sql=QString("show tables where ")+
"Tables_in_"+db_config->mysqlDbname()+"=\""+RDEscapeString(tbl_name)+"\"";
q=new RDSqlQuery(sql,false);
ret=q->first();
delete q;
return ret;
}
bool MainObject::DropTable(const QString &tbl_name,QString *err_msg) const
{
QString sql;