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
5992281d
Commit
5992281d
authored
Aug 31, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.0-maint
into rama.(none):/home/jimw/my/mysql-5.0-clean
parents
b6d3f563
55c61a6e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
256 additions
and
207 deletions
+256
-207
client/mysqldump.c
client/mysqldump.c
+8
-4
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+158
-124
mysql-test/t/mysqldump.test
mysql-test/t/mysqldump.test
+90
-79
No files found.
client/mysqldump.c
View file @
5992281d
...
...
@@ -850,8 +850,8 @@ static int get_options(int *argc, char ***argv)
static
void
DB_error
(
MYSQL
*
mysql
,
const
char
*
when
)
{
DBUG_ENTER
(
"DB_error"
);
my_printf_error
(
0
,
"Got error: %d: %s %s"
,
MYF
(
0
)
,
mysql_errno
(
mysql
),
mysql_error
(
mysql
),
when
);
fprintf
(
stderr
,
"%s: Got error: %d: %s %s
\n
"
,
my_progname
,
mysql_errno
(
mysql
),
mysql_error
(
mysql
),
when
);
safe_exit
(
EX_MYSQLERR
);
DBUG_VOID_RETURN
;
}
/* DB_error */
...
...
@@ -879,8 +879,9 @@ static int mysql_query_with_error_report(MYSQL *mysql_con, MYSQL_RES **res,
if
(
mysql_query
(
mysql_con
,
query
)
||
(
res
&&
!
((
*
res
)
=
mysql_store_result
(
mysql_con
))))
{
my_printf_error
(
0
,
"Couldn't execute '%s': %s (%d)"
,
MYF
(
0
),
query
,
mysql_error
(
mysql_con
),
mysql_errno
(
mysql_con
));
fprintf
(
stderr
,
"%s: Couldn't execute '%s': %s (%d)
\n
"
,
my_progname
,
query
,
mysql_error
(
mysql_con
),
mysql_errno
(
mysql_con
));
safe_exit
(
EX_MYSQLERR
);
return
1
;
}
...
...
@@ -2234,7 +2235,10 @@ static void dump_table(char *table, char *db)
check_io
(
md_result_file
);
}
if
(
mysql_query_with_error_report
(
mysql
,
0
,
query
))
{
DB_error
(
mysql
,
"when retrieving data from server"
);
goto
err
;
}
if
(
quick
)
res
=
mysql_use_result
(
mysql
);
else
...
...
mysql-test/r/mysqldump.result
View file @
5992281d
This diff is collapsed.
Click to expand it.
mysql-test/t/mysqldump.test
View file @
5992281d
...
...
@@ -548,71 +548,6 @@ INSERT INTO t1 VALUES (1),(2),(3);
--
exec
$MYSQL_DUMP
--
add
-
drop
-
database
--
skip
-
comments
--
databases
test
DROP
TABLE
t1
;
#
# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
#
create
database
db1
;
use
db1
;
CREATE
TABLE
t2
(
a
varchar
(
30
)
default
NULL
,
KEY
a
(
a
(
5
))
);
INSERT
INTO
t2
VALUES
(
'alfred'
);
INSERT
INTO
t2
VALUES
(
'angie'
);
INSERT
INTO
t2
VALUES
(
'bingo'
);
INSERT
INTO
t2
VALUES
(
'waffle'
);
INSERT
INTO
t2
VALUES
(
'lemon'
);
create
view
v2
as
select
*
from
t2
where
a
like
'a%'
with
check
option
;
--
exec
$MYSQL_DUMP
--
skip
-
comments
db1
drop
table
t2
;
drop
view
v2
;
drop
database
db1
;
#
# Bug 10713 mysqldump includes database in create view and referenced tables
#
# create table and views in db2
create
database
db2
;
use
db2
;
create
table
t1
(
a
int
);
create
table
t2
(
a
int
,
b
varchar
(
10
),
primary
key
(
a
));
insert
into
t2
values
(
1
,
"on"
),
(
2
,
"off"
),
(
10
,
"pol"
),
(
12
,
"meg"
);
insert
into
t1
values
(
289
),
(
298
),
(
234
),
(
456
),
(
789
);
create
view
v1
as
select
*
from
t2
;
create
view
v2
as
select
*
from
t1
;
# dump tables and view from db2
--
exec
$MYSQL_DUMP
db2
>
$MYSQLTEST_VARDIR
/
tmp
/
bug10713
.
sql
# drop the db, tables and views
drop
table
t1
,
t2
;
drop
view
v1
,
v2
;
drop
database
db2
;
# create db1 and reload dump
create
database
db1
;
use
db1
;
--
exec
$MYSQL
db1
<
$MYSQLTEST_VARDIR
/
tmp
/
bug10713
.
sql
# check that all tables and views could be created
show
tables
;
select
*
from
t2
order
by
a
;
drop
table
t1
,
t2
;
drop
database
db1
;
#
# BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
#
--
exec
$MYSQL_MY_PRINT_DEFAULTS
--
config
-
file
=
$MYSQL_TEST_DIR
/
std_data
/
bug15328
.
cnf
mysqldump
#
# Bug #9558 mysqldump --no-data db t1 t2 format still dumps data
#
...
...
@@ -719,6 +654,12 @@ select * from t1;
drop
table
t1
;
#
# BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
#
--
exec
$MYSQL_MY_PRINT_DEFAULTS
--
config
-
file
=
$MYSQL_TEST_DIR
/
std_data
/
bug15328
.
cnf
mysqldump
#
# BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
#
...
...
@@ -748,8 +689,87 @@ show create table `t1`;
drop
table
`t1`
;
#
# Bug #18536: wrong table order
#
create
table
t1
(
a
int
);
create
table
t2
(
a
int
);
create
table
t3
(
a
int
);
--
error
6
--
exec
$MYSQL_DUMP
--
skip
-
comments
--
force
--
no
-
data
test
t3
t1
non_existing
t2
drop
table
t1
,
t2
,
t3
;
#
# Bug #21288: mysqldump segmentation fault when using --where
#
create
table
t1
(
a
int
);
--
error
2
--
exec
$MYSQL_DUMP
--
skip
-
comments
--
force
test
t1
--
where
=
'xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
2
>&
1
drop
table
t1
;
--
echo
End
of
4.1
tests
#
# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
#
create
database
db1
;
use
db1
;
CREATE
TABLE
t2
(
a
varchar
(
30
)
default
NULL
,
KEY
a
(
a
(
5
))
);
INSERT
INTO
t2
VALUES
(
'alfred'
);
INSERT
INTO
t2
VALUES
(
'angie'
);
INSERT
INTO
t2
VALUES
(
'bingo'
);
INSERT
INTO
t2
VALUES
(
'waffle'
);
INSERT
INTO
t2
VALUES
(
'lemon'
);
create
view
v2
as
select
*
from
t2
where
a
like
'a%'
with
check
option
;
--
exec
$MYSQL_DUMP
--
skip
-
comments
db1
drop
table
t2
;
drop
view
v2
;
drop
database
db1
;
use
test
;
#
# Bug 10713 mysqldump includes database in create view and referenced tables
#
# create table and views in db2
create
database
db2
;
use
db2
;
create
table
t1
(
a
int
);
create
table
t2
(
a
int
,
b
varchar
(
10
),
primary
key
(
a
));
insert
into
t2
values
(
1
,
"on"
),
(
2
,
"off"
),
(
10
,
"pol"
),
(
12
,
"meg"
);
insert
into
t1
values
(
289
),
(
298
),
(
234
),
(
456
),
(
789
);
create
view
v1
as
select
*
from
t2
;
create
view
v2
as
select
*
from
t1
;
# dump tables and view from db2
--
exec
$MYSQL_DUMP
db2
>
$MYSQLTEST_VARDIR
/
tmp
/
bug10713
.
sql
# drop the db, tables and views
drop
table
t1
,
t2
;
drop
view
v1
,
v2
;
drop
database
db2
;
use
test
;
# create db1 and reload dump
create
database
db1
;
use
db1
;
--
exec
$MYSQL
db1
<
$MYSQLTEST_VARDIR
/
tmp
/
bug10713
.
sql
# check that all tables and views could be created
show
tables
;
select
*
from
t2
order
by
a
;
drop
table
t1
,
t2
;
drop
database
db1
;
use
test
;
#
# dump of view
#
...
...
@@ -813,6 +833,7 @@ select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1;
drop
view
v1
,
v2
,
v3
;
drop
table
t1
;
#
# Test for dumping triggers
#
...
...
@@ -1072,19 +1093,6 @@ insert into t1 values ('','');
--
exec
$MYSQL_DUMP
--
skip
-
comments
--
hex
-
blob
test
t1
drop
table
t1
;
#
# Bug #18536: wrong table order
#
create
table
t1
(
a
int
);
create
table
t2
(
a
int
);
create
table
t3
(
a
int
);
--
error
6
--
exec
$MYSQL_DUMP
--
skip
-
comments
--
force
--
no
-
data
test
t3
t1
non_existing
t2
drop
table
t1
,
t2
,
t3
;
--
echo
End
of
4.1
tests
#
# Bug 14871 Invalid view dump output
#
...
...
@@ -1266,11 +1274,11 @@ use mysqldump_dbb;
drop
view
v1
;
drop
table
t1
;
drop
database
mysqldump_dbb
;
use
test
;
#
# Bug#21215 mysqldump creating incomplete backups without warning
#
use
test
;
# Create user without sufficient privs to perform the requested operation
create
user
mysqltest_1
@
localhost
;
...
...
@@ -1339,3 +1347,6 @@ drop table t1;
revoke
all
privileges
on
mysqldump_myDB
.*
from
myDB_User
@
localhost
;
drop
user
myDB_User
;
drop
database
mysqldump_myDB
;
use
test
;
--
echo
End
of
5.0
tests
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