Bug#23280059: ITEM_ROW::ILLEGAL_METHOD_CALL(CONST CHAR*):
ASSERTION `0' FAILED ON SELECT AREA Problem: Optimizer tries to get the points to calculate area without checking the return value of uint4korr for 0 "points". As a result server exits. Solution: Check the return value from uint4korr().
This commit is contained in:
parent
09784e244b
commit
54e887b2fe
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2002, 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
|
||||
@ -849,6 +849,8 @@ int Gis_polygon::area(double *ar, const char **end_of_data) const
|
||||
if (no_data(data, 4))
|
||||
return 1;
|
||||
n_points= uint4korr(data);
|
||||
if (n_points == 0)
|
||||
return 1;
|
||||
if (not_enough_points(data, n_points))
|
||||
return 1;
|
||||
get_point(&prev_x, &prev_y, data+4);
|
||||
|
Loading…
x
Reference in New Issue
Block a user