mirror of
https://github.com/taosdata/TDengine
synced 2026-05-24 10:09:01 +00:00
* restore .gitmodules
* Revert "[TD-13408]<test>: move tests directory out"
This reverts commit 7db7bd9337.
* revert to make tests back
* immigrate file change in stand-alone repo to TDengine
* remove tests repository checkout
Co-authored-by: tangfangzhi <fztang@taosdata.com>
100 lines
2.1 KiB
Text
100 lines
2.1 KiB
Text
system sh/stop_dnodes.sh
|
|
system sh/deploy.sh -n dnode1 -i 1
|
|
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
|
|
system sh/exec.sh -n dnode1 -s start
|
|
|
|
sleep 10
|
|
sql connect
|
|
print ======================== dnode1 start
|
|
|
|
|
|
$db = testdb
|
|
sql drop database if exists $db
|
|
sql create database $db cachelast 2
|
|
sql use $db
|
|
|
|
$table1 = table_name
|
|
$table2 = tablexname
|
|
|
|
sql create table $table1 (ts timestamp, b binary(20))
|
|
sql create table $table2 (ts timestamp, b binary(20))
|
|
|
|
sql insert into $table1 values(now, "table_name")
|
|
sql insert into $table1 values(now-1m, "tablexname")
|
|
sql insert into $table1 values(now-2m, "tablexxx")
|
|
sql insert into $table1 values(now-3m, "table")
|
|
|
|
sql select b from $table1
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
|
|
sql select b from $table1 where b like 'table_name'
|
|
if $rows != 2 then
|
|
return -1
|
|
endi
|
|
|
|
|
|
sql select b from $table1 where b like 'table\_name'
|
|
if $rows != 1 then
|
|
return -1
|
|
endi
|
|
|
|
sql show tables;
|
|
if $rows != 2 then
|
|
return -1
|
|
endi
|
|
|
|
sql show tables like 'table_name'
|
|
if $rows != 2 then
|
|
return -1
|
|
endi
|
|
|
|
sql show tables like 'table\_name'
|
|
if $rows != 1 then
|
|
return -1
|
|
endi
|
|
|
|
sql create database escape_percentage;
|
|
sql use escape_percentage;
|
|
$table1 = tablename
|
|
$table2 = `table%`
|
|
|
|
sql create table $table1 (ts timestamp, b binary(20))
|
|
sql create table $table2 (ts timestamp, b binary(20))
|
|
|
|
sql insert into $table1 values(now, "table%name")
|
|
sql insert into $table1 values(now-1m, "table%")
|
|
sql insert into $table1 values(now-2m, "table%%%")
|
|
sql insert into $table1 values(now-3m, "table")
|
|
|
|
sql select b from $table1 where b like 'table\%'
|
|
print $rows
|
|
if $rows != 1 then
|
|
return -1
|
|
endi
|
|
sql select b from $table1 where b like 'table\%\%\%'
|
|
print $rows
|
|
if $rows != 1 then
|
|
return -1
|
|
endi
|
|
sql select b from $table1 where b like 'table%'
|
|
print $rows
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
sql show tables like 'table\%'
|
|
print $rows
|
|
if $rows != 1 then
|
|
return -1
|
|
endi
|
|
sql show tables like 'table%'
|
|
print $rows
|
|
if $rows != 2 then
|
|
return -1
|
|
endi
|
|
sql drop database escape_percentage
|
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
|
|
|
|