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
1b6962a4
Commit
1b6962a4
authored
Jul 14, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/tnurnberg/work/mysql-5.0-21014
parents
316577d6
f27e9254
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
88 additions
and
2 deletions
+88
-2
client/mysqldump.c
client/mysqldump.c
+9
-2
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+61
-0
mysql-test/t/mysqldump.test
mysql-test/t/mysqldump.test
+18
-0
No files found.
client/mysqldump.c
View file @
1b6962a4
...
@@ -2781,6 +2781,12 @@ static my_bool dump_all_views_in_db(char *database)
...
@@ -2781,6 +2781,12 @@ static my_bool dump_all_views_in_db(char *database)
uint
numrows
;
uint
numrows
;
char
table_buff
[
NAME_LEN
*
2
+
3
];
char
table_buff
[
NAME_LEN
*
2
+
3
];
if
(
mysql_select_db
(
sock
,
database
))
{
DB_error
(
sock
,
"when selecting the database"
);
return
1
;
}
if
(
opt_xml
)
if
(
opt_xml
)
print_xml_tag1
(
md_result_file
,
""
,
"database name="
,
database
,
"
\n
"
);
print_xml_tag1
(
md_result_file
,
""
,
"database name="
,
database
,
"
\n
"
);
if
(
lock_tables
)
if
(
lock_tables
)
...
@@ -3436,12 +3442,13 @@ static my_bool get_view_structure(char *table, char* db)
...
@@ -3436,12 +3442,13 @@ static my_bool get_view_structure(char *table, char* db)
mysql_free_result
(
table_res
);
mysql_free_result
(
table_res
);
/* Get the result from "select ... information_schema" */
/* Get the result from "select ... information_schema" */
if
(
!
(
table_res
=
mysql_store_result
(
sock
)))
if
(
!
(
table_res
=
mysql_store_result
(
sock
))
||
!
(
row
=
mysql_fetch_row
(
table_res
)))
{
{
safe_exit
(
EX_MYSQLERR
);
safe_exit
(
EX_MYSQLERR
);
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
row
=
mysql_fetch_row
(
table_res
);
lengths
=
mysql_fetch_lengths
(
table_res
);
lengths
=
mysql_fetch_lengths
(
table_res
);
/*
/*
...
...
mysql-test/r/mysqldump.result
View file @
1b6962a4
...
@@ -2844,3 +2844,64 @@ DROP TABLE IF EXISTS `v1`;
...
@@ -2844,3 +2844,64 @@ DROP TABLE IF EXISTS `v1`;
drop view v1;
drop view v1;
drop table t1;
drop table t1;
drop database mysqldump_test_db;
drop database mysqldump_test_db;
create database mysqldump_tables;
use mysqldump_tables;
create table basetable ( id serial, tag varchar(64) );
create database mysqldump_views;
use mysqldump_views;
create view nasishnasifu as select mysqldump_tables.basetable.id from mysqldump_tables.basetable;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_tables` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `mysqldump_tables`;
DROP TABLE IF EXISTS `basetable`;
CREATE TABLE `basetable` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`tag` varchar(64) default NULL,
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40000 ALTER TABLE `basetable` DISABLE KEYS */;
LOCK TABLES `basetable` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `basetable` ENABLE KEYS */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_views` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `mysqldump_views`;
DROP TABLE IF EXISTS `nasishnasifu`;
/*!50001 DROP VIEW IF EXISTS `nasishnasifu`*/;
/*!50001 CREATE TABLE `nasishnasifu` (
`id` bigint(20) unsigned
) */;
/*!50001 DROP TABLE IF EXISTS `nasishnasifu`*/;
/*!50001 DROP VIEW IF EXISTS `nasishnasifu`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `mysqldump_views`.`nasishnasifu` AS select `mysqldump_tables`.`basetable`.`id` AS `id` from `mysqldump_tables`.`basetable` */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
drop view nasishnasifu;
drop database mysqldump_views;
drop table mysqldump_tables.basetable;
drop database mysqldump_tables;
mysql-test/t/mysqldump.test
View file @
1b6962a4
...
@@ -1194,6 +1194,7 @@ drop table t1;
...
@@ -1194,6 +1194,7 @@ drop table t1;
--
exec
$MYSQL_DUMP
--
force
-
N
--
compact
--
skip
-
comments
test
--
exec
$MYSQL_DUMP
--
force
-
N
--
compact
--
skip
-
comments
test
--
echo
}
mysqldump
--
echo
}
mysqldump
drop
view
v1
;
drop
view
v1
;
# BUG#17201 Spurious 'DROP DATABASE' in output,
# BUG#17201 Spurious 'DROP DATABASE' in output,
# also confusion between tables and views.
# also confusion between tables and views.
# Example code from Markus Popp
# Example code from Markus Popp
...
@@ -1210,3 +1211,20 @@ insert into t1 values (0815);
...
@@ -1210,3 +1211,20 @@ insert into t1 values (0815);
drop
view
v1
;
drop
view
v1
;
drop
table
t1
;
drop
table
t1
;
drop
database
mysqldump_test_db
;
drop
database
mysqldump_test_db
;
# Bug21014 Segmentation fault of mysqldump on view
create
database
mysqldump_tables
;
use
mysqldump_tables
;
create
table
basetable
(
id
serial
,
tag
varchar
(
64
)
);
create
database
mysqldump_views
;
use
mysqldump_views
;
create
view
nasishnasifu
as
select
mysqldump_tables
.
basetable
.
id
from
mysqldump_tables
.
basetable
;
--
exec
$MYSQL_DUMP
--
skip
-
comments
--
databases
mysqldump_tables
mysqldump_views
;
drop
view
nasishnasifu
;
drop
database
mysqldump_views
;
drop
table
mysqldump_tables
.
basetable
;
drop
database
mysqldump_tables
;
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