@@ -78,6 +78,32 @@ def __perform_test(self, lob_type, input_type):
7878 order by IntCol""" )
7979 self .__validate_query (self .cursor , lob_type )
8080
81+ def __test_bind_ordering (self , lob_type ):
82+ main_col = "A" * 32768
83+ extra_col_1 = "B" * 65536
84+ extra_col_2 = "C" * 131072
85+ if lob_type == "BLOB" :
86+ main_col = main_col .encode ()
87+ extra_col_1 = extra_col_1 .encode ()
88+ extra_col_2 = extra_col_2 .encode ()
89+ self .connection .stmtcachesize = 0
90+ self .cursor .execute (f"truncate table Test{ lob_type } s" )
91+ data = (1 , main_col , 8 , extra_col_1 , 15 , extra_col_2 )
92+ self .cursor .execute (f"""
93+ insert into Test{ lob_type } s (
94+ IntCol,
95+ { lob_type } Col,
96+ ExtraNumCol1,
97+ Extra{ lob_type } Col1,
98+ ExtraNumCol2,
99+ Extra{ lob_type } Col2
100+ ) values (:1, :2, :3, :4, :5, :6)""" ,
101+ data )
102+ with test_env .FetchLobsContextManager (False ):
103+ self .cursor .execute (f"select * from Test{ lob_type } s" )
104+ fetched_data = self .cursor .fetchone ()
105+ self .assertEqual (fetched_data , data )
106+
81107 def __test_fetch_lobs_direct (self , lob_type ):
82108 self .cursor .execute (f"truncate table Test{ lob_type } s" )
83109 data = []
@@ -450,5 +476,17 @@ def test_1929_fetch_nclob_as_str(self):
450476 "1929 - test fetching NCLOB as str"
451477 self .__test_fetch_lobs_direct ("NCLOB" )
452478
479+ def test_1930_bind_order_blob (self ):
480+ "1930 - test bind ordering with BLOB"
481+ self .__test_bind_ordering ("BLOB" )
482+
483+ def test_1931_bind_order_clob (self ):
484+ "1931 - test bind ordering with CLOB"
485+ self .__test_bind_ordering ("CLOB" )
486+
487+ def test_1932_bind_order_nclob (self ):
488+ "1932 - test bind ordering with NCLOB"
489+ self .__test_bind_ordering ("NCLOB" )
490+
453491if __name__ == "__main__" :
454492 test_env .run_test_cases ()
0 commit comments