[Tarantool-patches] [PATCH] sql: fix segfault in pragma table_info

Chris Sosnin k.sosnin at tarantool.org
Thu Jan 30 15:53:51 MSK 2020


Hi! Thank you for the review!

> I'd add a bit of details:
> 
> -- Make sure that 'pragma table_info()' correctly handles tables
> -- without primary key.

I agree, inserted your version.

> 
>> +table_info = box.execute('pragma table_info("_vinyl_deferred_delete")')
> 
> To ignore statement result as a rule we use underscore:
> 
> _ = box.execute(…)

Fixed.

> Finally, personally I wouldn't focus on particular '_vinyl_deferred_delete'
> system space, but rather create casual space without pk and/or format and
> use it in the test. Then we could run it using both engines.


I rewrote tests, new diff:

+test_run = require('test_run').new()
+engine = test_run:get_cfg('engine')
+--
+-- Make sure that 'pragma table_info()' correctly handles tables
+-- without primary key.
+--
+T = box.schema.create_space('T', {         \
+    engine = engine,                       \
+    format = {{'i', 'integer'}}            \
+})
+_ = box.execute('pragma table_info(T)')
+T:drop()


More information about the Tarantool-patches mailing list