[td-225] update script
This commit is contained in:
parent
02f7098d11
commit
c31efb7044
|
@ -206,68 +206,71 @@ endi
|
||||||
|
|
||||||
################# binary
|
################# binary
|
||||||
sql alter table st41 set tag tag_binary = "shanghai"
|
sql alter table st41 set tag tag_binary = "shanghai"
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data23 != shanghai then
|
if $data00 != shanghai then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
##### test 'space' case
|
##### test 'space' case
|
||||||
#$tagvalue = '
|
$tagvalue = ''
|
||||||
#$tagvalue = $tagvalue '
|
$tagvalue = $tagvalue '
|
||||||
#sql alter table st41 set tag tag_binary = $tagvalue
|
|
||||||
sql alter table st41 set tag tag_binary = ""
|
sql alter table st41 set tag tag_binary = ""
|
||||||
#sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
#if $data23 != $tagvalue then
|
if $data00 != @@ then
|
||||||
# return -1
|
print expect , actual $data00
|
||||||
#endi
|
|
||||||
sql alter table st41 set tag tag_binary = "NULL"
|
|
||||||
sql describe st41
|
|
||||||
if $data23 != NULL then
|
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
sql alter table st41 set tag tag_binary = "NULL"
|
||||||
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
|
if $data00 != NULL then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
|
||||||
sql alter table st41 set tag tag_binary = NULL
|
sql alter table st41 set tag tag_binary = NULL
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data23 != NULL then
|
if $data00 != NULL then
|
||||||
print ==8== expect: NULL, actually: $data23
|
print ==8== expect: NULL, actually: $data23
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
################### nchar
|
################### nchar
|
||||||
sql alter table st41 set tag tag_nchar = "<22><>˼<EFBFBD><CBBC><EFBFBD><EFBFBD>"
|
sql alter table st41 set tag tag_nchar = "<22><>˼<EFBFBD><CBBC><EFBFBD><EFBFBD>"
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
#sleep 1000
|
#sleep 1000
|
||||||
#if $data33 != <20><>˼<EFBFBD><CBBC><EFBFBD><EFBFBD> then
|
#if $data01 != <20><>˼<EFBFBD><CBBC><EFBFBD><EFBFBD> then
|
||||||
# print ==== expect <20><>˼<EFBFBD><CBBC><EFBFBD><EFBFBD>, actually $data33
|
# print ==== expect <20><>˼<EFBFBD><CBBC><EFBFBD><EFBFBD>, actually $data01
|
||||||
# return -1
|
# return -1
|
||||||
#endi
|
#endi
|
||||||
##### test 'space' case
|
##### test 'space' case
|
||||||
#$tagvalue = '
|
#$tagvalue = '
|
||||||
#$tagvalue = $tagvalue '
|
#$tagvalue = $tagvalue '
|
||||||
sql alter table st41 set tag tag_nchar = ''
|
sql alter table st41 set tag tag_nchar = ''
|
||||||
#sql describe st41
|
#sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
#if $data33 != $tagvalue then
|
#if $data01 != $tagvalue then
|
||||||
# return -1
|
# return -1
|
||||||
#endi
|
#endi
|
||||||
sql alter table st41 set tag tag_nchar = "NULL"
|
sql alter table st41 set tag tag_nchar = "NULL"
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data33 != NULL then
|
if $data01 != NULL then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_nchar = NULL
|
sql alter table st41 set tag tag_nchar = NULL
|
||||||
#sql describe st41
|
#sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
#if $data33 != then
|
#if $data01 != then
|
||||||
# print ==9== expect , actually $data33
|
# print ==9== expect , actually $data01
|
||||||
# return -1
|
# return -1
|
||||||
#endi
|
#endi
|
||||||
|
|
||||||
################### int
|
################### int
|
||||||
sql alter table st41 set tag tag_int = -2147483647
|
sql alter table st41 set tag tag_int = -2147483647
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data43 != -2147483647 then
|
if $data02 != -2147483647 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_int = 2147483647
|
sql alter table st41 set tag tag_int = 2147483647
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data43 != 2147483647 then
|
if $data02 != 2147483647 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -275,19 +278,19 @@ sql_error alter table st41 set tag tag_int = -2147483648
|
||||||
sql_error alter table st41 set tag tag_int = 2147483648
|
sql_error alter table st41 set tag tag_int = 2147483648
|
||||||
|
|
||||||
sql alter table st41 set tag tag_int = '-379'
|
sql alter table st41 set tag tag_int = '-379'
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data43 != -379 then
|
if $data02 != -379 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_int = -2000
|
sql alter table st41 set tag tag_int = -2000
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data43 != -2000 then
|
if $data02 != -2000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_int = NULL
|
sql alter table st41 set tag tag_int = NULL
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data43 != NULL then
|
if $data02 != NULL then
|
||||||
print ==10== expect: NULL, actually: $data43
|
print ==10== expect: NULL, actually: $data02
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_int = 'NULL'
|
sql alter table st41 set tag tag_int = 'NULL'
|
||||||
|
@ -296,34 +299,34 @@ sql_error alter table st41 set tag tag_int = abc379
|
||||||
|
|
||||||
################### bool
|
################### bool
|
||||||
sql alter table st41 set tag tag_bool = 'true'
|
sql alter table st41 set tag tag_bool = 'true'
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data53 != true then
|
if $data03 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_bool = 'false'
|
sql alter table st41 set tag tag_bool = 'false'
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data53 != false then
|
if $data03 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_bool = 0
|
sql alter table st41 set tag tag_bool = 0
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data53 != false then
|
if $data03 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_bool = 123
|
sql alter table st41 set tag tag_bool = 123
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data53 != true then
|
if $data03 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_bool = 'NULL'
|
sql alter table st41 set tag tag_bool = 'NULL'
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data53 != NULL then
|
if $data03 != NULL then
|
||||||
print ==14== expect: NULL, actually: $data53
|
print ==14== expect: NULL, actually: $data03
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_bool = NULL
|
sql alter table st41 set tag tag_bool = NULL
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data53 != NULL then
|
if $data03 != NULL then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -333,50 +336,51 @@ sql_error alter table st41 set tag tag_bool = abc379
|
||||||
|
|
||||||
################### float
|
################### float
|
||||||
sql alter table st41 set tag tag_float = -32
|
sql alter table st41 set tag tag_float = -32
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data63 != -32.000000 then
|
if $data04 != -32.00000 then
|
||||||
|
print expect -32.00000 actual $data04
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_float = 54.123456
|
sql alter table st41 set tag tag_float = 54.123456
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data63 != 54.123455 then
|
if $data04 != 54.123455 then
|
||||||
print ==15== expect: 54.123455, actually: $data63
|
print ==15== expect: 54.123455, actually: $data04
|
||||||
# return -1
|
# return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_float = 54.12345
|
sql alter table st41 set tag tag_float = 54.12345
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data63 != 54.123451 then
|
if $data04 != 54.12345 then
|
||||||
print ==16== expect: 54.123451, actually: $data63
|
print ==16== expect: 54.12345, actually: $data04
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_float = 54.12345678
|
sql alter table st41 set tag tag_float = 54.12345678
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data63 != 54.123455 then
|
if $data04 != 54.12346 then
|
||||||
print ==11== expect: 54.123455, actually : $data63
|
print ==11== expect: 54.12346, actually : $data04
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_float = NULL
|
sql alter table st41 set tag tag_float = NULL
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data63 != NULL then
|
if $data04 != NULL then
|
||||||
print ==12== expect: NULL, actually : $data63
|
print ==12== expect: NULL, actually : $data04
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_float = 'NULL'
|
sql alter table st41 set tag tag_float = 'NULL'
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data63 != NULL then
|
if $data04 != NULL then
|
||||||
print ==17== expect: NULL, actually : $data63
|
print ==17== expect: NULL, actually : $data04
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_float = '54.123456'
|
sql alter table st41 set tag tag_float = '54.123456'
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data63 != 54.123455 then
|
if $data04 != 54.12346 then
|
||||||
print ==18== expect: 54.123455, actually : $data63
|
print ==18== expect: 54.12346, actually : $data04
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_float = '-54.123456'
|
sql alter table st41 set tag tag_float = '-54.123456'
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data63 != -54.123455 then
|
if $data04 != -54.12346 then
|
||||||
print ==19== expect: -54.123455, actually : $data63
|
print ==19== expect: -54.12346, actually : $data04
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql_error alter table st41 set tag tag_float = ''
|
sql_error alter table st41 set tag tag_float = ''
|
||||||
|
@ -387,30 +391,32 @@ sql_error alter table st41 set tag tag_float = abc
|
||||||
|
|
||||||
################### double
|
################### double
|
||||||
sql alter table st41 set tag tag_double = -92
|
sql alter table st41 set tag tag_double = -92
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data73 != -92.000000 then
|
if $data05 != -92.000000000 then
|
||||||
|
print expect -92.000000000 actual $data05
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_double = 184
|
sql alter table st41 set tag tag_double = 184
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data73 != 184.000000 then
|
if $data05 != 184.000000000 then
|
||||||
|
print expect 184.000000000 actual $data05
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_double = '-2456'
|
sql alter table st41 set tag tag_double = '-2456'
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data73 != -2456.000000 then
|
if $data05 != -2456.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_double = NULL
|
sql alter table st41 set tag tag_double = NULL
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data73 != NULL then
|
if $data05 != NULL then
|
||||||
print ==13== expect: NULL, actually : $data73
|
print ==13== expect: NULL, actually : $data05
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st41 set tag tag_double = 'NULL'
|
sql alter table st41 set tag tag_double = 'NULL'
|
||||||
sql describe st41
|
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
|
||||||
if $data73 != NULL then
|
if $data05 != NULL then
|
||||||
print ==20== expect: NULL, actually : $data73
|
print ==20== expect: NULL, actually : $data05
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql_error alter table st41 set tag tag_double = ''
|
sql_error alter table st41 set tag tag_double = ''
|
||||||
|
@ -427,23 +433,22 @@ sql alter table st51 set tag tag_bigint = '-379'
|
||||||
sql alter table st51 set tag tag_bigint = -2000
|
sql alter table st51 set tag tag_bigint = -2000
|
||||||
sql alter table st51 set tag tag_bigint = NULL
|
sql alter table st51 set tag tag_bigint = NULL
|
||||||
sql alter table st51 set tag tag_bigint = 9223372036854775807
|
sql alter table st51 set tag tag_bigint = 9223372036854775807
|
||||||
sql describe st51
|
sql select tag_bigint, tag_smallint, tag_tinyint from st51
|
||||||
if $data23 != 9223372036854775807 then
|
if $data00 != 9223372036854775807 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st51 set tag tag_bigint = 9223372036854775808
|
sql alter table st51 set tag tag_bigint = 9223372036854775808
|
||||||
sql describe st51
|
sql select tag_bigint, tag_smallint, tag_tinyint from st51
|
||||||
if $data23 != 9223372036854775807 then
|
if $data00 != 9223372036854775807 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st51 set tag tag_bigint = -9223372036854775807
|
sql alter table st51 set tag tag_bigint = -9223372036854775807
|
||||||
sql describe st51
|
sql select tag_bigint, tag_smallint, tag_tinyint from st51
|
||||||
if $data23 != -9223372036854775807 then
|
if $data00 != -9223372036854775807 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql_error alter table st51 set tag tag_bigint = -9223372036854775808
|
sql_error alter table st51 set tag tag_bigint = -9223372036854775808
|
||||||
|
|
||||||
|
|
||||||
sql alter table st51 set tag tag_bigint = 'NULL'
|
sql alter table st51 set tag tag_bigint = 'NULL'
|
||||||
sql_error alter table st51 set tag tag_bigint = ''
|
sql_error alter table st51 set tag tag_bigint = ''
|
||||||
sql_error alter table st51 set tag tag_bigint = abc379
|
sql_error alter table st51 set tag tag_bigint = abc379
|
||||||
|
@ -452,15 +457,15 @@ sql_error alter table st51 set tag tag_bigint = abc379
|
||||||
sql alter table st51 set tag tag_smallint = -2000
|
sql alter table st51 set tag tag_smallint = -2000
|
||||||
sql alter table st51 set tag tag_smallint = NULL
|
sql alter table st51 set tag tag_smallint = NULL
|
||||||
sql alter table st51 set tag tag_smallint = 32767
|
sql alter table st51 set tag tag_smallint = 32767
|
||||||
sql describe st51
|
sql select tag_bigint, tag_smallint, tag_tinyint from st51
|
||||||
if $data33 != 32767 then
|
if $data01 != 32767 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql_error alter table st51 set tag tag_smallint = 32768
|
sql_error alter table st51 set tag tag_smallint = 32768
|
||||||
|
|
||||||
sql alter table st51 set tag tag_smallint = -32767
|
sql alter table st51 set tag tag_smallint = -32767
|
||||||
sql describe st51
|
sql select tag_bigint, tag_smallint, tag_tinyint from st51
|
||||||
if $data33 != -32767 then
|
if $data01 != -32767 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql_error alter table st51 set tag tag_smallint = -32768
|
sql_error alter table st51 set tag tag_smallint = -32768
|
||||||
|
@ -473,13 +478,13 @@ sql_error alter table st51 set tag tag_smallint = abc379
|
||||||
sql alter table st51 set tag tag_tinyint = -127
|
sql alter table st51 set tag tag_tinyint = -127
|
||||||
sql alter table st51 set tag tag_tinyint = NULL
|
sql alter table st51 set tag tag_tinyint = NULL
|
||||||
sql alter table st51 set tag tag_tinyint = 127
|
sql alter table st51 set tag tag_tinyint = 127
|
||||||
sql describe st51
|
sql select tag_bigint, tag_smallint, tag_tinyint from st51
|
||||||
if $data43 != 127 then
|
if $data02 != 127 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql alter table st51 set tag tag_tinyint = -127
|
sql alter table st51 set tag tag_tinyint = -127
|
||||||
sql describe st51
|
sql select tag_bigint, tag_smallint, tag_tinyint from st51
|
||||||
if $data43 != -127 then
|
if $data02 != -127 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql_error alter table st51 set tag tag_tinyint = '-128'
|
sql_error alter table st51 set tag tag_tinyint = '-128'
|
||||||
|
|
Loading…
Reference in New Issue