summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2015-12-29 14:17:31 +0400
committerAlexander Barkov <bar@mariadb.org>2015-12-29 14:17:31 +0400
commite1b9be5417668b184893148adea5f1f0e3a8d00f (patch)
tree73a4b1035a07612863b227721e659038c3410744 /sql/field.h
parente126baafbc78f15c794082f0a93740d81041d038 (diff)
downloadmariadb-git-e1b9be5417668b184893148adea5f1f0e3a8d00f.tar.gz
MDEV-9319 ALTER from a bigger to a smaller blob type truncates too much data
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/field.h b/sql/field.h
index 4c79847228e..49f94179a92 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1830,6 +1830,11 @@ protected:
*/
String value;
+ void store_length(uchar *i_ptr, uint i_packlength, uint32 i_number);
+ inline void store_length(uint32 number)
+ {
+ store_length(ptr, packlength, number);
+ }
public:
Field_blob(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
enum utype unireg_check_arg, const char *field_name_arg,
@@ -1902,11 +1907,6 @@ public:
int reset(void) { bzero(ptr, packlength+sizeof(uchar*)); return 0; }
void reset_fields() { bzero((uchar*) &value,sizeof(value)); }
uint32 get_field_buffer_size(void) { return value.alloced_length(); }
- void store_length(uchar *i_ptr, uint i_packlength, uint32 i_number);
- inline void store_length(uint32 number)
- {
- store_length(ptr, packlength, number);
- }
inline uint32 get_length(uint row_offset= 0)
{ return get_length(ptr+row_offset, this->packlength); }
uint32 get_length(const uchar *ptr, uint packlength);
@@ -1935,6 +1935,7 @@ public:
{
set_ptr_offset(0, length, data);
}
+ int copy_value(Field_blob *from);
uint get_key_image(uchar *buff,uint length, imagetype type);
void set_key_image(const uchar *buff,uint length);
void sql_type(String &str) const;