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

Add push down test for function bin in tikv. #28

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

Conversation

cireu
Copy link
Contributor

@cireu cireu commented Nov 12, 2019

Signed-off-by: Zhu Zihao <all_but_last>@163.com

Signed-off-by: Zhu Zihao <all_but_last>@163.com
@cireu
Copy link
Contributor Author

cireu commented Nov 12, 2019

What's the meaning of this failed CI build? I try run copr test in tikv/tikv#5872. And I don't know whether the issue is about my code or copr-test now. @breeswish

@lonng
Copy link
Member

lonng commented Nov 13, 2019

@cireu Seems TiDB does not handle correctly.

@cireu
Copy link
Contributor Author

cireu commented Nov 13, 2019

should I report this in tidb? @lonng

@lonng
Copy link
Member

lonng commented Nov 13, 2019

@cireu I reproduce this in MySQL and the TiDB has the same behavior with MySQL. So I think you can investigate into it.

Reproduce step:

  • mysql --host=172.16.5.32 --port=4000 --user=root test < ./push-down-test/prepare/0_data.sql
  • SELECT FORMAT( '10:02:47.050292', ( 'p' DIV col_smallint) ) AS field1 FROMtable20_int_autoincWHERE BIN(col_smallint ) /* QNO 2562 CON_ID 176 */ ;

@cireu
Copy link
Contributor Author

cireu commented Nov 13, 2019

@lonng Try following commands

docker run --rm --name msql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -e MYSQL_DATABASE=test -d mysql:8.0.15
mysql -h<yourlocalhost> -P3306 -uroot -p123456 test < ./push-down-test/prepare/0_data.sql

And after run the SQL query I get

mysql> select format( '10:02:47.050292', ( 'p' DIV `col_smallint` ) ) AS field1 FROM `table20_int_autoinc` WHERE BIN( `col_smallint` );
+--------+
| field1 |
+--------+
| 10     |
| 10     |
| 10     |
| 10     |
| 10     |
| 10     |
| 10     |
| 10     |
| 10     |
| 10     |
| 10     |
| 10     |
+--------+
12 rows in set, 24 warnings (0.00 sec)

Same result as TiKV coprocessor

@cireu
Copy link
Contributor Author

cireu commented Nov 16, 2019

Don' t why DCO bot complain about my sign-off.

@breezewish
Copy link
Member

Hi, the DCO requires all commits to be signed-off. You can have a rebase (like rewriting the branch into one, signed commit).

@cireu
Copy link
Contributor Author

cireu commented Dec 8, 2019

Looks that this issue is still opened now. pingcap/tidb#13440

I will do the rest(resolve conflicts, sign commits) after that.

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.

3 participants