diff --git a/MySQLdb/_mysql.c b/MySQLdb/_mysql.c index 9d7eef9..54639c1 100644 --- a/MySQLdb/_mysql.c +++ b/MySQLdb/_mysql.c @@ -1132,7 +1132,7 @@ _mysql_escape_dict( PyObject *args) { PyObject *o=NULL, *d=NULL, *r=NULL, *item, *quoted, *pkey; - int ppos = 0; + Py_ssize_t ppos = 0; if (!PyArg_ParseTuple(args, "O!O:escape_dict", &PyDict_Type, &o, &d)) goto error; if (!PyMapping_Check(d)) { diff --git a/MySQLdb/metadata.cfg b/MySQLdb/metadata.cfg index 210456c..26f9aff 100644 --- a/MySQLdb/metadata.cfg +++ b/MySQLdb/metadata.cfg @@ -29,7 +29,7 @@ author_email: andy@dustman.net license: GPL platforms: ALL url: http://sourceforge.net/projects/mysql-python -download_url: http://easynews.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-%(version)s.tar.gz +download_url: http://osdn.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-%(version)s.tar.gz classifiers: Development Status :: 5 - Production/Stable Environment :: Other Environment diff --git a/MySQLdb/test_MySQLdb_capabilities.py b/MySQLdb/test_MySQLdb_capabilities.py index 5a6871e..a15c8d7 100644 --- a/MySQLdb/test_MySQLdb_capabilities.py +++ b/MySQLdb/test_MySQLdb_capabilities.py @@ -75,6 +75,16 @@ class test_MySQLdb(test_capabilities.DatabaseTest): c.execute("DROP PROCEDURE test_sp") c.execute('drop table %s' % (self.table)) + def test_small_CHAR(self): + # Character data + def generator(row,col): + i = (row*col+62)%256 + if i == 62: return '' + if i == 63: return None + return chr(i) + self.check_data_integrity( + ('col1 char(1)','col2 char(1)'), + generator) if __name__ == '__main__': if test_MySQLdb.leak_test: