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
4fc5752f
Commit
4fc5752f
authored
Nov 18, 2011
by
Jorgen Loland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backmerge of BUG#12997905
parent
4de17022
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
sql/field.h
sql/field.h
+17
-0
sql/field_conv.cc
sql/field_conv.cc
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+3
-0
No files found.
sql/field.h
View file @
4fc5752f
...
@@ -2128,6 +2128,23 @@ public:
...
@@ -2128,6 +2128,23 @@ public:
uchar
*
from_null_ptr
,
*
to_null_ptr
;
uchar
*
from_null_ptr
,
*
to_null_ptr
;
my_bool
*
null_row
;
my_bool
*
null_row
;
uint
from_bit
,
to_bit
;
uint
from_bit
,
to_bit
;
/**
Number of bytes in the fields pointed to by 'from_ptr' and
'to_ptr'. Usually this is the number of bytes that are copied from
'from_ptr' to 'to_ptr'.
For variable-length fields (VARCHAR), the first byte(s) describe
the actual length of the text. For VARCHARs with length
< 256 there is 1 length byte
>= 256 there is 2 length bytes
Thus, if from_field is VARCHAR(10), from_length (and in most cases
to_length) is 11. For VARCHAR(1024), the length is 1026. @see
Field_varstring::length_bytes
Note that for VARCHARs, do_copy() will be do_varstring*() which
only copies the length-bytes (1 or 2) + the actual length of the
text instead of from/to_length bytes. @see get_copy_func()
*/
uint
from_length
,
to_length
;
uint
from_length
,
to_length
;
Field
*
from_field
,
*
to_field
;
Field
*
from_field
,
*
to_field
;
String
tmp
;
// For items
String
tmp
;
// For items
...
...
sql/field_conv.cc
View file @
4fc5752f
...
@@ -707,7 +707,7 @@ Copy_field::get_copy_func(Field *to,Field *from)
...
@@ -707,7 +707,7 @@ Copy_field::get_copy_func(Field *to,Field *from)
if
(((
Field_varstring
*
)
to
)
->
length_bytes
!=
if
(((
Field_varstring
*
)
to
)
->
length_bytes
!=
((
Field_varstring
*
)
from
)
->
length_bytes
)
((
Field_varstring
*
)
from
)
->
length_bytes
)
return
do_field_string
;
return
do_field_string
;
if
(
to_length
!=
from_length
)
else
return
(((
Field_varstring
*
)
to
)
->
length_bytes
==
1
?
return
(((
Field_varstring
*
)
to
)
->
length_bytes
==
1
?
(
from
->
charset
()
->
mbmaxlen
==
1
?
do_varstring1
:
(
from
->
charset
()
->
mbmaxlen
==
1
?
do_varstring1
:
do_varstring1_mb
)
:
do_varstring1_mb
)
:
...
...
sql/sql_select.cc
View file @
4fc5752f
...
@@ -10647,6 +10647,9 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
...
@@ -10647,6 +10647,9 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
if
(
open_tmp_table
(
table
))
if
(
open_tmp_table
(
table
))
goto
err
;
goto
err
;
// Make empty record so random data is not written to disk
empty_record
(
table
);
thd
->
mem_root
=
mem_root_save
;
thd
->
mem_root
=
mem_root_save
;
DBUG_RETURN
(
table
);
DBUG_RETURN
(
table
);
...
...
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