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
cf6e2214
Commit
cf6e2214
authored
Dec 28, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client/mysqldump.c
compilation failure fixed cleanup
parent
1613bf27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
28 deletions
+15
-28
client/mysqldump.c
client/mysqldump.c
+15
-28
No files found.
client/mysqldump.c
View file @
cf6e2214
...
@@ -137,7 +137,6 @@ typedef struct st_table_rule_ent
...
@@ -137,7 +137,6 @@ typedef struct st_table_rule_ent
uint
key_len
;
uint
key_len
;
}
TABLE_RULE_ENT
;
}
TABLE_RULE_ENT
;
my_bool
ignore_table_inited
;
HASH
ignore_table
;
HASH
ignore_table
;
static
struct
my_option
my_long_options
[]
=
static
struct
my_option
my_long_options
[]
=
...
@@ -532,16 +531,12 @@ static byte* get_table_key(TABLE_RULE_ENT* e, uint* len,
...
@@ -532,16 +531,12 @@ static byte* get_table_key(TABLE_RULE_ENT* e, uint* len,
}
}
void
init_table_rule_hash
(
HASH
*
h
,
bool
*
h_inited
)
void
init_table_rule_hash
(
HASH
*
h
)
{
{
if
(
hash_init
(
h
,
charset_info
,
TABLE_RULE_HASH_SIZE
,
0
,
0
,
if
(
hash_init
(
h
,
charset_info
,
TABLE_RULE_HASH_SIZE
,
0
,
0
,
(
hash_get_key
)
get_table_key
,
(
hash_get_key
)
get_table_key
,
(
hash_free_key
)
free_table_ent
,
0
))
(
hash_free_key
)
free_table_ent
,
0
))
{
exit
(
EX_EOM
);
fprintf
(
stderr
,
"Internal hash initialization error
\n
"
);
exit
(
1
);
}
*
h_inited
=
1
;
}
}
...
@@ -617,37 +612,30 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -617,37 +612,30 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break
;
break
;
case
(
int
)
OPT_IGNORE_TABLE
:
case
(
int
)
OPT_IGNORE_TABLE
:
{
{
const
char
*
dot
=
strchr
(
argument
,
'.'
);
if
(
!
dot
)
{
fprintf
(
stderr
,
"Illegal use of option --ignore-table=<database>.<table>
\n
"
);
exit
(
1
);
}
// len is always > 0 because we know the there exists a '.'
uint
len
=
(
uint
)
strlen
(
argument
);
uint
len
=
(
uint
)
strlen
(
argument
);
TABLE_RULE_ENT
*
e
=
(
TABLE_RULE_ENT
*
)
my_malloc
(
sizeof
(
TABLE_RULE_ENT
)
TABLE_RULE_ENT
*
e
;
+
len
,
MYF
(
MY_WME
));
if
(
!
strchr
(
argument
,
'.'
))
if
(
!
e
)
{
{
fprintf
(
stderr
,
"I
nternal memory allocation error
\n
"
);
fprintf
(
stderr
,
"I
llegal use of option --ignore-table=<database>.<table>
\n
"
);
exit
(
1
);
exit
(
1
);
}
}
/* len is always > 0 because we know the there exists a '.' */
e
=
(
TABLE_RULE_ENT
*
)
my_malloc
(
sizeof
(
TABLE_RULE_ENT
)
+
len
,
MYF
(
MY_WME
));
if
(
!
e
)
exit
(
EX_EOM
);
e
->
key
=
(
char
*
)
e
+
sizeof
(
TABLE_RULE_ENT
);
e
->
key
=
(
char
*
)
e
+
sizeof
(
TABLE_RULE_ENT
);
e
->
key_len
=
len
;
e
->
key_len
=
len
;
memcpy
(
e
->
key
,
argument
,
len
);
memcpy
(
e
->
key
,
argument
,
len
);
if
(
!
ignore_table_inited
)
if
(
!
hash_inited
(
&
ignore_table
)
)
init_table_rule_hash
(
&
ignore_table
,
&
ignore_table_inited
);
init_table_rule_hash
(
&
ignore_table
);
if
(
my_hash_insert
(
&
ignore_table
,
(
byte
*
)
e
))
if
(
my_hash_insert
(
&
ignore_table
,
(
byte
*
)
e
))
{
exit
(
EX_EOM
);
fprintf
(
stderr
,
"Internal hash insert error
\n
"
);
exit
(
1
);
}
break
;
break
;
}
}
case
(
int
)
OPT_COMPATIBLE
:
case
(
int
)
OPT_COMPATIBLE
:
{
{
char
buff
[
255
];
char
buff
[
255
];
char
*
end
=
compatible_mode_normal_str
;
char
*
end
=
compatible_mode_normal_str
;
int
i
;
int
i
;
...
@@ -2021,8 +2009,7 @@ static int init_dumping(char *database)
...
@@ -2021,8 +2009,7 @@ static int init_dumping(char *database)
my_bool
include_table
(
byte
*
hash_key
,
uint
len
)
my_bool
include_table
(
byte
*
hash_key
,
uint
len
)
{
{
if
(
ignore_table_inited
&&
if
(
hash_search
(
&
ignore_table
,
(
byte
*
)
hash_key
,
len
))
hash_search
(
&
ignore_table
,
(
byte
*
)
hash_key
,
len
))
return
FALSE
;
return
FALSE
;
return
TRUE
;
return
TRUE
;
...
...
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