blob: 1781534c07f830a4f26b78da22261bf7a50c86e1 [file] [log] [blame]
ij> --
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may not use this file except in compliance with
-- the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
driver 'org.apache.derby.jdbc.ClientDriver';
ij> --Bug 4632 Make the db italian to make sure string selects are working
connect 'testij;create=true;territory=it' USER 'dbadmin' PASSWORD 'dbadmin';
ij(CONNECTION1)> connect 'testij' USER 'dbadmin' PASSWORD 'dbadbmin';
ij(CONNECTION2)> -- this is a comment, a comment in front of a select should not cause an error
select * from sys.systables where 1=0;
TABLEID |TABLENAME |&|SCHEMAID |&
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ij(CONNECTION2)> -- this is a comment, a comment in front of a values clauses should not cause an error
values(1);
1
-----------
1
ij(CONNECTION2)> -- Try some URL attributes
disconnect all;
ij> connect 'testij2;create=true' USER 'dbadmin' PASSWORD 'dbadbmin';
ij> select * from APP.notthere;
ERROR 42X05: Table/View 'APP.NOTTHERE' does not exist.
ij> -- examples from the docs
connect 'testij2;create=true;user=judy;password=judy';
ij(CONNECTION1)> connect './testij2;user=judy;password=judy';
ij(CONNECTION2)> connect 'toursDB';
ERROR 08004: The connection was refused because the database toursDB was not found.
ij(CONNECTION2)> connect 'toursDB' USER 'dbadmin' PASSWORD 'dbadbmin';
ERROR 08004: The connection was refused because the database toursDB was not found.
ij(CONNECTION2)> connect 'wombat' USER 'APP' PASSWORD 'APP';
ij(CONNECTION3)> connect 'testij2;create=true;user=usr;password=pwd';
ij(CONNECTION4)> connect 'testij2;upgrade=true;user=usr;password=pwd';
ij(CONNECTION5)> connect 'testij2;shutdown=true;user=usr;password=pwd';
ERROR 08006: DERBY SQL error: ERRORCODE: 45000, SQLSTATE: 08006, SQLERRMC: Database 'testij2' shutdown.
ij(CONNECTION5)> connect './testij2;create=true;user=usr;password=pwd';
ij(CONNECTION6)> connect './testij2;create=true;user=usr;password=pwd';
ij(CONNECTION7)> connect 'testij2;create=true;user=usr;password=pwd';
ij(CONNECTION8)> connect 'testij2;upgrade=true;user=usr;password=pwd';
ij(CONNECTION9)> connect 'testij2;shutdown=true;user=usr;password=pwd';
ERROR 08006: DERBY SQL error: ERRORCODE: 45000, SQLSTATE: 08006, SQLERRMC: Database 'testij2' shutdown.
ij(CONNECTION9)> -- retrieveMessageText Testing
connect 'testij2;create=true;user=usr;password=pwd;retrieveMessageText=false';
ij(CONNECTION10)> -- Should not get message text
select * from APP.notthere;
ERROR 42X05: DERBY SQL error: ERRORCODE: 30000, SQLSTATE: 42X05, SQLERRMC: APP.NOTTHERE42X05
ij(CONNECTION10)> connect 'testij2;create=true;user=usr;password=pwd;retrieveMessageText=true';
ij(CONNECTION11)> -- Should see message text
select * from APP.notthere;
ERROR 42X05: Table/View 'APP.NOTTHERE' does not exist.
ij(CONNECTION11)> -- just user security mechanism
connect 'testij2;create=true;user=usr;retrieveMessageText=true';
ij(CONNECTION12)> connect 'wombat' USER 'APP';
ij(CONNECTION13)> disconnect all;
ij>