[FEAT MERGE]patch sql compat feature to 431

This commit is contained in:
SevenJ-swj
2024-04-15 16:07:24 +00:00
committed by ob-robot
parent 71c32f94b0
commit 6423e587c1
177 changed files with 16669 additions and 1854 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,187 @@
************** Begin Test Reserved Keyword ***************
Reserved Keyword: ALTER
Test PL procedure name Sql:create procedure ALTER () select 1;
Reserved Keyword: BEFORE
Test PL procedure name Sql:create procedure BEFORE () select 1;
Reserved Keyword: BY
Test PL procedure name Sql:create procedure BY () select 1;
Reserved Keyword: CALL
Test PL procedure name Sql:create procedure CALL () select 1;
Reserved Keyword: CASE
Test PL procedure name Sql:create procedure CASE () select 1;
Reserved Keyword: CONDITION
Test PL procedure name Sql:create procedure CONDITION () select 1;
Reserved Keyword: CONTINUE
Test PL procedure name Sql:create procedure CONTINUE () select 1;
Reserved Keyword: CREATE
Test PL procedure name Sql:create procedure CREATE () select 1;
Reserved Keyword: CURRENT_USER
Test PL procedure name Sql:create procedure CURRENT_USER () select 1;
Reserved Keyword: CURSOR
Test PL procedure name Sql:create procedure CURSOR () select 1;
Reserved Keyword: DECLARE
Test PL procedure name Sql:create procedure DECLARE () select 1;
Reserved Keyword: DEFAULT
Test PL procedure name Sql:create procedure DEFAULT () select 1;
Reserved Keyword: DELETE
Test PL procedure name Sql:create procedure DELETE () select 1;
Reserved Keyword: DETERMINISTIC
Test PL procedure name Sql:create procedure DETERMINISTIC () select 1;
Reserved Keyword: DROP
Test PL procedure name Sql:create procedure DROP () select 1;
Reserved Keyword: EACH
Test PL procedure name Sql:create procedure EACH () select 1;
Reserved Keyword: ELSE
Test PL procedure name Sql:create procedure ELSE () select 1;
Reserved Keyword: ELSEIF
Test PL procedure name Sql:create procedure ELSEIF () select 1;
Reserved Keyword: EXISTS
Test PL procedure name Sql:create procedure EXISTS () select 1;
Reserved Keyword: EXIT
Test PL procedure name Sql:create procedure EXIT () select 1;
Reserved Keyword: FETCH
Test PL procedure name Sql:create procedure FETCH () select 1;
Reserved Keyword: FOR
Test PL procedure name Sql:create procedure FOR () select 1;
Reserved Keyword: FROM
Test PL procedure name Sql:create procedure FROM () select 1;
Reserved Keyword: IF
Test PL procedure name Sql:create procedure IF () select 1;
Reserved Keyword: IN
Test PL procedure name Sql:create procedure IN () select 1;
Reserved Keyword: INDEX
Test PL procedure name Sql:create procedure INDEX () select 1;
Reserved Keyword: INOUT
Test PL procedure name Sql:create procedure INOUT () select 1;
Reserved Keyword: INSERT
Test PL procedure name Sql:create procedure INSERT () select 1;
Reserved Keyword: INTO
Test PL procedure name Sql:create procedure INTO () select 1;
Reserved Keyword: IS
Test PL procedure name Sql:create procedure IS () select 1;
Reserved Keyword: ITERATE
Test PL procedure name Sql:create procedure ITERATE () select 1;
Reserved Keyword: LEAVE
Test PL procedure name Sql:create procedure LEAVE () select 1;
Reserved Keyword: LIMIT
Test PL procedure name Sql:create procedure LIMIT () select 1;
Reserved Keyword: LONG
Test PL procedure name Sql:create procedure LONG () select 1;
Reserved Keyword: LOOP
Test PL procedure name Sql:create procedure LOOP () select 1;
Reserved Keyword: MODIFIES
Test PL procedure name Sql:create procedure MODIFIES () select 1;
Reserved Keyword: NOT
Test PL procedure name Sql:create procedure NOT () select 1;
Reserved Keyword: ON
Test PL procedure name Sql:create procedure ON () select 1;
Reserved Keyword: OR
Test PL procedure name Sql:create procedure OR () select 1;
Reserved Keyword: OUT
Test PL procedure name Sql:create procedure OUT () select 1;
Reserved Keyword: PROCEDURE
Test PL procedure name Sql:create procedure PROCEDURE () select 1;
Reserved Keyword: READS
Test PL procedure name Sql:create procedure READS () select 1;
Reserved Keyword: REPEAT
Test PL procedure name Sql:create procedure REPEAT () select 1;
Reserved Keyword: REPLACE
Test PL procedure name Sql:create procedure REPLACE () select 1;
Reserved Keyword: RESIGNAL
Test PL procedure name Sql:create procedure RESIGNAL () select 1;
Reserved Keyword: RETURN
Test PL procedure name Sql:create procedure RETURN () select 1;
Reserved Keyword: SELECT
Test PL procedure name Sql:create procedure SELECT () select 1;
Reserved Keyword: SIGNAL
Test PL procedure name Sql:create procedure SIGNAL () select 1;
Reserved Keyword: SQL
Test PL procedure name Sql:create procedure SQL () select 1;
Reserved Keyword: SQLEXCEPTION
Test PL procedure name Sql:create procedure SQLEXCEPTION () select 1;
Reserved Keyword: SQLSTATE
Test PL procedure name Sql:create procedure SQLSTATE () select 1;
Reserved Keyword: SQLWARNING
Test PL procedure name Sql:create procedure SQLWARNING () select 1;
Reserved Keyword: TABLE
Test PL procedure name Sql:create procedure TABLE () select 1;
Reserved Keyword: THEN
Test PL procedure name Sql:create procedure THEN () select 1;
Reserved Keyword: TRIGGER
Test PL procedure name Sql:create procedure TRIGGER () select 1;
Reserved Keyword: UPDATE
Test PL procedure name Sql:create procedure UPDATE () select 1;
Reserved Keyword: USING
Test PL procedure name Sql:create procedure USING () select 1;
Reserved Keyword: WHEN
Test PL procedure name Sql:create procedure WHEN () select 1;
Reserved Keyword: WHILE
Test PL procedure name Sql:create procedure WHILE () select 1;
Reserved Keyword: TINYINT
Test PL procedure name Sql:create procedure TINYINT () select 1;
Reserved Keyword: SMALLINT
Test PL procedure name Sql:create procedure SMALLINT () select 1;
Reserved Keyword: MEDIUMINT
Test PL procedure name Sql:create procedure MEDIUMINT () select 1;
Reserved Keyword: INTEGER
Test PL procedure name Sql:create procedure INTEGER () select 1;
Reserved Keyword: BIGINT
Test PL procedure name Sql:create procedure BIGINT () select 1;
Reserved Keyword: FLOAT
Test PL procedure name Sql:create procedure FLOAT () select 1;
Reserved Keyword: DOUBLE
Test PL procedure name Sql:create procedure DOUBLE () select 1;
Reserved Keyword: PRECISION
Test PL procedure name Sql:create procedure PRECISION () select 1;
Reserved Keyword: DEC
Test PL procedure name Sql:create procedure DEC () select 1;
Reserved Keyword: DECIMAL
Test PL procedure name Sql:create procedure DECIMAL () select 1;
Reserved Keyword: NUMERIC
Test PL procedure name Sql:create procedure NUMERIC () select 1;
Reserved Keyword: CHARACTER
Test PL procedure name Sql:create procedure CHARACTER () select 1;
Reserved Keyword: VARCHAR
Test PL procedure name Sql:create procedure VARCHAR () select 1;
Reserved Keyword: BINARY
Test PL procedure name Sql:create procedure BINARY () select 1;
Reserved Keyword: VARBINARY
Test PL procedure name Sql:create procedure VARBINARY () select 1;
Reserved Keyword: UNSIGNED
Test PL procedure name Sql:create procedure UNSIGNED () select 1;
Reserved Keyword: ZEROFILL
Test PL procedure name Sql:create procedure ZEROFILL () select 1;
Reserved Keyword: COLLATE
Test PL procedure name Sql:create procedure COLLATE () select 1;
Reserved Keyword: SET
Test PL procedure name Sql:create procedure SET () select 1;
Reserved Keyword: BLOB
Test PL procedure name Sql:create procedure BLOB () select 1;
Reserved Keyword: TINYTEXT
Test PL procedure name Sql:create procedure TINYTEXT () select 1;
Reserved Keyword: MEDIUMTEXT
Test PL procedure name Sql:create procedure MEDIUMTEXT () select 1;
Reserved Keyword: LONGTEXT
Test PL procedure name Sql:create procedure LONGTEXT () select 1;
Reserved Keyword: TINYBLOB
Test PL procedure name Sql:create procedure TINYBLOB () select 1;
Reserved Keyword: MEDIUMBLOB
Test PL procedure name Sql:create procedure MEDIUMBLOB () select 1;
Reserved Keyword: LONGBLOB
Test PL procedure name Sql:create procedure LONGBLOB () select 1;
Reserved Keyword: VARYING
Test PL procedure name Sql:create procedure VARYING () select 1;
Reserved Keyword: CHARSET
Test PL procedure name Sql:create procedure CHARSET () select 1;
Reserved Keyword: COMMIT
Test PL procedure name Sql:create procedure COMMIT () select 1;
Reserved Keyword: ROLLBACK
Test PL procedure name Sql:create procedure ROLLBACK () select 1;
Reserved Keyword: DO
Test PL procedure name Sql:create procedure DO () select 1;
Reserved Keyword: UNTIL
Test PL procedure name Sql:create procedure UNTIL () select 1;
************** Total Count of Reserved Keyword:91 ***************
************** End Test Reserved Keyword ***************
************** Begin Test Non-Reserved Keyword ***************
************** End Test Non-Reserved Keyword ***************

View File

@ -0,0 +1,465 @@
************** Begin Test Reserved Keyword ***************
Reserved Keyword: ACCESSIBLE
Test Table Name and Column Name Sql:create table ACCESSIBLE(ACCESSIBLE int);
Reserved Keyword: ADD
Test Table Name and Column Name Sql:create table ADD(ADD int);
Reserved Keyword: ALL
Test Table Name and Column Name Sql:create table ALL(ALL int);
Reserved Keyword: ALTER
Test Table Name and Column Name Sql:create table ALTER(ALTER int);
Reserved Keyword: ANALYZE
Test Table Name and Column Name Sql:create table ANALYZE(ANALYZE int);
Reserved Keyword: AND
Test Table Name and Column Name Sql:create table AND(AND int);
Reserved Keyword: AS
Test Table Name and Column Name Sql:create table AS(AS int);
Reserved Keyword: ASC
Test Table Name and Column Name Sql:create table ASC(ASC int);
Reserved Keyword: ASENSITIVE
Test Table Name and Column Name Sql:create table ASENSITIVE(ASENSITIVE int);
Reserved Keyword: BEFORE
Test Table Name and Column Name Sql:create table BEFORE(BEFORE int);
Reserved Keyword: BETWEEN
Test Table Name and Column Name Sql:create table BETWEEN(BETWEEN int);
Reserved Keyword: BIGINT
Test Table Name and Column Name Sql:create table BIGINT(BIGINT int);
Reserved Keyword: BINARY
Test Table Name and Column Name Sql:create table BINARY(BINARY int);
Reserved Keyword: BLOB
Test Table Name and Column Name Sql:create table BLOB(BLOB int);
Reserved Keyword: BOTH
Test Table Name and Column Name Sql:create table BOTH(BOTH int);
Reserved Keyword: BY
Test Table Name and Column Name Sql:create table BY(BY int);
Reserved Keyword: CALL
Test Table Name and Column Name Sql:create table CALL(CALL int);
Reserved Keyword: CASCADE
Test Table Name and Column Name Sql:create table CASCADE(CASCADE int);
Reserved Keyword: CASE
Test Table Name and Column Name Sql:create table CASE(CASE int);
Reserved Keyword: CHANGE
Test Table Name and Column Name Sql:create table CHANGE(CHANGE int);
Reserved Keyword: CHAR
Test Table Name and Column Name Sql:create table CHAR(CHAR int);
Reserved Keyword: CHARACTER
Test Table Name and Column Name Sql:create table CHARACTER(CHARACTER int);
Reserved Keyword: CHECK
Test Table Name and Column Name Sql:create table CHECK(CHECK int);
Reserved Keyword: COLLATE
Test Table Name and Column Name Sql:create table COLLATE(COLLATE int);
Reserved Keyword: COLUMN
Test Table Name and Column Name Sql:create table COLUMN(COLUMN int);
Reserved Keyword: CONDITION
Test Table Name and Column Name Sql:create table CONDITION(CONDITION int);
Reserved Keyword: CONSTRAINT
Test Table Name and Column Name Sql:create table CONSTRAINT(CONSTRAINT int);
Reserved Keyword: CONTINUE
Test Table Name and Column Name Sql:create table CONTINUE(CONTINUE int);
Reserved Keyword: CONVERT
Test Table Name and Column Name Sql:create table CONVERT(CONVERT int);
Reserved Keyword: CREATE
Test Table Name and Column Name Sql:create table CREATE(CREATE int);
Reserved Keyword: CROSS
Test Table Name and Column Name Sql:create table CROSS(CROSS int);
Reserved Keyword: CURRENT_DATE
Test Table Name and Column Name Sql:create table CURRENT_DATE(CURRENT_DATE int);
Reserved Keyword: CURRENT_TIME
Test Table Name and Column Name Sql:create table CURRENT_TIME(CURRENT_TIME int);
Reserved Keyword: CURRENT_TIMESTAMP
Test Table Name and Column Name Sql:create table CURRENT_TIMESTAMP(CURRENT_TIMESTAMP int);
Reserved Keyword: CURRENT_USER
Test Table Name and Column Name Sql:create table CURRENT_USER(CURRENT_USER int);
Reserved Keyword: CURSOR
Test Table Name and Column Name Sql:create table CURSOR(CURSOR int);
Reserved Keyword: DATABASE
Test Table Name and Column Name Sql:create table DATABASE(DATABASE int);
Reserved Keyword: DATABASES
Test Table Name and Column Name Sql:create table DATABASES(DATABASES int);
Reserved Keyword: DAY_HOUR
Test Table Name and Column Name Sql:create table DAY_HOUR(DAY_HOUR int);
Reserved Keyword: DAY_MICROSECOND
Test Table Name and Column Name Sql:create table DAY_MICROSECOND(DAY_MICROSECOND int);
Reserved Keyword: DAY_MINUTE
Test Table Name and Column Name Sql:create table DAY_MINUTE(DAY_MINUTE int);
Reserved Keyword: DAY_SECOND
Test Table Name and Column Name Sql:create table DAY_SECOND(DAY_SECOND int);
Reserved Keyword: DECLARE
Test Table Name and Column Name Sql:create table DECLARE(DECLARE int);
Reserved Keyword: DECIMAL
Test Table Name and Column Name Sql:create table DECIMAL(DECIMAL int);
Reserved Keyword: DEFAULT
Test Table Name and Column Name Sql:create table DEFAULT(DEFAULT int);
Reserved Keyword: DELAYED
Test Table Name and Column Name Sql:create table DELAYED(DELAYED int);
Reserved Keyword: DELETE
Test Table Name and Column Name Sql:create table DELETE(DELETE int);
Reserved Keyword: DESC
Test Table Name and Column Name Sql:create table DESC(DESC int);
Reserved Keyword: DESCRIBE
Test Table Name and Column Name Sql:create table DESCRIBE(DESCRIBE int);
Reserved Keyword: DETERMINISTIC
Test Table Name and Column Name Sql:create table DETERMINISTIC(DETERMINISTIC int);
Reserved Keyword: DISTINCT
Test Table Name and Column Name Sql:create table DISTINCT(DISTINCT int);
Reserved Keyword: DISTINCTROW
Test Table Name and Column Name Sql:create table DISTINCTROW(DISTINCTROW int);
Reserved Keyword: DIV
Test Table Name and Column Name Sql:create table DIV(DIV int);
Reserved Keyword: DOUBLE
Test Table Name and Column Name Sql:create table DOUBLE(DOUBLE int);
Reserved Keyword: DROP
Test Table Name and Column Name Sql:create table DROP(DROP int);
Reserved Keyword: DUAL
Test Table Name and Column Name Sql:create table DUAL(DUAL int);
Reserved Keyword: EACH
Test Table Name and Column Name Sql:create table EACH(EACH int);
Reserved Keyword: ELSE
Test Table Name and Column Name Sql:create table ELSE(ELSE int);
Reserved Keyword: ELSEIF
Test Table Name and Column Name Sql:create table ELSEIF(ELSEIF int);
Reserved Keyword: ENCLOSED
Test Table Name and Column Name Sql:create table ENCLOSED(ENCLOSED int);
Reserved Keyword: ESCAPED
Test Table Name and Column Name Sql:create table ESCAPED(ESCAPED int);
Reserved Keyword: EXISTS
Test Table Name and Column Name Sql:create table EXISTS(EXISTS int);
Reserved Keyword: EXIT
Test Table Name and Column Name Sql:create table EXIT(EXIT int);
Reserved Keyword: EXPLAIN
Test Table Name and Column Name Sql:create table EXPLAIN(EXPLAIN int);
Reserved Keyword: FETCH
Test Table Name and Column Name Sql:create table FETCH(FETCH int);
Reserved Keyword: FLOAT
Test Table Name and Column Name Sql:create table FLOAT(FLOAT int);
Reserved Keyword: FLOAT4
Test Table Name and Column Name Sql:create table FLOAT4(FLOAT4 int);
Reserved Keyword: FLOAT8
Test Table Name and Column Name Sql:create table FLOAT8(FLOAT8 int);
Reserved Keyword: FOR
Test Table Name and Column Name Sql:create table FOR(FOR int);
Reserved Keyword: FORCE
Test Table Name and Column Name Sql:create table FORCE(FORCE int);
Reserved Keyword: FOREIGN
Test Table Name and Column Name Sql:create table FOREIGN(FOREIGN int);
Reserved Keyword: FROM
Test Table Name and Column Name Sql:create table FROM(FROM int);
Reserved Keyword: FULLTEXT
Test Table Name and Column Name Sql:create table FULLTEXT(FULLTEXT int);
Reserved Keyword: GENERATED
Test Table Name and Column Name Sql:create table GENERATED(GENERATED int);
Reserved Keyword: GET
Test Table Name and Column Name Sql:create table GET(GET int);
Reserved Keyword: GRANT
Test Table Name and Column Name Sql:create table GRANT(GRANT int);
Reserved Keyword: GROUP
Test Table Name and Column Name Sql:create table GROUP(GROUP int);
Reserved Keyword: HAVING
Test Table Name and Column Name Sql:create table HAVING(HAVING int);
Reserved Keyword: HIGH_PRIORITY
Test Table Name and Column Name Sql:create table HIGH_PRIORITY(HIGH_PRIORITY int);
Reserved Keyword: HOUR_MICROSECOND
Test Table Name and Column Name Sql:create table HOUR_MICROSECOND(HOUR_MICROSECOND int);
Reserved Keyword: HOUR_MINUTE
Test Table Name and Column Name Sql:create table HOUR_MINUTE(HOUR_MINUTE int);
Reserved Keyword: HOUR_SECOND
Test Table Name and Column Name Sql:create table HOUR_SECOND(HOUR_SECOND int);
Reserved Keyword: IF
Test Table Name and Column Name Sql:create table IF(IF int);
Reserved Keyword: IGNORE
Test Table Name and Column Name Sql:create table IGNORE(IGNORE int);
Reserved Keyword: IN
Test Table Name and Column Name Sql:create table IN(IN int);
Reserved Keyword: INDEX
Test Table Name and Column Name Sql:create table INDEX(INDEX int);
Reserved Keyword: INFILE
Test Table Name and Column Name Sql:create table INFILE(INFILE int);
Reserved Keyword: INNER
Test Table Name and Column Name Sql:create table INNER(INNER int);
Reserved Keyword: INOUT
Test Table Name and Column Name Sql:create table INOUT(INOUT int);
Reserved Keyword: INSENSITIVE
Test Table Name and Column Name Sql:create table INSENSITIVE(INSENSITIVE int);
Reserved Keyword: INSERT
Test Table Name and Column Name Sql:create table INSERT(INSERT int);
Reserved Keyword: INT
Test Table Name and Column Name Sql:create table INT(INT int);
Reserved Keyword: INT1
Test Table Name and Column Name Sql:create table INT1(INT1 int);
Reserved Keyword: INT2
Test Table Name and Column Name Sql:create table INT2(INT2 int);
Reserved Keyword: INT3
Test Table Name and Column Name Sql:create table INT3(INT3 int);
Reserved Keyword: INT4
Test Table Name and Column Name Sql:create table INT4(INT4 int);
Reserved Keyword: INT8
Test Table Name and Column Name Sql:create table INT8(INT8 int);
Reserved Keyword: INTEGER
Test Table Name and Column Name Sql:create table INTEGER(INTEGER int);
Reserved Keyword: INTERVAL
Test Table Name and Column Name Sql:create table INTERVAL(INTERVAL int);
Reserved Keyword: INTO
Test Table Name and Column Name Sql:create table INTO(INTO int);
Reserved Keyword: IO_AFTER_GTIDS
Test Table Name and Column Name Sql:create table IO_AFTER_GTIDS(IO_AFTER_GTIDS int);
Reserved Keyword: IO_BEFORE_GTIDS
Test Table Name and Column Name Sql:create table IO_BEFORE_GTIDS(IO_BEFORE_GTIDS int);
Reserved Keyword: IS
Test Table Name and Column Name Sql:create table IS(IS int);
Reserved Keyword: ITERATE
Test Table Name and Column Name Sql:create table ITERATE(ITERATE int);
Reserved Keyword: JOIN
Test Table Name and Column Name Sql:create table JOIN(JOIN int);
Reserved Keyword: KEY
Test Table Name and Column Name Sql:create table KEY(KEY int);
Reserved Keyword: KEYS
Test Table Name and Column Name Sql:create table KEYS(KEYS int);
Reserved Keyword: KILL
Test Table Name and Column Name Sql:create table KILL(KILL int);
Reserved Keyword: LEADING
Test Table Name and Column Name Sql:create table LEADING(LEADING int);
Reserved Keyword: LEAVE
Test Table Name and Column Name Sql:create table LEAVE(LEAVE int);
Reserved Keyword: LEFT
Test Table Name and Column Name Sql:create table LEFT(LEFT int);
Reserved Keyword: LIKE
Test Table Name and Column Name Sql:create table LIKE(LIKE int);
Reserved Keyword: LIMIT
Test Table Name and Column Name Sql:create table LIMIT(LIMIT int);
Reserved Keyword: LINEAR
Test Table Name and Column Name Sql:create table LINEAR(LINEAR int);
Reserved Keyword: LINES
Test Table Name and Column Name Sql:create table LINES(LINES int);
Reserved Keyword: LOAD
Test Table Name and Column Name Sql:create table LOAD(LOAD int);
Reserved Keyword: LOCALTIME
Test Table Name and Column Name Sql:create table LOCALTIME(LOCALTIME int);
Reserved Keyword: LOCALTIMESTAMP
Test Table Name and Column Name Sql:create table LOCALTIMESTAMP(LOCALTIMESTAMP int);
Reserved Keyword: LONG
Test Table Name and Column Name Sql:create table LONG(LONG int);
Reserved Keyword: LONGBLOB
Test Table Name and Column Name Sql:create table LONGBLOB(LONGBLOB int);
Reserved Keyword: LONGTEXT
Test Table Name and Column Name Sql:create table LONGTEXT(LONGTEXT int);
Reserved Keyword: LOOP
Test Table Name and Column Name Sql:create table LOOP(LOOP int);
Reserved Keyword: LOW_PRIORITY
Test Table Name and Column Name Sql:create table LOW_PRIORITY(LOW_PRIORITY int);
Reserved Keyword: MASTER_BIND
Test Table Name and Column Name Sql:create table MASTER_BIND(MASTER_BIND int);
Reserved Keyword: MASTER_SSL_VERIFY_SERVER_CERT
Test Table Name and Column Name Sql:create table MASTER_SSL_VERIFY_SERVER_CERT(MASTER_SSL_VERIFY_SERVER_CERT int);
Reserved Keyword: MATCH
Test Table Name and Column Name Sql:create table MATCH(MATCH int);
Reserved Keyword: MAXVALUE
Test Table Name and Column Name Sql:create table MAXVALUE(MAXVALUE int);
Reserved Keyword: MEDIUMBLOB
Test Table Name and Column Name Sql:create table MEDIUMBLOB(MEDIUMBLOB int);
Reserved Keyword: MEDIUMINT
Test Table Name and Column Name Sql:create table MEDIUMINT(MEDIUMINT int);
Reserved Keyword: MEDIUMTEXT
Test Table Name and Column Name Sql:create table MEDIUMTEXT(MEDIUMTEXT int);
Reserved Keyword: MIDDLEINT
Test Table Name and Column Name Sql:create table MIDDLEINT(MIDDLEINT int);
Reserved Keyword: MINUTE_MICROSECOND
Test Table Name and Column Name Sql:create table MINUTE_MICROSECOND(MINUTE_MICROSECOND int);
Reserved Keyword: MINUTE_SECOND
Test Table Name and Column Name Sql:create table MINUTE_SECOND(MINUTE_SECOND int);
Reserved Keyword: MOD
Test Table Name and Column Name Sql:create table MOD(MOD int);
Reserved Keyword: MODIFIES
Test Table Name and Column Name Sql:create table MODIFIES(MODIFIES int);
Reserved Keyword: NATURAL
Test Table Name and Column Name Sql:create table NATURAL(NATURAL int);
Reserved Keyword: NOT
Test Table Name and Column Name Sql:create table NOT(NOT int);
Reserved Keyword: NO_WRITE_TO_BINLOG
Test Table Name and Column Name Sql:create table NO_WRITE_TO_BINLOG(NO_WRITE_TO_BINLOG int);
Reserved Keyword: NUMERIC
Test Table Name and Column Name Sql:create table NUMERIC(NUMERIC int);
Reserved Keyword: ON
Test Table Name and Column Name Sql:create table ON(ON int);
Reserved Keyword: OPTIMIZE
Test Table Name and Column Name Sql:create table OPTIMIZE(OPTIMIZE int);
Reserved Keyword: OPTION
Test Table Name and Column Name Sql:create table OPTION(OPTION int);
Reserved Keyword: OPTIONALLY
Test Table Name and Column Name Sql:create table OPTIONALLY(OPTIONALLY int);
Reserved Keyword: OR
Test Table Name and Column Name Sql:create table OR(OR int);
Reserved Keyword: ORDER
Test Table Name and Column Name Sql:create table ORDER(ORDER int);
Reserved Keyword: OUT
Test Table Name and Column Name Sql:create table OUT(OUT int);
Reserved Keyword: OUTER
Test Table Name and Column Name Sql:create table OUTER(OUTER int);
Reserved Keyword: OUTFILE
Test Table Name and Column Name Sql:create table OUTFILE(OUTFILE int);
Reserved Keyword: PARTITION
Test Table Name and Column Name Sql:create table PARTITION(PARTITION int);
Reserved Keyword: PRECISION
Test Table Name and Column Name Sql:create table PRECISION(PRECISION int);
Reserved Keyword: PRIMARY
Test Table Name and Column Name Sql:create table PRIMARY(PRIMARY int);
Reserved Keyword: PROCEDURE
Test Table Name and Column Name Sql:create table PROCEDURE(PROCEDURE int);
Reserved Keyword: PURGE
Test Table Name and Column Name Sql:create table PURGE(PURGE int);
Reserved Keyword: RANGE
Test Table Name and Column Name Sql:create table RANGE(RANGE int);
Reserved Keyword: READ
Test Table Name and Column Name Sql:create table READ(READ int);
Reserved Keyword: READS
Test Table Name and Column Name Sql:create table READS(READS int);
Reserved Keyword: READ_WRITE
Test Table Name and Column Name Sql:create table READ_WRITE(READ_WRITE int);
Reserved Keyword: REAL
Test Table Name and Column Name Sql:create table REAL(REAL int);
Reserved Keyword: REFERENCES
Test Table Name and Column Name Sql:create table REFERENCES(REFERENCES int);
Reserved Keyword: REGEXP
Test Table Name and Column Name Sql:create table REGEXP(REGEXP int);
Reserved Keyword: RELEASE
Test Table Name and Column Name Sql:create table RELEASE(RELEASE int);
Reserved Keyword: RENAME
Test Table Name and Column Name Sql:create table RENAME(RENAME int);
Reserved Keyword: REPEAT
Test Table Name and Column Name Sql:create table REPEAT(REPEAT int);
Reserved Keyword: REPLACE
Test Table Name and Column Name Sql:create table REPLACE(REPLACE int);
Reserved Keyword: REQUIRE
Test Table Name and Column Name Sql:create table REQUIRE(REQUIRE int);
Reserved Keyword: RESIGNAL
Test Table Name and Column Name Sql:create table RESIGNAL(RESIGNAL int);
Reserved Keyword: RESTRICT
Test Table Name and Column Name Sql:create table RESTRICT(RESTRICT int);
Reserved Keyword: RETURN
Test Table Name and Column Name Sql:create table RETURN(RETURN int);
Reserved Keyword: REVOKE
Test Table Name and Column Name Sql:create table REVOKE(REVOKE int);
Reserved Keyword: RIGHT
Test Table Name and Column Name Sql:create table RIGHT(RIGHT int);
Reserved Keyword: RLIKE
Test Table Name and Column Name Sql:create table RLIKE(RLIKE int);
Reserved Keyword: SCHEMA
Test Table Name and Column Name Sql:create table SCHEMA(SCHEMA int);
Reserved Keyword: SCHEMAS
Test Table Name and Column Name Sql:create table SCHEMAS(SCHEMAS int);
Reserved Keyword: SECOND_MICROSECOND
Test Table Name and Column Name Sql:create table SECOND_MICROSECOND(SECOND_MICROSECOND int);
Reserved Keyword: SELECT
Test Table Name and Column Name Sql:create table SELECT(SELECT int);
Reserved Keyword: SENSITIVE
Test Table Name and Column Name Sql:create table SENSITIVE(SENSITIVE int);
Reserved Keyword: SEPARATOR
Test Table Name and Column Name Sql:create table SEPARATOR(SEPARATOR int);
Reserved Keyword: SET
Test Table Name and Column Name Sql:create table SET(SET int);
Reserved Keyword: SHOW
Test Table Name and Column Name Sql:create table SHOW(SHOW int);
Reserved Keyword: SIGNAL
Test Table Name and Column Name Sql:create table SIGNAL(SIGNAL int);
Reserved Keyword: SMALLINT
Test Table Name and Column Name Sql:create table SMALLINT(SMALLINT int);
Reserved Keyword: SPATIAL
Test Table Name and Column Name Sql:create table SPATIAL(SPATIAL int);
Reserved Keyword: SPECIFIC
Test Table Name and Column Name Sql:create table SPECIFIC(SPECIFIC int);
Reserved Keyword: SQL
Test Table Name and Column Name Sql:create table SQL(SQL int);
Reserved Keyword: SQLEXCEPTION
Test Table Name and Column Name Sql:create table SQLEXCEPTION(SQLEXCEPTION int);
Reserved Keyword: SQLSTATE
Test Table Name and Column Name Sql:create table SQLSTATE(SQLSTATE int);
Reserved Keyword: SQLWARNING
Test Table Name and Column Name Sql:create table SQLWARNING(SQLWARNING int);
Reserved Keyword: SQL_BIG_RESULT
Test Table Name and Column Name Sql:create table SQL_BIG_RESULT(SQL_BIG_RESULT int);
Reserved Keyword: SQL_CALC_FOUND_ROWS
Test Table Name and Column Name Sql:create table SQL_CALC_FOUND_ROWS(SQL_CALC_FOUND_ROWS int);
Reserved Keyword: SQL_SMALL_RESULT
Test Table Name and Column Name Sql:create table SQL_SMALL_RESULT(SQL_SMALL_RESULT int);
Reserved Keyword: SSL
Test Table Name and Column Name Sql:create table SSL(SSL int);
Reserved Keyword: STARTING
Test Table Name and Column Name Sql:create table STARTING(STARTING int);
Reserved Keyword: STORED
Test Table Name and Column Name Sql:create table STORED(STORED int);
Reserved Keyword: STRAIGHT_JOIN
Test Table Name and Column Name Sql:create table STRAIGHT_JOIN(STRAIGHT_JOIN int);
Reserved Keyword: TABLE
Test Table Name and Column Name Sql:create table TABLE(TABLE int);
Reserved Keyword: TERMINATED
Test Table Name and Column Name Sql:create table TERMINATED(TERMINATED int);
Reserved Keyword: THEN
Test Table Name and Column Name Sql:create table THEN(THEN int);
Reserved Keyword: TINYBLOB
Test Table Name and Column Name Sql:create table TINYBLOB(TINYBLOB int);
Reserved Keyword: TINYINT
Test Table Name and Column Name Sql:create table TINYINT(TINYINT int);
Reserved Keyword: TINYTEXT
Test Table Name and Column Name Sql:create table TINYTEXT(TINYTEXT int);
Reserved Keyword: TO
Test Table Name and Column Name Sql:create table TO(TO int);
Reserved Keyword: TRAILING
Test Table Name and Column Name Sql:create table TRAILING(TRAILING int);
Reserved Keyword: TRIGGER
Test Table Name and Column Name Sql:create table TRIGGER(TRIGGER int);
Reserved Keyword: UNDO
Test Table Name and Column Name Sql:create table UNDO(UNDO int);
Reserved Keyword: UNION
Test Table Name and Column Name Sql:create table UNION(UNION int);
Reserved Keyword: UNIQUE
Test Table Name and Column Name Sql:create table UNIQUE(UNIQUE int);
Reserved Keyword: UNLOCK
Test Table Name and Column Name Sql:create table UNLOCK(UNLOCK int);
Reserved Keyword: UNSIGNED
Test Table Name and Column Name Sql:create table UNSIGNED(UNSIGNED int);
Reserved Keyword: UPDATE
Test Table Name and Column Name Sql:create table UPDATE(UPDATE int);
Reserved Keyword: USAGE
Test Table Name and Column Name Sql:create table USAGE(USAGE int);
Reserved Keyword: USE
Test Table Name and Column Name Sql:create table USE(USE int);
Reserved Keyword: USING
Test Table Name and Column Name Sql:create table USING(USING int);
Reserved Keyword: UTC_DATE
Test Table Name and Column Name Sql:create table UTC_DATE(UTC_DATE int);
Reserved Keyword: UTC_TIME
Test Table Name and Column Name Sql:create table UTC_TIME(UTC_TIME int);
Reserved Keyword: UTC_TIMESTAMP
Test Table Name and Column Name Sql:create table UTC_TIMESTAMP(UTC_TIMESTAMP int);
Reserved Keyword: VALUES
Test Table Name and Column Name Sql:create table VALUES(VALUES int);
Reserved Keyword: VARBINARY
Test Table Name and Column Name Sql:create table VARBINARY(VARBINARY int);
Reserved Keyword: VARCHAR
Test Table Name and Column Name Sql:create table VARCHAR(VARCHAR int);
Reserved Keyword: VARCHARACTER
Test Table Name and Column Name Sql:create table VARCHARACTER(VARCHARACTER int);
Reserved Keyword: VARYING
Test Table Name and Column Name Sql:create table VARYING(VARYING int);
Reserved Keyword: VIRTUAL
Test Table Name and Column Name Sql:create table VIRTUAL(VIRTUAL int);
Reserved Keyword: WHEN
Test Table Name and Column Name Sql:create table WHEN(WHEN int);
Reserved Keyword: WHERE
Test Table Name and Column Name Sql:create table WHERE(WHERE int);
Reserved Keyword: WHILE
Test Table Name and Column Name Sql:create table WHILE(WHILE int);
Reserved Keyword: WITH
Test Table Name and Column Name Sql:create table WITH(WITH int);
Reserved Keyword: WRITE
Test Table Name and Column Name Sql:create table WRITE(WRITE int);
Reserved Keyword: XOR
Test Table Name and Column Name Sql:create table XOR(XOR int);
Reserved Keyword: YEAR_MONTH
Test Table Name and Column Name Sql:create table YEAR_MONTH(YEAR_MONTH int);
Reserved Keyword: ZEROFILL
Test Table Name and Column Name Sql:create table ZEROFILL(ZEROFILL int);
Reserved Keyword: TABLEGROUP
Test Table Name and Column Name Sql:create table TABLEGROUP(TABLEGROUP int);
************** Total Count of Reserved Keyword:230 ***************
************** End Test Reserved Keyword ***************
************** Begin Test Non-Reserved Keyword ***************
************** End Test Non-Reserved Keyword ***************

View File

@ -0,0 +1,191 @@
************** Begin Test Reserved Keyword ***************
Reserved Keyword: ALL
Test PL type name Sql:create type ALL as table of varchar2(1);
Reserved Keyword: ALTER
Test PL type name Sql:create type ALTER as table of varchar2(1);
Reserved Keyword: AND
Test PL type name Sql:create type AND as table of varchar2(1);
Reserved Keyword: ANY
Test PL type name Sql:create type ANY as table of varchar2(1);
Reserved Keyword: AS
Test PL type name Sql:create type AS as table of varchar2(1);
Reserved Keyword: ASC
Test PL type name Sql:create type ASC as table of varchar2(1);
Reserved Keyword: AT
Test PL type name Sql:create type AT as table of varchar2(1);
Reserved Keyword: BEGIN
Test PL type name Sql:create type BEGIN as table of varchar2(1);
Reserved Keyword: BETWEEN
Test PL type name Sql:create type BETWEEN as table of varchar2(1);
Reserved Keyword: BY
Test PL type name Sql:create type BY as table of varchar2(1);
Reserved Keyword: CASE
Test PL type name Sql:create type CASE as table of varchar2(1);
Reserved Keyword: CHECK
Test PL type name Sql:create type CHECK as table of varchar2(1);
Reserved Keyword: CLUSTERS
Test PL type name Sql:create type CLUSTERS as table of varchar2(1);
Reserved Keyword: CLUSTER
Test PL type name Sql:create type CLUSTER as table of varchar2(1);
Reserved Keyword: COLAUTH
Test PL type name Sql:create type COLAUTH as table of varchar2(1);
Reserved Keyword: COLUMNS
Test PL type name Sql:create type COLUMNS as table of varchar2(1);
Reserved Keyword: COMPRESS
Test PL type name Sql:create type COMPRESS as table of varchar2(1);
Reserved Keyword: CONNECT
Test PL type name Sql:create type CONNECT as table of varchar2(1);
Reserved Keyword: CRASH
Test PL type name Sql:create type CRASH as table of varchar2(1);
Reserved Keyword: CREATE
Test PL type name Sql:create type CREATE as table of varchar2(1);
Reserved Keyword: CURSOR
Test PL type name Sql:create type CURSOR as table of varchar2(1);
Reserved Keyword: COMMIT
Test PL type name Sql:create type COMMIT as table of varchar2(1);
Reserved Keyword: DELETE
Test PL type name Sql:create type DELETE as table of varchar2(1);
Reserved Keyword: DECLARE
Test PL type name Sql:create type DECLARE as table of varchar2(1);
Reserved Keyword: DEFAULT
Test PL type name Sql:create type DEFAULT as table of varchar2(1);
Reserved Keyword: DESC
Test PL type name Sql:create type DESC as table of varchar2(1);
Reserved Keyword: DISTINCT
Test PL type name Sql:create type DISTINCT as table of varchar2(1);
Reserved Keyword: DROP
Test PL type name Sql:create type DROP as table of varchar2(1);
Reserved Keyword: EXISTS
Test PL type name Sql:create type EXISTS as table of varchar2(1);
Reserved Keyword: ELSE
Test PL type name Sql:create type ELSE as table of varchar2(1);
Reserved Keyword: ELSIF
Test PL type name Sql:create type ELSIF as table of varchar2(1);
Reserved Keyword: END
Test PL type name Sql:create type END as table of varchar2(1);
Reserved Keyword: EXCEPTION
Test PL type name Sql:create type EXCEPTION as table of varchar2(1);
Reserved Keyword: EXCLUSIVE
Test PL type name Sql:create type EXCLUSIVE as table of varchar2(1);
Reserved Keyword: FETCH
Test PL type name Sql:create type FETCH as table of varchar2(1);
Reserved Keyword: FOR
Test PL type name Sql:create type FOR as table of varchar2(1);
Reserved Keyword: FROM
Test PL type name Sql:create type FROM as table of varchar2(1);
Reserved Keyword: FUNCTION
Test PL type name Sql:create type FUNCTION as table of varchar2(1);
Reserved Keyword: GOTO
Test PL type name Sql:create type GOTO as table of varchar2(1);
Reserved Keyword: GRANT
Test PL type name Sql:create type GRANT as table of varchar2(1);
Reserved Keyword: GROUP
Test PL type name Sql:create type GROUP as table of varchar2(1);
Reserved Keyword: HAVING
Test PL type name Sql:create type HAVING as table of varchar2(1);
Reserved Keyword: IDENTIFIED
Test PL type name Sql:create type IDENTIFIED as table of varchar2(1);
Reserved Keyword: IF
Test PL type name Sql:create type IF as table of varchar2(1);
Reserved Keyword: IN
Test PL type name Sql:create type IN as table of varchar2(1);
Reserved Keyword: INDEX
Test PL type name Sql:create type INDEX as table of varchar2(1);
Reserved Keyword: INDEXES
Test PL type name Sql:create type INDEXES as table of varchar2(1);
Reserved Keyword: INSERT
Test PL type name Sql:create type INSERT as table of varchar2(1);
Reserved Keyword: INTERSECT
Test PL type name Sql:create type INTERSECT as table of varchar2(1);
Reserved Keyword: INTO
Test PL type name Sql:create type INTO as table of varchar2(1);
Reserved Keyword: IS
Test PL type name Sql:create type IS as table of varchar2(1);
Reserved Keyword: LIKE
Test PL type name Sql:create type LIKE as table of varchar2(1);
Reserved Keyword: LOCK
Test PL type name Sql:create type LOCK as table of varchar2(1);
Reserved Keyword: MINUS
Test PL type name Sql:create type MINUS as table of varchar2(1);
Reserved Keyword: MODE
Test PL type name Sql:create type MODE as table of varchar2(1);
Reserved Keyword: NOCOMPRESS
Test PL type name Sql:create type NOCOMPRESS as table of varchar2(1);
Reserved Keyword: NOT
Test PL type name Sql:create type NOT as table of varchar2(1);
Reserved Keyword: NOWAIT
Test PL type name Sql:create type NOWAIT as table of varchar2(1);
Reserved Keyword: NULL
Test PL type name Sql:create type NULL as table of varchar2(1);
Reserved Keyword: OF
Test PL type name Sql:create type OF as table of varchar2(1);
Reserved Keyword: ON
Test PL type name Sql:create type ON as table of varchar2(1);
Reserved Keyword: OPTION
Test PL type name Sql:create type OPTION as table of varchar2(1);
Reserved Keyword: OR
Test PL type name Sql:create type OR as table of varchar2(1);
Reserved Keyword: ORDER
Test PL type name Sql:create type ORDER as table of varchar2(1);
Reserved Keyword: OVERLAPS
Test PL type name Sql:create type OVERLAPS as table of varchar2(1);
Reserved Keyword: PROCEDURE
Test PL type name Sql:create type PROCEDURE as table of varchar2(1);
Reserved Keyword: PUBLIC
Test PL type name Sql:create type PUBLIC as table of varchar2(1);
Reserved Keyword: RESOURCE
Test PL type name Sql:create type RESOURCE as table of varchar2(1);
Reserved Keyword: REVOKE
Test PL type name Sql:create type REVOKE as table of varchar2(1);
Reserved Keyword: RETURN
Test PL type name Sql:create type RETURN as table of varchar2(1);
Reserved Keyword: ROLLBACK
Test PL type name Sql:create type ROLLBACK as table of varchar2(1);
Reserved Keyword: SELECT
Test PL type name Sql:create type SELECT as table of varchar2(1);
Reserved Keyword: SHARE
Test PL type name Sql:create type SHARE as table of varchar2(1);
Reserved Keyword: SIZE
Test PL type name Sql:create type SIZE as table of varchar2(1);
Reserved Keyword: SQL
Test PL type name Sql:create type SQL as table of varchar2(1);
Reserved Keyword: START
Test PL type name Sql:create type START as table of varchar2(1);
Reserved Keyword: SUBTYPE
Test PL type name Sql:create type SUBTYPE as table of varchar2(1);
Reserved Keyword: SAVEPOINT
Test PL type name Sql:create type SAVEPOINT as table of varchar2(1);
Reserved Keyword: SET
Test PL type name Sql:create type SET as table of varchar2(1);
Reserved Keyword: TABAUTH
Test PL type name Sql:create type TABAUTH as table of varchar2(1);
Reserved Keyword: TABLE
Test PL type name Sql:create type TABLE as table of varchar2(1);
Reserved Keyword: THEN
Test PL type name Sql:create type THEN as table of varchar2(1);
Reserved Keyword: TO
Test PL type name Sql:create type TO as table of varchar2(1);
Reserved Keyword: UNION
Test PL type name Sql:create type UNION as table of varchar2(1);
Reserved Keyword: UNIQUE
Test PL type name Sql:create type UNIQUE as table of varchar2(1);
Reserved Keyword: UPDATE
Test PL type name Sql:create type UPDATE as table of varchar2(1);
Reserved Keyword: VALUES
Test PL type name Sql:create type VALUES as table of varchar2(1);
Reserved Keyword: VIEW
Test PL type name Sql:create type VIEW as table of varchar2(1);
Reserved Keyword: VIEWS
Test PL type name Sql:create type VIEWS as table of varchar2(1);
Reserved Keyword: WHEN
Test PL type name Sql:create type WHEN as table of varchar2(1);
Reserved Keyword: WHERE
Test PL type name Sql:create type WHERE as table of varchar2(1);
Reserved Keyword: WITH
Test PL type name Sql:create type WITH as table of varchar2(1);
Reserved Keyword: WHILE
Test PL type name Sql:create type WHILE as table of varchar2(1);
************** Total Count of Reserved Keyword:93 ***************
************** End Test Reserved Keyword ***************
************** Begin Test Non-Reserved Keyword ***************
************** End Test Non-Reserved Keyword ***************

View File

@ -0,0 +1,231 @@
************** Begin Test Reserved Keyword ***************
Reserved Keyword: ACCESS
Test Table Name and Column Name Sql:create table ACCESS(ACCESS int);
Reserved Keyword: ADD
Test Table Name and Column Name Sql:create table ADD(ADD int);
Reserved Keyword: ALL
Test Table Name and Column Name Sql:create table ALL(ALL int);
Reserved Keyword: ALTER
Test Table Name and Column Name Sql:create table ALTER(ALTER int);
Reserved Keyword: AND
Test Table Name and Column Name Sql:create table AND(AND int);
Reserved Keyword: ANY
Test Table Name and Column Name Sql:create table ANY(ANY int);
Reserved Keyword: AS
Test Table Name and Column Name Sql:create table AS(AS int);
Reserved Keyword: ASC
Test Table Name and Column Name Sql:create table ASC(ASC int);
Reserved Keyword: AUDIT
Test Table Name and Column Name Sql:create table AUDIT(AUDIT int);
Reserved Keyword: BETWEEN
Test Table Name and Column Name Sql:create table BETWEEN(BETWEEN int);
Reserved Keyword: BY
Test Table Name and Column Name Sql:create table BY(BY int);
Reserved Keyword: CHAR
Test Table Name and Column Name Sql:create table CHAR(CHAR int);
Reserved Keyword: CHECK
Test Table Name and Column Name Sql:create table CHECK(CHECK int);
Reserved Keyword: CLUSTER
Test Table Name and Column Name Sql:create table CLUSTER(CLUSTER int);
Reserved Keyword: COLUMN
Test Table Name and Column Name Sql:create table COLUMN(COLUMN int);
Reserved Keyword: COMMENT
Test Table Name and Column Name Sql:create table COMMENT(COMMENT int);
Reserved Keyword: COMPRESS
Test Table Name and Column Name Sql:create table COMPRESS(COMPRESS int);
Reserved Keyword: CONNECT
Test Table Name and Column Name Sql:create table CONNECT(CONNECT int);
Reserved Keyword: CREATE
Test Table Name and Column Name Sql:create table CREATE(CREATE int);
Reserved Keyword: CURRENT
Test Table Name and Column Name Sql:create table CURRENT(CURRENT int);
Reserved Keyword: DATE
Test Table Name and Column Name Sql:create table DATE(DATE int);
Reserved Keyword: DECIMAL
Test Table Name and Column Name Sql:create table DECIMAL(DECIMAL int);
Reserved Keyword: DEFAULT
Test Table Name and Column Name Sql:create table DEFAULT(DEFAULT int);
Reserved Keyword: DELETE
Test Table Name and Column Name Sql:create table DELETE(DELETE int);
Reserved Keyword: DESC
Test Table Name and Column Name Sql:create table DESC(DESC int);
Reserved Keyword: DISTINCT
Test Table Name and Column Name Sql:create table DISTINCT(DISTINCT int);
Reserved Keyword: DROP
Test Table Name and Column Name Sql:create table DROP(DROP int);
Reserved Keyword: ELSE
Test Table Name and Column Name Sql:create table ELSE(ELSE int);
Reserved Keyword: EXCLUSIVE
Test Table Name and Column Name Sql:create table EXCLUSIVE(EXCLUSIVE int);
Reserved Keyword: EXISTS
Test Table Name and Column Name Sql:create table EXISTS(EXISTS int);
Reserved Keyword: FILE
Test Table Name and Column Name Sql:create table FILE(FILE int);
Reserved Keyword: FLOAT
Test Table Name and Column Name Sql:create table FLOAT(FLOAT int);
Reserved Keyword: FOR
Test Table Name and Column Name Sql:create table FOR(FOR int);
Reserved Keyword: FROM
Test Table Name and Column Name Sql:create table FROM(FROM int);
Reserved Keyword: GRANT
Test Table Name and Column Name Sql:create table GRANT(GRANT int);
Reserved Keyword: GROUP
Test Table Name and Column Name Sql:create table GROUP(GROUP int);
Reserved Keyword: HAVING
Test Table Name and Column Name Sql:create table HAVING(HAVING int);
Reserved Keyword: IDENTIFIED
Test Table Name and Column Name Sql:create table IDENTIFIED(IDENTIFIED int);
Reserved Keyword: IMMEDIATE
Test Table Name and Column Name Sql:create table IMMEDIATE(IMMEDIATE int);
Reserved Keyword: IN
Test Table Name and Column Name Sql:create table IN(IN int);
Reserved Keyword: INCREMENT
Test Table Name and Column Name Sql:create table INCREMENT(INCREMENT int);
Reserved Keyword: INDEX
Test Table Name and Column Name Sql:create table INDEX(INDEX int);
Reserved Keyword: INITIAL
Test Table Name and Column Name Sql:create table INITIAL(INITIAL int);
Reserved Keyword: INSERT
Test Table Name and Column Name Sql:create table INSERT(INSERT int);
Reserved Keyword: INTEGER
Test Table Name and Column Name Sql:create table INTEGER(INTEGER int);
Reserved Keyword: INTERSECT
Test Table Name and Column Name Sql:create table INTERSECT(INTERSECT int);
Reserved Keyword: INTO
Test Table Name and Column Name Sql:create table INTO(INTO int);
Reserved Keyword: IS
Test Table Name and Column Name Sql:create table IS(IS int);
Reserved Keyword: LEVEL
Test Table Name and Column Name Sql:create table LEVEL(LEVEL int);
Reserved Keyword: LIKE
Test Table Name and Column Name Sql:create table LIKE(LIKE int);
Reserved Keyword: LOCK
Test Table Name and Column Name Sql:create table LOCK(LOCK int);
Reserved Keyword: LONG
Test Table Name and Column Name Sql:create table LONG(LONG int);
Reserved Keyword: MAXEXTENTS
Test Table Name and Column Name Sql:create table MAXEXTENTS(MAXEXTENTS int);
Reserved Keyword: MINUS
Test Table Name and Column Name Sql:create table MINUS(MINUS int);
Reserved Keyword: MODE
Test Table Name and Column Name Sql:create table MODE(MODE int);
Reserved Keyword: MODIFY
Test Table Name and Column Name Sql:create table MODIFY(MODIFY int);
Reserved Keyword: NOAUDIT
Test Table Name and Column Name Sql:create table NOAUDIT(NOAUDIT int);
Reserved Keyword: NOCOMPRESS
Test Table Name and Column Name Sql:create table NOCOMPRESS(NOCOMPRESS int);
Reserved Keyword: NOT
Test Table Name and Column Name Sql:create table NOT(NOT int);
Reserved Keyword: NOTFOUND
Test Table Name and Column Name Sql:create table NOTFOUND(NOTFOUND int);
Reserved Keyword: NOWAIT
Test Table Name and Column Name Sql:create table NOWAIT(NOWAIT int);
Reserved Keyword: NUMBER
Test Table Name and Column Name Sql:create table NUMBER(NUMBER int);
Reserved Keyword: OF
Test Table Name and Column Name Sql:create table OF(OF int);
Reserved Keyword: OFFLINE
Test Table Name and Column Name Sql:create table OFFLINE(OFFLINE int);
Reserved Keyword: ON
Test Table Name and Column Name Sql:create table ON(ON int);
Reserved Keyword: ONLINE
Test Table Name and Column Name Sql:create table ONLINE(ONLINE int);
Reserved Keyword: OPTION
Test Table Name and Column Name Sql:create table OPTION(OPTION int);
Reserved Keyword: OR
Test Table Name and Column Name Sql:create table OR(OR int);
Reserved Keyword: ORDER
Test Table Name and Column Name Sql:create table ORDER(ORDER int);
Reserved Keyword: PCTFREE
Test Table Name and Column Name Sql:create table PCTFREE(PCTFREE int);
Reserved Keyword: PRIOR
Test Table Name and Column Name Sql:create table PRIOR(PRIOR int);
Reserved Keyword: PRIVILEGES
Test Table Name and Column Name Sql:create table PRIVILEGES(PRIVILEGES int);
Reserved Keyword: PUBLIC
Test Table Name and Column Name Sql:create table PUBLIC(PUBLIC int);
Reserved Keyword: RAW
Test Table Name and Column Name Sql:create table RAW(RAW int);
Reserved Keyword: RENAME
Test Table Name and Column Name Sql:create table RENAME(RENAME int);
Reserved Keyword: RESOURCE
Test Table Name and Column Name Sql:create table RESOURCE(RESOURCE int);
Reserved Keyword: REVOKE
Test Table Name and Column Name Sql:create table REVOKE(REVOKE int);
Reserved Keyword: ROW
Test Table Name and Column Name Sql:create table ROW(ROW int);
Reserved Keyword: ROWID
Test Table Name and Column Name Sql:create table ROWID(ROWID int);
Reserved Keyword: ROWLABEL
Test Table Name and Column Name Sql:create table ROWLABEL(ROWLABEL int);
Reserved Keyword: ROWNUM
Test Table Name and Column Name Sql:create table ROWNUM(ROWNUM int);
Reserved Keyword: ROWS
Test Table Name and Column Name Sql:create table ROWS(ROWS int);
Reserved Keyword: START
Test Table Name and Column Name Sql:create table START(START int);
Reserved Keyword: SELECT
Test Table Name and Column Name Sql:create table SELECT(SELECT int);
Reserved Keyword: SESSION
Test Table Name and Column Name Sql:create table SESSION(SESSION int);
Reserved Keyword: SET
Test Table Name and Column Name Sql:create table SET(SET int);
Reserved Keyword: SHARE
Test Table Name and Column Name Sql:create table SHARE(SHARE int);
Reserved Keyword: SIZE
Test Table Name and Column Name Sql:create table SIZE(SIZE int);
Reserved Keyword: SMALLINT
Test Table Name and Column Name Sql:create table SMALLINT(SMALLINT int);
Reserved Keyword: SUCCESSFUL
Test Table Name and Column Name Sql:create table SUCCESSFUL(SUCCESSFUL int);
Reserved Keyword: SYNONYM
Test Table Name and Column Name Sql:create table SYNONYM(SYNONYM int);
Reserved Keyword: SYSDATE
Test Table Name and Column Name Sql:create table SYSDATE(SYSDATE int);
Reserved Keyword: TABLE
Test Table Name and Column Name Sql:create table TABLE(TABLE int);
Reserved Keyword: THEN
Test Table Name and Column Name Sql:create table THEN(THEN int);
Reserved Keyword: TO
Test Table Name and Column Name Sql:create table TO(TO int);
Reserved Keyword: TRIGGER
Test Table Name and Column Name Sql:create table TRIGGER(TRIGGER int);
Reserved Keyword: UID
Test Table Name and Column Name Sql:create table UID(UID int);
Reserved Keyword: UNION
Test Table Name and Column Name Sql:create table UNION(UNION int);
Reserved Keyword: UNIQUE
Test Table Name and Column Name Sql:create table UNIQUE(UNIQUE int);
Reserved Keyword: UPDATE
Test Table Name and Column Name Sql:create table UPDATE(UPDATE int);
Reserved Keyword: USER
Test Table Name and Column Name Sql:create table USER(USER int);
Reserved Keyword: VALIDATE
Test Table Name and Column Name Sql:create table VALIDATE(VALIDATE int);
Reserved Keyword: VALUES
Test Table Name and Column Name Sql:create table VALUES(VALUES int);
Reserved Keyword: VARCHAR
Test Table Name and Column Name Sql:create table VARCHAR(VARCHAR int);
Reserved Keyword: VARCHAR2
Test Table Name and Column Name Sql:create table VARCHAR2(VARCHAR2 int);
Reserved Keyword: VIEW
Test Table Name and Column Name Sql:create table VIEW(VIEW int);
Reserved Keyword: WHENEVER
Test Table Name and Column Name Sql:create table WHENEVER(WHENEVER int);
Reserved Keyword: WHERE
Test Table Name and Column Name Sql:create table WHERE(WHERE int);
Reserved Keyword: WITH
Test Table Name and Column Name Sql:create table WITH(WITH int);
Reserved Keyword: CASE
Test Table Name and Column Name Sql:create table CASE(CASE int);
Reserved Keyword: CONNECT_BY_ROOT
Test Table Name and Column Name Sql:create table CONNECT_BY_ROOT(CONNECT_BY_ROOT int);
Reserved Keyword: DUAL
Test Table Name and Column Name Sql:create table DUAL(DUAL int);
Reserved Keyword: SQL_CALC_FOUND_ROWS
Test Table Name and Column Name Sql:create table SQL_CALC_FOUND_ROWS(SQL_CALC_FOUND_ROWS int);
************** Total Count of Reserved Keyword:113 ***************
************** End Test Reserved Keyword ***************
************** Begin Test Non-Reserved Keyword ***************
************** End Test Non-Reserved Keyword ***************

View File

@ -40,6 +40,9 @@ protected:
void print_parse_outline(const char *query_str, std::ofstream &of_result, int64_t expect_error = OB_SUCCESS);
void do_filter_hint(const char *query_str, std::ofstream &of_result, int64_t expect_error = OB_SUCCESS);
bool pretreat_cmd(std::string line, int64_t &expect_error);
void parse_keyword(std::ifstream &if_tests, std::ofstream &of_result, bool is_sql_keyword);
void do_parse_keyword(const char *keyword, std::ofstream &of_result, bool is_reserved, bool is_sql_keyword);
bool non_reserved_keyword_can_not_be_name(const char *keyword, bool is_sql_keyword);
protected:
// data members
ObArenaAllocator allocator_;
@ -262,6 +265,283 @@ TEST_F(TestParser, test_parser_outline)
is_equal_content(tmp_file,result_file);
}
TEST_F(TestParser, test_mysql_sql_keyword)
{
const char* test_file = "../../../../src/sql/parser/sql_parser_mysql_mode.y";
const char* result_file = "./test_mysql_sql_keyword.result";
const char* tmp_file = "./test_mysql_sql_keyword.tmp";
// run tests
std::ifstream if_tests(test_file);
ASSERT_TRUE(if_tests.is_open());
std::ofstream of_result(tmp_file);
ASSERT_TRUE(of_result.is_open());
test::clp.sql_mode = DEFAULT_MYSQL_MODE;
set_compat_mode(oceanbase::lib::Worker::CompatMode::MYSQL);
ASSERT_NO_FATAL_FAILURE(parse_keyword(if_tests, of_result, true));
of_result.close();
// verify results
is_equal_content(tmp_file,result_file);
}
TEST_F(TestParser, test_mysql_pl_keyword)
{
const char* test_file = "../../../../src/pl/parser/pl_parser_mysql_mode.y";
const char* result_file = "./test_mysql_pl_keyword.result";
const char* tmp_file = "./test_mysql_pl_keyword.tmp";
// run tests
std::ifstream if_tests(test_file);
ASSERT_TRUE(if_tests.is_open());
std::ofstream of_result(tmp_file);
ASSERT_TRUE(of_result.is_open());
test::clp.sql_mode = DEFAULT_MYSQL_MODE;
set_compat_mode(oceanbase::lib::Worker::CompatMode::MYSQL);
ASSERT_NO_FATAL_FAILURE(parse_keyword(if_tests, of_result, false));
of_result.close();
// verify results
is_equal_content(tmp_file,result_file);
}
TEST_F(TestParser, test_oracle_sql_keyword)
{
const char* test_file = "../../../../close_modules/oracle_parser/sql/parser/sql_parser_oracle_mode.y";
const char* result_file = "./test_oracle_sql_keyword.result";
const char* tmp_file = "./test_oracle_sql_keyword.tmp";
// run tests
std::ifstream if_tests(test_file);
ASSERT_TRUE(if_tests.is_open());
std::ofstream of_result(tmp_file);
ASSERT_TRUE(of_result.is_open());
test::clp.sql_mode = DEFAULT_ORACLE_MODE | SMO_ORACLE;
set_compat_mode(oceanbase::lib::Worker::CompatMode::ORACLE);
ASSERT_NO_FATAL_FAILURE(parse_keyword(if_tests, of_result, true));
of_result.close();
// verify results
is_equal_content(tmp_file,result_file);
}
TEST_F(TestParser, test_oracle_pl_keyword)
{
const char* test_file = "../../../../close_modules/oracle_pl/pl/parser/pl_parser_oracle_mode.y";
const char* result_file = "./test_oracle_pl_keyword.result";
const char* tmp_file = "./test_oracle_pl_keyword.tmp";
// run tests
std::ifstream if_tests(test_file);
ASSERT_TRUE(if_tests.is_open());
std::ofstream of_result(tmp_file);
ASSERT_TRUE(of_result.is_open());
test::clp.sql_mode = DEFAULT_ORACLE_MODE | SMO_ORACLE;
set_compat_mode(oceanbase::lib::Worker::CompatMode::ORACLE);
ASSERT_NO_FATAL_FAILURE(parse_keyword(if_tests, of_result, false));
of_result.close();
// verify results
is_equal_content(tmp_file,result_file);
}
void TestParser::parse_keyword(std::ifstream &if_tests, std::ofstream &of_result, bool is_sql_keyword)
{
std::string line;
const char* reserved_keyword_begin = "//-----------------------------reserved keyword begin-----------------------------------------------";
const char* reserved_keyword_end = "//-----------------------------reserved keyword end-------------------------------------------------";
const char* non_reserved_keyword_begin = "//-----------------------------non_reserved keyword begin-------------------------------------------";
const char* non_keyword_end = "//-----------------------------non_reserved keyword end---------------------------------------------";
bool test_reserved_keyword = false;
bool test_non_reserved_keyword = false;
int64_t num_reserved_keyword = 0;
while (std::getline(if_tests, line)) {
if (strncmp(line.c_str(), reserved_keyword_begin, strlen(reserved_keyword_begin)) == 0) {
of_result << "************** Begin Test Reserved Keyword ***************" << std::endl;
test_reserved_keyword = true;
continue;
} else if (strncmp(line.c_str(), reserved_keyword_end, strlen(reserved_keyword_end)) == 0) {
of_result << "************** Total Count of Reserved Keyword:" << num_reserved_keyword <<" ***************" << std::endl;
of_result << "************** End Test Reserved Keyword ***************" << std::endl;
test_reserved_keyword = false;
continue;
} else if (strncmp(line.c_str(), non_reserved_keyword_begin, strlen(non_reserved_keyword_begin)) == 0) {
of_result << "************** Begin Test Non-Reserved Keyword ***************" << std::endl;
test_non_reserved_keyword = true;
continue;
} else if (strncmp(line.c_str(), non_keyword_end, strlen(non_keyword_end)) == 0) {
of_result << "************** End Test Non-Reserved Keyword ***************" << std::endl;
break;
} else if (!test_reserved_keyword && !test_non_reserved_keyword) {
continue;
}
int64_t line_size = strlen(line.c_str());
char *tmp_buf = NULL;
if (NULL == (tmp_buf = static_cast<char*>(allocator_.alloc(line_size + 1)))) {
fprintf(stderr, "failed to alloc memory for: %s\n", line.c_str());
break;
} else {
MEMSET(tmp_buf, '\0', line_size + 1);
int64_t valid_buf_len = 0;
for (int64_t i = 0; i < line_size; ++i) {
if (isspace(line.c_str()[i])) {
if (valid_buf_len > 0 && valid_buf_len <= line_size) {
tmp_buf[valid_buf_len] = '\0';
if ((is_sql_keyword && (test::clp.sql_mode & SMO_ORACLE) && strcmp(tmp_buf, "FILE_KEY") == 0) ||
(!is_sql_keyword && (test::clp.sql_mode & SMO_ORACLE) && strcmp(tmp_buf, "BEGIN_KEY") == 0) ||
(!is_sql_keyword && (test::clp.sql_mode & SMO_ORACLE) && strcmp(tmp_buf, "END_KEY") == 0)) {
valid_buf_len -= 4;//FILE_KEY ==> FILE、BEGIN_KEY==> DEGIN、END_KEY==> END
tmp_buf[valid_buf_len] = '\0';
} else if ((is_sql_keyword && (test::clp.sql_mode & SMO_ORACLE) && strcmp(tmp_buf, "INITIAL_") == 0) ||
(!is_sql_keyword && (test::clp.sql_mode & SMO_ORACLE) && strcmp(tmp_buf, "NULLX") == 0)) {
valid_buf_len -= 1;//INITIAL_ ==> INITIAL、NULLX==>NULL
tmp_buf[valid_buf_len] = '\0';
}
ASSERT_NO_FATAL_FAILURE(do_parse_keyword(tmp_buf, of_result, test_reserved_keyword, is_sql_keyword));
valid_buf_len = 0;
if (test_reserved_keyword) {
++ num_reserved_keyword;
}
}
} else if (line.c_str()[i] == '/' && i < line_size - 1 && line.c_str()[i + 1] == '*') {
i = i + 2;
while (i < line_size) {
if (line.c_str()[i] == '*' && i < line_size - 1 && line.c_str()[i + 1] == '/') {
i = i + 2;
break;
}
++ i;
}
} else if (valid_buf_len < line_size) {
tmp_buf[valid_buf_len++] = line.c_str()[i];
}
}
if (valid_buf_len > 0 && valid_buf_len <= line_size) {
tmp_buf[valid_buf_len] = '\0';
if ((is_sql_keyword && (test::clp.sql_mode & SMO_ORACLE) && strcmp(tmp_buf, "FILE_KEY") == 0) ||
(!is_sql_keyword && (test::clp.sql_mode & SMO_ORACLE) && strcmp(tmp_buf, "BEGIN_KEY") == 0) ||
(!is_sql_keyword && (test::clp.sql_mode & SMO_ORACLE) && strcmp(tmp_buf, "END_KEY") == 0)) {
valid_buf_len -= 4;//FILE_KEY ==> FILE、BEGIN_KEY==> DEGIN、END_KEY==> END
tmp_buf[valid_buf_len] = '\0';
} else if ((is_sql_keyword && (test::clp.sql_mode & SMO_ORACLE) && strcmp(tmp_buf, "INITIAL_") == 0) ||
(!is_sql_keyword && (test::clp.sql_mode & SMO_ORACLE) && strcmp(tmp_buf, "NULLX") == 0)) {
valid_buf_len -= 1;//INITIAL_ ==> INITIAL、NULLX==>NULL
tmp_buf[valid_buf_len] = '\0';
}
ASSERT_NO_FATAL_FAILURE(do_parse_keyword(tmp_buf, of_result, test_reserved_keyword, is_sql_keyword));
valid_buf_len = 0;
if (test_reserved_keyword) {
++ num_reserved_keyword;
}
}
}
}
}
//reserved keyword test: create table table_name(column_name int);
//non_reserved keyword test: create table table_name(column_name int)
// select 1 alias_name from t1 alias_name;
void TestParser::do_parse_keyword(const char *keyword, std::ofstream &of_result, bool is_reserved, bool is_sql_keyword)
{
char *buf = NULL;
int64_t buf_len = strlen(keyword) * 2 + 1024;
if (NULL == (buf = static_cast<char*>(allocator_.alloc(buf_len)))) {
fprintf(stderr, "failed to alloc memory for: %s\n", keyword);
} else if (is_sql_keyword) {
sprintf(buf, "create table %s(%s int);", keyword, keyword);
if (is_reserved) {
of_result << "Reserved Keyword: "<< keyword << std::endl;
of_result << "Test Table Name and Column Name Sql:" << buf << std::endl;
}
} else if (test::clp.sql_mode & SMO_ORACLE) {
sprintf(buf, "create type %s as table of varchar2(1);", keyword);
if (is_reserved) {
of_result << "Reserved Keyword: "<< keyword << std::endl;
of_result << "Test PL type name Sql:" << buf << std::endl;
}
} else {
sprintf(buf, "create procedure %s () select 1;", keyword);
if (is_reserved) {
of_result << "Reserved Keyword: "<< keyword << std::endl;
of_result << "Test PL procedure name Sql:" << buf << std::endl;
}
}
ObString query = ObString::make_string(buf);
int ret = OB_SUCCESS;
_OB_LOG(INFO, "test keyword to be name: %s", buf);
ObSQLMode mode = test::clp.sql_mode;
ObParser parser(allocator_, mode);
ParseResult parse_result;
ret = parser.parse(query, parse_result);
if ((is_reserved && ret != 0) ||
(!is_reserved && ret == 0)) {
ret = OB_SUCCESS;
} else if (!is_reserved && is_sql_keyword && (test::clp.sql_mode & SMO_ORACLE) && strcmp(keyword, "CONSTRAINT") == 0) {
ret = OB_SUCCESS;
} else if ((is_reserved && !is_sql_keyword && (test::clp.sql_mode & SMO_ORACLE) && strcmp(keyword, "EXISTS") == 0) ||
(is_reserved && !is_sql_keyword && (test::clp.sql_mode & SMO_ORACLE) && strcmp(keyword, "SET") == 0)) {
ret = OB_SUCCESS;
} else if (!is_reserved && !is_sql_keyword && non_reserved_keyword_can_not_be_name(keyword, is_sql_keyword)) {
ret = OB_SUCCESS;
} else {
fprintf(stderr, "test keyword to be name failed:%s\n", buf);
}
ASSERT_EQ(OB_SUCCESS, -ret);
if (!is_reserved && is_sql_keyword) {
sprintf(buf, "select 1 %s from t1 %s;", keyword, keyword);
query = ObString::make_string(buf);
_OB_LOG(INFO, "test keyword to alias name: %s", buf);
ret = parser.parse(query, parse_result);
if (ret != 0) {
if (non_reserved_keyword_can_not_be_name(keyword, is_sql_keyword)) {
ret = 0;
} else {
fprintf(stderr, "test keyword to alias name failed:%s\n", buf);
}
}
}
ASSERT_EQ(OB_SUCCESS, -ret);
parser.free_result(parse_result);
}
bool TestParser::non_reserved_keyword_can_not_be_name(const char *keyword, bool is_sql_keyword)
{
bool ret = false;
if (is_sql_keyword) {
if (test::clp.sql_mode & SMO_ORACLE) {
if (strcmp(keyword, "USING") == 0 ||
strcmp(keyword, "BULK") == 0 ||
strcmp(keyword, "COLLATE") == 0 ||
strcmp(keyword, "CROSS") == 0 ||
strcmp(keyword, "FULL") == 0 ||
strcmp(keyword, "INNER") == 0 ||
strcmp(keyword, "JOIN") == 0 ||
strcmp(keyword, "LOG") == 0 ||
strcmp(keyword, "LEFT") == 0 ||
strcmp(keyword, "NATURAL") == 0 ||
strcmp(keyword, "RETURN") == 0 ||
strcmp(keyword, "RIGHT") == 0 ||
strcmp(keyword, "RETURNING") == 0) {
ret = true;
}
} else if (strcmp(keyword, "EXCEPT") == 0 ||
strcmp(keyword, "INTERSECT") == 0 ||
strcmp(keyword, "MINUS") == 0 ||
strcmp(keyword, "MEMBER") == 0 ||
strcmp(keyword, "SOUNDS") == 0 ||
strcmp(keyword, "WINDOW") == 0) {
ret = true;
}
} else {
if (test::clp.sql_mode & SMO_ORACLE) {
if (strcmp(keyword, "CHARACTER") == 0 ||
strcmp(keyword, "CONSTANT") == 0 ||
strcmp(keyword, "DATE") == 0 ||
strcmp(keyword, "FLOAT") == 0 ||
strcmp(keyword, "LOOP") == 0 ||
strcmp(keyword, "NUMBER") == 0 ||
strcmp(keyword, "RAW") == 0 ||
strcmp(keyword, "REAL") == 0 ||
strcmp(keyword, "VARCHAR") == 0 ||
strcmp(keyword, "VARCHAR2") == 0) {
ret = true;
}
}
}
return ret;
}
void TestParser::do_parse(const char *query_str, std::ofstream &of_result, int64_t expect_error) {
ObSQLMode mode = test::clp.sql_mode;
ObParser parser(allocator_, mode);
@ -327,9 +607,11 @@ bool TestParser::pretreat_cmd(std::string line, int64_t &expect_error)
if (strncmp(p, "oracle", strlen("oracle")) == 0) {
OB_LOG(INFO, "switch parser sql_mode to oracle");
test::clp.sql_mode = DEFAULT_ORACLE_MODE | SMO_ORACLE;
set_compat_mode(oceanbase::lib::Worker::CompatMode::ORACLE);
} else if (strncmp(p, "mysql", strlen("mysql")) == 0) {
OB_LOG(INFO, "switch parser sql_mode to mysql");
test::clp.sql_mode = DEFAULT_MYSQL_MODE;
set_compat_mode(oceanbase::lib::Worker::CompatMode::MYSQL);
}
skip_cmd = true;
UNUSED(w);

File diff suppressed because it is too large Load Diff

View File

@ -20,11 +20,11 @@ commit;
commit/*hint+commit*/;
commit work;
commit/*hint+commit work*/ work;
#--sql_mode oracle
#commit comment 'comment transaction commit';
#commit work comment 'comment txn commit work';
#commit/*hint+commit tx hint*/ comment 'comment + hint';
#commit/*hint+commit tx work hint*/ work comment 'comment + hint';
--sql_mode oracle
commit comment 'comment transaction commit';
commit work comment 'comment txn commit work';
commit/*hint+commit tx hint*/ comment 'comment + hint';
commit/*hint+commit tx work hint*/ work comment 'comment + hint';
--sql_mode mysql
rollback;
rollback/*hint+rollback*/;
@ -293,12 +293,12 @@ select unique distinct( max(c1)), c2 from t1;
select unique(*) from t1;
########################## test for returning ###################################
#--sql_mode oracle
#delete from t1 where c1 = 1 returning c1 + 1, c2 * 2;
#update t1 set c1 = 1 where c2 = 2 returning c1, c2 + 3, c3 * c4;
#insert into t1 values(1, 2, 3) returning c1, c2, c3;
#--error 5001
#replace into t1 values(1, 2) returning c1, c2, c3, c4, c5, c6;
--sql_mode oracle
delete from t1 where c1 = 1 returning c1 + 1, c2 * 2;
update t1 set c1 = 1 where c2 = 2 returning c1, c2 + 3, c3 * c4;
insert into t1 values(1, 2, 3) returning c1, c2, c3;
--error 5001
replace into t1 values(1, 2) returning c1, c2, c3, c4, c5, c6;
############# tablegroup ##################
--sql_mode mysql
alter tablegroup tg2 add table t1,t2;