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
cce14aab
Commit
cce14aab
authored
21 years ago
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge paul@bk-internal.mysql.com:/home/bk/mysql-4.1
into teton.kitebird.com:/home/paul/mysql-4.1
parents
e085cada
ee3bf94c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
14 deletions
+39
-14
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+8
-2
sql/ha_berkeley.cc
sql/ha_berkeley.cc
+3
-1
sql/item.h
sql/item.h
+4
-0
sql/sql_prepare.cc
sql/sql_prepare.cc
+23
-10
strings/ctype-mb.c
strings/ctype-mb.c
+1
-1
No files found.
libmysqld/lib_sql.cc
View file @
cce14aab
...
...
@@ -755,7 +755,10 @@ bool setup_params_data(st_prep_stmt *stmt)
{
uchar
*
buff
=
(
uchar
*
)
client_param
->
buffer
;
param
->
maybe_null
=
param
->
null_value
=
0
;
param
->
setup_param_func
(
param
,
&
buff
);
param
->
setup_param_func
(
param
,
&
buff
,
client_param
->
length
?
*
client_param
->
length
:
client_param
->
buffer_length
);
}
}
param_no
++
;
...
...
@@ -796,7 +799,10 @@ bool setup_params_data_withlog(st_prep_stmt *stmt)
{
uchar
*
buff
=
(
uchar
*
)
client_param
->
buffer
;
param
->
maybe_null
=
param
->
null_value
=
0
;
param
->
setup_param_func
(
param
,
&
buff
);
param
->
setup_param_func
(
param
,
&
buff
,
client_param
->
length
?
*
client_param
->
length
:
client_param
->
buffer_length
);
res
=
param
->
query_val_str
(
&
str
);
}
}
...
...
This diff is collapsed.
Click to expand it.
sql/ha_berkeley.cc
View file @
cce14aab
...
...
@@ -304,11 +304,13 @@ void berkeley_cleanup_log_files(void)
char
**
names
;
int
error
;
// by HF. Sometimes it crashes. TODO - find out why
#ifndef EMBEDDED_LIBRARY
/* XXX: Probably this should be done somewhere else, and
* should be tunable by the user. */
if
((
error
=
db_env
->
txn_checkpoint
(
db_env
,
0
,
0
,
0
)))
my_error
(
ER_ERROR_DURING_CHECKPOINT
,
MYF
(
0
),
error
);
/* purecov: inspected */
#endif
if
((
error
=
db_env
->
log_archive
(
db_env
,
&
names
,
DB_ARCH_ABS
))
!=
0
)
{
DBUG_PRINT
(
"error"
,
(
"log_archive failed (error %d)"
,
error
));
/* purecov: inspected */
...
...
This diff is collapsed.
Click to expand it.
sql/item.h
View file @
cce14aab
...
...
@@ -346,7 +346,11 @@ public:
void
set_time
(
TIME
*
tm
,
timestamp_type
type
);
bool
get_time
(
TIME
*
tm
);
void
reset
()
{}
#ifndef EMBEDDED_LIBRARY
void
(
*
setup_param_func
)(
Item_param
*
param
,
uchar
**
pos
);
#else
void
(
*
setup_param_func
)(
Item_param
*
param
,
uchar
**
pos
,
ulong
data_len
);
#endif
enum
Item_result
result_type
()
const
{
return
item_result_type
;
}
String
*
query_val_str
(
String
*
str
);
...
...
This diff is collapsed.
Click to expand it.
sql/sql_prepare.cc
View file @
cce14aab
...
...
@@ -76,6 +76,14 @@ Long data handling:
#define STMT_QUERY_LOG_LENGTH 8192
#ifdef EMBEDDED_LIBRARY
#define SETUP_PARAM_FUNCTION(fn_name) \
static void fn_name(Item_param *param, uchar **pos, ulong data_len)
#else
#define SETUP_PARAM_FUNCTION(fn_name) \
static void fn_name(Item_param *param, uchar **pos)
#endif
String
my_null_string
(
"NULL"
,
4
,
default_charset_info
);
/*
...
...
@@ -189,6 +197,7 @@ static bool send_item_params(PREP_STMT *stmt)
caller by positing the pointer to param data
*/
#ifndef EMBEDDED_LIBRARY
static
ulong
get_param_length
(
uchar
**
packet
)
{
reg1
uchar
*
pos
=
*
packet
;
...
...
@@ -210,6 +219,10 @@ static ulong get_param_length(uchar **packet)
(
*
packet
)
+=
9
;
// Must be 254 when here
return
(
ulong
)
uint4korr
(
pos
+
1
);
}
#else
#define get_param_length(A) data_len
#endif
/*!EMBEDDED_LIBRARY*/
/*
Setup param conversion routines
...
...
@@ -229,31 +242,31 @@ static ulong get_param_length(uchar **packet)
*/
static
void
setup_param_tiny
(
Item_param
*
param
,
uchar
**
pos
)
SETUP_PARAM_FUNCTION
(
setup_param_tiny
)
{
param
->
set_int
((
longlong
)(
**
pos
));
*
pos
+=
1
;
}
static
void
setup_param_short
(
Item_param
*
param
,
uchar
**
pos
)
SETUP_PARAM_FUNCTION
(
setup_param_short
)
{
param
->
set_int
((
longlong
)
sint2korr
(
*
pos
));
*
pos
+=
2
;
}
static
void
setup_param_int32
(
Item_param
*
param
,
uchar
**
pos
)
SETUP_PARAM_FUNCTION
(
setup_param_int32
)
{
param
->
set_int
((
longlong
)
sint4korr
(
*
pos
));
*
pos
+=
4
;
}
static
void
setup_param_int64
(
Item_param
*
param
,
uchar
**
pos
)
SETUP_PARAM_FUNCTION
(
setup_param_int64
)
{
param
->
set_int
((
longlong
)
sint8korr
(
*
pos
));
*
pos
+=
8
;
}
static
void
setup_param_float
(
Item_param
*
param
,
uchar
**
pos
)
SETUP_PARAM_FUNCTION
(
setup_param_float
)
{
float
data
;
float4get
(
data
,
*
pos
);
...
...
@@ -261,7 +274,7 @@ static void setup_param_float(Item_param *param, uchar **pos)
*
pos
+=
4
;
}
static
void
setup_param_double
(
Item_param
*
param
,
uchar
**
pos
)
SETUP_PARAM_FUNCTION
(
setup_param_double
)
{
double
data
;
float8get
(
data
,
*
pos
);
...
...
@@ -269,7 +282,7 @@ static void setup_param_double(Item_param *param, uchar **pos)
*
pos
+=
8
;
}
static
void
setup_param_time
(
Item_param
*
param
,
uchar
**
pos
)
SETUP_PARAM_FUNCTION
(
setup_param_time
)
{
ulong
length
;
...
...
@@ -293,7 +306,7 @@ static void setup_param_time(Item_param *param, uchar **pos)
*
pos
+=
length
;
}
static
void
setup_param_datetime
(
Item_param
*
param
,
uchar
**
pos
)
SETUP_PARAM_FUNCTION
(
setup_param_datetime
)
{
uint
length
=
get_param_length
(
pos
);
...
...
@@ -323,7 +336,7 @@ static void setup_param_datetime(Item_param *param, uchar **pos)
*
pos
+=
length
;
}
static
void
setup_param_date
(
Item_param
*
param
,
uchar
**
pos
)
SETUP_PARAM_FUNCTION
(
setup_param_date
)
{
ulong
length
;
...
...
@@ -345,7 +358,7 @@ static void setup_param_date(Item_param *param, uchar **pos)
*
pos
+=
length
;
}
static
void
setup_param_str
(
Item_param
*
param
,
uchar
**
pos
)
SETUP_PARAM_FUNCTION
(
setup_param_str
)
{
ulong
len
=
get_param_length
(
pos
);
param
->
set_value
((
const
char
*
)
*
pos
,
len
);
...
...
This diff is collapsed.
Click to expand it.
strings/ctype-mb.c
View file @
cce14aab
...
...
@@ -307,7 +307,7 @@ uint my_instr_mb(CHARSET_INFO *cs,
{
if
(
nmatch
)
{
match
[
0
].
beg
=
big
0
;
match
[
0
].
beg
=
0
;
match
[
0
].
end
=
big
-
big0
;
match
[
0
].
mblen
=
res
;
if
(
nmatch
>
1
)
...
...
This diff is collapsed.
Click to expand it.
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