Menu

#51 [Perl]Method of tables() can't return values

open
nobody
None
5
2011-12-31
2011-12-31
Jira Trac
No

Test Build:CUBRID 2008 R4.0 (8.4.0.2019) (64bit release build for linux_gnu)
OS: Linux 64
Description: Method of tables() can't return values

Repro Steps:
perl tables_02.pl

statements in tables_02.pl:

$dbh-do(CREATE TABLE a_tbl(id INT NOT NULL,phone VARCHAR(10));) or die create error: $dbh-errstr;
$dbh-do(INSERT INTO a_tbl VALUES(1,'111-1111'), (2,'222-2222'), (3, '333-3333'), (4, NULL), (5, NULL);) or die insert error: $dbh-errs
tr ;
$dbh-do(CREATE VIEW b_view AS SELECT * FROM a_tbl WHERE phone IS NOT NULL WITH CHECK OPTION;) or die create view error: $dbh-errstr;

my @tables=$dbh-tables();
print address of \@tables: ;
print \@tables .\n;

print content of \@tables: ;
print @tables \n\n;
foreach my $table (@tables){
print Table Name: $table \n;
}

Actual result:
{noformat}
Use of uninitialized value $table in concatenation (.) or string at /home/perl/opt/perl5/lib/site_perl/5.14.1/x86_64-linux/DBD/cubrid.pm line 246.
address of @tables: ARRAY(0xce201d0)
content of @tables:
{noformat}

Expect result:
{noformat}
address of @tables: ARRAY(0xce201d0)
content of @tables: `a_tbl` `b_view`

Table Name: `a_tbl`
Table Name: `b_view`
{noformat}

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.