Menu

#81 [Perl]Data was inserted into demodb DB when url isn't correct

open
nobody
None
5
2012-02-09
2012-02-09
Jira Trac
No

Test Build: CUBRID 2008 R4.1 (8.4.1.1005) (64bit release build for linux_gnu)
OS: Linux 64
Description: Data was inserted into demodb DB when url isn't correct

Repro Steps:
perl prepare_test2.pl pldb2 33000 10.34.64.60

Statements in prepare_test2.pl:
{noformat}
$db=$ARGV[0];
$port=$ARGV[1];
$hostname=$ARGV[2];
my $user=dba;
my $pass=;

my $data_source=dbi:cubrid:databaseaaaaa=$db;host=$hostname;port=$port;
print $data_source .\n;
my $dbh;

$dbh=DBI-connect($data_source, $user, $pass,{RaiseError = 1}) or die connect err: $dbh-errstr;

$dbh - do(drop table if EXISTS tbl;) or die drop error: $dbh-errstr;
$dbh - do(create table tbl(id int, name char(20));) or die create error: $dbh-errstr;
$dbh - do(insert into tbl values(1,'zhangsan'),(2,'lisi'),(3,'wangwu'),(4,'mazi');) or die insert error:$dbh-errstr;
{noformat}

Actual Results:
{noformat}
dbi:cubrid:databaseaaaaa=pldb2;host=10.34.64.60;port=33000
1..1
ok 1 - prepare of delete succeed

csql -udba demodb

csql show tables;

=== Result of SELECT Command in Line 4 ===

Tables_in_demodb

'tbl'

1 rows selected.

{noformat}

Expect result:
1.error appear
2.tbl table can't be created in demodb

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.