diff --git a/mysql-test/suite/compat/oracle/r/func_substr.result b/mysql-test/suite/compat/oracle/r/func_substr.result
index eca5f48..ec1c12f 100644
--- a/mysql-test/suite/compat/oracle/r/func_substr.result
+++ b/mysql-test/suite/compat/oracle/r/func_substr.result
@@ -22,19 +22,43 @@ SUBSTR('abc',2,null)	SUBSTR('abc',1,null)	SUBSTR('abc',0,null)
 NULL	NULL	NULL
 SELECT SUBSTR('abc',2,0),SUBSTR('abc',1,0), SUBSTR('abc',0,0) FROM dual;
 SUBSTR('abc',2,0)	SUBSTR('abc',1,0)	SUBSTR('abc',0,0)
-		
-create table t1 (c1 varchar(10),start integer, length integer);
+NULL	NULL	NULL
+SELECT SUBSTR('abc',2,-1),SUBSTR('abc',1,-1), SUBSTR('abc',0,-1) FROM dual;
+SUBSTR('abc',2,-1)	SUBSTR('abc',1,-1)	SUBSTR('abc',0,-1)
+NULL	NULL	NULL
+SELECT SUBSTR(SPACE(0),1) FROM DUAL;
+SUBSTR(SPACE(0),1)
+NULL
+CREATE TABLE t1 (c1 VARCHAR(10),start INTEGER, length INTEGER);
 INSERT INTO t1 VALUES ('abc', 1, 1);
 INSERT INTO t1 VALUES ('abc', 0, 1);
 INSERT INTO t1 VALUES (null, 1, 1);
 INSERT INTO t1 VALUES (null, 0, 1);
-select substr(c1,start,length) from t1;
-substr(c1,start,length)
+INSERT INTO t1 VALUES ('abc', 1, 0);
+INSERT INTO t1 VALUES ('abc', 0, 0);
+INSERT INTO t1 VALUES (null, 1, 0);
+INSERT INTO t1 VALUES (null, 0, 0);
+INSERT INTO t1 VALUES ('abc', 1, -1);
+INSERT INTO t1 VALUES ('abc', 0, -1);
+INSERT INTO t1 VALUES (null, 1, -1);
+INSERT INTO t1 VALUES (null, 0, -1);
+INSERT INTO t1 VALUES (SPACE(0), 0, 1);
+SELECT SUBSTR(c1,start,length) FROM t1;
+SUBSTR(c1,start,length)
 a
 a
 NULL
 NULL
-drop table t1;
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+DROP TABLE t1;
 EXPLAIN EXTENDED SELECT SUBSTR('abc',2,1) ;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
diff --git a/mysql-test/suite/compat/oracle/t/func_substr.test b/mysql-test/suite/compat/oracle/t/func_substr.test
index 5d5ec78..332469f 100644
--- a/mysql-test/suite/compat/oracle/t/func_substr.test
+++ b/mysql-test/suite/compat/oracle/t/func_substr.test
@@ -1,5 +1,6 @@
 #
 # MDEV-14012 - sql_mode=Oracle: substr(): treat position 0 as position 1
+# MDEV-10574 - sql_mode=Oracle: return null insteaf of empty string
 #
 
 SET sql_mode=ORACLE;
@@ -11,14 +12,26 @@ SELECT SUBSTR('abc',-2,1),SUBSTR('abc',-1,1), SUBSTR('abc',-0,1) FROM dual;
 SELECT SUBSTR('abc',null) FROM dual;
 SELECT SUBSTR('abc',2,null),SUBSTR('abc',1,null), SUBSTR('abc',0,null) FROM dual;
 SELECT SUBSTR('abc',2,0),SUBSTR('abc',1,0), SUBSTR('abc',0,0) FROM dual;
+SELECT SUBSTR('abc',2,-1),SUBSTR('abc',1,-1), SUBSTR('abc',0,-1) FROM dual;
+SELECT SUBSTR(SPACE(0),1) FROM DUAL;
 
-create table t1 (c1 varchar(10),start integer, length integer);
+CREATE TABLE t1 (c1 VARCHAR(10),start INTEGER, length INTEGER);
 INSERT INTO t1 VALUES ('abc', 1, 1);
 INSERT INTO t1 VALUES ('abc', 0, 1);
 INSERT INTO t1 VALUES (null, 1, 1);
 INSERT INTO t1 VALUES (null, 0, 1);
-select substr(c1,start,length) from t1;
-drop table t1;
+INSERT INTO t1 VALUES ('abc', 1, 0);
+INSERT INTO t1 VALUES ('abc', 0, 0);
+INSERT INTO t1 VALUES (null, 1, 0);
+INSERT INTO t1 VALUES (null, 0, 0);
+INSERT INTO t1 VALUES ('abc', 1, -1);
+INSERT INTO t1 VALUES ('abc', 0, -1);
+INSERT INTO t1 VALUES (null, 1, -1);
+INSERT INTO t1 VALUES (null, 0, -1);
+INSERT INTO t1 VALUES (SPACE(0), 0, 1);
+
+SELECT SUBSTR(c1,start,length) FROM t1;
+DROP TABLE t1;
 
 EXPLAIN EXTENDED SELECT SUBSTR('abc',2,1) ;
 
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 49f82f7..a68e38e 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -35,7 +35,7 @@ class Item_str_func :public Item_func
      character set. No memory is allocated.
      @retval A pointer to the str_value member.
    */
-  String *make_empty_result()
+  virtual String *make_empty_result()
   {
     /*
       Reset string length to an empty string. We don't use str_value.set() as
@@ -521,6 +521,8 @@ class Item_func_substr_oracle :public Item_func_substr
 protected:
   longlong get_position()
   { longlong pos= args[1]->val_int(); return pos == 0 ? 1 : pos; }
+  String *make_empty_result()
+  { null_value= 1; return NULL; }
 public:
   Item_func_substr_oracle(THD *thd, Item *a, Item *b):
     Item_func_substr(thd, a, b) {}
