Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

mysql: fixed parsing decimal, 0xf6 in text presentation is not decima…

…l like binary one
  • Loading branch information...
commit b7ac203e3b1a424a991ce1140d22df06a2c32bfa 1 parent 677864e
@tailhook authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 zorro/mysql.py
View
4 zorro/mysql.py
@@ -167,7 +167,7 @@ def _read_bindatetime(buf, pos):
FIELD_MAPPING = {
- 0x00: Decimal,
+ 0x00: lambda a: Decimal(str(a, 'utf-8')),
0x01: int,
0x02: int,
0x03: int,
@@ -181,7 +181,7 @@ def _read_bindatetime(buf, pos):
0x0c: lambda a: datetime.strptime(str(a, 'ascii'), '%Y-%m-%d %H:%M:%S'),
0x0d: int,
0x0f: lambda a: str(a, 'utf-8'),
- 0xf6: Decimal,
+ 0xf6: lambda a: str(a, 'utf-8'),
0xf7: lambda a: str(a, 'utf-8'),
0xf8: lambda a: set(s.decode('utf-8').split(',')),
0xf9: bytes,
Please sign in to comment.
Something went wrong with that request. Please try again.