db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eranda Sooriyabandara <erandaj...@gmail.com>
Subject Buddy testing on Qualified identifers in ij
Date Sun, 25 Apr 2010 18:54:19 GMT
Hi,
I do some buddy testing and had following results.


ij> CONNECT 'jdbc:derby:memory:dummy;create=true;user=eranda' AS
eranda_conn;

ij> CREATE TABLE table1(a int);

0 rows inserted/updated/deleted

ij> INSERT INTO table1 VALUES(1),(2),(3);

3 rows inserted/updated/deleted

ij> CREATE TABLE table2(a varchar(255));

0 rows inserted/updated/deleted

ij> INSERT INTO table2 VALUES('aa'),('ab'),('ac');

3 rows inserted/updated/deleted

ij> CREATE TABLE table3(a double);

0 rows inserted/updated/deleted

ij> INSERT INTO table3 VALUES(1.2),(2.3),(3.4);

3 rows inserted/updated/deleted

ij> PREPARE stmt1 AS 'SELECT * FROM table1';

ij> PREPARE stmt2 AS 'SELECT * FROM table2';

ij> PREPARE stmt3 AS 'SELECT * FROM table3';

ij> CONNECT 'jdbc:derby:memory:dummy;user=chamodya' AS chamodya_conn;

ij(CHAMODYA_CONN)> CREATE TABLE table1(b int);

0 rows inserted/updated/deleted

ij(CHAMODYA_CONN)> CREATE TABLE table2(b varchar(255));

0 rows inserted/updated/deleted

ij(CHAMODYA_CONN)> CREATE TABLE table3(b double);

0 rows inserted/updated/deleted

ij(CHAMODYA_CONN)> PREPARE stmt1 AS 'INSERT INTO table1 VALUES(?)';

ij(CHAMODYA_CONN)> PREPARE stmt2 AS 'INSERT INTO table2 VALUES(?)';

ij(CHAMODYA_CONN)> PREPARE stmt3 AS 'INSERT INTO table3 VALUES(?)';

ij(CHAMODYA_CONN)> AUTOCOMMIT OFF;

ij(CHAMODYA_CONN)> EXECUTE stmt1 USING stmt1@eranda_conn;

1 row inserted/updated/deleted

1 row inserted/updated/deleted

1 row inserted/updated/deleted

ij(CHAMODYA_CONN)> EXECUTE stmt2 USING stmt2@eranda_conn;

1 row inserted/updated/deleted

1 row inserted/updated/deleted

1 row inserted/updated/deleted

ij(CHAMODYA_CONN)> EXECUTE stmt3 USING stmt3@eranda_conn;

1 row inserted/updated/deleted

1 row inserted/updated/deleted

1 row inserted/updated/deleted

ij(CHAMODYA_CONN)> EXECUTE stmt3 USING stmt1@eranda_conn;

1 row inserted/updated/deleted

1 row inserted/updated/deleted

1 row inserted/updated/deleted

ij(CHAMODYA_CONN)> SELECT * FROM table1;

B

-----------

1

2

3



3 rows selected

ij(CHAMODYA_CONN)> SELECT * FROM table2;

B



--------------------------------------------------------------------------------

------------------------------------------------

aa



ab



ac





3 rows selected

ij(CHAMODYA_CONN)> SELECT * FROM table3;

B

----------------------

1.2

2.3

3.4

1.0

2.0

3.0



6 rows selected

ij(CHAMODYA_CONN)> PREPARE stmt4 AS 'SELECT * FROM table1'

> ;

ij(CHAMODYA_CONN)> PREPARE stmt5 AS 'SELECT * FROM table2';

ij(CHAMODYA_CONN)> PREPARE stmt6 AS 'SELECT * FROM table3';

ij(CHAMODYA_CONN)> CONNECT 'jdbc:derby:memory:dummy;user=dulanji' AS
dulanji_con

n;

ij(DULANJI_CONN)> CREATE TABLE table1(c int);

0 rows inserted/updated/deleted

ij(DULANJI_CONN)> CREATE TABLE table2(c varchar(255));

0 rows inserted/updated/deleted

ij(DULANJI_CONN)> CREATE TABLE table3(c double);

0 rows inserted/updated/deleted

ij(DULANJI_CONN)> PREPARE stmt1 AS 'INSERT INTO table1 VALUES(?)';

ij(DULANJI_CONN)> PREPARE stmt2 AS 'INSERT INTO table2 VALUES(?)';

ij(DULANJI_CONN)> PREPARE stmt3 AS 'INSERT INTO table3 VALUES(?)';

ij(DULANJI_CONN)> AUTOCOMMIT OFF;

ij(DULANJI_CONN)> EXECUTE stmt1 USING stmt4@chamodya_conn;

1 row inserted/updated/deleted

1 row inserted/updated/deleted

1 row inserted/updated/deleted

ij(DULANJI_CONN)> EXECUTE stmt2 USING stmt5@chamodya_conn;

1 row inserted/updated/deleted

1 row inserted/updated/deleted

1 row inserted/updated/deleted

ij(DULANJI_CONN)> EXECUTE stmt3 USING stmt6@chamodya_conn;

1 row inserted/updated/deleted

1 row inserted/updated/deleted

1 row inserted/updated/deleted

1 row inserted/updated/deleted

1 row inserted/updated/deleted

1 row inserted/updated/deleted

ij(DULANJI_CONN)> COMMIT;

ij(DULANJI_CONN)> SELECT * FROM table1;

C

-----------

1

2

3



3 rows selected

ij(DULANJI_CONN)> SELECT * FROM table2;

C



--------------------------------------------------------------------------------

------------------------------------------------

aa



ab



ac





3 rows selected

ij(DULANJI_CONN)> SELECT * FROM table3;

C

----------------------

1.2

2.3

3.4

1.0

2.0

3.0



6 rows selected

ij(DULANJI_CONN)> EXECUTE stmt1 USING stmt1@eranda_conn;

1 row inserted/updated/deleted

1 row inserted/updated/deleted

1 row inserted/updated/deleted

ij(DULANJI_CONN)> EXECUTE stmt2 USING stmt2@eranda_conn;

1 row inserted/updated/deleted

1 row inserted/updated/deleted

1 row inserted/updated/deleted

ij(DULANJI_CONN)> EXECUTE stmt3 USING stmt3@eranda_conn;

1 row inserted/updated/deleted

1 row inserted/updated/deleted

1 row inserted/updated/deleted

ij(DULANJI_CONN)> EXECUTE stmt3 USING stmt1@eranda_conn;

1 row inserted/updated/deleted

1 row inserted/updated/deleted

1 row inserted/updated/deleted

ij(DULANJI_CONN)> SELECT * FROM table1;

C

-----------

1

2

3

1

2

3



6 rows selected

ij(DULANJI_CONN)> SELECT * FROM table2;

C



--------------------------------------------------------------------------------

------------------------------------------------

aa



ab



ac



aa



ab



ac





6 rows selected

ij(DULANJI_CONN)> SELECT * FROM table3;

C

----------------------

1.2

2.3

3.4

1.0

2.0

3.0

1.2

2.3

3.4

1.0

2.0

3.0



12 rows selected

ij(DULANJI_CONN)> REMOVE stmt1@eranda_conn;

ij(DULANJI_CONN)> REMOVE stmt2@eranda_conn;

ij(DULANJI_CONN)> REMOVE stmt3@eranda_conn;

ij(DULANJI_CONN)> REMOVE stmt1@chamodya_conn;

ij(DULANJI_CONN)> REMOVE stmt2@chamodya_conn;

ij(DULANJI_CONN)> REMOVE stmt3@chamodya_conn;

ij(DULANJI_CONN)> REMOVE stmt4@chamodya_conn;

ij(DULANJI_CONN)> REMOVE stmt5@chamodya_conn;

ij(DULANJI_CONN)> REMOVE stmt6@chamodya_conn;

ij(DULANJI_CONN)> REMOVE stmt1@dulanji_conn;

ij(DULANJI_CONN)> REMOVE stmt2@dulanji_conn;

ij(DULANJI_CONN)> REMOVE stmt3@dulanji_conn;



Are there anything I should add to the test?

Thanks

Eranda

Mime
View raw message