We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please answer these questions before submitting your issue. Thanks!
mysql> create table t(a int, b int, key(b)); Query OK, 0 rows affected (0.01 sec) mysql> create global binding for select * from t using select * from t use index(b); Query OK, 0 rows affected (0.01 sec) mysql> show global bindings; +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ | Original_sql | Bind_sql | Default_db | Status | Create_time | Update_time | Charset | Collation | +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ | select * from t | select * from t use index(b) | tmp | using | 2019-11-18 18:23:42.800 | 2019-11-18 18:23:42.800 | utf8 | utf8_general_ci | +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ 1 row in set (0.00 sec) mysql> select * from mysql.bind_info; +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ | original_sql | bind_sql | default_db | status | create_time | update_time | charset | collation | +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ | select * from t | select * from t use index(b) | tmp | using | 2019-11-18 18:23:42.800 | 2019-11-18 18:23:42.800 | utf8 | utf8_general_ci | +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ 1 row in set (0.00 sec) mysql> drop table t; Query OK, 0 rows affected (0.03 sec) mysql> show global bindings; +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ | Original_sql | Bind_sql | Default_db | Status | Create_time | Update_time | Charset | Collation | +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ | select * from t | select * from t use index(b) | tmp | using | 2019-11-18 18:31:55.675 | 2019-11-18 18:31:55.675 | utf8 | utf8_general_ci | +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ 1 row in set (0.00 sec) mysql> select * from mysql.bind_info; +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ | original_sql | bind_sql | default_db | status | create_time | update_time | charset | collation | +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ | select * from t | select * from t use index(b) | tmp | using | 2019-11-18 18:31:55.675 | 2019-11-18 18:31:55.675 | utf8 | utf8_general_ci | +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ 1 row in set (0.00 sec) mysql> create table t(c1 int, c2 int); Query OK, 0 rows affected (0.01 sec) mysql> select * from mysql.bind_info; +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ | original_sql | bind_sql | default_db | status | create_time | update_time | charset | collation | +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ | select * from t | select * from t use index(b) | tmp | using | 2019-11-18 18:31:55.675 | 2019-11-18 18:31:55.675 | utf8 | utf8_general_ci | +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ 1 row in set (0.00 sec) mysql> show global bindings; +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ | Original_sql | Bind_sql | Default_db | Status | Create_time | Update_time | Charset | Collation | +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+ | select * from t | select * from t use index(b) | tmp | using | 2019-11-18 18:31:55.675 | 2019-11-18 18:31:55.675 | utf8 | utf8_general_ci | +-----------------+------------------------------+------------+--------+-------------------------+-------------------------+---------+-----------------+
No endless error in log, and show global bindings and select * from mysql.bind_info should contain no record after a few rounds of ERROR.
show global bindings
select * from mysql.bind_info
After drop table t, there are endless errors in log like
drop table t
[2019/11/18 18:35:22.676 +08:00] [ERROR] [handle.go:157] ["update bindinfo failed"] [error="[schema:1146]Table 'tmp.t' doesn't exist"]
and after re-create the table with another schema, the error log changes to be:
[2019/11/18 18:35:52.675 +08:00] [ERROR] [handle.go:157] ["update bindinfo failed"] [error="[planner:1176]Key 'b' doesn't exist in table 't'"]
tidb-server -V
select tidb_version();
Release Version: v4.0.0-alpha-1029-gd438c86 Git Commit Hash: d438c860a660f00c755094e1d6c9e61c18715edf Git Branch: refine_args UTC Build Time: 2019-11-18 10:01:47 GoVersion: go1.13.1 Race Enabled: false TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306 Check Table Before Drop: false
The text was updated successfully, but these errors were encountered:
alivxxx
Successfully merging a pull request may close this issue.
Bug Report
Please answer these questions before submitting your issue. Thanks!
No endless error in log, and
show global bindings
andselect * from mysql.bind_info
should contain no record after a few rounds of ERROR.After
drop table t
, there are endless errors in log likeand after re-create the table with another schema, the error log changes to be:
tidb-server -V
or runselect tidb_version();
on TiDB)?The text was updated successfully, but these errors were encountered: