57 Commits

Author SHA1 Message Date
a2ebbd2073 Use _Bool only for MySQL 8 2017-12-21 20:09:58 +09:00
1ea5d01db8 my_bool is removed from MySQL 8
Fixed #218
2017-12-21 19:16:24 +09:00
b10ecd0b46 Remove broken row_seek() and row_tell() (#220)
They are broken from long ago and making them safe is difficult.
So remove them rather than fix.
2017-12-21 18:48:50 +09:00
b948553229 simplify memory management of the conv dictionary
In ResultObject_Initialize, always borrow the conv dictionary from the
caller. This simplifies the code, removes an allocation, and fixes ref
leaks in error cases.
2017-12-21 18:26:28 +09:00
1a9874b340 raise InterfaceError when mysql_errno() returns 0 (#203) 2017-09-02 01:50:16 +09:00
6058715077 Fix compile with MariaDB 10.2.8 (#200) 2017-08-31 10:53:55 +09:00
ca4317a6b5 Fix encoding tuple argument (#155)
Since Connections.encoders is broken by design.
Tuple and list is escaped directly in `Connection.literal()`.
Removed tuple and list from converters mapping.

Fixes #145
2017-08-30 18:49:02 +09:00
ca41a647cb remove include "my_config.h". (#198)
fixes #197
2017-08-28 22:35:27 +09:00
1a10d0e4fc Support error numbers > CR_MAX_ERROR (#188)
fixes #187
2017-06-27 12:10:11 +09:00
f41e651e28 fix leak of connection->converter. (#182) 2017-06-16 16:58:59 +09:00
1693848c9f Fix compile error with MariaDB 10.2. (#177)
Don't touch MYSQL.reconnect directly.
2017-06-07 15:46:20 +09:00
2feb5ed685 reduce IS_PY3K usage 2017-01-04 21:46:39 +09:00
10c6f9f767 Add typecheck for _mysql.result()
fixes #137
2017-01-04 21:37:24 +09:00
387c350188 Fix compile error on MSVC compiler.
fixes #121
2016-09-30 15:50:10 +09:00
4202f611df Don't use mysql_real_escape_string_quote on MariaDB (#115) 2016-09-12 07:50:05 +09:00
db1bb2ccb1 Spelling fixes (#112) 2016-09-12 06:31:28 +09:00
269d3208ff MySQL Connector/C 6.1.6 doesn't have mysql_real_escape_string_quote (#111)
While it's MYSQL_VERSION_ID is 50706 and MySQL 5.7.6 has it.
Since MySQL 5.7.6 is old milestone version, just drop supporting it.

fixes #110
2016-09-06 14:00:12 +09:00
a83baad1d0 Use mysql_real_escape_string_quote() if exists. 2016-09-05 01:16:12 +09:00
05fbc500d1 Always MYSQL_VERSION_ID >= 50007 2016-09-05 01:05:12 +09:00
fb842fbdd5 Use METH_NOARGS (#103) 2016-07-27 01:49:06 +09:00
8c219d9261 Merge pull request #100 from methane/mysql-affected-rows-error
mysql_affected_rows may return -1
2016-07-25 12:25:02 +09:00
ac1fb2dddd mysql_affected_rows may return -1 2016-07-25 03:55:38 +09:00
66029d6406 Support 'database' and 'password' kwargs 2016-06-28 17:36:57 +09:00
012e91a03a Fix accessing buffer of decrefed string
fixes #78
2016-05-12 10:25:15 +09:00
98bec5fb8c fixup 2015-11-05 03:38:13 +09:00
b07937487d Don't fetch warnings when there is next result
Fixes #48
2015-10-12 02:29:06 +09:00
8c090157b7 Check after mysql_store_result propery
fixes #51
2015-10-11 20:09:17 +09:00
d4ef92d43a Adding FIELD_TYPE_GEOMETRY as binary type fixes the issue of the UnicodeDecodeError and makes geometry types usable. 2015-07-21 21:50:46 +02:00
04896fc6f5 Treat BIT as binary type. 2015-04-09 03:33:33 +09:00
57348117f3 missing default value: raise IntegrityError
instead of OperationalError

Follow Python DB API 2.0:
http://legacy.python.org/dev/peps/pep-0249/#integrityerror

Initially reported here:
https://sourceforge.net/p/mysql-python/bugs/336/
2015-03-16 02:03:09 +01:00
fae710dbfc Fix _mysql.escape_string() 2015-02-24 14:53:52 +09:00
21a91a2ee2 Don't release GIL in dealloc()
Fixes farcepest/MySQLdb1#84
2014-10-24 20:07:23 +09:00
e7e3a9b334 Fix warnings while building _mysql.so 2014-10-12 20:45:12 +09:00
0b9a5b09e0 Fix build error when using libmariadbclient.
Fixes farcepest/MySQLdb1#80
2014-10-11 22:37:27 +09:00
5ba60802c7 Add low level APIs for semi-async query. 2014-07-03 14:26:38 +09:00
f1608b7097 Fix compilation error on Windows. 2014-04-28 15:37:12 +09:00
bc5c25e9f9 Merge remote-tracking branch 'mysqldb/python3'
Conflicts:
	README.md
2014-04-28 14:18:03 +09:00
63df97dc05 Support MySQL-Connector/C 6.1 for Windows. 2014-04-28 11:11:49 +09:00
af18cc9c08 Remove pymemcompat.h 2014-04-18 22:59:30 +09:00
5a66f79f10 Fix segfault on Python 2. 2014-04-18 11:50:58 +09:00
e8c1ebb5b7 Call decoders with unicode when field is not str and bytes. 2014-04-18 03:42:11 +09:00
b5780d29c9 self of module-level function is not NULL on Python 3. 2014-04-18 01:11:47 +09:00
9cdef719a6 More fix 2014-04-17 19:50:42 +09:00
acc984c247 Fix escaping.
escape_string() -- only accepts bytes
string_literal() -- Use ASCII to encode str(o)
2014-04-17 19:41:01 +09:00
c4d8948449 Remove more macros for ancient Python. 2014-04-17 01:13:43 +09:00
2556226b3e Cleanup
Remove macros for Python <2.6
2014-04-17 01:05:38 +09:00
80f5a4a66f Fix segfault on Python 2. 2014-04-17 00:44:43 +09:00
690e5e9325 Fix getattr on result object. 2014-04-16 23:33:17 +09:00
8b8444fd89 Fix memory corruption on Python 3. 2014-04-16 23:29:05 +09:00
5fc7131cc0 Some Python 3 C-API fixes. 2014-04-16 22:31:48 +09:00