mariadb/storage/connect/OracleInterface.java

70 lines
1.7 KiB
Java
Raw Normal View History

package wrappers;
import java.sql.*;
import java.util.Hashtable;
import javax.sql.DataSource;
import oracle.jdbc.pool.OracleDataSource;
public class OracleInterface extends JdbcInterface {
public OracleInterface() {
this(true);
} // end of OracleInterface constructor
public OracleInterface(boolean b) {
super(b);
if (dst == null)
dst = new Hashtable<String, DataSource>();
} // end of OracleInterface constructor
@Override
public int JdbcConnect(String[] parms, int fsize, boolean scrollable) {
int rc = 0;
String url = parms[1];
DataSource ds = null;
OracleDataSource ods = null;
if (DEBUG)
System.out.println("Connecting to Oracle data source");
try {
- JAVA DEBUG now depends on connect_xtrace MySQL and MariaDB drivers use catalog for schema modified: storage/connect/JdbcInterface.java - Jdbc temporal fields now return time in seconds modified: storage/connect/JdbcInterface.java modified: storage/connect/jdbconn.cpp modified: storage/connect/jdbconn.h - Recognize JDBC temporal types modified: storage/connect/ha_connect.cc modified: storage/connect/jdbconn.cpp - Test validity of URL modified: storage/connect/ApacheInterface.java modified: storage/connect/JdbcInterface.java modified: storage/connect/MariadbInterface.java modified: storage/connect/MysqlInterface.java modified: storage/connect/OracleInterface.java modified: storage/connect/PostgresqlInterface.java - Java class files are no more distributed A JdbcInterface.jar file is now compiled modified: storage/connect/CMakeLists.txt deleted: storage/connect/wrappers/ApacheInterface.class deleted: storage/connect/wrappers/Client.class deleted: storage/connect/wrappers/JdbcInterface.class deleted: storage/connect/wrappers/MariadbInterface.class deleted: storage/connect/wrappers/MysqlInterface.class deleted: storage/connect/wrappers/OracleInterface.class deleted: storage/connect/wrappers/PostgresqlInterface.class - Try to find the JVM path using JAVA_HOME or registers (Windows) modified: storage/connect/jdbconn.cpp - Add Monty's patches modified: storage/connect/connect.h modified: storage/connect/csort.cpp modified: storage/connect/ha_connect.cc modified: storage/connect/jsonudf.cpp -Change connect_java_wrapper variable from GLOBAL to SESSION modified: storage/connect/ha_connect.cc modified: storage/connect/jdbconn.cpp - Modify the tests to be able to run at least jdbc and jdbc_new modified: storage/connect/mysql-test/connect/disabled.def modified: storage/connect/mysql-test/connect/r/jdbc.result modified: storage/connect/mysql-test/connect/r/jdbc_new.result modified: storage/connect/mysql-test/connect/t/jdbc.test modified: storage/connect/mysql-test/connect/t/jdbc_new.test modified: storage/connect/mysql-test/connect/t/jdbconn.inc modified: storage/connect/mysql-test/connect/t/jdbconn_cleanup.inc added: storage/connect/mysql-test/connect/std_data/JdbcMariaDB.jar
2016-07-09 12:08:31 +02:00
CheckURL(url, "oracle");
if ((ds = dst.get(url)) == null) {
ods = new OracleDataSource();
ods.setURL(url);
if (parms[2] != null)
ods.setUser(parms[2]);
if (parms[3] != null)
ods.setPassword(parms[3]);
ds = ods;
dst.put(url, ds);
} // endif ds
// Get a connection from the data source
conn = ds.getConnection();
// Get the data base meta data object
dbmd = conn.getMetaData();
// Get a statement from the connection
stmt = GetStmt(fsize, scrollable);
} catch (SQLException se) {
SetErrmsg(se);
rc = -2;
} catch( Exception e ) {
SetErrmsg(e);
rc = -3;
} // end try/catch
return rc;
} // end of JdbcConnect
} // end of class OracleInterface