Merge pull request #29744 from taosdata/fix/keeper

fix(keeper): fix sql for log.logs stable
This commit is contained in:
Linhe Huo 2025-02-11 19:39:25 +08:00 committed by GitHub
commit 1011b24816
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 6 deletions

View File

@ -1,4 +1,4 @@
name: taosKeeper CI
name: taosKeeper Build
on:
push:
@ -8,7 +8,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
name: Run unit tests
name: Build and test on ubuntu-latest
steps:
- name: Checkout the repository

View File

@ -411,9 +411,11 @@ func (p *Processor) Prepare() {
func (p *Processor) withDBName(tableName string) string {
b := pool.BytesPoolGet()
b.WriteByte('`')
b.WriteString(p.db)
b.WriteByte('.')
b.WriteString("`.`")
b.WriteString(tableName)
b.WriteByte('`')
return b.String()
}

View File

@ -119,3 +119,9 @@ func Test_getStatusStr(t *testing.T) {
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`")
}

View File

@ -1,8 +1,6 @@
package util
import (
"testing"
)
import "testing"
func TestEmpty(t *testing.T) {
}