Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plan/sql_rewrite.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func RewriteShowAsSelect(stmt *rel.SqlShow, ctx *Context) (*rel.SqlSelect, error
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+

*/
sqlStatement = fmt.Sprintf("select Table, Non_unique, Key_name, Seq_in_index, Column_name, Collation, Cardinality, Sub_part, Packed, `Null`, Index_type, Index_comment from `schema`.`indexes`;")
sqlStatement = "select Table, Non_unique, Key_name, Seq_in_index, Column_name, Collation, Cardinality, Sub_part, Packed, `Null`, Index_type, Index_comment from `schema`.`indexes`;"

case "variables":
// SHOW [GLOBAL | SESSION] VARIABLES [like_or_where]
Expand Down Expand Up @@ -172,7 +172,7 @@ func RewriteShowAsSelect(stmt *rel.SqlShow, ctx *Context) (*rel.SqlSelect, error
| Binlog_snapshot_position | 0
*/
case "engines":
sqlStatement = fmt.Sprintf("select Engine, Support, Comment, Transactions, XA, Savepoints from `context`.`engines`;")
sqlStatement = "select Engine, Support, Comment, Transactions, XA, Savepoints from `context`.`engines`;"
/*
show engines;
mysql> show engines;
Expand Down
6 changes: 3 additions & 3 deletions rel/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -1765,7 +1765,7 @@ func SqlWhereFromPb(pb *SqlWherePb) *SqlWhere {
}

func (m *SqlInto) Keyword() lex.TokenType { return lex.TokenInto }
func (m *SqlInto) String() string { return fmt.Sprintf("%s", m.Table) }
func (m *SqlInto) String() string { return m.Table }
func (m *SqlInto) WriteDialect(w expr.DialectWriter) {}
func (m *SqlInto) Equal(s *SqlInto) bool {
if m == nil && s == nil {
Expand Down Expand Up @@ -1959,7 +1959,7 @@ func (m *SqlCommand) WriteDialect(w expr.DialectWriter) {}

func (m *SqlCreate) Keyword() lex.TokenType { return lex.TokenCreate }
func (m *SqlCreate) FingerPrint(r rune) string { return m.String() }
func (m *SqlCreate) String() string { return fmt.Sprintf("not-implemented") }
func (m *SqlCreate) String() string { return "not-implemented" }
func (m *SqlCreate) WriteDialect(w expr.DialectWriter) {}

func (m *SqlDrop) Keyword() lex.TokenType { return lex.TokenDrop }
Expand All @@ -1969,7 +1969,7 @@ func (m *SqlDrop) WriteDialect(w expr.DialectWriter) {}

func (m *SqlAlter) Keyword() lex.TokenType { return lex.TokenAlter }
func (m *SqlAlter) FingerPrint(r rune) string { return m.String() }
func (m *SqlAlter) String() string { return fmt.Sprintf("not-implemented") }
func (m *SqlAlter) String() string { return "not-implemented" }
func (m *SqlAlter) WriteDialect(w expr.DialectWriter) {}

// Node serialization helpers
Expand Down