mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2026-03-13 08:00:02 +08:00
Fix for Python 2.5.
Added a unit test for single character columns. Updated download URL.
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user