mysql-proxy-discuss team mailing list archive
-
mysql-proxy-discuss team
-
Mailing list archive
-
Message #00075
Thoughts on lib/proxy/auto-config.lua
Hi!
I have two thoughts on the auto-config.lua script:
1) IMHO, it should be okay if the 'literal' token is a valid Lua identifier
(e.g. analyze_query)
2) the parse_value() function may return false, so we should not use 'if not
val then ... end'
I've created a branch (
https://code.launchpad.net/~zhuzhaoyuan/mysql-proxy/fix-auto-config<https://code.launchpad.net/%7Ezhuzhaoyuan/mysql-proxy/fix-auto-config>)
to try to fix the problems above. But, frankly, I don't like the second fix
I did ('val == nil') too much, since it seems not idiomatic to Lua
programmers. Please correct me if you have better ideas ;)
Cheers!
--
Joshua Zhu
http://blog.zhuzhaoyuan.com