[Pythonmac-SIG] Re: MySQLdb.connect
Andre Posumentov
andrep at ntlworld.com
Thu Jun 19 03:29:19 EDT 2003
Hi again,
The cause of my problem was out of date header files.
The 4.0.13 MySQL package installer puts everything into:
/usr/local/mysql/include
/usr/local/mysql/lib ...etc..
Check that you don't have conflicting headers from earlier MySQL
installs in, say, /usr/include/mysql
Setup.py checks both directories, but in the wrong order to save the
careless from tripping over their own shoelaces..
Cheers,
Andre P
> On Thursday, June 19, 2003, at 12:26 am, Andre Posumentov wrote:
>
>> Hi,
>>
>> Just to confirm that I've also stumbled over Nigel's problem:
>>
>> - Using MySQLdb I get:
>>
>> >>> import MySQLdb
>> >>> db = MySQLdb.connect(db='test')
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in ?
>> File "MySQLdb/__init__.py", line 63, in Connect
>> return apply(Connection, args, kwargs)
>> File "MySQLdb/connections.py", line 116, in __init__
>> self.converter[types.StringType] = self.string_literal
>> TypeError: object does not support item assignment
>> >>>
>> *** malloc[836]: Deallocation of a pointer not malloced: 0xf0878;
>> This could be a double free(), or free() called with the middle of an
>> allocated block; Try setting environment variable MallocHelp to see
>> tools to help debug
>> >>>
>>
>> - Using _mysql I get:
>>
>> >>> import _mysql
>> >>> db=_mysql.connect()
>> *** malloc[805]: error for object 0x3cdc18: Incorrect checksum for
>> freed object - object was probably modified after being freed; break
>> at szone_error
>>
>> In both cases, the interpreter then dies, with a seg fault.
>>
>> This, using Python 2.2.1, the MySQL 4.0.13 package install, and
>> MySQL-python-0.9.2
>> Same errors after re-compiling with Python 2.3b1, for what it's worth.
>>
>> More later if I can unearth any useful insights.
>>
>> cheers,
>> Andre P
>>
>>
>>>
>>> 1. MySQLdb.connect (Nigel King)
>>>
>>> From: Nigel King <king at dircon.co.uk>
>>> Date: Wed Jun 18, 2003 12:20:12 pm Europe/London
>>> To: <pythonmac-sig at python.org>
>>> Subject: [Pythonmac-SIG] MySQLdb.connect
>>>
>>>
>>>
>>>> My first guess: you built the Python MySQLdb extension with another
>>>> Python that you're using to run it. You're running with Apple's
>>>> Python
>>>> 2.2, maybe built it with Python 2.3a2? or with fink-Python from
>>>> /sw/bin?
>>>
>>> I very carefully (ie got my son who is a Unix software Engineer)
>>> compiled
>>> under each of the versions and ran the MySQLdb query under each. So
>>> I do not
>>> think this is the problem.
>>>
>>> It seems from the lack of interest that nobody else is having the
>>> same
>>> problem. Please somebody confirm.
>>>
>>> TIA
>>> --
>>> Nigel
>>
>
More information about the Pythonmac-SIG
mailing list