sql: increment VIEW counter for tables within sub-select
VIEW can be created not only in form of AS SELECT but also in form of AS VALUES (...). In the latter case space's view reference counters were not incremented. Furthermore, if view came with sub-select, reference counters of tables within sub-select were not updated as well. These problems occurred due to simplified traverse over AST: only tables within FROM clause were accounted. This patch fixes them introducing complete pass over AST using walker. Closes #3815
Showing
- src/box/alter.cc 11 additions, 5 deletionssrc/box/alter.cc
- src/box/sql.h 18 additions, 11 deletionssrc/box/sql.h
- src/box/sql/build.c 0 additions, 3 deletionssrc/box/sql/build.c
- src/box/sql/select.c 48 additions, 37 deletionssrc/box/sql/select.c
- src/box/sql/sqliteInt.h 0 additions, 1 deletionsrc/box/sql/sqliteInt.h
- test/sql/view.result 58 additions, 0 deletionstest/sql/view.result
- test/sql/view.test.lua 24 additions, 0 deletionstest/sql/view.test.lua
Loading
Please register or sign in to comment