<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 1 Mar 2018, at 16:55, <a href="mailto:v.shpilevoy@tarantool.org" class="">v.shpilevoy@tarantool.org</a> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class="">I would say it is too gently to silently skip situation when collation is missed.<br class="">I can't imagine reason when collation isn't found by name, since AFAIK in SQL every<br class="">column features collation (even if it wasn't set, by default it would be "BINARY").<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Try to write assert(coll != NULL), and sql-tap/collation.test.lua fails, because BINARY collation in SQL has name, that can not be found in Tarantool.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></div></blockquote></div><br class=""><div class="">Well, you can check collation name before lookup. If it is “BINARY”, then handle situation as you done before.</div><div class="">Otherwise, add sort of assertion. You can see how it happens in sql.c tarantoolSqlite3MakeIdxParts()</div><div class="">(I am not saying this solution is better, but it already exists and collation transforming from name to</div><div class=""> internal struct should be the same everywhere, I guess. Moreover, I think that “BINARY” collation is</div><div class=""> complete mess and names should be replaced with structs, but it is matter of separate patch.)</div><div class="">But still it is up to you.</div><div class=""><br class=""></div><div class="">Also, as for the last patch, should we remove 'sqlite3_table_column_metadata()' function? It seems to be unused.</div><div class=""><br class=""></div><div class="">Anyway, the rest seems to be OK.</div></body></html>