mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
merge
This commit is contained in:
@@ -345,4 +345,19 @@ SELECT COALESCE(a) = COALESCE(b) FROM t1;
|
||||
COALESCE(a) = COALESCE(b)
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of tests
|
||||
#
|
||||
# Bug #54461: crash with longblob and union or update with subquery
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b LONGBLOB);
|
||||
INSERT INTO t1 VALUES (1, '2'), (2, '3'), (3, '2');
|
||||
SELECT DISTINCT LEAST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
|
||||
LEAST(a, (SELECT b FROM t1 LIMIT 1))
|
||||
1
|
||||
2
|
||||
SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
|
||||
GREATEST(a, (SELECT b FROM t1 LIMIT 1))
|
||||
2
|
||||
3
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@@ -478,4 +478,17 @@ SELECT COALESCE(a) = COALESCE(b) FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug #54461: crash with longblob and union or update with subquery
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT, b LONGBLOB);
|
||||
INSERT INTO t1 VALUES (1, '2'), (2, '3'), (3, '2');
|
||||
|
||||
SELECT DISTINCT LEAST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
|
||||
SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@@ -83,7 +83,9 @@ void my_print_stacktrace(uchar* stack_bottom __attribute__((unused)),
|
||||
|
||||
#if BACKTRACE_DEMANGLE
|
||||
|
||||
char __attribute__ ((weak)) *my_demangle(const char *mangled_name, int *status)
|
||||
char __attribute__ ((weak)) *
|
||||
my_demangle(const char *mangled_name __attribute__((unused)),
|
||||
int *status __attribute__((unused)))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -2531,6 +2531,8 @@ void Item_func_min_max::fix_length_and_dec()
|
||||
decimals,
|
||||
unsigned_flag));
|
||||
}
|
||||
else if (cmp_type == REAL_RESULT)
|
||||
max_length= float_length(decimals);
|
||||
cached_field_type= agg_field_type(args, arg_count);
|
||||
}
|
||||
|
||||
|
@@ -1436,8 +1436,6 @@ int lex_one_token(void *arg, void *yythd)
|
||||
}
|
||||
else
|
||||
{
|
||||
const char* version_mark= lip->get_ptr() - 1;
|
||||
DBUG_ASSERT(*version_mark == '!');
|
||||
/*
|
||||
Patch and skip the conditional comment to avoid it
|
||||
being propagated infinitely (eg. to a slave).
|
||||
@@ -1446,7 +1444,6 @@ int lex_one_token(void *arg, void *yythd)
|
||||
comment_closed= ! consume_comment(lip, 1);
|
||||
if (! comment_closed)
|
||||
{
|
||||
DBUG_ASSERT(pcom == version_mark);
|
||||
*pcom= '!';
|
||||
}
|
||||
/* version allowed to have one level of comment inside. */
|
||||
|
Reference in New Issue
Block a user