diff --git a/MySQLdb/MySQLdb/__init__.py b/MySQLdb/MySQLdb/__init__.py index 0c5bc4e..095d1da 100644 --- a/MySQLdb/MySQLdb/__init__.py +++ b/MySQLdb/MySQLdb/__init__.py @@ -20,7 +20,7 @@ version_info = ( 9, 3, "beta", - 2) + 3) if version_info[3] == "final": __version__ = "%d.%d.%d" % version_info[:3] else: __version__ = "%d.%d.%d%1.1s%d" % version_info[:5] diff --git a/MySQLdb/MySQLdb/connections.py b/MySQLdb/MySQLdb/connections.py index a2e805b..bf32ec8 100644 --- a/MySQLdb/MySQLdb/connections.py +++ b/MySQLdb/MySQLdb/connections.py @@ -112,6 +112,7 @@ class Connection(ConnectionBase): u = unicode conv[FIELD_TYPE.STRING] = u conv[FIELD_TYPE.VAR_STRING] = u + conv[FIELD_TYPE.BLOB].insert(-1, (None, u)) self._make_connection(args, kwargs2) self.converter[types.StringType] = self.string_literal if hasattr(types, 'UnicodeType'): diff --git a/MySQLdb/MySQLdb/converters.py b/MySQLdb/MySQLdb/converters.py index 9451aea..82f7abc 100644 --- a/MySQLdb/MySQLdb/converters.py +++ b/MySQLdb/MySQLdb/converters.py @@ -26,7 +26,7 @@ MySQL.connect(). """ from _mysql import string_literal, escape_sequence, escape_dict, escape, NULL -from constants import FIELD_TYPE +from constants import FIELD_TYPE, FLAG from sets import * from times import * from string import split @@ -132,6 +132,10 @@ conversions = { FIELD_TYPE.DATETIME: DateTime_or_None, FIELD_TYPE.TIME: Time_or_None, FIELD_TYPE.DATE: Date_or_None, + FIELD_TYPE.BLOB: [ + (FLAG.BINARY, char_array), + (None, None), + ], } diff --git a/MySQLdb/_mysql.c b/MySQLdb/_mysql.c index f3c9228..c519936 100644 --- a/MySQLdb/_mysql.c +++ b/MySQLdb/_mysql.c @@ -1,4 +1,4 @@ -#define version_info "(0,9,3,'beta',2)" +#define version_info "(0,9,3,'beta',3)" #define __version__ "0.9.3" /* This program is free software; you can redistribute it and/or modify @@ -362,6 +362,38 @@ _mysql_ResultObject_Initialize( fun = Py_None; Py_INCREF(Py_None); } + if (PySequence_Check(fun)) { + int j, n2=PySequence_Size(fun); + PyObject *fun2=NULL; + for (j=0; jconverter, i, fun); } return 0; @@ -2370,7 +2402,7 @@ init_mysql(void) PyObject *dict, *module, *emod, *edict; module = Py_InitModule4("_mysql", _mysql_methods, _mysql___doc__, (PyObject *)NULL, PYTHON_API_VERSION); - + if (!module) return; /* this really should never happen */ _mysql_ConnectionObject_Type.ob_type = &PyType_Type; _mysql_ResultObject_Type.ob_type = &PyType_Type; #if PY_VERSION_HEX >= 0x02020000 diff --git a/MySQLdb/setup.py b/MySQLdb/setup.py index f6ebc14..144b308 100644 --- a/MySQLdb/setup.py +++ b/MySQLdb/setup.py @@ -18,7 +18,7 @@ embedded_server = (mysqlclient == 'mysqld') name = "MySQL-%s" % os.path.basename(sys.executable) if embedded_server: name = name + "-embedded" -version = "0.9.3b2" +version = "0.9.3b3" # include files and library locations should cover most platforms include_dirs = [ @@ -88,10 +88,10 @@ long_description = \ MySQLdb is an interface to the popular MySQL database server for Python. The design goals are: -- Compliance with Python database API version 2.0 -- Thread-safety -- Thread-friendliness (threads will not block each other) -- Compatibility with MySQL-3.22 and later + - Compliance with Python database API version 2.0 + - Thread-safety + - Thread-friendliness (threads will not block each other) + - Compatibility with MySQL-3.22 and later This module should be mostly compatible with an older interface written by Joe Skinner and others. However, the older version is