Using SQLite for great science, part 1 (or 3, I guess). | Stavros' Stuff
korokithakis.net
korokithakis.net
Reading about their testing process is also informative: http://www.sqlite.org/testing.html
Lua's design makes similar trade-offs, and they comment on this in http://www.lua.org/doc/sblp2005.pdf: "For instance, just the control-flow analysis of Bigloo, an optimizer Scheme compiler, is more than ten times larger than the whole Lua implementation." It's the same reason the core language doesn't have regular expressions. (Well, that, and LPEG.)
Or you can roll your own and write your own query language too...