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
7f55e8ea
Commit
7f55e8ea
authored
Oct 13, 2004
by
timour@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed compilation problem due to WL#1724 code inside #ifndef DBUG_OFF ... #endif.
parent
be1d522d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
89 deletions
+92
-89
sql/opt_range.cc
sql/opt_range.cc
+92
-89
No files found.
sql/opt_range.cc
View file @
7f55e8ea
...
...
@@ -6336,63 +6336,6 @@ void QUICK_ROR_UNION_SELECT::add_keys_and_lengths(String *key_names,
}
}
#ifndef DBUG_OFF
static
void
print_sel_tree
(
PARAM
*
param
,
SEL_TREE
*
tree
,
key_map
*
tree_map
,
const
char
*
msg
)
{
SEL_ARG
**
key
,
**
end
;
int
idx
;
char
buff
[
1024
];
DBUG_ENTER
(
"print_sel_tree"
);
if
(
!
_db_on_
)
DBUG_VOID_RETURN
;
String
tmp
(
buff
,
sizeof
(
buff
),
&
my_charset_bin
);
tmp
.
length
(
0
);
for
(
idx
=
0
,
key
=
tree
->
keys
,
end
=
key
+
param
->
keys
;
key
!=
end
;
key
++
,
idx
++
)
{
if
(
tree_map
->
is_set
(
idx
))
{
uint
keynr
=
param
->
real_keynr
[
idx
];
if
(
tmp
.
length
())
tmp
.
append
(
','
);
tmp
.
append
(
param
->
table
->
key_info
[
keynr
].
name
);
}
}
if
(
!
tmp
.
length
())
tmp
.
append
(
"(empty)"
);
DBUG_PRINT
(
"info"
,
(
"SEL_TREE %p (%s) scans:%s"
,
tree
,
msg
,
tmp
.
ptr
()));
DBUG_VOID_RETURN
;
}
static
void
print_ror_scans_arr
(
TABLE
*
table
,
const
char
*
msg
,
struct
st_ror_scan_info
**
start
,
struct
st_ror_scan_info
**
end
)
{
DBUG_ENTER
(
"print_ror_scans"
);
if
(
!
_db_on_
)
DBUG_VOID_RETURN
;
char
buff
[
1024
];
String
tmp
(
buff
,
sizeof
(
buff
),
&
my_charset_bin
);
tmp
.
length
(
0
);
for
(;
start
!=
end
;
start
++
)
{
if
(
tmp
.
length
())
tmp
.
append
(
','
);
tmp
.
append
(
table
->
key_info
[(
*
start
)
->
keynr
].
name
);
}
if
(
!
tmp
.
length
())
tmp
.
append
(
"(empty)"
);
DBUG_PRINT
(
"info"
,
(
"ROR key scans (%s): %s"
,
msg
,
tmp
.
ptr
()));
DBUG_VOID_RETURN
;
}
/*******************************************************************************
* Implementation of QUICK_GROUP_MIN_MAX_SELECT
...
...
@@ -8281,46 +8224,62 @@ void QUICK_GROUP_MIN_MAX_SELECT::add_keys_and_lengths(String *key_names,
}
/*
Print quick select information to DBUG_FILE.
#ifndef DBUG_OFF
SYNOPSIS
QUICK_GROUP_MIN_MAX_SELECT::dbug_dump()
indent Indentation offset
verbose If TRUE show more detailed output.
static
void
print_sel_tree
(
PARAM
*
param
,
SEL_TREE
*
tree
,
key_map
*
tree_map
,
const
char
*
msg
)
{
SEL_ARG
**
key
,
**
end
;
int
idx
;
char
buff
[
1024
];
DBUG_ENTER
(
"print_sel_tree"
);
if
(
!
_db_on_
)
DBUG_VOID_RETURN
;
DESCRIPTION
Print the contents of this quick select to DBUG_FILE. The method also
calls dbug_dump() for the used quick select if any.
String
tmp
(
buff
,
sizeof
(
buff
),
&
my_charset_bin
);
tmp
.
length
(
0
);
for
(
idx
=
0
,
key
=
tree
->
keys
,
end
=
key
+
param
->
keys
;
key
!=
end
;
key
++
,
idx
++
)
{
if
(
tree_map
->
is_set
(
idx
))
{
uint
keynr
=
param
->
real_keynr
[
idx
];
if
(
tmp
.
length
())
tmp
.
append
(
','
);
tmp
.
append
(
param
->
table
->
key_info
[
keynr
].
name
);
}
}
if
(
!
tmp
.
length
())
tmp
.
append
(
"(empty)"
);
IMPLEMENTATION
Caller is responsible for locking DBUG_FILE before this call and unlocking
it afterwards.
DBUG_PRINT
(
"info"
,
(
"SEL_TREE %p (%s) scans:%s"
,
tree
,
msg
,
tmp
.
ptr
()));
RETURN
None
*/
DBUG_VOID_RETURN
;
}
void
QUICK_GROUP_MIN_MAX_SELECT
::
dbug_dump
(
int
indent
,
bool
verbose
)
static
void
print_ror_scans_arr
(
TABLE
*
table
,
const
char
*
msg
,
struct
st_ror_scan_info
**
start
,
struct
st_ror_scan_info
**
end
)
{
fprintf
(
DBUG_FILE
,
"%*squick_group_min_max_select: index %s (%d), length: %d
\n
"
,
indent
,
""
,
index_info
->
name
,
index
,
max_used_key_length
);
if
(
key_infix_len
>
0
)
{
fprintf
(
DBUG_FILE
,
"%*susing key_infix with length %d:
\n
"
,
indent
,
""
,
key_infix_len
);
}
if
(
quick_prefix_select
)
{
fprintf
(
DBUG_FILE
,
"%*susing quick_range_select:
\n
"
,
indent
,
""
);
quick_prefix_select
->
dbug_dump
(
indent
+
2
,
verbose
);
}
if
(
min_max_ranges
.
elements
>
0
)
DBUG_ENTER
(
"print_ror_scans"
);
if
(
!
_db_on_
)
DBUG_VOID_RETURN
;
char
buff
[
1024
];
String
tmp
(
buff
,
sizeof
(
buff
),
&
my_charset_bin
);
tmp
.
length
(
0
);
for
(;
start
!=
end
;
start
++
)
{
fprintf
(
DBUG_FILE
,
"%*susing %d quick_ranges for MIN/MAX:
\n
"
,
indent
,
""
,
min_max_ranges
.
elements
);
if
(
tmp
.
length
())
tmp
.
append
(
','
);
tmp
.
append
(
table
->
key_info
[(
*
start
)
->
keynr
].
name
);
}
if
(
!
tmp
.
length
())
tmp
.
append
(
"(empty)"
);
DBUG_PRINT
(
"info"
,
(
"ROR key scans (%s): %s"
,
msg
,
tmp
.
ptr
()));
DBUG_VOID_RETURN
;
}
...
...
@@ -8475,6 +8434,50 @@ void QUICK_ROR_UNION_SELECT::dbug_dump(int indent, bool verbose)
fprintf
(
DBUG_FILE
,
"%*s}
\n
"
,
indent
,
""
);
}
/*
Print quick select information to DBUG_FILE.
SYNOPSIS
QUICK_GROUP_MIN_MAX_SELECT::dbug_dump()
indent Indentation offset
verbose If TRUE show more detailed output.
DESCRIPTION
Print the contents of this quick select to DBUG_FILE. The method also
calls dbug_dump() for the used quick select if any.
IMPLEMENTATION
Caller is responsible for locking DBUG_FILE before this call and unlocking
it afterwards.
RETURN
None
*/
void
QUICK_GROUP_MIN_MAX_SELECT
::
dbug_dump
(
int
indent
,
bool
verbose
)
{
fprintf
(
DBUG_FILE
,
"%*squick_group_min_max_select: index %s (%d), length: %d
\n
"
,
indent
,
""
,
index_info
->
name
,
index
,
max_used_key_length
);
if
(
key_infix_len
>
0
)
{
fprintf
(
DBUG_FILE
,
"%*susing key_infix with length %d:
\n
"
,
indent
,
""
,
key_infix_len
);
}
if
(
quick_prefix_select
)
{
fprintf
(
DBUG_FILE
,
"%*susing quick_range_select:
\n
"
,
indent
,
""
);
quick_prefix_select
->
dbug_dump
(
indent
+
2
,
verbose
);
}
if
(
min_max_ranges
.
elements
>
0
)
{
fprintf
(
DBUG_FILE
,
"%*susing %d quick_ranges for MIN/MAX:
\n
"
,
indent
,
""
,
min_max_ranges
.
elements
);
}
}
#endif
/*****************************************************************************
...
...
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