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
eaa0c449
Commit
eaa0c449
authored
Dec 09, 2003
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleanup after some reasoning
parent
3248878c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
10 deletions
+16
-10
libmysql/libmysql.c
libmysql/libmysql.c
+2
-1
myisam/ft_boolean_search.c
myisam/ft_boolean_search.c
+9
-2
sql/mysqld.cc
sql/mysqld.cc
+2
-2
sql/opt_range.cc
sql/opt_range.cc
+1
-1
sql/repl_failsafe.cc
sql/repl_failsafe.cc
+0
-1
sql/table.cc
sql/table.cc
+2
-3
No files found.
libmysql/libmysql.c
View file @
eaa0c449
...
...
@@ -941,7 +941,8 @@ static void mysql_read_default_options(struct st_mysql_options *options,
options
->
rpl_parse
=
1
;
break
;
case
27
:
options
->
max_allowed_packet
=
atoi
(
opt_arg
);
if
(
opt_arg
)
options
->
max_allowed_packet
=
atoi
(
opt_arg
);
break
;
default:
DBUG_PRINT
(
"warning"
,(
"unknown option: %s"
,
option
[
0
]));
...
...
myisam/ft_boolean_search.c
View file @
eaa0c449
...
...
@@ -322,10 +322,13 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, byte *query,
to alloc queue with alloc_root()
*/
res
=
ftb
->
queue
.
max_elements
=
1
+
query_len
/
(
min
(
ft_min_word_len
,
2
)
+
1
);
ftb
->
queue
.
root
=
(
byte
**
)
alloc_root
(
&
ftb
->
mem_root
,
(
res
+
1
)
*
sizeof
(
void
*
));
if
(
!
(
ftb
->
queue
.
root
=
(
byte
**
)
alloc_root
(
&
ftb
->
mem_root
,
(
res
+
1
)
*
sizeof
(
void
*
))))
goto
err
;
reinit_queue
(
&
ftb
->
queue
,
res
,
0
,
0
,
(
int
(
*
)(
void
*
,
byte
*
,
byte
*
))
FTB_WORD_cmp
,
0
);
ftbe
=
(
FTB_EXPR
*
)
alloc_root
(
&
ftb
->
mem_root
,
sizeof
(
FTB_EXPR
));
if
(
!
(
ftbe
=
(
FTB_EXPR
*
)
alloc_root
(
&
ftb
->
mem_root
,
sizeof
(
FTB_EXPR
))))
goto
err
;
ftbe
->
weight
=
1
;
ftbe
->
flags
=
FTB_FLAG_YES
;
ftbe
->
nos
=
1
;
...
...
@@ -343,6 +346,10 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, byte *query,
if
(
ftb
->
queue
.
elements
<
2
)
ftb
->
with_scan
&=
~
FTB_FLAG_TRUNC
;
ftb
->
state
=
READY
;
return
ftb
;
err:
free_root
(
&
ftb
->
mem_root
,
MYF
(
0
));
my_free
((
gptr
)
ftb
,
MYF
(
0
));
return
0
;
}
...
...
sql/mysqld.cc
View file @
eaa0c449
...
...
@@ -4632,14 +4632,14 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
my_use_symdir
=
0
;
break
;
case
(
int
)
OPT_BIND_ADDRESS
:
if
(
argument
&&
isdigit
(
argument
[
0
]))
if
(
isdigit
(
argument
[
0
]))
{
my_bind_addr
=
(
ulong
)
inet_addr
(
argument
);
}
else
{
struct
hostent
*
ent
;
if
(
argument
||
argument
[
0
])
if
(
argument
[
0
])
ent
=
gethostbyname
(
argument
);
else
{
...
...
sql/opt_range.cc
View file @
eaa0c449
...
...
@@ -2454,7 +2454,7 @@ QUICK_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table, TABLE_REF *ref)
if
(
cp_buffer_from_ref
(
ref
))
{
if
(
thd
->
fatal_error
)
return
0
;
// out of memory
goto
err
;
// out of memory
return
quick
;
// empty range
}
...
...
sql/repl_failsafe.cc
View file @
eaa0c449
...
...
@@ -426,7 +426,6 @@ static Slave_log_event* find_slave_event(IO_CACHE* log,
my_snprintf
(
errmsg
,
SLAVE_ERRMSG_SIZE
,
"Could not find slave event in log '%s'"
,
(
char
*
)
log_file_name
);
delete
ev
;
return
0
;
}
...
...
sql/table.cc
View file @
eaa0c449
...
...
@@ -1100,13 +1100,12 @@ rename_file_ext(const char * from,const char * to,const char * ext)
char
*
get_field
(
MEM_ROOT
*
mem
,
TABLE
*
table
,
uint
fieldnr
)
{
Field
*
field
=
table
->
field
[
fieldnr
];
char
buff
[
MAX_FIELD_WIDTH
];
char
buff
[
MAX_FIELD_WIDTH
]
,
*
to
;
String
str
(
buff
,
sizeof
(
buff
));
field
->
val_str
(
&
str
,
&
str
);
uint
length
=
str
.
length
();
if
(
!
length
)
if
(
!
length
||
!
(
to
=
(
char
*
)
alloc_root
(
mem
,
length
+
1
))
)
return
NullS
;
char
*
to
=
(
char
*
)
alloc_root
(
mem
,
length
+
1
);
memcpy
(
to
,
str
.
ptr
(),(
uint
)
length
);
to
[
length
]
=
0
;
return
to
;
...
...
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