Developer blog for MySQL Python project
It is impossible to install it using easy_install from source without installed MySQL and compiler. The most problematic thing is that there is no descriptive error message from easy_install. The reason for failure is unchecked call to OpenKey() I've left a comment on your SF thread, but I am not sure updates are sent from there if I am not subscribed.
You make that sound like a surprise, but the README makes this quite clear: A C compiler and you need MySQL development headers and libraries installed are prerequisites.
It is not about requirement - it is about easy_install behaviour. I'd expect it to tell what to do next. BTW, I would vote for placing this extension as a module to be downloaded in case of:easy_install mysql
There will be a binary egg release for Windows for 1.2.3, provided someone makes one for me to distribute, which is likely. I don't make binary releases for pre-releases.
hi, why don't catch exception after mysql_use_result and mysql_store_result?
It now fails on OpenSolaris like this:> easy_install mysql-pythonSearching for mysql-pythonReading http://pypi.python.org/simple/mysql-python/Reading http://sourceforge.net/projects/mysql-pythonReading http://sourceforge.net/projects/mysql-python/Best match: MySQL-python 1.2.3c1Downloading http://osdn.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-1.2.3c1.tar.gzProcessing MySQL-python-1.2.3c1.tar.gzRunning MySQL-python-1.2.3c1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-EdcRxe/MySQL-python-1.2.3c1/egg-dist-tmp-kUQtg9"/opt/csw/include/python2.5/pyport.h", line 761: #error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."cc: acomp failed for _mysql.cerror: Setup script exited with error: command 'cc' failed with exit status 21.2.2 installed on the same system with no problems.
I'm not sure which versions of MySQL, but at least some of the 5.0 versions do NOT report the MYSQL_TYPE_SET or MYSQL_TYPE_ENUM resultset column types properly. They are returned as MYSQL_TYPE_STRING with the flags set to either SET_FLAG or ENUM_FLAG. I have fixed your code for my server and wish to share it with the world. Simply add:#define REAL_TYPE(t, f) ((t) != MYSQL_TYPE_STRING ? (t) : ((f) & SET_FLAG ? MYSQL_TYPE_SET : ((f) & ENUM_FLAG ? MYSQL_TYPE_ENUM : (t))))Near the top of _mysql.c. Then replace the two instances of fields[i].type with REAL_TYPE(fields[i].type, fields[i].flags).I hope this helps save someone 10 hours of trying to figure out why Sets are returned as Strings. I would probably suggest this as a pretty safe change to make to the core product. If you want a binary for 1.2.3b2 for windows compiled for Python 2.4, message me. I can probably get other versions compiled for you too if you ask nicely.
Andy,I've just started using MySQLdb and Python and found it really useful. Is it possible to implement the MySQL JOIN command on multiple tables in Python/MySQLdb? I've searched everywhere but most articles demonstrate create table and insert but not JOIN. Any help appreciatedyoursDoug
Doug, there is nothing special about JOINs, but if you are having problems, try posting in the SourceForge forums.
Post a Comment