diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result
index 8483f6dc6646e89b99fe803178b44ee3db052b99..fb544ccd8de6da07e8037a0acb6a04a6eec293cc 100644
--- a/mysql-test/r/sp-error.result
+++ b/mysql-test/r/sp-error.result
@@ -1147,3 +1147,19 @@ show procedure status;
 Db	Name	Type	Definer	Modified	Created	Security_type	Comment
 test	 bug15658	PROCEDURE	root@localhost	0000-00-00 00:00:00	0000-00-00 00:00:00	DEFINER	
 drop procedure ` bug15658`;
+drop function if exists bug14270;
+drop table if exists t1;
+create table t1 (s1 int primary key);
+create function bug14270() returns int
+begin
+load index into cache t1;
+return 1;
+end|
+ERROR 0A000: Not allowed to return a result set from a function
+create function bug14270() returns int
+begin
+cache index t1 key (`primary`) in keycache1;
+return 1;
+end|
+ERROR 0A000: Not allowed to return a result set from a function
+drop table t1;
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index 25944144d218521949d9a36b8ae062eeada4a4a9..22cc325f55ea85fd19ad6871c848597341fc9c67 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -1643,6 +1643,35 @@ show procedure status;
 drop procedure ` bug15658`;
 
 
+#
+# BUG#14270: Stored procedures: crash if load index
+#
+--disable_warnings
+drop function if exists bug14270;
+drop table if exists t1;
+--enable_warnings
+
+create table t1 (s1 int primary key);
+
+delimiter |;
+--error ER_SP_NO_RETSET
+create function bug14270() returns int
+begin
+  load index into cache t1;
+  return 1;
+end|
+
+--error ER_SP_NO_RETSET
+create function bug14270() returns int
+begin
+  cache index t1 key (`primary`) in keycache1;
+  return 1;
+end|
+delimiter ;|
+
+drop table t1;
+
+
 #
 # BUG#NNNN: New bug synopsis
 #