Merge pull request #29744 from taosdata/fix/keeper
fix(keeper): fix sql for log.logs stable
This commit is contained in:
commit
1011b24816
|
@ -1,4 +1,4 @@
|
||||||
name: taosKeeper CI
|
name: taosKeeper Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -8,7 +8,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Run unit tests
|
name: Build and test on ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
|
@ -411,9 +411,11 @@ func (p *Processor) Prepare() {
|
||||||
|
|
||||||
func (p *Processor) withDBName(tableName string) string {
|
func (p *Processor) withDBName(tableName string) string {
|
||||||
b := pool.BytesPoolGet()
|
b := pool.BytesPoolGet()
|
||||||
|
b.WriteByte('`')
|
||||||
b.WriteString(p.db)
|
b.WriteString(p.db)
|
||||||
b.WriteByte('.')
|
b.WriteString("`.`")
|
||||||
b.WriteString(tableName)
|
b.WriteString(tableName)
|
||||||
|
b.WriteByte('`')
|
||||||
return b.String()
|
return b.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,3 +119,9 @@ func Test_getStatusStr(t *testing.T) {
|
||||||
assert.Equal(t, tt.expected, res)
|
assert.Equal(t, tt.expected, res)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Test_withDBName(t *testing.T) {
|
||||||
|
processor := &Processor{db: "db"}
|
||||||
|
res := processor.withDBName("test")
|
||||||
|
assert.Equal(t, res, "`db`.`test`")
|
||||||
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package util
|
package util
|
||||||
|
|
||||||
import (
|
import "testing"
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestEmpty(t *testing.T) {
|
func TestEmpty(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue