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
92ffe8cf
Commit
92ffe8cf
authored
Feb 02, 2006
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #16753 DD: mysqldump does not support Cluster Disk Data backups
parent
8c024b90
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
50 deletions
+82
-50
client/mysqldump.c
client/mysqldump.c
+48
-35
mysql-test/r/ndb_dd_dump.result
mysql-test/r/ndb_dd_dump.result
+21
-12
mysql-test/t/ndb_dd_dump.test
mysql-test/t/ndb_dd_dump.test
+13
-3
No files found.
client/mysqldump.c
View file @
92ffe8cf
...
...
@@ -2489,14 +2489,15 @@ static int dump_all_tablespaces()
int
first
;
if
(
mysql_query_with_error_report
(
sock
,
&
tableres
,
"SELECT DISTINCT "
"LOGFILE_GROUP_NAME,"
"FILE_NAME,"
"INITIAL_SIZE,"
"ENGINE "
"FROM INFORMATION_SCHEMA.FILES "
"WHERE FILE_TYPE =
\"
UNDO LOG
\"
"
"ORDER BY LOGFILE_GROUP_NAME"
))
"SELECT DISTINCT"
" LOGFILE_GROUP_NAME,"
" FILE_NAME,"
" TOTAL_EXTENTS,"
" INITIAL_SIZE,"
" ENGINE"
" FROM INFORMATION_SCHEMA.FILES"
" WHERE FILE_TYPE =
\"
UNDO LOG
\"
"
" ORDER BY LOGFILE_GROUP_NAME"
))
return
1
;
buf
[
0
]
=
0
;
...
...
@@ -2506,14 +2507,12 @@ static int dump_all_tablespaces()
first
=
1
;
if
(
first
)
{
first
=
0
;
if
(
!
opt_xml
&&
opt_comments
)
{
fprintf
(
md_result_file
,
"
\n
--
\n
-- Logfile group: %s
\n
--
\n
"
,
row
[
0
]);
check_io
(
md_result_file
);
}
fprintf
(
md_result_file
,
"
\n
CREATE"
);
strxmov
(
buf
,
row
[
0
],
NullS
);
}
else
{
...
...
@@ -2521,27 +2520,39 @@ static int dump_all_tablespaces()
}
fprintf
(
md_result_file
,
" LOGFILE GROUP %s
\n
"
" ADD UNDOFILE '%s'
\n
"
" ADD UNDOFILE '%s'
\n
"
,
row
[
0
],
row
[
1
]);
if
(
first
)
{
fprintf
(
md_result_file
,
" UNDO_BUFFER_SIZE %s
\n
"
,
row
[
2
]);
}
fprintf
(
md_result_file
,
" INITIAL_SIZE %s
\n
"
" ENGINE=%s;
\n
"
,
row
[
0
],
row
[
1
],
row
[
2
],
row
[
3
]
);
row
[
3
],
row
[
4
]);
check_io
(
md_result_file
);
if
(
first
)
{
first
=
0
;
strxmov
(
buf
,
row
[
0
],
NullS
);
}
}
if
(
mysql_query_with_error_report
(
sock
,
&
tableres
,
"SELECT DISTINCT "
"TABLESPACE_NAME,"
"LOGFILE_GROUP_NAME,"
"FILE_NAME,"
"INITIAL_SIZE,"
"ENGINE "
"FROM INFORMATION_SCHEMA.FILES "
"WHERE FILE_TYPE =
\"
DATAFILE
\"
"
"ORDER BY TABLESPACE_NAME, LOGFILE_GROUP_NAME"
))
"SELECT DISTINCT"
" TABLESPACE_NAME,"
" FILE_NAME,"
" LOGFILE_GROUP_NAME,"
" EXTENT_SIZE,"
" INITIAL_SIZE,"
" ENGINE"
" FROM INFORMATION_SCHEMA.FILES"
" WHERE FILE_TYPE =
\"
DATAFILE
\"
"
" ORDER BY TABLESPACE_NAME, LOGFILE_GROUP_NAME"
))
return
1
;
buf
[
0
]
=
0
;
...
...
@@ -2557,7 +2568,6 @@ static int dump_all_tablespaces()
check_io
(
md_result_file
);
}
fprintf
(
md_result_file
,
"
\n
CREATE"
);
strxmov
(
buf
,
row
[
0
],
NullS
);
}
else
{
...
...
@@ -2567,23 +2577,26 @@ static int dump_all_tablespaces()
" TABLESPACE %s
\n
"
" ADD DATAFILE '%s'
\n
"
,
row
[
0
],
row
[
2
]
);
row
[
1
]);
if
(
first
)
{
first
=
0
;
fprintf
(
md_result_file
,
" USE LOGFILE GROUP %s
\n
"
,
row
[
1
]
);
" USE LOGFILE GROUP %s
\n
"
" EXTENT_SIZE %s
\n
"
,
row
[
2
],
row
[
3
]);
}
fprintf
(
md_result_file
,
" INITIAL_SIZE %s
\n
"
" ENGINE=%s;
\n
"
,
row
[
3
],
row
[
4
]
);
row
[
4
],
row
[
5
]);
check_io
(
md_result_file
);
if
(
first
)
{
first
=
0
;
strxmov
(
buf
,
row
[
0
],
NullS
);
}
}
return
0
;
}
...
...
mysql-test/r/ndb_dd_dump.result
View file @
92ffe8cf
...
...
@@ -10,8 +10,8 @@ INITIAL_SIZE = 4M
ENGINE NDB;
CREATE LOGFILE GROUP lg2
ADD UNDOFILE 'undofile_lg2_01.dat'
INITIAL_SIZE 2M
UNDO_BUFFER_SIZE = 1M
INITIAL_SIZE 2M
ENGINE NDB;
ALTER LOGFILE GROUP lg2
ADD UNDOFILE 'undofile_lg2_02.dat'
...
...
@@ -20,6 +20,7 @@ ENGINE NDB;
CREATE TABLESPACE ts1
ADD DATAFILE 'datafile_ts1_01.dat'
USE LOGFILE GROUP lg1
EXTENT_SIZE 1M
INITIAL_SIZE 2M
ENGINE NDB;
ALTER TABLESPACE ts1
...
...
@@ -174,22 +175,30 @@ DROP TABLESPACE ts3 ENGINE = NDB;
DROP LOGFILE GROUP lg1 ENGINE = NDB;
DROP LOGFILE GROUP lg2 ENGINE = NDB;
SELECT DISTINCT
LOGFILE_GROUP_NAME,
FILE_NAME,
TOTAL_EXTENTS,
INITIAL_SIZE,
ENGINE
FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME;
LOGFILE_GROUP_NAME FILE_NAME TOTAL_EXTENTS INITIAL_SIZE ENGINE
lg1 undofile_lg1_01.dat 1048576 2097152 ndbcluster
lg1 undofile_lg1_02.dat 1048576 4194304 ndbcluster
lg2 undofile_lg2_01.dat 1048576 2097152 ndbcluster
lg2 undofile_lg2_02.dat 1048576 4194304 ndbcluster
SELECT DISTINCT
TABLESPACE_NAME,
LOGFILE_GROUP_NAME,
FILE_TYPE,
FILE_NAME,
EXTENT_SIZE,
INITIAL_SIZE,
ENGINE
FROM INFORMATION_SCHEMA.FILES ORDER BY FILE_NAME;
TABLESPACE_NAME LOGFILE_GROUP_NAME FILE_TYPE FILE_NAME INITIAL_SIZE ENGINE
ts1 lg1 DATAFILE datafile_ts1_01.dat 2097152 ndbcluster
ts1 lg1 DATAFILE datafile_ts1_02.dat 1048576 ndbcluster
ts2 lg1 DATAFILE datafile_ts2_01.dat 2097152 ndbcluster
ts3 lg2 DATAFILE datafile_ts3_01.dat 4194304 ndbcluster
ts3 lg1 UNDO LOG undofile_lg1_01.dat 2097152 ndbcluster
ts3 lg1 UNDO LOG undofile_lg1_02.dat 4194304 ndbcluster
ts3 lg2 UNDO LOG undofile_lg2_01.dat 2097152 ndbcluster
ts3 lg2 UNDO LOG undofile_lg2_02.dat 4194304 ndbcluster
FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="DATAFILE" ORDER BY FILE_NAME;
TABLESPACE_NAME LOGFILE_GROUP_NAME FILE_NAME EXTENT_SIZE INITIAL_SIZE ENGINE
ts1 lg1 datafile_ts1_01.dat 1048576 2097152 ndbcluster
ts1 lg1 datafile_ts1_02.dat 1048576 1048576 ndbcluster
ts2 lg1 datafile_ts2_01.dat 1048576 2097152 ndbcluster
ts3 lg2 datafile_ts3_01.dat 1048576 4194304 ndbcluster
SELECT COUNT(*) FROM t1;
COUNT(*)
500
...
...
mysql-test/t/ndb_dd_dump.test
View file @
92ffe8cf
...
...
@@ -17,8 +17,8 @@ ENGINE NDB;
CREATE
LOGFILE
GROUP
lg2
ADD
UNDOFILE
'undofile_lg2_01.dat'
INITIAL_SIZE
2
M
UNDO_BUFFER_SIZE
=
1
M
INITIAL_SIZE
2
M
ENGINE
NDB
;
ALTER
LOGFILE
GROUP
lg2
...
...
@@ -29,6 +29,7 @@ ENGINE NDB;
CREATE
TABLESPACE
ts1
ADD
DATAFILE
'datafile_ts1_01.dat'
USE
LOGFILE
GROUP lg1
EXTENT_SIZE 1M
INITIAL_SIZE 2M
ENGINE NDB
;
...
...
@@ -207,14 +208,23 @@ DROP LOGFILE GROUP lg2 ENGINE = NDB;
--
exec
$MYSQL
test
<
var
/
tmp
/
ndb_dd_dump
.
sql
SELECT
DISTINCT
LOGFILE_GROUP_NAME
,
FILE_NAME
,
TOTAL_EXTENTS
,
INITIAL_SIZE
,
ENGINE
FROM
INFORMATION_SCHEMA
.
FILES
WHERE
FILE_TYPE
=
"UNDO LOG"
ORDER
BY
FILE_NAME
;
SELECT
DISTINCT
TABLESPACE_NAME
,
LOGFILE_GROUP_NAME
,
FILE_TYPE
,
FILE_NAME
,
EXTENT_SIZE
,
INITIAL_SIZE
,
ENGINE
FROM
INFORMATION_SCHEMA
.
FILES
ORDER
BY
FILE_NAME
;
FROM
INFORMATION_SCHEMA
.
FILES
WHERE
FILE_TYPE
=
"DATAFILE"
ORDER
BY
FILE_NAME
;
SELECT
COUNT
(
*
)
FROM
t1
;
SELECT
COUNT
(
*
)
FROM
t2
;
SELECT
COUNT
(
*
)
FROM
t3
;
...
...
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