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
13af8650
Commit
13af8650
authored
Nov 18, 2015
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-8719 - Obsolete sql_memdup() in favor of THD::memdup() and thd_memdup()
parent
55e67c3e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
17 deletions
+6
-17
sql/opt_range.h
sql/opt_range.h
+0
-1
sql/partition_info.cc
sql/partition_info.cc
+3
-3
sql/partition_info.h
sql/partition_info.h
+1
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-2
sql/thr_malloc.cc
sql/thr_malloc.cc
+0
-9
sql/thr_malloc.h
sql/thr_malloc.h
+0
-1
No files found.
sql/opt_range.h
View file @
13af8650
...
@@ -24,7 +24,6 @@
...
@@ -24,7 +24,6 @@
#pragma interface
/* gcc class implementation */
#pragma interface
/* gcc class implementation */
#endif
#endif
#include "thr_malloc.h"
/* sql_memdup */
#include "records.h"
/* READ_RECORD */
#include "records.h"
/* READ_RECORD */
#include "queues.h"
/* QUEUE */
#include "queues.h"
/* QUEUE */
/*
/*
...
...
sql/partition_info.cc
View file @
13af8650
...
@@ -1940,11 +1940,11 @@ void partition_info::print_no_partition_found(TABLE *table_arg, myf errflag)
...
@@ -1940,11 +1940,11 @@ void partition_info::print_no_partition_found(TABLE *table_arg, myf errflag)
FALSE Success
FALSE Success
*/
*/
bool
partition_info
::
set_part_expr
(
char
*
start_token
,
Item
*
item_ptr
,
bool
partition_info
::
set_part_expr
(
THD
*
thd
,
char
*
start_token
,
Item
*
item_ptr
,
char
*
end_token
,
bool
is_subpart
)
char
*
end_token
,
bool
is_subpart
)
{
{
uint
expr_len
=
end_token
-
start_token
;
uint
expr_len
=
end_token
-
start_token
;
char
*
func_string
=
(
char
*
)
sql_
memdup
(
start_token
,
expr_len
);
char
*
func_string
=
(
char
*
)
thd
->
memdup
(
start_token
,
expr_len
);
if
(
!
func_string
)
if
(
!
func_string
)
{
{
...
@@ -3153,7 +3153,7 @@ part_column_list_val *partition_info::add_column_value(THD *thd)
...
@@ -3153,7 +3153,7 @@ part_column_list_val *partition_info::add_column_value(THD *thd)
return
NULL
;
return
NULL
;
}
}
bool
partition_info
::
set_part_expr
(
char
*
start_token
,
Item
*
item_ptr
,
bool
partition_info
::
set_part_expr
(
THD
*
thd
,
char
*
start_token
,
Item
*
item_ptr
,
char
*
end_token
,
bool
is_subpart
)
char
*
end_token
,
bool
is_subpart
)
{
{
(
void
)
start_token
;
(
void
)
start_token
;
...
...
sql/partition_info.h
View file @
13af8650
...
@@ -332,7 +332,7 @@ class partition_info : public Sql_alloc
...
@@ -332,7 +332,7 @@ class partition_info : public Sql_alloc
void
init_col_val
(
part_column_list_val
*
col_val
,
Item
*
item
);
void
init_col_val
(
part_column_list_val
*
col_val
,
Item
*
item
);
int
reorganize_into_single_field_col_val
(
THD
*
thd
);
int
reorganize_into_single_field_col_val
(
THD
*
thd
);
part_column_list_val
*
add_column_value
(
THD
*
thd
);
part_column_list_val
*
add_column_value
(
THD
*
thd
);
bool
set_part_expr
(
char
*
start_token
,
Item
*
item_ptr
,
bool
set_part_expr
(
THD
*
thd
,
char
*
start_token
,
Item
*
item_ptr
,
char
*
end_token
,
bool
is_subpart
);
char
*
end_token
,
bool
is_subpart
);
static
int
compare_column_values
(
const
void
*
a
,
const
void
*
b
);
static
int
compare_column_values
(
const
void
*
a
,
const
void
*
b
);
bool
set_up_charset_field_preps
(
THD
*
thd
);
bool
set_up_charset_field_preps
(
THD
*
thd
);
...
...
sql/sql_yacc.yy
View file @
13af8650
...
@@ -5055,7 +5055,7 @@ part_func:
...
@@ -5055,7 +5055,7 @@ part_func:
'(' remember_name part_func_expr remember_end ')'
'(' remember_name part_func_expr remember_end ')'
{
{
partition_info *part_info= Lex->part_info;
partition_info *part_info= Lex->part_info;
if (part_info->set_part_expr(
$2+
1, $3, $4, FALSE))
if (part_info->set_part_expr(
thd, $2 +
1, $3, $4, FALSE))
{ MYSQL_YYABORT; }
{ MYSQL_YYABORT; }
part_info->num_columns= 1;
part_info->num_columns= 1;
part_info->column_list= FALSE;
part_info->column_list= FALSE;
...
@@ -5065,7 +5065,7 @@ part_func:
...
@@ -5065,7 +5065,7 @@ part_func:
sub_part_func:
sub_part_func:
'(' remember_name part_func_expr remember_end ')'
'(' remember_name part_func_expr remember_end ')'
{
{
if (Lex->part_info->set_part_expr(
$2+
1, $3, $4, TRUE))
if (Lex->part_info->set_part_expr(
thd, $2 +
1, $3, $4, TRUE))
{ MYSQL_YYABORT; }
{ MYSQL_YYABORT; }
}
}
;
;
...
...
sql/thr_malloc.cc
View file @
13af8650
...
@@ -106,15 +106,6 @@ char *sql_strmake(const char *str, size_t len)
...
@@ -106,15 +106,6 @@ char *sql_strmake(const char *str, size_t len)
}
}
void
*
sql_memdup
(
const
void
*
ptr
,
size_t
len
)
{
void
*
pos
;
if
((
pos
=
sql_alloc
(
len
)))
memcpy
(
pos
,
ptr
,
len
);
return
pos
;
}
char
*
sql_strmake_with_convert
(
const
char
*
str
,
size_t
arg_length
,
char
*
sql_strmake_with_convert
(
const
char
*
str
,
size_t
arg_length
,
CHARSET_INFO
*
from_cs
,
CHARSET_INFO
*
from_cs
,
size_t
max_res_length
,
size_t
max_res_length
,
...
...
sql/thr_malloc.h
View file @
13af8650
...
@@ -26,7 +26,6 @@ void *sql_alloc(size_t);
...
@@ -26,7 +26,6 @@ void *sql_alloc(size_t);
void
*
sql_calloc
(
size_t
);
void
*
sql_calloc
(
size_t
);
char
*
sql_strdup
(
const
char
*
str
);
char
*
sql_strdup
(
const
char
*
str
);
char
*
sql_strmake
(
const
char
*
str
,
size_t
len
);
char
*
sql_strmake
(
const
char
*
str
,
size_t
len
);
void
*
sql_memdup
(
const
void
*
ptr
,
size_t
size
);
char
*
sql_strmake_with_convert
(
const
char
*
str
,
size_t
arg_length
,
char
*
sql_strmake_with_convert
(
const
char
*
str
,
size_t
arg_length
,
CHARSET_INFO
*
from_cs
,
CHARSET_INFO
*
from_cs
,
size_t
max_res_length
,
size_t
max_res_length
,
...
...
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