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

support show variables where syntax #199

Closed
cppmule opened this issue Sep 19, 2015 · 6 comments · Fixed by #200
Closed

support show variables where syntax #199

cppmule opened this issue Sep 19, 2015 · 6 comments · Fixed by #200

Comments

@cppmule
Copy link

cppmule commented Sep 19, 2015

2015/09/19 21:39:04 session.go:235: [error] Syntax error: /* mysql-connector-java-5.1.35 ( Revision: 5fb9c5849535c13917c2cf9baaece6ef9693ef27 ) */SHOW VARIABLES WHERE Variable_name ='language' OR Variable_name = 'net_write_timeout' OR Variable_name = 'interactive_timeout' OR Variable_name = 'wait_timeout' OR Variable_name = 'character_set_client' OR Variable_name = 'character_set_connection' OR Variable_name = 'character_set' OR Variable_name = 'character_set_server' OR Variable_name = 'tx_isolation' OR Variable_name = 'transaction_isolation' OR Variable_name = 'character_set_results' OR Variable_name = 'timezone' OR Variable_name = 'time_zone' OR Variable_name = 'system_time_zone' OR Variable_name = 'lower_case_table_names' OR Variable_name = 'max_allowed_packet' OR Variable_name = 'net_buffer_length' OR Variable_name = 'sql_mode' OR Variable_name = 'query_cache_type' OR Variable_name = 'query_cache_size' OR Variable_name = 'license' OR Variable_name = 'init_connect'

@siddontang siddontang changed the title Java connect to tidb-server error. support show variables where syntax Sep 19, 2015
@siddontang
Copy link
Member

@cppmule

We have not supported show variables where syntax, we will support it later.
Thank you very much.

@siddontang
Copy link
Member

Hi @cppmule

Can you checkout branch siddontang/fix-issue-199 and help us to test it again?

@cppmule
Copy link
Author

cppmule commented Sep 19, 2015

Passed, thanks.
I got more errors:

2015/09/19 22:52:40 conn.go:257: [error] cmd: -- MySQL dump 10.13 Distrib 5.5.34, for Linux (x86_64)

-- Host: localhost Database: icar_qa


-- Server version 5.5.34-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

Seems you didn't ignore comments.

@qiuyesuifeng
Copy link
Member

Thanks for your report.
Yes, we have not support sql comment like select c /* this is a comment */ from t now.
We will support it later.
btw, is it convenient for u to remove sql comment temporarily to check whether have any other problems? Thanks again.

@ngaut
Copy link
Member

ngaut commented Sep 19, 2015

The comments are generated by some java tools. And there are too many comments.
We should strip those comments.

/**/

--

@siddontang
Copy link
Member

Move comment discussion to #203 😄

YuJuncen pushed a commit to YuJuncen/tidb that referenced this issue Apr 23, 2021
* restore,checkpoints: move checkpoints into its own package

This allows both the "restore" package to import the "web" package, and
allow the "web" package to use "checkpoints", without leading to circular
dependency.

* verification: implemented json.Marshaler for KVChecksum

* *: expose the current import progress to HTTP interface

* common: added "Pauser" synchronization primitive

* lightning: allows status address to reliably use port 0 for testing

* config: ensure AllIDs() return a deterministic order

* lightning,restore: support pausing, moving and deleting tasks through HTTP

Also fixed some goroutine leaks and crashes after canceling.

* common: fixed the bug where checksum is not cancelable

* config: added configlist.{MoveToFront, MoveToBack}

* web,lightning: added a web interface

* web: explain the web interface

* web: added OpenAPI (Swagger) spec of the HTTP API

* common: avoid double-close a channel

The channel may be double-closed given this sequence:

0. [B] p.Pause()
1. [A] p.Wait(ctx), run until the select
2. [B] p.Resume(), run until the for loop
3. [C] cancel the ctx
4. [A] continue from select, and close the channel
5. [B] continue the for loop, using the old copy of waiters, it will close
       the channel again, causing double-close error.

We just avoid closing the waiter when ctx expired.

* common: added a test to check for contended pause/resume flip

* common: fixed a potential race condition

* verification: change JSON field of checksum from cksum to checksum

* web: document the OpenAPI def and why we don't support webpack-dev-server

Fixed a potential typing error (see TypeStrong/atom-typescript#1053).

* config: prevents task ID conflict which may happen with a coarse clock

* restore: prevent encodeLoop panicking if deliverResult is closed?

* checkpoints,lightning: address comments
YuJuncen pushed a commit to YuJuncen/tidb that referenced this issue Apr 23, 2021
* restore: filter same table ddl

* *: do not return error when backup/restore data is empty

* fix create database double during incremental restore

* add tests

* fix ci

* address comment
xhebox pushed a commit to xhebox/tidb that referenced this issue Sep 28, 2021
xhebox pushed a commit to xhebox/tidb that referenced this issue Oct 8, 2021
okJiang pushed a commit to okJiang/tidb that referenced this issue Oct 19, 2021
…l-consistency` parameter (pingcap#199)

* support rebuild mysql connection to retry failed chunks

* refine consistency variables

* add --transactional-consistency and support rebuilding mysql conn to retry
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 a pull request may close this issue.

4 participants