зеркало из https://github.com/github/vitess-gh.git
sqlparser: fix broken unit test
The last commit broke one unit test because it was using upper case INDEX names, which is not possible in vitess. Only table names can contain upper case letters.
This commit is contained in:
Родитель
82c15f7a08
Коммит
bfec1d59f1
|
@ -468,7 +468,7 @@ func TestQueryExecutorPlanPKIn(t *testing.T) {
|
|||
func TestQueryExecutorPlanSelectSubQuery(t *testing.T) {
|
||||
db := setUpQueryExecutorTest()
|
||||
query := "select * from test_table where name = 1 limit 1000"
|
||||
expandedQuery := "select pk from test_table use index (INDEX) where name = 1 limit 1000"
|
||||
expandedQuery := "select pk from test_table use index (`index`) where name = 1 limit 1000"
|
||||
want := &mproto.QueryResult{
|
||||
Fields: getTestTableFields(),
|
||||
}
|
||||
|
@ -1055,7 +1055,7 @@ func TestQueryExecutorTableAclExemptACL(t *testing.T) {
|
|||
func TestQueryExecutorBlacklistQRFail(t *testing.T) {
|
||||
db := setUpQueryExecutorTest()
|
||||
query := "select * from test_table where name = 1 limit 1000"
|
||||
expandedQuery := "select pk from test_table use index (INDEX) where name = 1 limit 1000"
|
||||
expandedQuery := "select pk from test_table use index (`index`) where name = 1 limit 1000"
|
||||
expected := &mproto.QueryResult{
|
||||
Fields: getTestTableFields(),
|
||||
}
|
||||
|
@ -1114,7 +1114,7 @@ func TestQueryExecutorBlacklistQRFail(t *testing.T) {
|
|||
func TestQueryExecutorBlacklistQRRetry(t *testing.T) {
|
||||
db := setUpQueryExecutorTest()
|
||||
query := "select * from test_table where name = 1 limit 1000"
|
||||
expandedQuery := "select pk from test_table use index (INDEX) where name = 1 limit 1000"
|
||||
expandedQuery := "select pk from test_table use index (`index`) where name = 1 limit 1000"
|
||||
expected := &mproto.QueryResult{
|
||||
Fields: getTestTableFields(),
|
||||
}
|
||||
|
@ -1377,7 +1377,7 @@ func getQueryExecutorSupportedQueries() map[string]*mproto.QueryResult {
|
|||
[]sqltypes.Value{
|
||||
sqltypes.MakeString([]byte{}),
|
||||
sqltypes.MakeString([]byte{}),
|
||||
sqltypes.MakeString([]byte("INDEX")),
|
||||
sqltypes.MakeString([]byte("index")),
|
||||
sqltypes.MakeString([]byte{}),
|
||||
sqltypes.MakeString([]byte("name")),
|
||||
sqltypes.MakeString([]byte{}),
|
||||
|
|
Загрузка…
Ссылка в новой задаче