Posted by Kromey at 8:30pm Aug 24 '09
You must sign in to send Kromey a message
You must sign in to send Kromey a message
No one's been fired for this, but it's likely the person(s) responsible don't work there anymore anyway. In a nutshell, the issue evolved from someone who didn't know SQL writing SQL statements and Googling just enough to find things like the IN clause without going further to find out why it can be bad. And then other people came along, saw how it was done in function A, and copied the method when writing functions B through ZZ78QR. (Some of them have names precisely that meaningful, too!)
It's depressing how much of our code was written with this kind of quality.
MySQL doesn't impose a limit on the number of items in an IN clause, however it does impose a limit on the size of a query (if using TCP/IP; if you're using Unix sockets, there's no limit). Apparently, this limit is much higher than the 512KB I thought it was, seeing as how MySQL has not rejected queries as large as 2MB...
It's depressing how much of our code was written with this kind of quality.
MySQL doesn't impose a limit on the number of items in an IN clause, however it does impose a limit on the size of a query (if using TCP/IP; if you're using Unix sockets, there's no limit). Apparently, this limit is much higher than the 512KB I thought it was, seeing as how MySQL has not rejected queries as large as 2MB...