openresty / lua-resty-mysql

Nonblocking Lua MySQL driver library for ngx_lua or OpenResty
708 stars 236 forks source link

fix: field_count more than 250 #70

Closed huangnauh closed 7 years ago

huangnauh commented 7 years ago

field_count will be 0xfc (packet content: fc fb 0) when a table has 0xfb columns in mysql

agentzh commented 7 years ago

@huangnauh Your tests fail on my side:

t/sanity.t .......... 126/146
#   Failed test 'TEST 22: InnoDB has a limit of 1017 columns per table - response_body - response is expected (repeated req 0, req 0)'
#   at /home/agentzh/git/lua-resty-mysql/../test-nginx/lib/Test/Nginx/Socket.pm line 1500.
#          got: 'bad result: Can't create table `ngx_test`.`test1018` (errno: 185 "Too many columns"): 1005: HY000.
# '
#     expected: 'bad result: Too many columns: 1117: HY000.
# '

#   Failed test 'TEST 22: InnoDB has a limit of 1017 columns per table - response_body - response is expected (repeated req 1, req 0)'
#   at /home/agentzh/git/lua-resty-mysql/../test-nginx/lib/Test/Nginx/Socket.pm line 1500.
#          got: 'bad result: Can't create table `ngx_test`.`test1018` (errno: 185 "Too many columns"): 1005: HY000.
# '
#     expected: 'bad result: Too many columns: 1117: HY000.
# '
# Looks like you planned 146 tests but ran 148.
# Looks like you failed 2 tests of 148 run.
agentzh commented 7 years ago

@huangnauh Also, the test plan in t/sanity.t is not updated to account for your changes:

https://travis-ci.org/openresty/lua-resty-mysql/builds/306133697?utm_source=github_status&utm_medium=notification

The Travis CI build is broken.

Will you look into these issues? Thanks!

agentzh commented 7 years ago

@huangnauh Merged. Thanks!