summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2018-04-03 18:08:30 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2018-04-03 18:08:30 +0300
commit6a72b9096a9aa793571159ca9aa8fbc7fdf743b1 (patch)
treed02fcab11100ed4605c9cbb336b323e6805b59db
parent8ffbb825e6a09d3055f46ed4b456573aef5c474c (diff)
parentf5369faf5bbfb56b5e945836eb3f7c7ee88b4079 (diff)
downloadmariadb-git-6a72b9096a9aa793571159ca9aa8fbc7fdf743b1.tar.gz
Merge branch '5.5' into 10.0
-rw-r--r--mysql-test/r/func_misc.result11
-rw-r--r--mysql-test/r/parser.result7
-rw-r--r--mysql-test/r/view.result197
-rw-r--r--mysql-test/t/func_misc.test11
-rw-r--r--mysql-test/t/parser.test9
-rw-r--r--mysql-test/t/view.test196
-rw-r--r--mysys/my_addr_resolve.c2
-rw-r--r--sql-common/client.c4
-rw-r--r--sql/item_strfunc.h1
-rw-r--r--sql/sql_yacc.yy5
-rw-r--r--sql/table.h1
11 files changed, 441 insertions, 3 deletions
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index d54a70cab45..e3b66f24b3a 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -579,6 +579,17 @@ SELECT NAME_CONST('a', -(1)) OR 1;
NAME_CONST('a', -(1)) OR 1
1
#
+# MDEV-15630 uuid() function evaluates at wrong time in query
+#
+CREATE TABLE t1 (id INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT COUNT(1), UUID() as uid FROM t1 GROUP BY uid;
+COUNT(1) uid
+1 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+1 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+1 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+DROP TABLE t1;
+#
# End of 5.5 tests
#
#
diff --git a/mysql-test/r/parser.result b/mysql-test/r/parser.result
index cca754da295..2affbc23c5f 100644
--- a/mysql-test/r/parser.result
+++ b/mysql-test/r/parser.result
@@ -672,3 +672,10 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
PREPARE stmt FROM 'CREATE TRIGGER tr AFTER DELETE ON t1 FOR EACH ROW SET @a = 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 '\' at line 1
DROP TABLE t1;
+#
+# MDEV-15620 Crash when using "SET @@NEW.a=expr" inside a trigger
+#
+CREATE TABLE t1 (a INT);
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @@NEW.a=0;
+ERROR HY000: Unknown system variable 'NEW'
+DROP TABLE t1;
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 08b94186d77..4e3146052e9 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -5536,6 +5536,203 @@ View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select group_concat(`t1`.`str` separator '\\') AS `GROUP_CONCAT(str SEPARATOR '\\')` from `t1` latin1 latin1_swedish_ci
drop view v1;
drop table t1;
+CREATE TABLE IF NOT EXISTS t0 (f0 INT);
+CREATE TABLE IF NOT EXISTS t1 (f1 INT);
+CREATE TABLE IF NOT EXISTS t2 (f2 INT);
+CREATE TABLE IF NOT EXISTS t3 (f3 INT);
+CREATE TABLE IF NOT EXISTS t4 (f4 INT);
+CREATE TABLE IF NOT EXISTS t5 (f5 INT);
+CREATE TABLE IF NOT EXISTS t6 (f6 INT);
+CREATE TABLE IF NOT EXISTS t7 (f7 INT);
+CREATE TABLE IF NOT EXISTS t8 (f8 INT);
+CREATE TABLE IF NOT EXISTS t9 (f9 INT);
+CREATE TABLE IF NOT EXISTS t10 (f10 INT);
+CREATE TABLE IF NOT EXISTS t11 (f11 INT);
+CREATE TABLE IF NOT EXISTS t12 (f12 INT);
+CREATE TABLE IF NOT EXISTS t13 (f13 INT);
+CREATE TABLE IF NOT EXISTS t14 (f14 INT);
+CREATE TABLE IF NOT EXISTS t15 (f15 INT);
+CREATE TABLE IF NOT EXISTS t16 (f16 INT);
+CREATE TABLE IF NOT EXISTS t17 (f17 INT);
+CREATE TABLE IF NOT EXISTS t18 (f18 INT);
+CREATE TABLE IF NOT EXISTS t19 (f19 INT);
+CREATE TABLE IF NOT EXISTS t20 (f20 INT);
+CREATE TABLE IF NOT EXISTS t21 (f21 INT);
+CREATE TABLE IF NOT EXISTS t22 (f22 INT);
+CREATE TABLE IF NOT EXISTS t23 (f23 INT);
+CREATE TABLE IF NOT EXISTS t24 (f24 INT);
+CREATE TABLE IF NOT EXISTS t25 (f25 INT);
+CREATE TABLE IF NOT EXISTS t26 (f26 INT);
+CREATE TABLE IF NOT EXISTS t27 (f27 INT);
+CREATE TABLE IF NOT EXISTS t28 (f28 INT);
+CREATE TABLE IF NOT EXISTS t29 (f29 INT);
+CREATE TABLE IF NOT EXISTS t30 (f30 INT);
+CREATE TABLE IF NOT EXISTS t31 (f31 INT);
+CREATE TABLE IF NOT EXISTS t32 (f32 INT);
+CREATE TABLE IF NOT EXISTS t33 (f33 INT);
+CREATE TABLE IF NOT EXISTS t34 (f34 INT);
+CREATE TABLE IF NOT EXISTS t35 (f35 INT);
+CREATE TABLE IF NOT EXISTS t36 (f36 INT);
+CREATE TABLE IF NOT EXISTS t37 (f37 INT);
+CREATE TABLE IF NOT EXISTS t38 (f38 INT);
+CREATE TABLE IF NOT EXISTS t39 (f39 INT);
+CREATE TABLE IF NOT EXISTS t40 (f40 INT);
+CREATE TABLE IF NOT EXISTS t41 (f41 INT);
+CREATE TABLE IF NOT EXISTS t42 (f42 INT);
+CREATE TABLE IF NOT EXISTS t43 (f43 INT);
+CREATE TABLE IF NOT EXISTS t44 (f44 INT);
+CREATE TABLE IF NOT EXISTS t45 (f45 INT);
+CREATE TABLE IF NOT EXISTS t46 (f46 INT);
+CREATE TABLE IF NOT EXISTS t47 (f47 INT);
+CREATE TABLE IF NOT EXISTS t48 (f48 INT);
+CREATE TABLE IF NOT EXISTS t49 (f49 INT);
+CREATE TABLE IF NOT EXISTS t50 (f50 INT);
+CREATE TABLE IF NOT EXISTS t51 (f51 INT);
+CREATE TABLE IF NOT EXISTS t52 (f52 INT);
+CREATE TABLE IF NOT EXISTS t53 (f53 INT);
+CREATE TABLE IF NOT EXISTS t54 (f54 INT);
+CREATE TABLE IF NOT EXISTS t55 (f55 INT);
+CREATE TABLE IF NOT EXISTS t56 (f56 INT);
+CREATE TABLE IF NOT EXISTS t57 (f57 INT);
+CREATE TABLE IF NOT EXISTS t58 (f58 INT);
+CREATE TABLE IF NOT EXISTS t59 (f59 INT);
+CREATE TABLE IF NOT EXISTS t60 (f60 INT);
+CREATE OR REPLACE VIEW v60 AS SELECT * FROM t60;
+EXPLAIN
+SELECT t0.*
+FROM t0
+JOIN t1
+ON t1.f1 = t0.f0
+LEFT JOIN t2
+ON t0.f0 = t2.f2
+LEFT JOIN t3
+ON t0.f0 = t3.f3
+LEFT JOIN t4
+ON t0.f0 = t4.f4
+LEFT JOIN t5
+ON t4.f4 = t5.f5
+LEFT JOIN t6
+ON t0.f0 = t6.f6
+LEFT JOIN t7
+ON t0.f0 = t7.f7
+LEFT JOIN t8
+ON t0.f0 = t8.f8
+LEFT JOIN t9
+ON t0.f0 = t9.f9
+LEFT JOIN t10
+ON t0.f0 = t10.f10
+LEFT JOIN t11
+ON t0.f0 = t11.f11
+LEFT JOIN t12
+ON t0.f0 = t12.f12
+LEFT JOIN t13
+ON t0.f0 = t13.f13
+LEFT JOIN t14
+ON t0.f0 = t14.f14
+LEFT JOIN t15
+ON t0.f0 = t15.f15
+LEFT JOIN t16
+ON t0.f0 = t16.f16
+LEFT JOIN t17
+ON t0.f0 = t17.f17
+LEFT JOIN t18
+ON t0.f0 = t18.f18
+LEFT JOIN t19
+ON t18.f18 = t19.f19
+LEFT JOIN t20
+ON t20.f20 = t19.f19
+LEFT JOIN t21
+ON t20.f20 = t21.f21
+LEFT JOIN t22
+ON t19.f19 = t22.f22
+LEFT JOIN t23
+ON t23.f23 = t0.f0
+LEFT JOIN t24
+ON t24.f24 = t23.f23
+LEFT JOIN t25
+ON t0.f0 = t25.f25
+LEFT JOIN t26
+ON t26.f26 = t0.f0
+LEFT JOIN t27
+ON t27.f27 = t0.f0
+LEFT JOIN t28
+ON t0.f0 = t28.f28
+LEFT JOIN t29
+ON t0.f0 = t29.f29
+LEFT JOIN t30
+ON t30.f30 = t0.f0
+LEFT JOIN t31
+ON t0.f0 = t31.f31
+LEFT JOIN t32
+ON t32.f32 = t31.f31
+LEFT JOIN t33
+ON t33.f33 = t0.f0
+LEFT JOIN t34
+ON t33.f33 = t34.f34
+LEFT JOIN t35
+ON t33.f33 = t35.f35
+LEFT JOIN t36
+ON t36.f36 = t0.f0
+LEFT JOIN t37
+ON t32.f32 = t37.f37
+LEFT JOIN t38
+ON t31.f31 = t38.f38
+LEFT JOIN t39
+ON t39.f39 = t0.f0
+LEFT JOIN t40
+ON t40.f40 = t39.f39
+LEFT JOIN t41
+ON t41.f41 = t0.f0
+LEFT JOIN t42
+ON t42.f42 = t41.f41
+LEFT JOIN t43
+ON t43.f43 = t41.f41
+LEFT JOIN t44
+ON t44.f44 = t0.f0
+LEFT JOIN t45
+ON t45.f45 = t0.f0
+LEFT JOIN t46
+ON t46.f46 = t0.f0
+LEFT JOIN t47
+ON t47.f47 = t0.f0
+LEFT JOIN t48
+ON t48.f48 = t0.f0
+LEFT JOIN t49
+ON t0.f0 = t49.f49
+LEFT JOIN t50
+ON t0.f0 = t50.f50
+LEFT JOIN t51
+ON t0.f0 = t51.f51
+LEFT JOIN t52
+ON t52.f52 = t0.f0
+LEFT JOIN t53
+ON t53.f53 = t0.f0
+LEFT JOIN t54
+ON t54.f54 = t0.f0
+LEFT JOIN t55
+ON t55.f55 = t0.f0
+LEFT JOIN t56
+ON t56.f56 = t0.f0
+LEFT JOIN t57
+ON t57.f57 = t0.f0
+LEFT JOIN t58
+ON t58.f58 = t57.f57
+LEFT JOIN t59
+ON t36.f36 = t59.f59
+LEFT JOIN v60
+ON t36.f36 = v60.f60
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+drop table t0, t1, t2, t3, t4, t5, t6, t7, t8, t9,
+t10, t11, t12, t13, t14, t15, t16, t17, t18,
+t19, t20, t21, t22, t23, t24, t25, t26, t27,
+t28, t29, t30, t31, t32, t33, t34, t35, t36,
+t37, t38, t39, t40, t41, t42, t43, t44, t45,
+t46, t47, t48, t49, t50, t51, t52, t53, t54,
+t55, t56, t57, t58, t59,t60;
+drop view v60;
# -----------------------------------------------------------------
# -- End of 5.5 tests.
# -----------------------------------------------------------------
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
index dc7202268d6..271d061b192 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -607,6 +607,17 @@ SELECT NAME_CONST('a', -(1 AND 2)) OR 1;
SELECT NAME_CONST('a', -(1)) OR 1;
--echo #
+--echo # MDEV-15630 uuid() function evaluates at wrong time in query
+--echo #
+
+CREATE TABLE t1 (id INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+--replace_column 2 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+SELECT COUNT(1), UUID() as uid FROM t1 GROUP BY uid;
+DROP TABLE t1;
+
+
+--echo #
--echo # End of 5.5 tests
--echo #
diff --git a/mysql-test/t/parser.test b/mysql-test/t/parser.test
index 3058a70eefc..6a69f666a81 100644
--- a/mysql-test/t/parser.test
+++ b/mysql-test/t/parser.test
@@ -780,3 +780,12 @@ CREATE TRIGGER tr AFTER DELETE ON t1 FOR EACH ROW SET @a = 1\;
--error ER_PARSE_ERROR
PREPARE stmt FROM 'CREATE TRIGGER tr AFTER DELETE ON t1 FOR EACH ROW SET @a = 1\\';
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-15620 Crash when using "SET @@NEW.a=expr" inside a trigger
+--echo #
+
+CREATE TABLE t1 (a INT);
+--error ER_UNKNOWN_SYSTEM_VARIABLE
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @@NEW.a=0;
+DROP TABLE t1;
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index fcf95c2500f..c59eaa9d96d 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -5479,6 +5479,202 @@ SHOW CREATE VIEW v1;
drop view v1;
drop table t1;
+CREATE TABLE IF NOT EXISTS t0 (f0 INT);
+CREATE TABLE IF NOT EXISTS t1 (f1 INT);
+CREATE TABLE IF NOT EXISTS t2 (f2 INT);
+CREATE TABLE IF NOT EXISTS t3 (f3 INT);
+CREATE TABLE IF NOT EXISTS t4 (f4 INT);
+CREATE TABLE IF NOT EXISTS t5 (f5 INT);
+CREATE TABLE IF NOT EXISTS t6 (f6 INT);
+CREATE TABLE IF NOT EXISTS t7 (f7 INT);
+CREATE TABLE IF NOT EXISTS t8 (f8 INT);
+CREATE TABLE IF NOT EXISTS t9 (f9 INT);
+CREATE TABLE IF NOT EXISTS t10 (f10 INT);
+CREATE TABLE IF NOT EXISTS t11 (f11 INT);
+CREATE TABLE IF NOT EXISTS t12 (f12 INT);
+CREATE TABLE IF NOT EXISTS t13 (f13 INT);
+CREATE TABLE IF NOT EXISTS t14 (f14 INT);
+CREATE TABLE IF NOT EXISTS t15 (f15 INT);
+CREATE TABLE IF NOT EXISTS t16 (f16 INT);
+CREATE TABLE IF NOT EXISTS t17 (f17 INT);
+CREATE TABLE IF NOT EXISTS t18 (f18 INT);
+CREATE TABLE IF NOT EXISTS t19 (f19 INT);
+CREATE TABLE IF NOT EXISTS t20 (f20 INT);
+CREATE TABLE IF NOT EXISTS t21 (f21 INT);
+CREATE TABLE IF NOT EXISTS t22 (f22 INT);
+CREATE TABLE IF NOT EXISTS t23 (f23 INT);
+CREATE TABLE IF NOT EXISTS t24 (f24 INT);
+CREATE TABLE IF NOT EXISTS t25 (f25 INT);
+CREATE TABLE IF NOT EXISTS t26 (f26 INT);
+CREATE TABLE IF NOT EXISTS t27 (f27 INT);
+CREATE TABLE IF NOT EXISTS t28 (f28 INT);
+CREATE TABLE IF NOT EXISTS t29 (f29 INT);
+CREATE TABLE IF NOT EXISTS t30 (f30 INT);
+CREATE TABLE IF NOT EXISTS t31 (f31 INT);
+CREATE TABLE IF NOT EXISTS t32 (f32 INT);
+CREATE TABLE IF NOT EXISTS t33 (f33 INT);
+CREATE TABLE IF NOT EXISTS t34 (f34 INT);
+CREATE TABLE IF NOT EXISTS t35 (f35 INT);
+CREATE TABLE IF NOT EXISTS t36 (f36 INT);
+CREATE TABLE IF NOT EXISTS t37 (f37 INT);
+CREATE TABLE IF NOT EXISTS t38 (f38 INT);
+CREATE TABLE IF NOT EXISTS t39 (f39 INT);
+CREATE TABLE IF NOT EXISTS t40 (f40 INT);
+CREATE TABLE IF NOT EXISTS t41 (f41 INT);
+CREATE TABLE IF NOT EXISTS t42 (f42 INT);
+CREATE TABLE IF NOT EXISTS t43 (f43 INT);
+CREATE TABLE IF NOT EXISTS t44 (f44 INT);
+CREATE TABLE IF NOT EXISTS t45 (f45 INT);
+CREATE TABLE IF NOT EXISTS t46 (f46 INT);
+CREATE TABLE IF NOT EXISTS t47 (f47 INT);
+CREATE TABLE IF NOT EXISTS t48 (f48 INT);
+CREATE TABLE IF NOT EXISTS t49 (f49 INT);
+CREATE TABLE IF NOT EXISTS t50 (f50 INT);
+CREATE TABLE IF NOT EXISTS t51 (f51 INT);
+CREATE TABLE IF NOT EXISTS t52 (f52 INT);
+CREATE TABLE IF NOT EXISTS t53 (f53 INT);
+CREATE TABLE IF NOT EXISTS t54 (f54 INT);
+CREATE TABLE IF NOT EXISTS t55 (f55 INT);
+CREATE TABLE IF NOT EXISTS t56 (f56 INT);
+CREATE TABLE IF NOT EXISTS t57 (f57 INT);
+CREATE TABLE IF NOT EXISTS t58 (f58 INT);
+CREATE TABLE IF NOT EXISTS t59 (f59 INT);
+CREATE TABLE IF NOT EXISTS t60 (f60 INT);
+CREATE OR REPLACE VIEW v60 AS SELECT * FROM t60;
+
+EXPLAIN
+ SELECT t0.*
+FROM t0
+JOIN t1
+ ON t1.f1 = t0.f0
+LEFT JOIN t2
+ ON t0.f0 = t2.f2
+LEFT JOIN t3
+ ON t0.f0 = t3.f3
+LEFT JOIN t4
+ ON t0.f0 = t4.f4
+LEFT JOIN t5
+ ON t4.f4 = t5.f5
+LEFT JOIN t6
+ ON t0.f0 = t6.f6
+LEFT JOIN t7
+ ON t0.f0 = t7.f7
+LEFT JOIN t8
+ ON t0.f0 = t8.f8
+LEFT JOIN t9
+ ON t0.f0 = t9.f9
+LEFT JOIN t10
+ ON t0.f0 = t10.f10
+LEFT JOIN t11
+ ON t0.f0 = t11.f11
+LEFT JOIN t12
+ ON t0.f0 = t12.f12
+LEFT JOIN t13
+ ON t0.f0 = t13.f13
+LEFT JOIN t14
+ ON t0.f0 = t14.f14
+LEFT JOIN t15
+ ON t0.f0 = t15.f15
+LEFT JOIN t16
+ ON t0.f0 = t16.f16
+LEFT JOIN t17
+ ON t0.f0 = t17.f17
+LEFT JOIN t18
+ ON t0.f0 = t18.f18
+LEFT JOIN t19
+ ON t18.f18 = t19.f19
+LEFT JOIN t20
+ ON t20.f20 = t19.f19
+LEFT JOIN t21
+ ON t20.f20 = t21.f21
+LEFT JOIN t22
+ ON t19.f19 = t22.f22
+LEFT JOIN t23
+ ON t23.f23 = t0.f0
+LEFT JOIN t24
+ ON t24.f24 = t23.f23
+LEFT JOIN t25
+ ON t0.f0 = t25.f25
+LEFT JOIN t26
+ ON t26.f26 = t0.f0
+LEFT JOIN t27
+ ON t27.f27 = t0.f0
+LEFT JOIN t28
+ ON t0.f0 = t28.f28
+LEFT JOIN t29
+ ON t0.f0 = t29.f29
+LEFT JOIN t30
+ ON t30.f30 = t0.f0
+LEFT JOIN t31
+ ON t0.f0 = t31.f31
+LEFT JOIN t32
+ ON t32.f32 = t31.f31
+LEFT JOIN t33
+ ON t33.f33 = t0.f0
+LEFT JOIN t34
+ ON t33.f33 = t34.f34
+LEFT JOIN t35
+ ON t33.f33 = t35.f35
+LEFT JOIN t36
+ ON t36.f36 = t0.f0
+LEFT JOIN t37
+ ON t32.f32 = t37.f37
+LEFT JOIN t38
+ ON t31.f31 = t38.f38
+LEFT JOIN t39
+ ON t39.f39 = t0.f0
+LEFT JOIN t40
+ ON t40.f40 = t39.f39
+LEFT JOIN t41
+ ON t41.f41 = t0.f0
+LEFT JOIN t42
+ ON t42.f42 = t41.f41
+LEFT JOIN t43
+ ON t43.f43 = t41.f41
+LEFT JOIN t44
+ ON t44.f44 = t0.f0
+LEFT JOIN t45
+ ON t45.f45 = t0.f0
+LEFT JOIN t46
+ ON t46.f46 = t0.f0
+LEFT JOIN t47
+ ON t47.f47 = t0.f0
+LEFT JOIN t48
+ ON t48.f48 = t0.f0
+LEFT JOIN t49
+ ON t0.f0 = t49.f49
+LEFT JOIN t50
+ ON t0.f0 = t50.f50
+LEFT JOIN t51
+ ON t0.f0 = t51.f51
+LEFT JOIN t52
+ ON t52.f52 = t0.f0
+LEFT JOIN t53
+ ON t53.f53 = t0.f0
+LEFT JOIN t54
+ ON t54.f54 = t0.f0
+LEFT JOIN t55
+ ON t55.f55 = t0.f0
+LEFT JOIN t56
+ ON t56.f56 = t0.f0
+LEFT JOIN t57
+ ON t57.f57 = t0.f0
+LEFT JOIN t58
+ ON t58.f58 = t57.f57
+LEFT JOIN t59
+ ON t36.f36 = t59.f59
+LEFT JOIN v60
+ ON t36.f36 = v60.f60
+;
+drop table t0, t1, t2, t3, t4, t5, t6, t7, t8, t9,
+t10, t11, t12, t13, t14, t15, t16, t17, t18,
+t19, t20, t21, t22, t23, t24, t25, t26, t27,
+t28, t29, t30, t31, t32, t33, t34, t35, t36,
+t37, t38, t39, t40, t41, t42, t43, t44, t45,
+t46, t47, t48, t49, t50, t51, t52, t53, t54,
+t55, t56, t57, t58, t59,t60;
+drop view v60;
+
--echo # -----------------------------------------------------------------
--echo # -- End of 5.5 tests.
--echo # -----------------------------------------------------------------
diff --git a/mysys/my_addr_resolve.c b/mysys/my_addr_resolve.c
index f831ad5121f..02f71fd72bd 100644
--- a/mysys/my_addr_resolve.c
+++ b/mysys/my_addr_resolve.c
@@ -204,7 +204,7 @@ int my_addr_resolve(void *ptr, my_addr_loc *loc)
strnmov(addr2line_binary, info.dli_fname, sizeof(addr2line_binary));
}
offset = info.dli_fbase;
- len= my_snprintf(input, sizeof(input), "%p\n", ptr - offset);
+ len= my_snprintf(input, sizeof(input), "%08x\n", (ulonglong)(ptr - offset));
if (write(in[1], input, len) <= 0)
return 1;
if (read(out[0], output, sizeof(output)) <= 0)
diff --git a/sql-common/client.c b/sql-common/client.c
index dcd92abecad..a509645b743 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -2509,10 +2509,10 @@ static int send_client_reply_packet(MCPVIO_EXT *mpvio,
if (mysql->client_flag & CLIENT_MULTI_STATEMENTS)
mysql->client_flag|= CLIENT_MULTI_RESULTS;
-#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
+#ifdef HAVE_OPENSSL
if (mysql->options.use_ssl)
mysql->client_flag|= CLIENT_SSL;
-#endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY*/
+#endif /* HAVE_OPENSSL */
if (mpvio->db)
mysql->client_flag|= CLIENT_CONNECT_WITH_DB;
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 1213faeec5c..98db265943f 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -1146,6 +1146,7 @@ public:
DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII);
fix_char_length(MY_UUID_STRING_LENGTH);
}
+ table_map used_tables() const { return RAND_TABLE_BIT; }
const char *func_name() const{ return "uuid"; }
String *val_str(String *);
bool check_vcol_func_processor(uchar *int_arg)
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 04c11ec04ef..321e6ffc9cd 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -14570,6 +14570,11 @@ option_value_no_option_type:
| '@' '@' opt_var_ident_type internal_variable_name equal set_expr_or_default
{
struct sys_var_with_base tmp= $4;
+ if (tmp.var == trg_new_row_fake_var)
+ {
+ my_error(ER_UNKNOWN_SYSTEM_VARIABLE, MYF(0), "NEW");
+ MYSQL_YYABORT;
+ }
/* Lookup if necessary: must be a system variable. */
if (tmp.var == NULL)
{
diff --git a/sql/table.h b/sql/table.h
index 69a954e73d3..94173ee79e3 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -2224,6 +2224,7 @@ struct TABLE_LIST
DBUG_PRINT("enter", ("Alias: '%s' Unit: %p",
(alias ? alias : "<NULL>"),
get_unit()));
+ derived= get_unit();
derived_type= ((derived_type & (derived ? DTYPE_MASK : DTYPE_VIEW)) |
DTYPE_TABLE | DTYPE_MATERIALIZE);
set_check_materialized();