Skip to content

Commit 5775176

Browse files
panyingxueagentzh
authored andcommitted
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>
1 parent 79c4a37 commit 5775176

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/resty/mysql.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,13 @@ local mt = { __index = _M }
108108

109109

110110
-- mysql field value type converters
111-
local converters = new_tab(0, 8)
111+
local converters = new_tab(0, 9)
112112

113113
for i = 0x01, 0x05 do
114114
-- tiny, short, long, float, double
115115
converters[i] = tonumber
116116
end
117+
converters[0x00] = tonumber -- decimal
117118
-- converters[0x08] = tonumber -- long long
118119
converters[0x09] = tonumber -- int24
119120
converters[0x0d] = tonumber -- year

0 commit comments

Comments
 (0)