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
1e701f26
Commit
1e701f26
authored
Nov 25, 2022
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-26831 fallout: name resolution cache simple test
parent
cf36ae5c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
0 deletions
+64
-0
mysql-test/main/name_resolution_cache_debug.result
mysql-test/main/name_resolution_cache_debug.result
+25
-0
mysql-test/main/name_resolution_cache_debug.test
mysql-test/main/name_resolution_cache_debug.test
+36
-0
sql/sql_base.cc
sql/sql_base.cc
+3
-0
No files found.
mysql-test/main/name_resolution_cache_debug.result
0 → 100644
View file @
1e701f26
connect con1,localhost,root;
create table t1 (a int, b int);
create table t2 (c int, d int);
create view v1 as select c+1 as e, d+1 as f from t2;
SET DEBUG_SYNC= 'table_field_cached SIGNAL in_sync WAIT_FOR go';
prepare stmt1 from "select a from t1";
execute stmt1;
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
SET DEBUG_SYNC= 'now SIGNAL go';
connection con1;
a
SET DEBUG_SYNC= 'table_field_cached SIGNAL in_sync WAIT_FOR go';
prepare stmt1 from "select e from v1";
execute stmt1;
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
SET DEBUG_SYNC= 'now SIGNAL go';
connection con1;
e
connection default;
disconnect con1;
SET DEBUG_SYNC = 'RESET';
drop view v1;
drop table t1,t2;
mysql-test/main/name_resolution_cache_debug.test
0 → 100644
View file @
1e701f26
source
include
/
have_debug_sync
.
inc
;
connect
con1
,
localhost
,
root
;
create
table
t1
(
a
int
,
b
int
);
create
table
t2
(
c
int
,
d
int
);
create
view
v1
as
select
c
+
1
as
e
,
d
+
1
as
f
from
t2
;
SET
DEBUG_SYNC
=
'table_field_cached SIGNAL in_sync WAIT_FOR go'
;
prepare
stmt1
from
"select a from t1"
;
--
send
execute
stmt1
connection
default
;
SET
DEBUG_SYNC
=
'now WAIT_FOR in_sync'
;
SET
DEBUG_SYNC
=
'now SIGNAL go'
;
connection
con1
;
--
reap
SET
DEBUG_SYNC
=
'table_field_cached SIGNAL in_sync WAIT_FOR go'
;
prepare
stmt1
from
"select e from v1"
;
--
send
execute
stmt1
connection
default
;
SET
DEBUG_SYNC
=
'now WAIT_FOR in_sync'
;
SET
DEBUG_SYNC
=
'now SIGNAL go'
;
connection
con1
;
--
reap
connection
default
;
disconnect
con1
;
SET
DEBUG_SYNC
=
'RESET'
;
drop
view
v1
;
drop
table
t1
,
t2
;
sql/sql_base.cc
View file @
1e701f26
...
...
@@ -5865,7 +5865,10 @@ find_field_in_table(THD *thd, TABLE *table, const char *name, size_t length,
if
(
cached_field_index
<
table
->
s
->
fields
&&
!
my_strcasecmp
(
system_charset_info
,
table
->
field
[
cached_field_index
]
->
field_name
.
str
,
name
))
{
field
=
table
->
field
[
cached_field_index
];
DEBUG_SYNC
(
thd
,
"table_field_cached"
);
}
else
{
LEX_CSTRING
fname
=
{
name
,
length
};
...
...
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