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
0f33b2f0
Commit
0f33b2f0
authored
Apr 24, 2003
by
vva@eagle.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added '.' to end of compressed string
parent
136e9943
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
sql/item_strfunc.cc
sql/item_strfunc.cc
+10
-1
No files found.
sql/item_strfunc.cc
View file @
0f33b2f0
...
@@ -2943,7 +2943,7 @@ String *Item_func_compress::val_str(String *str)
...
@@ -2943,7 +2943,7 @@ String *Item_func_compress::val_str(String *str)
*/
*/
ulong
new_size
=
(
ulong
)((
res
->
length
()
*
120
)
/
100
)
+
12
;
ulong
new_size
=
(
ulong
)((
res
->
length
()
*
120
)
/
100
)
+
12
;
buffer
.
realloc
((
uint32
)
new_size
+
4
);
buffer
.
realloc
((
uint32
)
new_size
+
4
+
1
);
Byte
*
body
=
((
Byte
*
)
buffer
.
c_ptr
())
+
4
;
Byte
*
body
=
((
Byte
*
)
buffer
.
c_ptr
())
+
4
;
if
((
err
=
compress
(
body
,
&
new_size
,
if
((
err
=
compress
(
body
,
&
new_size
,
...
@@ -2956,6 +2956,15 @@ String *Item_func_compress::val_str(String *str)
...
@@ -2956,6 +2956,15 @@ String *Item_func_compress::val_str(String *str)
}
}
int4store
(
buffer
.
c_ptr
(),
res
->
length
()
&
0x3FFFFFFF
);
int4store
(
buffer
.
c_ptr
(),
res
->
length
()
&
0x3FFFFFFF
);
/* This is for the stupid char fields which trim ' ': */
char
*
last_char
=
((
char
*
)
body
)
+
new_size
-
1
;
if
(
*
last_char
==
' '
)
{
*++
last_char
=
'.'
;
new_size
++
;
}
buffer
.
length
((
uint32
)
new_size
+
4
);
buffer
.
length
((
uint32
)
new_size
+
4
);
return
&
buffer
;
return
&
buffer
;
...
...
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