Skip to content
Snippets Groups Projects

fix: check tuple metadata size in tuple_validate_raw

Merged Dmitry Ivanov requested to merge funbringer/fix-tuple-validate-raw into 2.11.5-picodata

Summary

  • fix: check tuple metadata size in tuple_validate_raw

This check is needed to prevent the following scenario:

box.cfg()

box.schema.space.create("test")
box.space.test:create_index("primary", {
        unique = true, parts = { { field = 1, type = "str" } }
})

local t = { "pk1", {}, "value" }
for i = 1, 9000 do
  table.insert(t[2], { i })
end
box.space.test:insert(t)

-- This succeeds, but shouldn't!
box.space.test:create_index("broken", {
        parts = { { path = "[*][1]", type = "unsigned", field = 2 } }
})
-- This fails with an error due to metadata update...
box.space.test:update("pk1", { { "=", 3, "new value" } })
2025-03-03 10:26:13.519 [41046] main tuple.h:473 E> ER_TUPLE_METADATA_IS_TOO_BIG: Can't create tuple: metadata size 36022 is too big

NO_DOC=picodata NO_CHANGELOG=picodata

Close #82 (closed) Docs follow-up: not necessary / new issue

Edited by Dmitry Ivanov

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading