Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
606e2186
Commit
606e2186
authored
Apr 03, 2018
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-15630 uuid() function evaluates at wrong time in query
parent
bdab8b74
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
mysql-test/r/func_misc.result
mysql-test/r/func_misc.result
+11
-0
mysql-test/t/func_misc.test
mysql-test/t/func_misc.test
+12
-0
sql/item_strfunc.h
sql/item_strfunc.h
+1
-0
No files found.
mysql-test/r/func_misc.result
View file @
606e2186
...
...
@@ -572,6 +572,17 @@ N AVG
0 NULL
drop table t1;
#
# 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
#
SELECT NAME_CONST('a', -(1 OR 2)) OR 1;
...
...
mysql-test/t/func_misc.test
View file @
606e2186
...
...
@@ -596,6 +596,18 @@ AND 57813X540X1723 = 'Test';
drop
table
t1
;
--
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
#
...
...
sql/item_strfunc.h
View file @
606e2186
...
...
@@ -997,6 +997,7 @@ class Item_func_uuid: public Item_str_func
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment