summaryrefslogtreecommitdiff
path: root/sql/sql_error.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-09-25 22:05:56 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-09-25 22:05:56 +0300
commit4a32e2395e1ff6cf7274d0567282b1747031108b (patch)
treef20565057eebcd25fda9292e66695bbf8a409f41 /sql/sql_error.h
parentb773270c397a97425abc506e7d7fbc5fedb99d9c (diff)
parent86c3ba65aa39e1e81c52f3455a1bcf187906dffc (diff)
downloadmariadb-git-4a32e2395e1ff6cf7274d0567282b1747031108b.tar.gz
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'sql/sql_error.h')
-rw-r--r--sql/sql_error.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_error.h b/sql/sql_error.h
index 12344ccf78c..f8b8adc805a 100644
--- a/sql/sql_error.h
+++ b/sql/sql_error.h
@@ -837,7 +837,10 @@ public:
ErrConvString(const String *s)
: ErrConv(), str(s->ptr()), len(s->length()), cs(s->charset()) {}
const char *ptr() const
- { return err_conv(err_buffer, sizeof(err_buffer), str, len, cs); }
+ {
+ DBUG_ASSERT(len < UINT_MAX32);
+ return err_conv(err_buffer, (uint) sizeof(err_buffer), str, (uint) len, cs);
+ }
};
class ErrConvInteger : public ErrConv