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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
375825aa
Commit
375825aa
authored
May 14, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #3403 Wrong encoding in EXPLAIN SELECT output
parent
3226b9fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
+23
-3
mysql-test/r/explain.result
mysql-test/r/explain.result
+9
-0
mysql-test/t/explain.test
mysql-test/t/explain.test
+11
-0
sql/sql_select.cc
sql/sql_select.cc
+3
-3
No files found.
mysql-test/r/explain.result
View file @
375825aa
...
@@ -44,3 +44,12 @@ explain select count(*) from t1;
...
@@ -44,3 +44,12 @@ explain select count(*) from t1;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
drop table t1;
drop table t1;
set names koi8r;
create table (0 int, 1 int, key 0 (0), key 01 (0,1));
insert into (0) values (1);
insert into (0) values (2);
explain select 0 from where 0=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE ref 0,01 0 5 const 1 Using where; Using index
drop table ;
set names latin1;
mysql-test/t/explain.test
View file @
375825aa
...
@@ -30,3 +30,14 @@ explain select count(*) from t1;
...
@@ -30,3 +30,14 @@ explain select count(*) from t1;
insert
into
t1
values
(
1
);
insert
into
t1
values
(
1
);
explain
select
count
(
*
)
from
t1
;
explain
select
count
(
*
)
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
# Bug #3403 Wrong encoding in EXPLAIN SELECT output
#
set
names
koi8r
;
create
table
(
0
int
,
1
int
,
key
0
(
0
),
key
01
(
0
,
1
));
insert
into
(
0
)
values
(
1
);
insert
into
(
0
)
values
(
2
);
explain
select
0
from
where
0
=
1
;
drop
table
;
set
names
latin1
;
sql/sql_select.cc
View file @
375825aa
...
@@ -9123,7 +9123,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
...
@@ -9123,7 +9123,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
THD
*
thd
=
join
->
thd
;
THD
*
thd
=
join
->
thd
;
select_result
*
result
=
join
->
result
;
select_result
*
result
=
join
->
result
;
Item
*
item_null
=
new
Item_null
();
Item
*
item_null
=
new
Item_null
();
CHARSET_INFO
*
cs
=
&
my_charset_latin1
;
CHARSET_INFO
*
cs
=
system_charset_info
;
DBUG_ENTER
(
"select_describe"
);
DBUG_ENTER
(
"select_describe"
);
DBUG_PRINT
(
"info"
,
(
"Select 0x%lx, type %s, message %s"
,
DBUG_PRINT
(
"info"
,
(
"Select 0x%lx, type %s, message %s"
,
(
ulong
)
join
->
select_lex
,
join
->
select_lex
->
type
,
(
ulong
)
join
->
select_lex
,
join
->
select_lex
->
type
,
...
@@ -9190,7 +9190,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
...
@@ -9190,7 +9190,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
{
{
if
(
tmp1
.
length
())
if
(
tmp1
.
length
())
tmp1
.
append
(
','
);
tmp1
.
append
(
','
);
tmp1
.
append
(
table
->
key_info
[
j
].
name
);
tmp1
.
append
(
table
->
key_info
[
j
].
name
,
0
,
system_charset_info
);
}
}
}
}
}
}
...
@@ -9209,7 +9209,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
...
@@ -9209,7 +9209,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
{
{
if
(
tmp2
.
length
())
if
(
tmp2
.
length
())
tmp2
.
append
(
','
);
tmp2
.
append
(
','
);
tmp2
.
append
((
*
ref
)
->
name
());
tmp2
.
append
((
*
ref
)
->
name
()
,
0
,
system_charset_info
);
}
}
item_list
.
push_back
(
new
Item_string
(
tmp2
.
ptr
(),
tmp2
.
length
(),
cs
));
item_list
.
push_back
(
new
Item_string
(
tmp2
.
ptr
(),
tmp2
.
length
(),
cs
));
}
}
...
...
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