change to fit the mysql5.1 and python 2.6.5