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
f79f537f
Commit
f79f537f
authored
Feb 10, 2020
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-21690 LeakSanitizer: detected memory leaks in mem_heap_create_block_func
parent
77c63823
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
mysql-test/suite/innodb/r/foreign_key.result
mysql-test/suite/innodb/r/foreign_key.result
+7
-0
mysql-test/suite/innodb/t/foreign_key.test
mysql-test/suite/innodb/t/foreign_key.test
+10
-0
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+3
-1
No files found.
mysql-test/suite/innodb/r/foreign_key.result
View file @
f79f537f
...
...
@@ -565,4 +565,11 @@ t2 CREATE TABLE `t2` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop tables t2, t1;
set default_storage_engine= default;
#
# MDEV-21690 LeakSanitizer: detected memory leaks in mem_heap_create_block_func
#
CREATE TABLE t1 (a TEXT, b TEXT) ENGINE=InnoDB;
ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t1 (b);
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
DROP TABLE t1;
# End of 10.5 tests
mysql-test/suite/innodb/t/foreign_key.test
View file @
f79f537f
...
...
@@ -519,6 +519,16 @@ drop tables t2, t1;
set
default_storage_engine
=
default
;
--
echo
#
--
echo
# MDEV-21690 LeakSanitizer: detected memory leaks in mem_heap_create_block_func
--
echo
#
CREATE
TABLE
t1
(
a
TEXT
,
b
TEXT
)
ENGINE
=
InnoDB
;
--
error
ER_CANT_CREATE_TABLE
ALTER
TABLE
t1
ADD
FOREIGN
KEY
(
a
)
REFERENCES
t1
(
b
);
# Cleanup
DROP
TABLE
t1
;
--
echo
# End of 10.5 tests
--
source
include
/
wait_until_count_sessions
.
inc
storage/innobase/handler/ha_innodb.cc
View file @
f79f537f
...
...
@@ -12339,7 +12339,7 @@ create_table_info_t::create_foreign_keys()
" failed. Column %s was not found."
,
operation
,
create_name
,
k
.
str
(),
column_names
[
i
]);
dict_foreign_free
(
foreign
);
return
(
DB_CANNOT_ADD_CONSTRAINT
);
}
++
i
;
...
...
@@ -12353,6 +12353,7 @@ create_table_info_t::create_foreign_keys()
"allowed)."
,
operation
,
create_name
,
k
.
str
(),
i
,
MAX_COLS_PER_FK
);
dict_foreign_free
(
foreign
);
return
(
DB_CANNOT_ADD_CONSTRAINT
);
}
}
...
...
@@ -12367,6 +12368,7 @@ create_table_info_t::create_foreign_keys()
k
.
str
(),
column_names
,
index_error
,
err_col
,
err_index
,
table
);
dict_foreign_free
(
foreign
);
return
(
DB_CANNOT_ADD_CONSTRAINT
);
}
...
...
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