mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fix compiler warnings (detected by Intel's C++ compiler)
Fixed checking of privilege handling in CREATE ... SELECT (Bug #6094) client/mysql.cc: Fix compiler warnings client/mysqltest.c: Fix wrong counting of lines Remove compiler warnings heap/hp_hash.c: Fix compiler warnings innobase/dict/dict0load.c: Fix compiler warnings innobase/include/mem0mem.h: Fix compiler warnings libmysql/client_settings.h: Fix compiler warnings myisam/ft_nlq_search.c: Add comments about compiler warnings myisam/rt_index.c: Add comments about compiler warnings myisam/rt_mbr.c: Add comments about compiler warnings mysql-test/r/ps.result: Test case for bug#6094 mysql-test/t/ps.test: Test case for bug#6094 mysys/hash.c: Fix compiler warnings mysys/my_handler.c: Add comments about compiler warnings mysys/my_thr_init.c: Add comments about compiler warnings ndb/include/mgmapi/mgmapi.h: Fix compiler warnings regex/main.c: Fix compiler warnings sql/item.h: Fix compiler warnings sql/item_func.h: Add comments about compiler warnings sql/spatial.h: Add comments about compiler warnings sql/sql_lex.h: Fix compiler warning sql/sql_list.h: Fix compiler warning sql/sql_parse.cc: Move testing of access rights of tables in CREATE ... SELECT to create_table_precheck() to fix privilege checking in CREATE ... SELECT (Bug #6094) sql/sql_prepare.cc: Remove not needed empty line sql/sql_string.h: Fix compiler warnings strings/ctype-mb.c: Fix compiler warnings
This commit is contained in:
@@ -97,12 +97,14 @@ struct MBR
|
||||
|
||||
int equals(const MBR *mbr)
|
||||
{
|
||||
/* The following should be safe, even if we compare doubles */
|
||||
return ((mbr->xmin == xmin) && (mbr->ymin == ymin) &&
|
||||
(mbr->xmax == xmax) && (mbr->ymax == ymax));
|
||||
}
|
||||
|
||||
int disjoint(const MBR *mbr)
|
||||
{
|
||||
/* The following should be safe, even if we compare doubles */
|
||||
return ((mbr->xmin > xmax) || (mbr->ymin > ymax) ||
|
||||
(mbr->xmax < xmin) || (mbr->ymax < ymin));
|
||||
}
|
||||
@@ -114,6 +116,7 @@ struct MBR
|
||||
|
||||
int touches(const MBR *mbr)
|
||||
{
|
||||
/* The following should be safe, even if we compare doubles */
|
||||
return ((((mbr->xmin == xmax) || (mbr->xmax == xmin)) &&
|
||||
((mbr->ymin >= ymin) && (mbr->ymin <= ymax) ||
|
||||
(mbr->ymax >= ymin) && (mbr->ymax <= ymax))) ||
|
||||
@@ -124,18 +127,21 @@ struct MBR
|
||||
|
||||
int within(const MBR *mbr)
|
||||
{
|
||||
/* The following should be safe, even if we compare doubles */
|
||||
return ((mbr->xmin <= xmin) && (mbr->ymin <= ymin) &&
|
||||
(mbr->xmax >= xmax) && (mbr->ymax >= ymax));
|
||||
}
|
||||
|
||||
int contains(const MBR *mbr)
|
||||
{
|
||||
/* The following should be safe, even if we compare doubles */
|
||||
return ((mbr->xmin >= xmin) && (mbr->ymin >= ymin) &&
|
||||
(mbr->xmax <= xmax) && (mbr->ymax <= ymax));
|
||||
}
|
||||
|
||||
bool inner_point(double x, double y) const
|
||||
{
|
||||
/* The following should be safe, even if we compare doubles */
|
||||
return (xmin<x) && (xmax>x) && (ymin<y) && (ymax>x);
|
||||
}
|
||||
|
||||
@@ -164,6 +170,9 @@ public:
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static void operator delete(void *ptr, void *buffer)
|
||||
{}
|
||||
|
||||
enum wkbType
|
||||
{
|
||||
wkb_point= 1,
|
||||
|
Reference in New Issue
Block a user