mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Bug#21682356: STOP INJECTING DATA ITEMS IN AN ERROR MESSAGE
GENERATED BY THE EXP() FUNCTION When generating the error message for numeric overflow, pass a flag to Item::print() that prevents it from expanding constant expressions and parameters to the values they evaluate to. For consistency, also pass the flag to Item::print() when Item_func_spatial_collection::fix_length_and_dec() generates an error message. It doesn't make any difference at the moment, since constant expressions haven't been evaluated yet when this function is called.
This commit is contained in:
parent
79032a7ae1
commit
95825fa28a
6 changed files with 48 additions and 21 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef ITEM_GEOFUNC_INCLUDED
|
||||
#define ITEM_GEOFUNC_INCLUDED
|
||||
|
||||
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -187,7 +187,7 @@ public:
|
|||
if (args[i]->fixed && args[i]->field_type() != MYSQL_TYPE_GEOMETRY)
|
||||
{
|
||||
String str;
|
||||
args[i]->print(&str, QT_ORDINARY);
|
||||
args[i]->print(&str, QT_NO_DATA_EXPANSION);
|
||||
str.append('\0');
|
||||
my_error(ER_ILLEGAL_VALUE_FOR_TYPE, MYF(0), "non geometric",
|
||||
str.ptr());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue