sql: fix usage of not initialized index_stat
Query planner uses a temporary index definition object 'to represent the primary key index'. Whatever real purpose of this index_def is (query planner wasn't changed since SQLite merge, and may be broken), its opts.stat field pointed at a partially initialized index_stat structure. Which is supposed to be used by the planner to make decisions such as search by which index would be the optimal. The patch initializes the statistics with 0. Part of #4609
Loading
Please register or sign in to comment