Skip to content
Snippets Groups Projects
Commit 29613f22 authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon:
Browse files

fix: used to segfault sometimes in tarantool if parts count is 0

parent 39e428ec
No related branches found
No related tags found
1 merge request!544fix: used to segfault sometimes in tarantool if parts count is 0
Pipeline #18803 passed
......@@ -104,6 +104,15 @@ pub fn apply_schema_change(storage: &Clusterwide, ddl: &Ddl, version: u64) -> Re
}
let res = (|| -> tarantool::Result<()> {
if tt_pk_def.parts.is_empty() {
return Err(tarantool::set_and_get_error!(
tarantool::error::TarantoolErrorCode::ModifyIndex,
"can't create index '{}' in space '{}': parts list cannot be empty",
tt_pk_def.name,
tt_space_def.name,
)
.into());
}
sys_space.insert(&tt_space_def)?;
sys_index.insert(&tt_pk_def)?;
if let Some(def) = tt_bucket_id_def {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment