Bug #44877 mysql proxy uses wrong LUA_PATH and LUA_CPATH values
Submitted: 14 May 2009 14:47 Modified: 17 Aug 2009 15:20
Reporter: Diego Medina Email Updates:
Status: Closed Impact on me:
Category:MySQL Proxy: Install/Config Severity:S1 (Critical)
Version:0.7.0 r658 OS:Any
Assigned to: MC Brown CPU Architecture:Any

[14 May 2009 14:47] Diego Medina
LUA_PATH and LUA_CPATH are set to the build machine paths instead of using the current server paths

How to repeat:
1- run sbin/mysql-proxy    --version

and see these lines

    LUA_CPATH: (default) /Volumes/hd3/merlin/bs/mysql-proxy-64bit/inst/mysql-proxy/lib/mysql-proxy/lua
    LUA_PATH: (default) /Volumes/hd3/merlin/bs/mysql-proxy-64bit/inst/mysql-proxy/lib/mysql-proxy/lua
[15 May 2009 14:27] Jan Kneschke
revno: 659
committer: jan@mysql.com
branch nick: trunk
timestamp: Fri 2009-05-15 16:23:58 +0200
  derive the default LUA_PATH and LUA_CPATH from the basedir
    * moved the getenv()/setenv() for LUA_CPATH/LUA_PATH down after the basic
      option parsing
    * kept the network_mysqld_init() after the getenv()/setenv() as it creates 
      a initial lua_State which reads those envvars
    * fixed the lua-module suffix on HP/UX to .sl
[15 May 2009 16:51] Diego Medina
Verified fixed on 0.7.0 r659

The MySQL Proxy detects the proper LUA_PATH and LUA_CPATH, and you can also overwrite it like this

$ LUA_PATH="/Users/lib/?.lua"  /mysql-proxy- --version
[17 Aug 2009 15:20] MC Brown
A note has been added to the 0.7.0 changelog: 

MySQL Proxy would be configured with the LUA_PATH and LUA_CPATHn directory locations according to the build, not execution, host. In addition, during installation, certain Lua source files could be installed into the incorrect location