[Perl] Fail to excute sql command execute after prepare succesfully
Test case: http://svn.cubrid.org/cubridapis/perl/branches/RB-9.1.0/t2/Perl/_43_enum/cases/enum_prepare_06.pl
Test Environment:
{noformat}
cubrid_rel: 9.1.0.0201
perl driver: http://svn.cubrid.org/cubridapis/perl/branches/RB-9.1.0 1499
perl: 5.14.2
{noformat}
Test codes:
{noformat}
plan tests=3;
ok (my $sth=$dbh-prepare(prepare x from 'select * from enum03 where e3 ? and (e1 ? or e2 ?) order by 1, 2, 3,4';),prepare ok);
ok ($sth-execute(execute x using 6,2,3;), prepare of select succeed);
ok ($sth-execute(execute x using 'Sunday', 'a', 'Yes';), prepare of select succeed);
{noformat}
Test Result:
{noformat}
ok 1 - prepare ok
not ok 2 - prepare of select succeed
# Failed test 'prepare of select succeed'
# at Perl/_43_enum/cases/enum_prepare_06.pl line 28.
not ok 3 - prepare of select succeed
# Failed test 'prepare of select succeed'
# at Perl/_43_enum/cases/enum_prepare_06.pl line 29.
{noformat}
Execute these sql statemants in case file using csql command windows:
{noformat}
csql drop table if EXISTS enum03;
SQL statement execution time: 0.003242 sec
Current transaction has been committed.
1 command(s) successfully processed.
csql
csql create table enum03(e1 enum('a', 'b'), e2 enum('Yes', 'No', 'Cancel'),e3 enum ('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'),e4 enum('x', 'y', 'z'));
SQL statement execution time: 0.003682 sec
Current transaction has been committed.
1 command(s) successfully processed.
csql insert into enum03 values(1,1,1,1), (2, 3, 7, 3), ('b', 'No', 'Tuesday', 'y'),('a', 'Yes', 'Friday', 'x'), ('a', 'Cancel', 'Thursday', 'z'),('b', 1, 4, 'z');
6 rows affected.
SQL statement execution time: 0.001503 sec
Current transaction has been committed.
1 command(s) successfully processed.
csql prepare x from 'select * from enum03 where e3 ? and (e1 ? or e2 ?) order by 1, 2, 3,4';
SQL statement execution time: 0.002923 sec
Current transaction has been committed.
1 command(s) successfully processed.
csql execute x using 6,2,3;
=== Result of SELECT Command in Line 1 ===
'a' 'Yes' 'Sunday' 'x'
'a' 'Cancel' 'Thursday' 'z'
'b' 'Yes' 'Wednesday' 'z'
'b' 'No' 'Tuesday' 'y'
4 rows selected.
SQL statement execution time: 0.007852 sec
Current transaction has been committed.
1 command(s) successfully processed.
csql execute x using 'Sunday', 'a', 'Yes';
=== Result of SELECT Command in Line 1 ===
'b' 'Cancel' 'Saturday' 'z'
1 row selected.
SQL statement execution time: 0.007959 sec
Current transaction has been committed.
1 command(s) successfully processed.
{noformat}