@@ -466,23 +466,23 @@ function insert_with_idx_and_dummy_expr
466
466
{
467
467
disable_strict_mode
468
468
$CDB2SQL_EXE $CDB2_OPTIONS $DBNAME default - << EOF
469
- create table seqwithidxanddummyexpr {$( cat seqwithidxanddummyexpr .csc2) }\$\$
469
+ create table $1 {$( cat $1 .csc2) }\$\$
470
470
EOF
471
471
472
- $CDB2SQL_EXE $CDB2_OPTIONS $DBNAME default " insert into seqwithidxanddummyexpr (a) values(1)"
473
- [[ $? != 0 ]] && failexit " seqwithidxanddummyexpr table should have been allowed to insert"
474
- $CDB2SQL_EXE $CDB2_OPTIONS $DBNAME default " insert into seqwithidxanddummyexpr values(2, 2)"
475
- [[ $? != 0 ]] && failexit " seqwithidxanddummyexpr table should have been allowed to insert"
476
- $CDB2SQL_EXE $CDB2_OPTIONS $DBNAME default " insert into seqwithidxanddummyexpr values(NULL, NULL)"
477
- [[ $? != 0 ]] && failexit " seqwithidxanddummyexpr table should have been allowed to insert"
472
+ $CDB2SQL_EXE $CDB2_OPTIONS $DBNAME default " insert into $1 (a) values(1)"
473
+ [[ $? != 0 ]] && failexit " $1 table should have been allowed to insert"
474
+ $CDB2SQL_EXE $CDB2_OPTIONS $DBNAME default " insert into $1 values(2, 2)"
475
+ [[ $? != 0 ]] && failexit " $1 table should have been allowed to insert"
476
+ $CDB2SQL_EXE $CDB2_OPTIONS $DBNAME default " insert into $1 values(NULL, NULL)"
477
+ [[ $? != 0 ]] && failexit " $1 table should have been allowed to insert"
478
478
479
- out=$( $CDB2SQL_EXE $CDB2_OPTIONS $DBNAME default " select b from seqwithidxanddummyexpr order by b" )
480
- [[ $? != 0 ]] && failexit " seqwithidxanddummyexpr table should have been allowed to select"
479
+ out=$( $CDB2SQL_EXE $CDB2_OPTIONS $DBNAME default " select b from $1 order by b" )
480
+ [[ $? != 0 ]] && failexit " $1 table should have been allowed to select"
481
481
exp=$' (b=NULL)\n (b=1)\n (b=2)'
482
482
[[ $out != $exp ]] && failexit " Got $out , Expected $exp "
483
483
484
- $CDB2SQL_EXE -tabs $CDB2_OPTIONS $DBNAME default " exec procedure sys.cmd.verify('seqwithidxanddummyexpr ')"
485
- [[ $? != 0 ]] && failexit " seqwithidxanddummyexpr should have passed verify"
484
+ $CDB2SQL_EXE -tabs $CDB2_OPTIONS $DBNAME default " exec procedure sys.cmd.verify('$1 ')"
485
+ [[ $? != 0 ]] && failexit " $1 should have passed verify"
486
486
}
487
487
488
488
function run_test
@@ -515,7 +515,8 @@ function run_test
515
515
lrl_sequence
516
516
fi
517
517
518
- insert_with_idx_and_dummy_expr
518
+ insert_with_idx_and_dummy_expr seqwithidxanddummyexpr
519
+ insert_with_idx_and_dummy_expr seqwithdescidxanddummyexpr
519
520
}
520
521
521
522
run_test
0 commit comments