Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
889b08b0
Commit
889b08b0
authored
Dec 25, 2013
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding tests for TABLE_TYPE=ODBC with Oracle.
parent
ec906f92
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
498 additions
and
0 deletions
+498
-0
storage/connect/mysql-test/connect/r/odbc_oracle.result
storage/connect/mysql-test/connect/r/odbc_oracle.result
+237
-0
storage/connect/mysql-test/connect/t/have_odbc_oracle.inc
storage/connect/mysql-test/connect/t/have_odbc_oracle.inc
+15
-0
storage/connect/mysql-test/connect/t/odbc_oracle.sql
storage/connect/mysql-test/connect/t/odbc_oracle.sql
+16
-0
storage/connect/mysql-test/connect/t/odbc_oracle.test
storage/connect/mysql-test/connect/t/odbc_oracle.test
+230
-0
No files found.
storage/connect/mysql-test/connect/r/odbc_oracle.result
0 → 100644
View file @
889b08b0
Table Create Table
t1 CREATE TABLE `t1` (
`Name` varchar(256) NOT NULL,
`Description` varchar(256) NOT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Sources'
SET NAMES utf8;
#
# Checking CATFUNC=Tables
#
# All tables in all schemas (filtered with WHERE)
CREATE TABLE t1 ENGINE=CONNECT
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Tables;
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Table_Type Remark
MTR T1 TABLE
MTR T2 TABLE
MTR V1 VIEW
DROP TABLE t1;
# All tables in all schemas (filtered with WHERE)
CREATE TABLE t1 ENGINE=CONNECT
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Tables TABNAME='%.%';
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Table_Type Remark
MTR T1 TABLE
MTR T2 TABLE
MTR V1 VIEW
DROP TABLE t1;
# All tables "T1" in all schemas (filtered with WHERE)
CREATE TABLE t1 ENGINE=CONNECT
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Tables TABNAME='%.T1';
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Table_Type Remark
MTR T1 TABLE
DROP TABLE t1;
# All tables "T1" in all schemas (filtered with WHERE)
CREATE TABLE t1 ENGINE=CONNECT
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Tables TABNAME='T1';
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Table_Type Remark
MTR T1 TABLE
DROP TABLE t1;
# Table "T1" in the schema "MTR"
CREATE TABLE t1 ENGINE=CONNECT
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Tables TABNAME='MTR.T1';
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Table_Type Remark
MTR T1 TABLE
DROP TABLE t1;
# All tables in the schema "MTR"
CREATE TABLE t1 ENGINE=CONNECT
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Tables TABNAME='MTR.%';
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Table_Type Remark
MTR T1 TABLE
MTR T2 TABLE
MTR V1 VIEW
DROP TABLE t1;
#
# Checking CATFUNC=Columns
#
# All columns in all schemas (limited with WHERE)
CREATE TABLE t1 ENGINE=CONNECT
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Columns;
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
MTR T1 A 3 DECIMAL 38 40 0 10 1
MTR T1 B 6 NUMBER 38 40 0 0 1
MTR T2 A 12 VARCHAR2 64 64 0 0 1
MTR V1 A 3 DECIMAL 38 40 0 10 1
MTR V1 B 6 NUMBER 38 40 0 0 1
DROP TABLE t1;
# All columns in all schemas (limited with WHERE)
CREATE TABLE t1 ENGINE=CONNECT
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Columns TABNAME='%.%';
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
MTR T1 A 3 DECIMAL 38 40 0 10 1
MTR T1 B 6 NUMBER 38 40 0 0 1
MTR T2 A 12 VARCHAR2 64 64 0 0 1
MTR V1 A 3 DECIMAL 38 40 0 10 1
MTR V1 B 6 NUMBER 38 40 0 0 1
DROP TABLE t1;
# All tables "T1" in all schemas (limited with WHERE)
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' CATFUNC=Columns TABNAME='%.T1';
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
MTR T1 A 3 DECIMAL 38 40 0 10 1
MTR T1 B 6 NUMBER 38 40 0 0 1
DROP TABLE t1;
# Table "T1" in the schema "MTR"
CREATE TABLE t1 ENGINE=CONNECT
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Columns TABNAME='MTR.T1';
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
MTR T1 A 3 DECIMAL 38 40 0 10 1
MTR T1 B 6 NUMBER 38 40 0 0 1
DROP TABLE t1;
# All tables "T1" in all schemas (filtered with WHERE)
CREATE TABLE t1 ENGINE=CONNECT
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC=Columns TABNAME='%.T1';
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
MTR T1 A 3 DECIMAL 38 40 0 10 1
MTR T1 B 6 NUMBER 38 40 0 0 1
DROP TABLE t1;
#
# Checking tables
#
# Table "T1" in the default schema ("MTR")
CREATE TABLE t1 ENGINE=CONNECT
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
TABNAME='T1';
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`A` double(40,0) DEFAULT NULL,
`B` double(40,0) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='T1'
SELECT * FROM t1 ORDER BY A;
A B
10 1000000000
20 1000000000000
30 1000000000000000
CREATE TABLE t2 AS SELECT * FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`A` double(40,0) DEFAULT NULL,
`B` double(40,0) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t2;
A B
10 1000000000
20 1000000000000
30 1000000000000000
DROP TABLE t2;
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM v1;
A B
10 1000000000
20 1000000000000
30 1000000000000000
DROP VIEW v1;
DROP TABLE t1;
# Table "T1" in the schema "MTR"
CREATE TABLE t1 ENGINE=CONNECT
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
TABNAME='MTR.T1';
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`A` double(40,0) DEFAULT NULL,
`B` double(40,0) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='MTR.T1'
SELECT * FROM t1;
A B
10 1000000000
20 1000000000000
30 1000000000000000
DROP TABLE t1;
# View "V1" in the schema "MTR"
CREATE TABLE t1 ENGINE=CONNECT
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
TABNAME='MTR.V1';
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`A` double(40,0) DEFAULT NULL,
`B` double(40,0) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='MTR.V1'
SELECT * FROM t1;
A B
10 1000000000
20 1000000000000
30 1000000000000000
CREATE TABLE t2 AS SELECT * FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`A` double(40,0) DEFAULT NULL,
`B` double(40,0) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t2;
A B
10 1000000000
20 1000000000000
30 1000000000000000
DROP TABLE t2;
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM v1;
A B
10 1000000000
20 1000000000000
30 1000000000000000
DROP VIEW v1;
DROP TABLE t1;
# Table "T2" in the schema "MTR"
CREATE TABLE t1 ENGINE=CONNECT
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
TABNAME='MTR.T2';
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`A` varchar(64) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='MTR.T2'
SELECT * FROM t1;
A
test
CREATE TABLE t2 AS SELECT * FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`A` varchar(64) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t2;
A
test
DROP TABLE t2;
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM v1;
A
test
DROP VIEW v1;
DROP TABLE t1;
storage/connect/mysql-test/connect/t/have_odbc_oracle.inc
0 → 100644
View file @
889b08b0
--
disable_query_log
--
error
0
,
ER_UNKNOWN_ERROR
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CATFUNC
=
Sources
;
if
(
$mysql_errno
)
{
Skip
No
ODBC
support
;
}
if
(
!
`SELECT count(*) FROM t1 WHERE Name='ConnectEngineOracle'`
)
{
DROP
TABLE
t1
;
Skip
Need
ODBC
data
source
ConnectEngineOracle
;
}
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
--
enable_query_log
storage/connect/mysql-test/connect/t/odbc_oracle.sql
0 → 100644
View file @
889b08b0
DROP
USER
mtr
CASCADE
;
CREATE
USER
mtr
IDENTIFIED
BY
mtr
DEFAULT
TABLESPACE
users
TEMPORARY
TABLESPACE
temp
;
GRANT
CREATE
SESSION
TO
mtr
;
GRANT
CREATE
TABLE
TO
mtr
;
GRANT
CREATE
VIEW
TO
mtr
;
ALTER
USER
mtr
QUOTA
UNLIMITED
ON
USERS
;
CONNECT
mtr
/
mtr
;
CREATE
TABLE
t1
(
a
INT
,
b
NUMBER
);
INSERT
INTO
t1
VALUES
(
10
,
1000
*
1000
*
1000
);
INSERT
INTO
t1
VALUES
(
20
,
1000
*
1000
*
1000
*
1000
);
INSERT
INTO
t1
VALUES
(
30
,
1000
*
1000
*
1000
*
1000
*
1000
);
CREATE
VIEW
v1
AS
SELECT
*
FROM
t1
;
CREATE
TABLE
t2
(
a
VARCHAR
(
64
));
INSERT
INTO
t2
VALUES
(
'test'
);
storage/connect/mysql-test/connect/t/odbc_oracle.test
0 → 100644
View file @
889b08b0
--
source
have_odbc_oracle
.
inc
#
# To configure your system to be able to run this test,
# follow through the following steps:
#
# 1. Install and configure Oracle database to start on the system startup.
#
# 2. Create user, database, schema and tables to be used by mtr:
# sqlplus system/manager < odbc_oracle.sql
#
# 3. Configure Oracle ODBC Driver for unixODBC (skip this step on Windows):
# Add these lines into /etc/odbcinst.ini:
# (the exact paths can vary)
#
#[Oracle11g]
#Description=Oracle ODBC driver for Oracle 11g
#Driver=/u01/app/oracle/product/11.2.0/xe/lib/libsqora.so.11.1
#Setup=
#FileUsage=
#CPTimeout=
#CPReuse=
#
# 4. Create a data source with the name "ConnectEngineOracle"
# - On Windows: use odbcadm.exe
# - On Linux: put these lines into /etc/odbc.ini
#
#[ConnectEngineOracle]
#Application Attributes=T
#Attributes=W
#BatchAutocommitMode=IfAllSuccessful
#CloseCursor=F
#DisableDPM=F
#DisableMTS=T
#Driver=Oracle11g
#DSN=ConnectEngineOracle
#EXECSchemaOpt=
#EXECSyntax=T
#Failover=T
#FailoverDelay=10
#FailoverRetryCount=10
#FetchBufferSize=64000
#ForceWCHAR=F
#Lobs=T
#Longs=T
#MetadataIdDefault=F
#QueryTimeout=T
#ResultSets=T
#ServerName=
#SQLGetData extensions=F
#Translation DLL=
#Translation Option=0
#UserID=
SET
NAMES
utf8
;
#
# Oracle does not support the third (catalog) level
# in SQLTables() and SQLColumns(), e.g.: CATFUNC=Tables TABNAME='%.%.%'.
# It returns a "Driver not capable" error on attept to use non-NULL catalog.
#
# But it works fine with the second (schema) level:
# CATFUNC=Tables TABNAME='%.%'
# Note, if schema level is not specified, or schema level is '%',
# tables for *all* schemas are returned
# (not only for the schema associated with the user.
#
# Note, schema and table names must be in upper case.
#
--
echo
#
--
echo
# Checking CATFUNC=Tables
--
echo
#
--
echo
--
echo
# All tables in all schemas (filtered with WHERE)
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC
=
Tables
;
SELECT
*
FROM
t1
WHERE
Table_Schema
=
'MTR'
ORDER
BY
Table_Schema
,
Table_Name
;
DROP
TABLE
t1
;
--
echo
# All tables in all schemas (filtered with WHERE)
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC
=
Tables
TABNAME
=
'%.%'
;
SELECT
*
FROM
t1
WHERE
Table_Schema
=
'MTR'
ORDER
BY
Table_Schema
,
Table_Name
;
DROP
TABLE
t1
;
--
echo
# All tables "T1" in all schemas (filtered with WHERE)
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC
=
Tables
TABNAME
=
'%.T1'
;
SELECT
*
FROM
t1
WHERE
Table_Schema
=
'MTR'
ORDER
BY
Table_Schema
,
Table_Name
;
DROP
TABLE
t1
;
--
echo
# All tables "T1" in all schemas (filtered with WHERE)
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC
=
Tables
TABNAME
=
'T1'
;
SELECT
*
FROM
t1
WHERE
Table_Schema
=
'MTR'
ORDER
BY
Table_Schema
,
Table_Name
;
DROP
TABLE
t1
;
--
echo
# Table "T1" in the schema "MTR"
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC
=
Tables
TABNAME
=
'MTR.T1'
;
SELECT
*
FROM
t1
ORDER
BY
Table_Schema
,
Table_Name
;
DROP
TABLE
t1
;
--
echo
# All tables in the schema "MTR"
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC
=
Tables
TABNAME
=
'MTR.%'
;
SELECT
*
FROM
t1
ORDER
BY
Table_Schema
,
Table_Name
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Checking CATFUNC=Columns
--
echo
#
--
echo
--
echo
# All columns in all schemas (limited with WHERE)
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC
=
Columns
;
# Disable warnings to avoid "Result limited to 20000 lines"
--
disable_warnings
SELECT
*
FROM
t1
WHERE
Table_Schema
=
'MTR'
ORDER
BY
Table_Schema
,
Table_Name
;
--
enable_warnings
DROP
TABLE
t1
;
--
echo
# All columns in all schemas (limited with WHERE)
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC
=
Columns
TABNAME
=
'%.%'
;
# Disable warnings to avoid "Result limited to 20000 lines"
--
disable_warnings
SELECT
*
FROM
t1
WHERE
Table_Schema
=
'MTR'
ORDER
BY
Table_Schema
,
Table_Name
;
--
enable_warnings
DROP
TABLE
t1
;
--
echo
# All tables "T1" in all schemas (limited with WHERE)
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC
=
Columns
TABNAME
=
'%.T1'
;
SELECT
*
FROM
t1
WHERE
Table_Schema
=
'MTR'
ORDER
BY
Table_Schema
,
Table_Name
;
DROP
TABLE
t1
;
--
echo
# Table "T1" in the schema "MTR"
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC
=
Columns
TABNAME
=
'MTR.T1'
;
SELECT
*
FROM
t1
ORDER
BY
Table_Schema
,
Table_Name
;
DROP
TABLE
t1
;
--
echo
# All tables "T1" in all schemas (filtered with WHERE)
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
CATFUNC
=
Columns
TABNAME
=
'%.T1'
;
SELECT
*
FROM
t1
WHERE
Table_Schema
=
'MTR'
ORDER
BY
Table_Schema
,
Table_Name
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Checking tables
--
echo
#
--
echo
--
echo
# Table "T1" in the default schema ("MTR")
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
TABNAME
=
'T1'
;
SHOW
CREATE
TABLE
t1
;
SELECT
*
FROM
t1
ORDER
BY
A
;
CREATE
TABLE
t2
AS
SELECT
*
FROM
t1
;
SHOW
CREATE
TABLE
t2
;
SELECT
*
FROM
t2
;
DROP
TABLE
t2
;
CREATE
VIEW
v1
AS
SELECT
*
FROM
t1
;
SELECT
*
FROM
v1
;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
--
echo
# Table "T1" in the schema "MTR"
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
TABNAME
=
'MTR.T1'
;
SHOW
CREATE
TABLE
t1
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
--
echo
# View "V1" in the schema "MTR"
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
TABNAME
=
'MTR.V1'
;
SHOW
CREATE
TABLE
t1
;
SELECT
*
FROM
t1
;
CREATE
TABLE
t2
AS
SELECT
*
FROM
t1
;
SHOW
CREATE
TABLE
t2
;
SELECT
*
FROM
t2
;
DROP
TABLE
t2
;
CREATE
VIEW
v1
AS
SELECT
*
FROM
t1
;
SELECT
*
FROM
v1
;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
--
echo
# Table "T2" in the schema "MTR"
CREATE
TABLE
t1
ENGINE
=
CONNECT
TABLE_TYPE
=
ODBC
CONNECTION
=
'DSN=ConnectEngineOracle;UID=mtr;PWD=mtr'
TABNAME
=
'MTR.T2'
;
SHOW
CREATE
TABLE
t1
;
SELECT
*
FROM
t1
;
CREATE
TABLE
t2
AS
SELECT
*
FROM
t1
;
SHOW
CREATE
TABLE
t2
;
SELECT
*
FROM
t2
;
DROP
TABLE
t2
;
CREATE
VIEW
v1
AS
SELECT
*
FROM
t1
;
SELECT
*
FROM
v1
;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment