WL#3565: Functions call with IGNORE_SPACE

Affects: Server-5.1   —   Status: Complete

This Work Log is to track an incompatible change introduced by the fix for
BUG#21114.

The current implementation of SQL_MODE=IGNORE_SPACE is causing undesirable
side effects in the parser, as noted in BUG#21114.

To fix the bug correctly, the parser need to *not* honor IGNORE_SPACE,
but to rely on context so that the following syntaxes :
- "foo" "("
- "foo"  "("
will both refer to the same function when a function call is expected,
or will both refer to the proper construct (like "CREATE TABLE foo (..."
or "REFECENCES foo (" when a function call is not expected,
regardless of the SQL_MODE used (with or without IGNORE_SPACE)

In the long term, the SQL_MODE IGNORE_SPACE needs to be obsoleted,
but this is not the scope of the present Work Log.

For the functions impacted by the implementation of BUG#21114,
the fix introduces the following incompatible change:
for code that :
- would run only with IGNORE_SPACE=FALSE
- would use the "foo"  "(" syntax to refer to a stored function foo,
  as opposed to the native MySQL function foo
- would fail to run in IGNORE_SPACE=TRUE mode (ANSI, TRADITIONAL, all
  the other vendors)

Such code will need to be changed to use a db.foo() syntax to refer to the
stored function, and foo() to refer to the native function (unless SQL PATH is
implemented, which is another Work Log).