@@ -109,7 +109,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
create table SUM (a int);
drop table SUM;
create table SYSDATE(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SYSDATE(a int)' at line 1
DROP TABLE SYSDATE;
create table SYSDATE (a int);
drop table SYSDATE;
create table SYSTEM_USER(a int);
...
...
@@ -246,9 +246,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
create table SUM (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SUM (a int)' at line 1
create table SYSDATE(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SYSDATE(a int)' at line 1
DROP TABLE SYSDATE;
create table SYSDATE (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SYSDATE (a int)' at line 1
DROP TABLE SYSDATE;
create table SYSTEM_USER(a int);
drop table SYSTEM_USER;
create table SYSTEM_USER (a int);
...
...
@@ -2128,5 +2128,44 @@ Warnings:
Note 1003 (select `test`.`t1`.`x` AS `x` from `test`.`t1` limit 1)
drop table t1;
#
# MDEV-19682 sql_mode="oracle" does not support sysdate
#
SELECT sysdate LIKE '____-__-__ __:__:__';
ERROR 42S22: Unknown column 'sysdate' in 'field list'
SELECT sysdate = sysdate();
ERROR 42S22: Unknown column 'sysdate' in 'field list'
SELECT sysdate = sysdate(0);
ERROR 42S22: Unknown column 'sysdate' in 'field list'
CREATE DATABASE sysdate;
DROP DATABASE sysdate;
CREATE TABLE sysdate (a INT);
DROP TABLE sysdate;
CREATE TABLE t1 (sysdate INT);
DROP TABLE t1;
CREATE FUNCTION sysdate() RETURNS INT
BEGIN
RETURN 1;
END;
$$
Warnings:
Note 1585 This function 'sysdate' has the same name as a native function
@@ -806,3 +806,65 @@ ERROR HY000: Unknown data type: 'BEGIN'
#
# End of 10.5 tests
#
#
# Start of 10.6 tests
#
#
# MDEV-19682 sql_mode="oracle" does not support sysdate
#
SELECT sysdate LIKE '____-__-__ __:__:__';
sysdate LIKE '____-__-__ __:__:__'
1
SELECT sysdate = sysdate();
sysdate = sysdate()
1
SELECT sysdate = sysdate(0);
sysdate = sysdate(0)
1
CREATE DATABASE sysdate;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sysdate' at line 1
CREATE TABLE sysdate (a INT);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sysdate (a INT)' at line 1
CREATE TABLE t1 (sysdate INT);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sysdate INT)' at line 1
CREATE TABLE t1 (a sysdate);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sysdate)' at line 1
CREATE FUNCTION sysdate RETURN INT AS
BEGIN
RETURN 1;
END;
$$
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sysdate RETURN INT AS
BEGIN
RETURN 1;
END' at line 1
CREATE FUNCTION sysdate() RETURN INT AS
BEGIN
RETURN 1;
END;
$$
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sysdate() RETURN INT AS
BEGIN
RETURN 1;
END' at line 1
DECLARE
sysdate INT := 10;
BEGIN
NULL;
END;
$$
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sysdate INT := 10;
BEGIN
NULL;
END' at line 2
BEGIN
<<sysdate>>
NULL;
END;
$$
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sysdate>>