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
6d99fdce
Commit
6d99fdce
authored
Jun 03, 2022
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-28491 Uuid. "UPDATE/DELETE" not working "WHERE id IN (SELECT id FROM ..)"
This is a 10.5 version of the patch.
parent
22f935d6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
3 deletions
+45
-3
plugin/type_inet/mysql-test/type_inet/type_inet6.result
plugin/type_inet/mysql-test/type_inet/type_inet6.result
+19
-0
plugin/type_inet/mysql-test/type_inet/type_inet6.test
plugin/type_inet/mysql-test/type_inet/type_inet6.test
+18
-0
plugin/type_inet/sql_type_inet.cc
plugin/type_inet/sql_type_inet.cc
+8
-3
No files found.
plugin/type_inet/mysql-test/type_inet/type_inet6.result
View file @
6d99fdce
...
...
@@ -2194,3 +2194,22 @@ SELECT IF(1, '::', a) AS f FROM t1 GROUP BY 'foo' HAVING f != '::1';
f
::
DROP TABLE t1;
#
# MDEV-28491 Uuid. "UPDATE/DELETE" not working "WHERE id IN (SELECT id FROM ..)"
#
CREATE TABLE companies (id INET6, name varchar(10));
INSERT INTO companies (id) values ('00::01');
CREATE TABLE divisions (company_id INET6);
INSERT INTO divisions (company_id) values ('00::01');
SELECT * FROM companies WHERE id IN (SELECT company_id FROM divisions);
id name
::1 NULL
UPDATE companies SET name = 'value' WHERE id IN (SELECT company_id FROM divisions);
SELECT * FROM companies;
id name
::1 value
DELETE FROM companies WHERE id IN (SELECT company_id FROM divisions);
SELECT * FROM companies;
id name
DROP TABLE divisions;
DROP TABLE companies;
plugin/type_inet/mysql-test/type_inet/type_inet6.test
View file @
6d99fdce
...
...
@@ -1612,3 +1612,21 @@ SELECT IF(1, '::', a) AS f FROM t1 GROUP BY 'foo' HAVING f != '';
SELECT
IF
(
1
,
'::'
,
a
)
AS
f
FROM
t1
GROUP
BY
'foo'
HAVING
f
!=
'::'
;
SELECT
IF
(
1
,
'::'
,
a
)
AS
f
FROM
t1
GROUP
BY
'foo'
HAVING
f
!=
'::1'
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-28491 Uuid. "UPDATE/DELETE" not working "WHERE id IN (SELECT id FROM ..)"
--
echo
#
CREATE
TABLE
companies
(
id
INET6
,
name
varchar
(
10
));
INSERT
INTO
companies
(
id
)
values
(
'00::01'
);
CREATE
TABLE
divisions
(
company_id
INET6
);
INSERT
INTO
divisions
(
company_id
)
values
(
'00::01'
);
SELECT
*
FROM
companies
WHERE
id
IN
(
SELECT
company_id
FROM
divisions
);
UPDATE
companies
SET
name
=
'value'
WHERE
id
IN
(
SELECT
company_id
FROM
divisions
);
SELECT
*
FROM
companies
;
DELETE
FROM
companies
WHERE
id
IN
(
SELECT
company_id
FROM
divisions
);
SELECT
*
FROM
companies
;
DROP
TABLE
divisions
;
DROP
TABLE
companies
;
plugin/type_inet/sql_type_inet.cc
View file @
6d99fdce
...
...
@@ -1109,7 +1109,12 @@ class Item_cache_inet6: public Item_cache
if
(
!
example
)
return
false
;
value_cached
=
true
;
null_value
=
example
->
val_native_with_conversion_result
(
current_thd
,
/*
Merge comments: in 10.7 this code migrated to
Item_cache_fbt in to sql/sql_type_fixedbin.h
*/
null_value_inside
=
null_value
=
example
->
val_native_with_conversion_result
(
current_thd
,
&
m_value
,
type_handler
());
return
true
;
...
...
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