Skip to content

Commit

Permalink
修改show index
Browse files Browse the repository at this point in the history
  • Loading branch information
PangXing committed Jul 22, 2023
1 parent 0457c45 commit 227f91b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
2 changes: 2 additions & 0 deletions pkg/dataset/sort_merge_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ import (

import (
"github.com/pkg/errors"

"github.com/spf13/cast"

"go.uber.org/atomic"
)

Expand Down
10 changes: 8 additions & 2 deletions pkg/runtime/conn_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@ package runtime
import (
"context"
"fmt"
"github.com/arana-db/arana/pkg/mysql"
"github.com/stretchr/testify/assert"
"testing"
)

import (
"github.com/stretchr/testify/assert"
)

import (
"github.com/arana-db/arana/pkg/mysql"
)

func TestBackendResourcePool_Get(t *testing.T) {
type args struct {
ctx context.Context
Expand Down
3 changes: 1 addition & 2 deletions pkg/runtime/plan/dal/show_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func (s *ShowIndexPlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Res
}

db, table := s.Shards.Smallest()
toTable := s.Stmt.TableName.Suffix()
s.Stmt.TableName = ast.TableName{table}

if err = s.Stmt.Restore(ast.RestoreDefault, &sb, &indexes); err != nil {
Expand All @@ -84,8 +85,6 @@ func (s *ShowIndexPlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Res
return nil, errors.WithStack(err)
}

toTable := s.Stmt.TableName.Suffix()

ds = dataset.Pipe(ds,
dataset.Map(nil, func(next proto.Row) (proto.Row, error) {
dest := make([]proto.Value, len(fields))
Expand Down
15 changes: 11 additions & 4 deletions pkg/runtime/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,20 @@ import (
"context"
"database/sql"
"fmt"
"testing"
"time"
)

import (
"github.com/stretchr/testify/assert"

"go.uber.org/atomic"
)

import (
"github.com/arana-db/arana/pkg/mysql"
"github.com/arana-db/arana/pkg/proto"
"github.com/arana-db/arana/pkg/runtime/gtid"
"github.com/stretchr/testify/assert"
"go.uber.org/atomic"
"testing"
"time"
)

func Test_branchTx_CallFieldList(t *testing.T) {
Expand Down

0 comments on commit 227f91b

Please sign in to comment.