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
814c69ea
Commit
814c69ea
authored
Jun 06, 2022
by
Monty
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/10.5' into 10.6
parents
4179f93d
4834a0d1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
21 deletions
+65
-21
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
storage/maria/ma_cache.c
storage/maria/ma_cache.c
+10
-4
storage/maria/ma_locking.c
storage/maria/ma_locking.c
+0
-2
storage/maria/ma_pagecache.c
storage/maria/ma_pagecache.c
+10
-12
No files found.
plugin/type_inet/mysql-test/type_inet/type_inet6.result
View file @
814c69ea
...
...
@@ -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 @
814c69ea
...
...
@@ -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 @
814c69ea
...
...
@@ -1113,9 +1113,14 @@ class Item_cache_inet6: public Item_cache
if
(
!
example
)
return
false
;
value_cached
=
true
;
null_value
=
example
->
val_native_with_conversion_result
(
current_thd
,
&
m_value
,
type_handler
());
/*
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
;
}
String
*
val_str
(
String
*
to
)
...
...
storage/maria/ma_cache.c
View file @
814c69ea
...
...
@@ -44,6 +44,9 @@ my_bool _ma_read_cache(MARIA_HA *handler, IO_CACHE *info, uchar *buff,
DBUG_ENTER
(
"_ma_read_cache"
);
DBUG_ASSERT
(
!
(
info
->
myflags
&
MY_ENCRYPT
));
if
(
unlikely
(
pos
>=
info
->
end_of_file
)
&&
(
flag
&
READING_HEADER
))
DBUG_RETURN
(
-
1
);
if
(
pos
<
info
->
pos_in_file
)
{
read_length
=
length
;
...
...
@@ -95,14 +98,17 @@ my_bool _ma_read_cache(MARIA_HA *handler, IO_CACHE *info, uchar *buff,
if
(
!
(
flag
&
READING_HEADER
)
||
(
int
)
read_length
==
-
1
||
read_length
+
in_buff_length
<
3
)
{
if
((
flag
&
READING_HEADER
)
&&
read_length
+
in_buff_length
==
0
)
DBUG_RETURN
(
-
1
);
/* End of file */
DBUG_PRINT
(
"error"
,
(
"Error %d reading next-multi-part block (Got %d bytes)"
,
my_errno
,
(
int
)
read_length
));
(
"Error %d reading next-multi-part block (Got %d
of %d
bytes)"
,
my_errno
,
(
int
)
read_length
,
(
int
)
length
));
if
(
!
my_errno
||
my_errno
==
HA_ERR_FILE_TOO_SHORT
)
{
if
(
!
handler
->
in_check_table
)
_ma_set_fatal_error
(
handler
->
s
,
HA_ERR_
WRONG_IN_RECORD
);
else
_ma_set_fatal_error
(
handler
->
s
,
HA_ERR_
FILE_TOO_SHORT
);
if
(
!
my_errno
)
my_errno
=
HA_ERR_WRONG_IN_RECORD
;
}
DBUG_RETURN
(
1
);
...
...
storage/maria/ma_locking.c
View file @
814c69ea
...
...
@@ -553,7 +553,6 @@ void _ma_mark_file_crashed(MARIA_SHARE *share)
{
uchar
buff
[
2
];
DBUG_ENTER
(
"_ma_mark_file_crashed"
);
CRASH_IF_S3_TABLE
(
share
);
share
->
state
.
changed
|=
STATE_CRASHED
;
if
(
share
->
no_status_updates
)
...
...
@@ -561,7 +560,6 @@ void _ma_mark_file_crashed(MARIA_SHARE *share)
mi_int2store
(
buff
,
share
->
state
.
changed
);
/*
We can ignore the errors, as if the mark failed, there isn't anything
else we can do; The user should already have got an error that the
...
...
storage/maria/ma_pagecache.c
View file @
814c69ea
...
...
@@ -2893,10 +2893,14 @@ static void read_big_block(PAGECACHE *pagecache,
if
(
pagecache
->
big_block_read
(
pagecache
,
&
args
,
&
block
->
hash_link
->
file
,
&
data
))
{
pagecache
->
big_block_free
(
&
data
);
pagecache_pthread_mutex_lock
(
&
pagecache
->
cache_lock
);
block_to_read
->
status
|=
PCBLOCK_ERROR
;
block_to_read
->
error
=
(
int16
)
my_errno
;
pagecache
->
big_block_free
(
&
data
);
/* Handle the block that we originally wanted with read */
block
->
status
|=
PCBLOCK_ERROR
;
block
->
error
=
block_to_read
->
error
;
goto
error
;
}
...
...
@@ -2980,6 +2984,7 @@ static void read_big_block(PAGECACHE *pagecache,
block_to_read
->
status
&=
~
PCBLOCK_BIG_READ
;
if
(
block_to_read
!=
block
)
{
/* Unlock the 'first block' in the big read */
remove_reader
(
block_to_read
);
unreg_request
(
pagecache
,
block_to_read
,
1
);
}
...
...
@@ -2993,18 +2998,11 @@ static void read_big_block(PAGECACHE *pagecache,
Read failed. Mark all readers waiting for the a block covered by the
big block that the read failed
*/
for
(
offset
=
pagecache
->
block_size
,
page
=
page_to_read
+
1
;
offset
<
data
.
length
;
offset
+
=
pagecache
->
block_size
,
page
+
+
)
for
(
offset
=
0
,
page
=
page_to_read
+
1
;
offset
<
big_block_size_in_pages
;
offset
++
)
{
DBUG_ASSERT
(
offset
+
pagecache
->
block_size
<=
data
.
length
);
if
(
page
==
our_page
)
{
DBUG_ASSERT
(
!
(
block
->
status
&
PCBLOCK_READ
));
block
->
status
|=
PCBLOCK_ERROR
;
block
->
error
=
(
int16
)
my_errno
;
}
else
if
(
page
!=
our_page
)
{
PAGECACHE_BLOCK_LINK
*
bl
;
bl
=
find_block
(
pagecache
,
&
block
->
hash_link
->
file
,
page
,
1
,
...
...
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