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
7eafe60b
Commit
7eafe60b
authored
Nov 22, 2002
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
protocol fixups
parent
ecc59f6a
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
397 additions
and
272 deletions
+397
-272
libmysql/errmsg.c
libmysql/errmsg.c
+3
-3
libmysql/libmysql.c
libmysql/libmysql.c
+188
-101
libmysql/libmysql.def
libmysql/libmysql.def
+18
-2
sql/item.cc
sql/item.cc
+6
-11
sql/item.h
sql/item.h
+7
-6
sql/mysql_priv.h
sql/mysql_priv.h
+1
-1
sql/sql_class.h
sql/sql_class.h
+1
-2
sql/sql_error.cc
sql/sql_error.cc
+1
-1
sql/sql_prepare.cc
sql/sql_prepare.cc
+172
-145
No files found.
libmysql/errmsg.c
View file @
7eafe60b
...
...
@@ -58,7 +58,7 @@ const char *client_errors[]=
"No parameters exists in the statement"
,
"Invalid parameter number"
,
"Can't send long data for non string or binary data types (parameter: %d)"
,
"Using
not
supported parameter type: %d (parameter: %d)"
"Using
un
supported parameter type: %d (parameter: %d)"
"Shared memory (%lu)"
,
"Can't open shared memory. Request event don't create (%lu)"
,
"Can't open shared memory. Answer event don't create (%lu)"
,
...
...
@@ -111,7 +111,7 @@ const char *client_errors[]=
"No parameters exists in the statement"
,
"Invalid parameter number"
,
"Can't send long data for non string or binary data types (parameter: %d)"
,
"Using
not
supported parameter type: %d (parameter: %d)"
"Using
un
supported parameter type: %d (parameter: %d)"
"Shared memory (%lu)"
,
"Can't open shared memory. Request event don't create (%lu)"
,
"Can't open shared memory. Answer event don't create (%lu)"
,
...
...
@@ -162,7 +162,7 @@ const char *client_errors[]=
"No parameters exists in the statement"
,
"Invalid parameter number"
,
"Can't send long data for non string or binary data types (parameter: %d)"
,
"Using
not
supported parameter type: %d (parameter: %d)"
"Using
un
supported parameter type: %d (parameter: %d)"
"Shared memory (%lu)"
,
"Can't open shared memory. Request event don't create (%lu)"
,
"Can't open shared memory. Answer event don't create (%lu)"
,
...
...
libmysql/libmysql.c
View file @
7eafe60b
This diff is collapsed.
Click to expand it.
libmysql/libmysql.def
View file @
7eafe60b
...
...
@@ -102,8 +102,24 @@ EXPORTS
mysql_add_slave
mysql_warning_count
mysql_warnings
mysql_prepare
mysql_execute
mysql_param_count
mysql_bind_param
mysql_bind_result
mysql_prepare_result
mysql_stmt_close
mysql_stmt_error
mysql_stmt_errno
mysql_fetch
mysql_send_long_data
mysql_multi_query
mysql_next_result
mysql_commit
mysql_rollback
mysql_autocommit
...
...
sql/item.cc
View file @
7eafe60b
...
...
@@ -315,32 +315,27 @@ void Item_param::set_null()
void
Item_param
::
set_int
(
longlong
i
)
{
int_value
=
(
longlong
)
i
;
item_result_type
=
INT_RESULT
;
item_type
=
INT_ITEM
;
}
void
Item_param
::
set_double
(
double
value
)
{
real_value
=
value
;
item_result_type
=
REAL_RESULT
;
item_type
=
REAL_ITEM
;
}
void
Item_param
::
set_value
(
const
char
*
str
,
uint
length
,
CHARSET_INFO
*
cs
)
void
Item_param
::
set_value
(
const
char
*
str
,
uint
length
)
{
str_value
.
set
(
str
,
length
,
cs
);
item_result_type
=
STRING_RESULT
;
str_value
.
set
(
str
,
length
,
thd_charset
());
item_type
=
STRING_ITEM
;
}
void
Item_param
::
set_longdata
(
const
char
*
str
,
ulong
length
,
CHARSET_INFO
*
cs
)
{
/* TODO: Fix this for binary handling by making use of
buffer_type..
*/
str_value
.
append
(
str
,
length
);
void
Item_param
::
set_longdata
(
const
char
*
str
,
ulong
length
)
{
str_value
.
append
(
str
,
length
);
long_data_supplied
=
1
;
}
...
...
sql/item.h
View file @
7eafe60b
...
...
@@ -186,8 +186,8 @@ public:
Item_param
(
char
*
name_par
=
0
)
{
name
=
name_par
?
name_par
:
(
char
*
)
"?"
;
long_data_supplied
=
false
;
item_type
=
STRING_ITEM
;
long_data_supplied
=
false
;
item_type
=
STRING_ITEM
;
item_result_type
=
STRING_RESULT
;
}
enum
Type
type
()
const
{
return
item_type
;
}
...
...
@@ -199,12 +199,13 @@ public:
void
set_null
();
void
set_int
(
longlong
i
);
void
set_double
(
double
i
);
void
set_value
(
const
char
*
str
,
uint
length
,
CHARSET_INFO
*
cs
);
void
set_long_str
(
const
char
*
str
,
ulong
length
,
CHARSET_INFO
*
cs
);
void
set_long_binary
(
const
char
*
str
,
ulong
length
,
CHARSET_INFO
*
cs
);
void
set_longdata
(
const
char
*
str
,
ulong
length
,
CHARSET_INFO
*
cs
);
void
set_value
(
const
char
*
str
,
uint
length
);
void
set_long_str
(
const
char
*
str
,
ulong
length
);
void
set_long_binary
(
const
char
*
str
,
ulong
length
);
void
set_longdata
(
const
char
*
str
,
ulong
length
);
void
set_long_end
();
void
reset
()
{}
void
(
*
setup_param_func
)(
Item_param
*
param
,
uchar
**
pos
);
enum
Item_result
result_type
()
const
{
return
item_result_type
;
}
Item
*
new_item
()
{
return
new
Item_param
(
name
);
}
...
...
sql/mysql_priv.h
View file @
7eafe60b
...
...
@@ -509,7 +509,7 @@ int mysqld_show_column_types(THD *thd);
int
mysqld_help
(
THD
*
thd
,
const
char
*
text
);
/* sql_prepare.cc */
int
compare_prep_stmt
(
PREP_STMT
*
a
,
PREP_STMT
*
b
,
void
*
not_used
);
int
compare_prep_stmt
(
void
*
not_used
,
PREP_STMT
*
stmt
,
ulong
*
key
);
void
free_prep_stmt
(
PREP_STMT
*
stmt
,
TREE_FREE
mode
,
void
*
not_used
);
bool
mysql_stmt_prepare
(
THD
*
thd
,
char
*
packet
,
uint
packet_length
);
void
mysql_stmt_execute
(
THD
*
thd
,
char
*
packet
);
...
...
sql/sql_class.h
View file @
7eafe60b
...
...
@@ -325,7 +325,7 @@ typedef struct st_prep_stmt
uint
param_count
;
uint
last_errno
;
char
last_error
[
MYSQL_ERRMSG_SIZE
];
bool
error_in_prepare
,
long_data_used
;
bool
error_in_prepare
,
long_data_used
,
param_inited
;
}
PREP_STMT
;
...
...
@@ -510,7 +510,6 @@ public:
bool
safe_to_cache_query
;
bool
volatile
killed
;
bool
prepare_command
;
Item_param
*
params
;
// Pointer to array of params
/*
If we do a purge of binary logs, log index info of the threads
...
...
sql/sql_error.cc
View file @
7eafe60b
...
...
@@ -115,7 +115,7 @@ static const char *warning_level_names[]= {"Note", "Warning", "Error", "?"};
my_bool
mysqld_show_warnings
(
THD
*
thd
,
ulong
levels_to_show
)
{
List
<
Item
>
field_list
;
DBUG_ENTER
(
"mysqld_show_
error
s"
);
DBUG_ENTER
(
"mysqld_show_
warning
s"
);
field_list
.
push_back
(
new
Item_empty_string
(
"Level"
,
7
));
field_list
.
push_back
(
new
Item_int
(
"Code"
,
0
,
4
));
...
...
sql/sql_prepare.cc
View file @
7eafe60b
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