SQLite

Artifact [d93508fc]
Login

Artifact d93508fc9913cfe6016214d4773e2ca498aa16546b093bae832c067d090dc107:

Ticket change [d93508fc] - New ticket [e4598ecb] Division by zero in the query planner.. by drh 2019-08-15 14:28:04.
D 2019-08-15T14:28:04.884
J foundin 3.29.0
J icomment The\sfollowing\sSQL\scauses\sa\sdivision\sby\szero\sin\sthe\squery\splanner:\r\n\r\n<blockquote><verbatim>\r\nANALYZE;\r\nCREATE\sTABLE\st1(a\sPRIMARY\sKEY);\r\nINSERT\sINTO\ssqlite_stat1\sVALUES('t1',null,'sz=0');\r\nANALYZE\ssqlite_master;\r\nSELECT\s0\sFROM\st1\sWHERE\sa\sIN(1,2,3);\r\n</verbatim></blockquote>\r\n\r\nThe\sproblem\sis\sthe\ssz=0\sparameter\son\sthe\ssqlite_stat1\sentry\sfor\sthe\st1\stable.\r\nThe\svalue\sof\ssz\sneeds\sto\sbe\s2\sor\sgreater,\sand\sthis\sis\snot\senforced.\s\sThe\r\nproblem\swas\sintroduced\sby\scheck-in\s[90e36676476e8db0]\son\s2014-04-30\sand\sfirst\r\nappeared\sin\sversion\s3.8.5.\r\n\r\nThis\sproblem\swas\sreported\son\sthe\sSQLite\smailing\slist\sby\sXingwei\sLin.
J login drh
J mimetype text/x-fossil-wiki
J severity Severe
J status Open
J title Division\sby\szero\sin\sthe\squery\splanner.
J type Code_Defect
K e4598ecbdd18bd82945f6029013296690e719a62
U drh
Z d84b3d357be6810cac0fba73172ae464