提交 c31efb70 编写于 作者: H Haojun Liao

[td-225] update script

上级 02f7098d
......@@ -206,68 +206,71 @@ endi
################# binary
sql alter table st41 set tag tag_binary = "shanghai"
sql describe st41
if $data23 != shanghai then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data00 != shanghai then
return -1
endi
##### test 'space' case
#$tagvalue = '
#$tagvalue = $tagvalue '
#sql alter table st41 set tag tag_binary = $tagvalue
$tagvalue = ''
$tagvalue = $tagvalue '
sql alter table st41 set tag tag_binary = ""
#sql describe st41
#if $data23 != $tagvalue then
# return -1
#endi
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data00 != @@ then
print expect , actual $data00
return -1
endi
sql alter table st41 set tag tag_binary = "NULL"
sql describe st41
if $data23 != NULL then
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 describe st41
if $data23 != NULL then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data00 != NULL then
print ==8== expect: NULL, actually: $data23
return -1
endi
################### 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
#sleep 1000
#if $data33 != ��˼���� then
# print ==== expect ��˼����, actually $data33
#if $data01 != ��˼���� then
# print ==== expect ��˼����, actually $data01
# return -1
#endi
##### test 'space' case
#$tagvalue = '
#$tagvalue = $tagvalue '
sql alter table st41 set tag tag_nchar = ''
#sql describe st41
#if $data33 != $tagvalue then
#sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
#if $data01 != $tagvalue then
# return -1
#endi
sql alter table st41 set tag tag_nchar = "NULL"
sql describe st41
if $data33 != NULL then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data01 != NULL then
return -1
endi
sql alter table st41 set tag tag_nchar = NULL
#sql describe st41
#if $data33 != then
# print ==9== expect , actually $data33
#sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
#if $data01 != then
# print ==9== expect , actually $data01
# return -1
#endi
################### int
sql alter table st41 set tag tag_int = -2147483647
sql describe st41
if $data43 != -2147483647 then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data02 != -2147483647 then
return -1
endi
sql alter table st41 set tag tag_int = 2147483647
sql describe st41
if $data43 != 2147483647 then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data02 != 2147483647 then
return -1
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 alter table st41 set tag tag_int = '-379'
sql describe st41
if $data43 != -379 then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data02 != -379 then
return -1
endi
sql alter table st41 set tag tag_int = -2000
sql describe st41
if $data43 != -2000 then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data02 != -2000 then
return -1
endi
sql alter table st41 set tag tag_int = NULL
sql describe st41
if $data43 != NULL then
print ==10== expect: NULL, actually: $data43
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data02 != NULL then
print ==10== expect: NULL, actually: $data02
return -1
endi
sql alter table st41 set tag tag_int = 'NULL'
......@@ -296,34 +299,34 @@ sql_error alter table st41 set tag tag_int = abc379
################### bool
sql alter table st41 set tag tag_bool = 'true'
sql describe st41
if $data53 != true then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data03 != 1 then
return -1
endi
sql alter table st41 set tag tag_bool = 'false'
sql describe st41
if $data53 != false then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data03 != 0 then
return -1
endi
sql alter table st41 set tag tag_bool = 0
sql describe st41
if $data53 != false then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data03 != 0 then
return -1
endi
sql alter table st41 set tag tag_bool = 123
sql describe st41
if $data53 != true then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data03 != 1 then
return -1
endi
sql alter table st41 set tag tag_bool = 'NULL'
sql describe st41
if $data53 != NULL then
print ==14== expect: NULL, actually: $data53
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data03 != NULL then
print ==14== expect: NULL, actually: $data03
return -1
endi
sql alter table st41 set tag tag_bool = NULL
sql describe st41
if $data53 != NULL then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data03 != NULL then
return -1
endi
......@@ -333,50 +336,51 @@ sql_error alter table st41 set tag tag_bool = abc379
################### float
sql alter table st41 set tag tag_float = -32
sql describe st41
if $data63 != -32.000000 then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data04 != -32.00000 then
print expect -32.00000 actual $data04
return -1
endi
sql alter table st41 set tag tag_float = 54.123456
sql describe st41
if $data63 != 54.123455 then
print ==15== expect: 54.123455, actually: $data63
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data04 != 54.123455 then
print ==15== expect: 54.123455, actually: $data04
# return -1
endi
sql alter table st41 set tag tag_float = 54.12345
sql describe st41
if $data63 != 54.123451 then
print ==16== expect: 54.123451, actually: $data63
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data04 != 54.12345 then
print ==16== expect: 54.12345, actually: $data04
return -1
endi
sql alter table st41 set tag tag_float = 54.12345678
sql describe st41
if $data63 != 54.123455 then
print ==11== expect: 54.123455, actually : $data63
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data04 != 54.12346 then
print ==11== expect: 54.12346, actually : $data04
return -1
endi
sql alter table st41 set tag tag_float = NULL
sql describe st41
if $data63 != NULL then
print ==12== expect: NULL, actually : $data63
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data04 != NULL then
print ==12== expect: NULL, actually : $data04
return -1
endi
sql alter table st41 set tag tag_float = 'NULL'
sql describe st41
if $data63 != NULL then
print ==17== expect: NULL, actually : $data63
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data04 != NULL then
print ==17== expect: NULL, actually : $data04
return -1
endi
sql alter table st41 set tag tag_float = '54.123456'
sql describe st41
if $data63 != 54.123455 then
print ==18== expect: 54.123455, actually : $data63
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data04 != 54.12346 then
print ==18== expect: 54.12346, actually : $data04
return -1
endi
sql alter table st41 set tag tag_float = '-54.123456'
sql describe st41
if $data63 != -54.123455 then
print ==19== expect: -54.123455, actually : $data63
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data04 != -54.12346 then
print ==19== expect: -54.12346, actually : $data04
return -1
endi
sql_error alter table st41 set tag tag_float = ''
......@@ -387,30 +391,32 @@ sql_error alter table st41 set tag tag_float = abc
################### double
sql alter table st41 set tag tag_double = -92
sql describe st41
if $data73 != -92.000000 then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data05 != -92.000000000 then
print expect -92.000000000 actual $data05
return -1
endi
sql alter table st41 set tag tag_double = 184
sql describe st41
if $data73 != 184.000000 then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data05 != 184.000000000 then
print expect 184.000000000 actual $data05
return -1
endi
sql alter table st41 set tag tag_double = '-2456'
sql describe st41
if $data73 != -2456.000000 then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data05 != -2456.000000000 then
return -1
endi
sql alter table st41 set tag tag_double = NULL
sql describe st41
if $data73 != NULL then
print ==13== expect: NULL, actually : $data73
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data05 != NULL then
print ==13== expect: NULL, actually : $data05
return -1
endi
sql alter table st41 set tag tag_double = 'NULL'
sql describe st41
if $data73 != NULL then
print ==20== expect: NULL, actually : $data73
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data05 != NULL then
print ==20== expect: NULL, actually : $data05
return -1
endi
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 = NULL
sql alter table st51 set tag tag_bigint = 9223372036854775807
sql describe st51
if $data23 != 9223372036854775807 then
sql select tag_bigint, tag_smallint, tag_tinyint from st51
if $data00 != 9223372036854775807 then
return -1
endi
sql alter table st51 set tag tag_bigint = 9223372036854775808
sql describe st51
if $data23 != 9223372036854775807 then
sql select tag_bigint, tag_smallint, tag_tinyint from st51
if $data00 != 9223372036854775807 then
return -1
endi
sql alter table st51 set tag tag_bigint = -9223372036854775807
sql describe st51
if $data23 != -9223372036854775807 then
sql select tag_bigint, tag_smallint, tag_tinyint from st51
if $data00 != -9223372036854775807 then
return -1
endi
sql_error alter table st51 set tag tag_bigint = -9223372036854775808
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 = 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 = NULL
sql alter table st51 set tag tag_smallint = 32767
sql describe st51
if $data33 != 32767 then
sql select tag_bigint, tag_smallint, tag_tinyint from st51
if $data01 != 32767 then
return -1
endi
sql_error alter table st51 set tag tag_smallint = 32768
sql alter table st51 set tag tag_smallint = -32767
sql describe st51
if $data33 != -32767 then
sql select tag_bigint, tag_smallint, tag_tinyint from st51
if $data01 != -32767 then
return -1
endi
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 = NULL
sql alter table st51 set tag tag_tinyint = 127
sql describe st51
if $data43 != 127 then
sql select tag_bigint, tag_smallint, tag_tinyint from st51
if $data02 != 127 then
return -1
endi
sql alter table st51 set tag tag_tinyint = -127
sql describe st51
if $data43 != -127 then
sql select tag_bigint, tag_smallint, tag_tinyint from st51
if $data02 != -127 then
return -1
endi
sql_error alter table st51 set tag tag_tinyint = '-128'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册