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
15dbe91a
Commit
15dbe91a
authored
Mar 15, 2003
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed typo (double ++ in assert)
removed all side effects from asserts for not to confuse casual reader
parent
15ff383e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
sql/protocol.cc
sql/protocol.cc
+20
-12
No files found.
sql/protocol.cc
View file @
15dbe91a
...
...
@@ -719,7 +719,8 @@ bool Protocol_simple::store(const char *from, uint length)
bool
Protocol_simple
::
store_tiny
(
longlong
from
)
{
#ifndef DEBUG_OFF
DBUG_ASSERT
(
field_types
==
0
||
field_types
[
field_pos
++
]
==
MYSQL_TYPE_TINY
);
DBUG_ASSERT
(
field_types
==
0
||
field_types
[
field_pos
]
==
MYSQL_TYPE_TINY
);
field_pos
++
;
#endif
char
buff
[
20
];
return
net_store_data
((
char
*
)
buff
,
...
...
@@ -731,7 +732,8 @@ bool Protocol_simple::store_short(longlong from)
{
#ifndef DEBUG_OFF
DBUG_ASSERT
(
field_types
==
0
||
field_types
[
field_pos
++
]
==
MYSQL_TYPE_SHORT
);
field_types
[
field_pos
]
==
MYSQL_TYPE_SHORT
);
field_pos
++
;
#endif
char
buff
[
20
];
return
net_store_data
((
char
*
)
buff
,
...
...
@@ -742,9 +744,10 @@ bool Protocol_simple::store_short(longlong from)
bool
Protocol_simple
::
store_long
(
longlong
from
)
{
#ifndef DEBUG_OFF
DBUG_ASSERT
(
field_types
==
0
||
field_types
[
field_pos
++
]
==
MYSQL_TYPE_INT24
||
field_types
[
field_pos
++
]
==
MYSQL_TYPE_LONG
);
DBUG_ASSERT
(
field_types
==
0
||
field_types
[
field_pos
]
==
MYSQL_TYPE_INT24
||
field_types
[
field_pos
]
==
MYSQL_TYPE_LONG
);
field_pos
++
;
#endif
char
buff
[
20
];
return
net_store_data
((
char
*
)
buff
,
...
...
@@ -756,7 +759,8 @@ bool Protocol_simple::store_longlong(longlong from, bool unsigned_flag)
{
#ifndef DEBUG_OFF
DBUG_ASSERT
(
field_types
==
0
||
field_types
[
field_pos
++
]
==
MYSQL_TYPE_LONGLONG
);
field_types
[
field_pos
]
==
MYSQL_TYPE_LONGLONG
);
field_pos
++
;
#endif
char
buff
[
22
];
return
net_store_data
((
char
*
)
buff
,
...
...
@@ -770,7 +774,8 @@ bool Protocol_simple::store(float from, uint32 decimals, String *buffer)
{
#ifndef DEBUG_OFF
DBUG_ASSERT
(
field_types
==
0
||
field_types
[
field_pos
++
]
==
MYSQL_TYPE_FLOAT
);
field_types
[
field_pos
]
==
MYSQL_TYPE_FLOAT
);
field_pos
++
;
#endif
buffer
->
set
((
double
)
from
,
decimals
,
thd
->
variables
.
thd_charset
);
return
net_store_data
((
char
*
)
buffer
->
ptr
(),
buffer
->
length
());
...
...
@@ -781,7 +786,8 @@ bool Protocol_simple::store(double from, uint32 decimals, String *buffer)
{
#ifndef DEBUG_OFF
DBUG_ASSERT
(
field_types
==
0
||
field_types
[
field_pos
++
]
==
MYSQL_TYPE_DOUBLE
);
field_types
[
field_pos
]
==
MYSQL_TYPE_DOUBLE
);
field_pos
++
;
#endif
buffer
->
set
(
from
,
decimals
,
thd
->
variables
.
thd_charset
);
return
net_store_data
((
char
*
)
buffer
->
ptr
(),
buffer
->
length
());
...
...
@@ -829,7 +835,8 @@ bool Protocol_simple::store_date(TIME *tm)
{
#ifndef DEBUG_OFF
DBUG_ASSERT
(
field_types
==
0
||
field_types
[
field_pos
++
]
==
MYSQL_TYPE_DATE
);
field_types
[
field_pos
]
==
MYSQL_TYPE_DATE
);
field_pos
++
;
#endif
char
buff
[
40
];
uint
length
;
...
...
@@ -845,7 +852,8 @@ bool Protocol_simple::store_time(TIME *tm)
{
#ifndef DEBUG_OFF
DBUG_ASSERT
(
field_types
==
0
||
field_types
[
field_pos
++
]
==
MYSQL_TYPE_TIME
);
field_types
[
field_pos
]
==
MYSQL_TYPE_TIME
);
field_pos
++
;
#endif
char
buff
[
40
];
uint
length
;
...
...
@@ -1035,7 +1043,7 @@ bool Protocol_prep::store(TIME *tm)
uint
length
;
field_pos
++
;
pos
=
buff
+
1
;
int2store
(
pos
,
tm
->
year
);
pos
[
2
]
=
(
uchar
)
tm
->
month
;
pos
[
3
]
=
(
uchar
)
tm
->
day
;
...
...
@@ -1074,7 +1082,7 @@ bool Protocol_prep::store_time(TIME *tm)
field_pos
++
;
pos
=
buff
+
1
;
pos
[
0
]
=
tm
->
neg
?
1
:
0
;
int4store
(
pos
+
1
,
tm
->
day
);
int4store
(
pos
+
1
,
tm
->
day
);
pos
[
5
]
=
(
uchar
)
tm
->
hour
;
pos
[
6
]
=
(
uchar
)
tm
->
minute
;
pos
[
7
]
=
(
uchar
)
tm
->
second
;
...
...
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