diff --git a/mysql-test/r/default.result b/mysql-test/r/default.result
index c0e786d9876b0cb569f9e355b3b5526fa8d5624b..3b1912f4a55b551167fca6273f63735a844c98bf 100644
--- a/mysql-test/r/default.result
+++ b/mysql-test/r/default.result
@@ -547,7 +547,7 @@ CALL p1;
 ERROR 42S22: Unknown column 'par' in 'DEFAULT'
 DROP PROCEDURE p1;
 CREATE TABLE t1 (a INT DEFAULT VALUE(a));
-ERROR HY000: Function or expression 'values()' cannot be used in the DEFAULT clause of `a`
+ERROR HY000: Function or expression 'value()' cannot be used in the DEFAULT clause of `a`
 CREATE TABLE t1 (a INT);
 CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW CREATE TABLE t2 (a INT DEFAULT NEW.a);
 ERROR HY000: Function or expression 'NEW.a' cannot be used in the DEFAULT clause of `a`
diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result
index 2c86e6c3e7371ac9d85e46ef8519c64cffade264..b36f995d32feeb772b99b9890b9340ae7101e9f4 100644
--- a/mysql-test/suite/funcs_1/r/storedproc.result
+++ b/mysql-test/suite/funcs_1/r/storedproc.result
@@ -2775,7 +2775,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
 SELECT * from t1 where f2=f1' at line 1
 CREATE PROCEDURE values()
 SELECT * from t1 where f2=f1;
-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 'values()
+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 '()
 SELECT * from t1 where f2=f1' at line 1
 CREATE PROCEDURE varbinary()
 SELECT * from t1 where f2=f1;
@@ -5596,7 +5596,7 @@ CREATE PROCEDURE sp1()
 values:BEGIN
 SELECT @x;
 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 'values:BEGIN
+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 ':BEGIN
 SELECT @x;
 END' at line 2
 DROP PROCEDURE IF EXISTS sp1;
@@ -9150,7 +9150,7 @@ CREATE PROCEDURE sp1()
 BEGIN
 declare values char;
 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 'values char;
+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 'char;
 END' at line 3
 DROP PROCEDURE IF EXISTS sp1;
 Warnings:
@@ -11494,8 +11494,9 @@ BEGIN
 declare values condition for sqlstate '02000';
 declare exit handler for values set @var2 = 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 'values condition for sqlstate '02000';
-declare exit handler for values set @var2' at line 3
+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 'condition for sqlstate '02000';
+declare exit handler for values set @var2 = 1;
+E' at line 3
 DROP PROCEDURE IF EXISTS sp1;
 Warnings:
 Note	1305	PROCEDURE db_storedproc.sp1 does not exist
@@ -13608,7 +13609,7 @@ CREATE PROCEDURE sp1( )
 BEGIN
 declare values handler for sqlstate '02000' set @var2 = 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 'values handler for sqlstate '02000' set @var2 = 1;
+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 'handler for sqlstate '02000' set @var2 = 1;
 END' at line 3
 DROP PROCEDURE IF EXISTS sp1;
 Warnings:
diff --git a/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc b/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc
index 88091ce42a419217cb70924b1bad7096d027e1b0..9435551ce6fb2b3f8d1ed64e763b8946061288ec 100644
--- a/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc
+++ b/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc
@@ -111,7 +111,7 @@ create table t1 (a int, b int generated always as (sleep(a)) virtual);
 
 --echo # VALUES()
 -- error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
-create table t1 (a varchar(1024), b varchar(1024) generated always as (values(a)) virtual);
+create table t1 (a varchar(1024), b varchar(1024) generated always as (value(a)) virtual);
 
 --echo # Stored procedures
 
diff --git a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result
index 27270654e9bb87d176ab924f3ac8020c99773830..fa8f2660aef854ab0171a7d56e9a66dd9604553d 100644
--- a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result
@@ -70,8 +70,8 @@ ERROR HY000: Function or expression 'row_count()' cannot be used in the GENERATE
 create table t1 (a int, b int generated always as (sleep(a)) virtual);
 ERROR HY000: Function or expression 'sleep()' cannot be used in the GENERATED ALWAYS AS clause of `b`
 # VALUES()
-create table t1 (a varchar(1024), b varchar(1024) generated always as (values(a)) virtual);
-ERROR HY000: Function or expression 'values()' cannot be used in the GENERATED ALWAYS AS clause of `b`
+create table t1 (a varchar(1024), b varchar(1024) generated always as (value(a)) virtual);
+ERROR HY000: Function or expression 'value()' cannot be used in the GENERATED ALWAYS AS clause of `b`
 # Stored procedures
 create procedure p1()
 begin
diff --git a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result
index 24fd3b988c2449085d7601bbfc0f5fc8da58177f..b777bb485de4f434d90d24364ced6949b4c1df7c 100644
--- a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result
@@ -72,8 +72,8 @@ ERROR HY000: Function or expression 'row_count()' cannot be used in the GENERATE
 create table t1 (a int, b int generated always as (sleep(a)) virtual);
 ERROR HY000: Function or expression 'sleep()' cannot be used in the GENERATED ALWAYS AS clause of `b`
 # VALUES()
-create table t1 (a varchar(1024), b varchar(1024) generated always as (values(a)) virtual);
-ERROR HY000: Function or expression 'values()' cannot be used in the GENERATED ALWAYS AS clause of `b`
+create table t1 (a varchar(1024), b varchar(1024) generated always as (value(a)) virtual);
+ERROR HY000: Function or expression 'value()' cannot be used in the GENERATED ALWAYS AS clause of `b`
 # Stored procedures
 create procedure p1()
 begin
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
index 5f09f1c26f882521fe90fce9a424214ff7e4075b..ab019da30e09fa00affbbf81b99c4b66ee0a0313 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
@@ -287,6 +287,19 @@
  NUMERIC_BLOCK_SIZE	4096
  ENUM_VALUE_LIST	NULL
  READ_ONLY	NO
+@@ -1556,10 +1556,10 @@
+ GLOBAL_VALUE_ORIGIN	COMPILE-TIME
+ DEFAULT_VALUE	10000
+ VARIABLE_SCOPE	SESSION
+-VARIABLE_TYPE	BIGINT UNSIGNED
++VARIABLE_TYPE	INT UNSIGNED
+ VARIABLE_COMMENT	The minimum number of scalar elements in the value list of IN predicate that triggers its conversion to IN subquery
+ NUMERIC_MIN_VALUE	0
+-NUMERIC_MAX_VALUE	18446744073709551615
++NUMERIC_MAX_VALUE	4294967295
+ NUMERIC_BLOCK_SIZE	1
+ ENUM_VALUE_LIST	NULL
+ READ_ONLY	NO
 @@ -1639,7 +1639,7 @@
  GLOBAL_VALUE_ORIGIN	COMPILE-TIME
  DEFAULT_VALUE	86400
@@ -1267,3 +1280,12 @@
  VARIABLE_COMMENT	Size of transaction coordinator log.
  ENUM_VALUE_LIST	NULL
  READ_ONLY	YES
+@@ -5422,7 +5422,7 @@
+ VARIABLE_TYPE	BIGINT UNSIGNED
+ VARIABLE_COMMENT	Sets the internal state of the RAND() generator for replication purposes
+ NUMERIC_MIN_VALUE	0
+-NUMERIC_MAX_VALUE	18446744073709551615
++NUMERIC_MAX_VALUE	4294967295
+ NUMERIC_BLOCK_SIZE	1
+ ENUM_VALUE_LIST	NULL
+ READ_ONLY	NO
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
index 0cc7df1bfa62fe5ad874b00e0424eca6aaeaef94..d457169f5308cecd08a8e275d4dd63e92ba436f2 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -1424,6 +1424,20 @@ NUMERIC_BLOCK_SIZE	1
 ENUM_VALUE_LIST	NULL
 READ_ONLY	NO
 COMMAND_LINE_ARGUMENT	REQUIRED
+VARIABLE_NAME	IN_SUBQUERY_CONVERSION_THRESHOLD
+SESSION_VALUE	10000
+GLOBAL_VALUE	10000
+GLOBAL_VALUE_ORIGIN	COMPILE-TIME
+DEFAULT_VALUE	10000
+VARIABLE_SCOPE	SESSION
+VARIABLE_TYPE	BIGINT UNSIGNED
+VARIABLE_COMMENT	The minimum number of scalar elements in the value list of IN predicate that triggers its conversion to IN subquery
+NUMERIC_MIN_VALUE	0
+NUMERIC_MAX_VALUE	18446744073709551615
+NUMERIC_BLOCK_SIZE	1
+ENUM_VALUE_LIST	NULL
+READ_ONLY	NO
+COMMAND_LINE_ARGUMENT	OPTIONAL
 VARIABLE_NAME	IN_TRANSACTION
 SESSION_VALUE	0
 GLOBAL_VALUE	NULL
diff --git a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result
index 2d5bcfe553d6c1f626d13fc46d2402ac5f8c6d5e..19e8efb06ad2865ebbd7e19dd254dcd30d79f8c8 100644
--- a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result
+++ b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result
@@ -127,8 +127,8 @@ ERROR HY000: Function or expression 'uuid_short()' cannot be used in the GENERAT
 create or replace table t1 (a varchar(1024) as (uuid()) PERSISTENT);
 ERROR HY000: Function or expression 'uuid()' cannot be used in the GENERATED ALWAYS AS clause of `a`
 # VALUES()
-create or replace table t1 (a varchar(1024), b varchar(1024) as (values(a)));
-ERROR HY000: Function or expression 'values()' cannot be used in the GENERATED ALWAYS AS clause of `b`
+create or replace table t1 (a varchar(1024), b varchar(1024) as (value(a)));
+ERROR HY000: Function or expression 'value()' cannot be used in the GENERATED ALWAYS AS clause of `b`
 # VERSION()
 create or replace table t1 (a varchar(1024), b varchar(1024) as (version()) PERSISTENT);
 ERROR HY000: Function or expression 'version()' cannot be used in the GENERATED ALWAYS AS clause of `b`
diff --git a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc
index 37de02a2b2973bfe89e0db6d4a972d0df308584c..52324176694b54c66517d26fd4d19e1816efed1f 100644
--- a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc
+++ b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc
@@ -187,7 +187,7 @@ create or replace table t1 (a varchar(1024) as (uuid()) PERSISTENT);
 
 --echo # VALUES()
 -- error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
-create or replace table t1 (a varchar(1024), b varchar(1024) as (values(a)));
+create or replace table t1 (a varchar(1024), b varchar(1024) as (value(a)));
 
 --echo # VERSION()
 -- error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
diff --git a/sql/item.h b/sql/item.h
index 9f76f0815621d1ef397b7885840dfd312635f821..c7ef5202389d7d3205efc92e46d40d955c442ec3 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -5506,7 +5506,7 @@ class Item_insert_value : public Item_field
   bool update_vcol_processor(void *arg) { return 0; }
   bool check_vcol_func_processor(void *arg)
   {
-    return mark_unsupported_function("values()", arg, VCOL_IMPOSSIBLE);
+    return mark_unsupported_function("value()", arg, VCOL_IMPOSSIBLE);
   }
 };
 
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 71172dd92a063c1118ed01a756d8c81849bcc4a4..2cb46deaafc036226a999dfb443c6e18d8a43c61 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -2302,6 +2302,7 @@ class Item_func_in :public Item_func_opt_neg,
   Item_func_in(THD *thd, List<Item> &list):
     Item_func_opt_neg(thd, list),
     Predicant_to_list_comparator(thd, arg_count - 1),
+    transform_into_subq(false),
     array(0), have_null(0),
     arg_types_compatible(FALSE), emb_on_expr_nest(0)
   { }
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 3d7e5a6c7a614d87e48c853307a9211025cdc663..7fc8fe05e86bca09464cc94e48e1c1ef1637c8e9 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -5790,6 +5790,8 @@ static Sys_var_mybool Sys_session_track_state_change(
        ON_CHECK(0),
        ON_UPDATE(update_session_track_state_change));
 
+#endif //EMBEDDED_LIBRARY
+
 static Sys_var_ulong Sys_in_subquery_conversion_threshold(
        "in_subquery_conversion_threshold",
        "The minimum number of scalar elements in the value list of "
@@ -5797,4 +5799,3 @@ static Sys_var_ulong Sys_in_subquery_conversion_threshold(
        SESSION_VAR(in_subquery_conversion_threshold), CMD_LINE(OPT_ARG),
        VALID_RANGE(0, ULONG_MAX), DEFAULT(10000), BLOCK_SIZE(1));
 
-#endif //EMBEDDED_LIBRARY