mirror of
https://github.com/matrix-construct/construct
synced 2024-10-06 15:48:53 +02:00
ircd::db: Move column alignment check outside of DB::Open ctor closure.
This commit is contained in:
parent
d3e61abe7d
commit
5544da61b8
1 changed files with 10 additions and 10 deletions
20
ircd/db.cc
20
ircd/db.cc
|
@ -956,16 +956,6 @@ try
|
||||||
this->column_index.at(handle->GetName()) = handle->GetID();
|
this->column_index.at(handle->GetName()) = handle->GetID();
|
||||||
}
|
}
|
||||||
|
|
||||||
for(size_t i(0); i < this->columns.size(); ++i)
|
|
||||||
if(db::id(*this->columns[i]) != i)
|
|
||||||
throw error
|
|
||||||
{
|
|
||||||
"Columns misaligned: expecting id[%zd] got id[%u] '%s'",
|
|
||||||
i,
|
|
||||||
db::id(*this->columns[i]),
|
|
||||||
db::name(*this->columns[i])
|
|
||||||
};
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}()}
|
}()}
|
||||||
,uuid{[this]
|
,uuid{[this]
|
||||||
|
@ -991,6 +981,16 @@ try
|
||||||
return checkpointer;
|
return checkpointer;
|
||||||
}()}
|
}()}
|
||||||
{
|
{
|
||||||
|
for(size_t i(0); i < this->columns.size(); ++i)
|
||||||
|
if(db::id(*this->columns[i]) != i)
|
||||||
|
throw error
|
||||||
|
{
|
||||||
|
"Columns misaligned: expecting id[%zd] got id[%u] '%s'",
|
||||||
|
i,
|
||||||
|
db::id(*this->columns[i]),
|
||||||
|
db::name(*this->columns[i])
|
||||||
|
};
|
||||||
|
|
||||||
if(ircd::checkdb)
|
if(ircd::checkdb)
|
||||||
{
|
{
|
||||||
log::notice
|
log::notice
|
||||||
|
|
Loading…
Reference in a new issue