Package org.h2.jdbc

Examples of org.h2.jdbc.JdbcStatement.execute()


                            break;
                        }
                    }
                }
            };
            t.execute();
            Thread.sleep(100);
            conn.close();
            SQLException e = (SQLException) t.getException();
            if (e != null) {
                if (ErrorCode.OBJECT_CLOSED != e.getErrorCode() &&
View Full Code Here


        Task t = new Task() {
            public void call() throws SQLException {
                prep.execute();
            }
        };
        t.execute();
        Thread.sleep(100);
        prep.cancel();
        SQLException e = (SQLException) t.getException();
        assertTrue(e != null);
        assertEquals(ErrorCode.STATEMENT_WAS_CANCELED, e.getErrorCode());
View Full Code Here

                    conn.prepareStatement("select * from test");
                }
            }
        };
        stat.execute("create table test(id int)");
        t.execute();
        for (int i = 0; i < 200; i++) {
            stat.execute("alter table test add column x int");
            stat.execute("alter table test drop column x");
        }
        t.get();
View Full Code Here

                    conn2.createStatement().execute("analyze");
                }
                conn2.close();
            }
        };
        t.execute();
        Thread.yield();
        for (int i = 0; i < 1000; i++) {
            conn.createStatement().execute("analyze");
        }
        t.get();
View Full Code Here

                while (!stop) {
                    stat.execute("select * from (select distinct id from test)");
                }
            }
        };
        t.execute();
        long start = System.currentTimeMillis();
        while (System.currentTimeMillis() - start < 1000) {
            Reader r = rs2.getCharacterStream(2);
            char[] buff = new char[1024];
            while (true) {
View Full Code Here

                data[0] = 'x';
                socket.getOutputStream().write(data);
                socket.close();
            }
        };
        task.execute();
        Thread.sleep(100);
        try {
            getConnection("jdbc:h2:tcp://localhost:9001/test");
            fail();
        } catch (SQLException e) {
View Full Code Here

                }
                // System.out.println("stopped ");

            }
        };
        serverThread.execute();
        try {
            Set<ConnectWorker> workers = new HashSet<ConnectWorker>();
            for (int i = 0; i < WORKER_COUNT; i++) {
                workers.add(new ConnectWorker(ssl, counter));
            }
View Full Code Here

                        prep.setInt(1, random.nextInt(count));
                        prep.execute();
                    }
                }
            };
            t.execute();
            list.add(t);
        }
        Thread.sleep(1000);
        for (Task t : list) {
            t.get();
View Full Code Here

                        prep.setInt(1, random.nextInt(count));
                        prep.execute();
                    }
                }
            };
            t.execute();
            list.add(t);
        }
        Thread.sleep(1000);
        for (Task t : list) {
            t.get();
View Full Code Here

                        assertEquals(buff, test);
                    }
                }
            };
            tasks[i] = t;
            t.execute();
        }
        Thread.sleep(1000);
        for (Task t : tasks) {
            t.get();
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.