Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bugs #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

fix bugs #6

wants to merge 5 commits into from

Conversation

azurewang
Copy link

fix receive large packet
fix _get_byte8
fix check large query

bug fix: repair fail on send large query(more than 16MB).
bug fix: repair funtion _get_byte8, bit operate only can work right at less than 32.
added test for read large row
added test for large insert_id
@agentzh
Copy link
Member

agentzh commented Mar 3, 2013

Thank you for your patches!

It'll be even more appreciated if you can

  1. add corresponding test cases to the existing test suite,
  2. remove unrelated minor changes from the patch, and
  3. use more descriptive commit log messages than "modified: /path/to/some/file".

Thanks!
-agentzh

@azurewang
Copy link
Author

修改的git log的描述
实现了支持大于16Mb的query。
添加的large.t测试集
测试返回超大的insert_id
测试发送大于16Mb的query
测试读取返回的大于16Mb的行

@agentzh
Copy link
Member

agentzh commented Mar 7, 2013

Perfect! Thank you for your contribution! I'll look into your patches soon :)

agentzh added a commit that referenced this pull request Mar 28, 2013
…ids) could not be properly parsed due to the lack of support for 64-bit integers in LuaJIT's BitOp library. thanks Azure Wang for the patch in github pull #6.
agentzh added a commit that referenced this pull request Mar 28, 2013
…t case added in the previous commit for pull #6.
@agentzh
Copy link
Member

agentzh commented Mar 28, 2013

Your test case "TEST 2: large query" in t/large.t is failing on my side. I'm getting the following error:

send() failed (32: Broken pipe)

Do you have any ideas? Is it passing on your side? Do you have any special configurations on the mysqld side?

@agentzh
Copy link
Member

agentzh commented Mar 28, 2013

And I'm getting the same error while running your "TEST 3: large row" in t/large.t:

t/large.t .. 1/3 
#   Failed test 'TEST 3: large row - response_body - response is expected'
#   at /home/agentzh/git/lua-resty-mysql/../test-nginx/lib/Test/Nginx/Socket.pm line 955.
#          got: 'insert data error:failed to send query: broken pipe
# '
#     expected: '1
# '

#   Failed test 'TEST 3: large row - pattern "[error]" should not match any line in error.log but matches line "2013/03/27 18:11:35 [error] 25278\#0: *1 send() failed (32: Broken pipe), client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\""'
#   at /home/agentzh/git/lua-resty-mysql/../test-nginx/lib/Test/Nginx/Socket.pm line 878.

@azurewang
Copy link
Author

应该是mysqld端设置的最大包大小不够大。我检查我的环境,有可能在测试脚本里加一下设置环境变量。
在 2013-3-28 上午9:12,"Yichun Zhang" [email protected]写道:

And I'm getting the same error while running your "TEST 3: large row" in
t/large.t:

t/large.t .. 1/3

Failed test 'TEST 3: large row - response_body - response is expected'

at /home/agentzh/git/lua-resty-mysql/../test-nginx/lib/Test/Nginx/Socket.pm line 955.

got: 'insert data error:failed to send query: broken pipe

'

expected: '1

'

Failed test 'TEST 3: large row - pattern "[error]" should not match any line in error.log but matches line "2013/03/27 18:11:35 [error] 25278#0: *1 send() failed (32: Broken pipe), client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost""'

at /home/agentzh/git/lua-resty-mysql/../test-nginx/lib/Test/Nginx/Socket.pm line 878.


Reply to this email directly or view it on GitHubhttps://github.com//pull/6#issuecomment-15563098
.

@azurewang
Copy link
Author

你确定打过补丁在跑的测试?

@azurewang
Copy link
Author

我这边在mysqld设置max-allowed-packet=200m
使用我打过补丁的代码三个测试都正常通过。
在 2013-3-28 上午10:21,"azure wang" [email protected]写道:

你确定打过补丁在跑的测试?

@azurewang
Copy link
Author

我的mysqld是debian6.0上apt-get安装的mysql-server。配置文件只增加了上面说的那一项。

在 2013-3-28 上午11:26,"azure wang" [email protected]写道:

我这边在mysqld设置max-allowed-packet=200m
使用我打过补丁的代码三个测试都正常通过。

在 2013-3-28 上午10:21,"azure wang" [email protected]写道:

你确定打过补丁在跑的测试?

@azurewang
Copy link
Author

你可以把你的mysqld信息告诉我一下,我按照你的mysqld环境在测试一下。
在 2013-3-28 上午11:40,"azure wang" [email protected]写道:

我的mysqld是debian6.0上apt-get安装的mysql-server。配置文件只增加了上面说的那一项。

在 2013-3-28 上午11:26,"azure wang" [email protected]写道:

我这边在mysqld设置max-allowed-packet=200m
使用我打过补丁的代码三个测试都正常通过。

在 2013-3-28 上午10:21,"azure wang" [email protected]写道:

你确定打过补丁在跑的测试?

@azurewang
Copy link
Author

测试三,我这没打补丁时,得到的行数是错误的,应该是一行,得到了两行。行里的数据也是错误的。没有出现管道破裂的情况啊。很奇怪。
在 2013-3-28 上午11:42,"azure wang" [email protected]写道:

你可以把你的mysqld信息告诉我一下,我按照你的mysqld环境在测试一下。
在 2013-3-28 上午11:40,"azure wang" [email protected]写道:

我的mysqld是debian6.0上apt-get安装的mysql-server。配置文件只增加了上面说的那一项。

在 2013-3-28 上午11:26,"azure wang" [email protected]写道:

我这边在mysqld设置max-allowed-packet=200m
使用我打过补丁的代码三个测试都正常通过。

在 2013-3-28 上午10:21,"azure wang" [email protected]写道:

你确定打过补丁在跑的测试?

@agentzh
Copy link
Member

agentzh commented Mar 28, 2013

Hello!

2013/3/27 AzureWang [email protected]

我这边在mysqld设置max-allowed-packet=200m
使用我打过补丁的代码三个测试都正常通过。

What happens if you use the default mysqld setup?

I think the tests should pass with the default mysqld configuration.

-agentzh

@agentzh
Copy link
Member

agentzh commented Mar 28, 2013

Hello!

On Wed, Mar 27, 2013 at 7:21 PM, AzureWang [email protected] wrote:

你确定打过补丁在跑的测试?

Yes, of course. I was on your fork's master.

Regards,
-agentzh

@agentzh
Copy link
Member

agentzh commented Mar 28, 2013

Hello!

2013/3/27 AzureWang [email protected]

你可以把你的mysqld信息告诉我一下,我按照你的mysqld环境在测试一下。

I'm using Fedora 17's mysqld (everything updated from the official yum),
with the default configuration.

-agentzh

@azurewang
Copy link
Author

我修改了测试的代码,你出现的错误是由于使用了mysqld5.5导致的,我写测试脚本的时候使用的是5.1,mysqld5.5如果发送的SQL超过max-allowed-packet(1M)就出现broken pipe, mysqld5.1会明确告诉你Got a packet bigger than 'max_allowed_packet' bytes.
mysqld5.5错误处理倒退了。现在Test3我这边使用mysqld5.5可以通过了。Test2由于是测试超过16M的SQL,不修改mysqld的max-allowed-packet 就无法通过测试。不知道在写测试脚本的时候能不能通过获取服务器的环境变量来判断是否运行这个测试。
mysqld5.5默认max-allowed-packet =1M 这个值有点小啊, 呵呵。反正是不能满足我们的业务。超过16M的情况虽然非常小,但是不能排除有这个可能性。所以我选择了支持大于16M的SQL。

@agentzh
Copy link
Member

agentzh commented Mar 29, 2013

Okay, I get it now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants