Permalink
Browse files

feature: added support for FIELD_TYPE_DECIMAL for MySQL servers prior…

… to 5.0 and 5.0.

Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
  • Loading branch information...
panyingxue authored and agentzh committed Jun 22, 2017
1 parent 79c4a37 commit 5775176bb031f669b97bb9099a75e5dcf915344c
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/resty/mysql.lua
View
@@ -108,12 +108,13 @@ local mt = { __index = _M }
-- mysql field value type converters
local converters = new_tab(0, 8)
local converters = new_tab(0, 9)
for i = 0x01, 0x05 do
-- tiny, short, long, float, double
converters[i] = tonumber
end
converters[0x00] = tonumber -- decimal
-- converters[0x08] = tonumber -- long long
converters[0x09] = tonumber -- int24
converters[0x0d] = tonumber -- year

0 comments on commit 5775176

Please sign in to comment.