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
5bb97877
Commit
5bb97877
authored
Mar 05, 2014
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
cfc2eb9d
64649e33
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
114 additions
and
4 deletions
+114
-4
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+42
-0
mysql-test/t/information_schema.test
mysql-test/t/information_schema.test
+56
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-1
sql/sql_show.cc
sql/sql_show.cc
+15
-3
No files found.
mysql-test/r/information_schema.result
View file @
5bb97877
...
...
@@ -1972,3 +1972,45 @@ drop database mysqltest;
#
# End of 5.5 tests
#
#
# MDEV-5723: mysqldump -uroot unusable for multi-database operations, checks all databases
#
drop database if exists db1;
create database db1;
use db1;
create table t1 (a int);
create table t2 (a int);
create table t3 (a int);
create database mysqltest;
use mysqltest;
create table t1 (a int);
create table t2 (a int);
create table t3 (a int);
flush tables;
flush status;
SELECT
LOGFILE_GROUP_NAME, FILE_NAME, TOTAL_EXTENTS, INITIAL_SIZE, ENGINE, EXTRA
FROM
INFORMATION_SCHEMA.FILES
WHERE
FILE_TYPE = 'UNDO LOG' AND FILE_NAME IS NOT NULL AND
LOGFILE_GROUP_NAME IN (SELECT DISTINCT LOGFILE_GROUP_NAME
FROM INFORMATION_SCHEMA.FILES
WHERE
FILE_TYPE = 'DATAFILE' AND
TABLESPACE_NAME IN (SELECT DISTINCT TABLESPACE_NAME
FROM INFORMATION_SCHEMA.PARTITIONS
WHERE TABLE_SCHEMA IN ('db1')
)
)
GROUP BY
LOGFILE_GROUP_NAME, FILE_NAME, ENGINE
ORDER BY
LOGFILE_GROUP_NAME;
LOGFILE_GROUP_NAME FILE_NAME TOTAL_EXTENTS INITIAL_SIZE ENGINE EXTRA
# This must have Opened_tables=3, not 6.
show status like 'Opened_tables';
Variable_name Value
Opened_tables 3
drop database mysqltest;
drop database db1;
mysql-test/t/information_schema.test
View file @
5bb97877
...
...
@@ -1816,5 +1816,61 @@ drop database mysqltest;
--
echo
# End of 5.5 tests
--
echo
#
--
echo
#
--
echo
# MDEV-5723: mysqldump -uroot unusable for multi-database operations, checks all databases
--
echo
#
--
disable_warnings
drop
database
if
exists
db1
;
--
enable_warnings
connect
(
con1
,
localhost
,
root
,,);
connection
con1
;
create
database
db1
;
use
db1
;
create
table
t1
(
a
int
);
create
table
t2
(
a
int
);
create
table
t3
(
a
int
);
create
database
mysqltest
;
use
mysqltest
;
create
table
t1
(
a
int
);
create
table
t2
(
a
int
);
create
table
t3
(
a
int
);
flush
tables
;
flush
status
;
SELECT
LOGFILE_GROUP_NAME
,
FILE_NAME
,
TOTAL_EXTENTS
,
INITIAL_SIZE
,
ENGINE
,
EXTRA
FROM
INFORMATION_SCHEMA
.
FILES
WHERE
FILE_TYPE
=
'UNDO LOG'
AND
FILE_NAME
IS
NOT
NULL
AND
LOGFILE_GROUP_NAME
IN
(
SELECT
DISTINCT
LOGFILE_GROUP_NAME
FROM
INFORMATION_SCHEMA
.
FILES
WHERE
FILE_TYPE
=
'DATAFILE'
AND
TABLESPACE_NAME
IN
(
SELECT
DISTINCT
TABLESPACE_NAME
FROM
INFORMATION_SCHEMA
.
PARTITIONS
WHERE
TABLE_SCHEMA
IN
(
'db1'
)
)
)
GROUP
BY
LOGFILE_GROUP_NAME
,
FILE_NAME
,
ENGINE
ORDER
BY
LOGFILE_GROUP_NAME
;
--
echo
# This must have Opened_tables=3, not 6.
show
status
like
'Opened_tables'
;
drop
database
mysqltest
;
drop
database
db1
;
connection
default
;
disconnect
con1
;
# Wait till all disconnects are completed
--
source
include
/
wait_until_count_sessions
.
inc
sql/sql_select.cc
View file @
5bb97877
...
...
@@ -19492,7 +19492,7 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx,
for
(;
const_key_parts
&
1
;
const_key_parts
>>=
1
)
key_part
++
;
if
(
key_part
=
=
key_part_end
)
if
(
key_part
>
=
key_part_end
)
{
/*
We are at the end of the key. Check if the engine has the primary
...
...
sql/sql_show.cc
View file @
5bb97877
...
...
@@ -8021,9 +8021,21 @@ static bool do_fill_table(THD *thd,
Warning_info
*
wi_saved
=
thd
->
warning_info
;
thd
->
warning_info
=
&
wi
;
bool
res
=
table_list
->
schema_table
->
fill_table
(
thd
,
table_list
,
join_table
->
select_cond
);
Item
*
item
=
join_table
->
select_cond
;
if
(
join_table
->
cache_select
&&
join_table
->
cache_select
->
cond
)
{
/*
If join buffering is used, we should use the condition that is attached
to the join cache. Cache condition has a part of WHERE that can be
checked when we're populating this table.
join_tab->select_cond is of no interest, because it only has conditions
that depend on both this table and previous tables in the join order.
*/
item
=
join_table
->
cache_select
->
cond
;
}
bool
res
=
table_list
->
schema_table
->
fill_table
(
thd
,
table_list
,
item
);
thd
->
warning_info
=
wi_saved
;
...
...
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