-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Zhibai Song
committed
Nov 14, 2023
1 parent
33b8906
commit 503748e
Showing
28 changed files
with
460 additions
and
407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
drop table if exists t2_BABEL2999; | ||
GO | ||
|
||
drop table t1_BABEL2999; | ||
GO | ||
|
||
drop table t3_BABEL2999; | ||
GO | ||
|
||
drop table t3_BABEL2999_2; | ||
GO | ||
|
||
drop procedure p1_BABEL2999; | ||
GO | ||
|
||
drop procedure p2_BABEL2999 | ||
GO | ||
|
||
drop procedure p3_BABEL2999 | ||
GO | ||
|
||
drop table t4_BABEL2999; | ||
GO | ||
|
||
drop table t5_BABEL2999; | ||
GO | ||
|
||
drop table t6_BABEL2999 | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
drop table if exists t1_BABEL2999; | ||
GO | ||
|
||
create table t1_BABEL2999(b varchar(10)); | ||
GO | ||
|
||
create table t2_BABEL2999(b int); | ||
GO | ||
|
||
create table t3_BABEL2999(b varchar); | ||
GO | ||
|
||
create procedure p1_BABEL2999 as select 'abc'; | ||
GO | ||
|
||
create procedure p2_BABEL2999 as select 555; | ||
GO | ||
|
||
create table t3_BABEL2999_2(a int, b datetime, c varchar(20)) | ||
GO | ||
|
||
create procedure p3_BABEL2999 as select '123', 123, 123; | ||
GO | ||
|
||
create table t4_BABEL2999( a binary(30), b varbinary(30), c varchar(30), d datetime, e smalldatetime) | ||
GO | ||
|
||
create table t5_BABEL2999( a decimal, b numeric) | ||
GO | ||
|
||
create table t6_BABEL2999( a int, b tinyint, c smallint) | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,216 @@ | ||
insert into t1_BABEL2999 exec('Select ''5'''); | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t1_BABEL2999 exec('Select 5'); | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t1_BABEL2999 exec('Select ''5'''); | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t1_BABEL2999 exec('Select ''hello'''); | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t1_BABEL2999 exec('SELECT ''helloworld'''); | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t1_BABEL2999 exec('SELECT ''helloworldhello'''); | ||
GO | ||
~~ERROR (Code: 8152)~~ | ||
|
||
~~ERROR (Message: value too long for type character varying(10))~~ | ||
|
||
|
||
select b from t1_BABEL2999 order by b; | ||
GO | ||
~~START~~ | ||
varchar | ||
5 | ||
5 | ||
5 | ||
hello | ||
helloworld | ||
~~END~~ | ||
|
||
|
||
insert into t2_BABEL2999 exec('Select ''5'''); -- varchar to int | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t2_BABEL2999 exec('Select 5'); -- int to int | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t2_BABEL2999 SELECT '5'; | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
select b from t2_BABEL2999 order by b; | ||
GO | ||
~~START~~ | ||
int | ||
5 | ||
5 | ||
5 | ||
~~END~~ | ||
|
||
|
||
insert into t3_BABEL2999 exec('Select ''5'''); | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t3_BABEL2999 exec('Select 5'); | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t3_BABEL2999 exec('Select ''5'''); | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
select b from t3_BABEL2999 order by b; | ||
GO | ||
~~START~~ | ||
varchar | ||
5 | ||
5 | ||
5 | ||
~~END~~ | ||
|
||
|
||
delete from t1_BABEL2999 | ||
GO | ||
~~ROW COUNT: 5~~ | ||
|
||
|
||
insert into t1_BABEL2999 exec p1_BABEL2999; | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t1_BABEL2999 exec('exec p1_BABEL2999'); | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
select * from t1_BABEL2999; | ||
GO | ||
~~START~~ | ||
varchar | ||
abc | ||
abc | ||
~~END~~ | ||
|
||
|
||
insert t3_BABEL2999_2 exec('select ''123'', 123, 123'); | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t3_BABEL2999_2 exec p3_BABEL2999 | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t3_BABEL2999_2 select '123', 123, 123 | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
select * from t3_BABEL2999_2; | ||
GO | ||
~~START~~ | ||
int#!#datetime#!#varchar | ||
123#!#1900-05-04 00:00:00.0#!#123 | ||
123#!#1900-05-04 00:00:00.0#!#123 | ||
123#!#1900-05-04 00:00:00.0#!#123 | ||
~~END~~ | ||
|
||
|
||
insert into t3_BABEL_2999_2 exec('select ''123'''); | ||
GO | ||
~~ERROR (Code: 33557097)~~ | ||
|
||
~~ERROR (Message: relation "t3_babel_2999_2" does not exist)~~ | ||
|
||
|
||
insert into t3_BABEL_2999_2 exec('select 123, 123'); | ||
GO | ||
~~ERROR (Code: 33557097)~~ | ||
|
||
~~ERROR (Message: relation "t3_babel_2999_2" does not exist)~~ | ||
|
||
|
||
insert into t4_BABEL2999 exec('select 123, 123, 123, 123, 123') | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t4_BABEL2999 exec('select cast(123 as binary), cast(123 as varbinary), 123, cast(123 as datetime), cast(123 as smalldatetime)') | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t4_BABEL2999 select 123, 123, 123, 123, 123 | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t4_BABEL2999 exec('select ''123'', ''123'', ''123'', ''123'', ''123'''); | ||
GO | ||
~~ERROR (Code: 33557097)~~ | ||
|
||
~~ERROR (Message: Implicit conversion from data type varchar to binary is not allowed. Use the CONVERT function to run this query.)~~ | ||
|
||
|
||
select * from t4_BABEL2999 | ||
GO | ||
~~START~~ | ||
binary#!#varbinary#!#varchar#!#datetime#!#smalldatetime | ||
00000000000000000000000000000000000000000000000000000000007B#!#0000007B#!#123#!#1900-05-04 00:00:00.0#!#1900-05-04 00:00:00.0 | ||
00000000000000000000000000000000000000000000000000000000007B#!#0000007B#!#123#!#1900-05-04 00:00:00.0#!#1900-05-04 00:00:00.0 | ||
00000000000000000000000000000000000000000000000000000000007B#!#0000007B#!#123#!#1900-05-04 00:00:00.0#!#1900-05-04 00:00:00.0 | ||
~~END~~ | ||
|
||
|
||
insert into t5_BABEL2999 exec('select ''1.234'', ''33.33'''); | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
select * from t5_BABEL2999 | ||
GO | ||
~~START~~ | ||
numeric#!#numeric | ||
1#!#33 | ||
~~END~~ | ||
|
||
|
||
insert into t6_BABEL2999 exec('select 1,2,3') | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t6_BABEL2999 exec('select ''1'',''2'',''3''') | ||
GO | ||
~~ROW COUNT: 1~~ | ||
|
||
|
||
insert into t6_BABEL2999 exec('select c,b,a from t6_BABEL2999') | ||
GO | ||
~~ROW COUNT: 2~~ | ||
|
Oops, something went wrong.