binary_escapeCharacter.sim 2.5 KB
Newer Older
S
slguan 已提交
1
system sh/stop_dnodes.sh
S
slguan 已提交
2 3

system sh/deploy.sh -n dnode1 -i 1
H
hjxilinx 已提交
4
system sh/cfg.sh -n dnode1 -c walLevel -v 0
H
hjxilinx 已提交
5
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3
S
slguan 已提交
6
system sh/exec.sh -n dnode1 -s start
H
Haojun Liao 已提交
7
sleep 1000
S
slguan 已提交
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
sql connect

sql drop database if exists ecdb
sql create database ecdb
sql use ecdb

sql create table tbx (ts timestamp, c1 int, c2 binary(20))
sql insert into tbx values ('2019-10-05 18:00:01.000', 1, '\'')
sql insert into tbx values ('2019-10-05 18:00:02.000', 2, '\'abc')
sql insert into tbx values ('2019-10-05 18:00:03.000', 3, '123\'')
sql select * from tbx
print "=====rows:$rows, line0:$data02, line1:$data12, line2:$data22"
if $data02 != @'@ then
  return -1
endi

if $data12 != @'abc@ then
  return -1
endi

if $data22 != @123'@ then
  return -1
endi

sql create table tb (ts timestamp, c1 binary(20))
sql insert into tb values ('2019-10-05 18:00:01.000', 'abc''001')
sql insert into tb values ('2019-10-05 18:00:02.000', 'abc\'002')
sql insert into tb values ('2019-10-05 18:00:03.000', 'abc\\003')
sql insert into tb values ('2019-10-05 18:00:04.000', 'abc"004')
sql insert into tb values ('2019-10-05 18:00:05.000', 'abc\005')

sql insert into tb values ('2019-10-05 18:00:06.000', "udp""001")
sql insert into tb values ('2019-10-05 18:00:07.000', "udp\"002")
sql insert into tb values ('2019-10-05 18:00:08.000', "udp\\003")
sql insert into tb values ('2019-10-05 18:00:09.000', "udp'004")
sql insert into tb values ('2019-10-05 18:00:10.000', "udp\005")

sql select * from tb limit 5
print "====rows: $rows "
if $rows != 5 then
  return -1
endi

print "Single quotation ==== data01~05: $data01, $data11, $data21, $data31, $data41 "

if $data01 != @abc'001@ then
  return -1
endi
if $data11 != @abc'002@ then
  return -1
endi
if $data21 != @abc\003@ then
  #return -1
  print "[ERROR] expect: abc\003, act:$data21"
endi
if $data31 != @abc"004@ then
  return -1
endi
if $data41 != @abc005@ then
  #return -1
  print "[ERROR] expect: abc005, act:$data41"
endi

sql select * from tb limit 5 offset 5

if $rows != 5 then
  return -1
endi

print "Double quotation  ==== data01~05: $data01, $data11, $data21, $data31, $data41 "

if $data01 != @udp"001@ then
  return -1
endi
if $data11 != @udp"002@ then
  return -1
endi
if $data21 != @udp\003@ then
 # return -1
  print "[ERROR] expect: udp\003, act:$data21"
endi
if $data31 != @udp'004@ then
  return -1
endi
if $data41 != @udp005@ then
  #return -1
  print "[ERROR] expect: udp005, act:$data41"
endi


S
scripts  
Shengliang Guan 已提交
98
system sh/exec.sh -n dnode1 -s stop -x SIGINT