.......PS. [ZBXNEXT-1133] moved "total" and "optional_num" variables to non-SQLite3 section