Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Console View


Categories: connectors experimental galera main
Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

connectors experimental galera main
Georgi (Joro) Kodinov
MDEV-39572: Fix small typos in COMMUNITY_CONTRIBUTIONS.md

Fixed some minor header typos in the document.
Yuchen Pei
MDEV-40168 wip

TODOs on top of those in the patch diff:

- EXPLAIN output should not say fulltext
- check type match to avoid false negative / positive bugs in mysql
- transcode the value into the index charset in mvi_encode_key
Thirunarayanan Balathandayuthapani
MDEV-40915  Table options (PAGE_COMPRESSED, ENCRYPTED) are ignored by ALTER TABLE on partitioned tables

Problem:
=========
ha_partition::check_if_supported_inplace_alter() sourced the
per-partition engine options from m_part_info, which describes
the table as it is now. The engine compares
create_info->option_struct against handler::option_struct
(old options), both are pointing to source table.
It leads to make the engine believe that there is no change
in table structure and allows to proceed PAGE_COMPRESSED=1
with INSTANT algorithm.

Fix:
====
Take the new options from altered_table->part_info, which was opened
from the new .frm with the new table-level options already merged
into every partition_element by parse_engine_part_options().

Do the same in prepare_inplace_alter_table(), so that both phases
agree and a per-partition option override reaches the rebuilt table.
Thirunarayanan Balathandayuthapani
MDEV-40915  Table options (PAGE_COMPRESSED, ENCRYPTED) are ignored by ALTER TABLE on partitioned tables

Problem:
=========
ha_partition::check_if_supported_inplace_alter() sourced the
per-partition engine options from m_part_info, which describes
the table as it is now. The engine compares
create_info->option_struct against handler::option_struct
(old options), both are pointing to source table.
It leads to make the engine believe that there is no change
in table structure and allows to proceed PAGE_COMPRESSED=1
with INSTANT algorithm.

Fix:
====
Take the new options from altered_table->part_info, which was opened
from the new .frm with the new table-level options already merged
into every partition_element by parse_engine_part_options().

Do the same in prepare_inplace_alter_table(), so that both phases
agree and a per-partition option override reaches the rebuilt table.
Dave Gosselin
BUGFIX:  Read a FULL JOIN's left side in full when the join above keeps its NULLs

The pass that produces a FULL JOIN's right side rows emits a right row
only when no left row matched it, so the record of which right rows
matched is complete only once every left row has been read.  An
enclosing join's ON that reads a left side column could supply a key
value for that table, and the plan then read the left side on that key
instead of scanning it.  A plain equality hid the problem because it
rejects the NULLs the FULL JOIN pads its left side with.  A null safe
equality keeps those rows, and a right row whose match went unread came
back as a row that never matched.

Key access on such a table is now refused, both where the plan picks an
access path and where the ref is built from the chosen plan.  A key
value that reads only tables of the same left side is still allowed,
since it decides where one left side table is read from another rather
than how much of the left side the FULL JOIN sees.  Section 36 of
full_join.test covers the shape.
Yuchen Pei
MDEV-40168 [wip] Add multi valued index over fulltext

TODOs on top of those in the patch diff:

- EXPLAIN output should not say fulltext
- check type match to avoid false negative / positive bugs in mysql
- transcode the value into the index charset in mvi_encode_key
Sergei Golubchik
MDEV-34805 post-review fixes

* keep `vec_len >= subdist_part * 2` logic in one place only
* keep "distance-greater-than" mode logic in one place only
* simplify VECTOR_DIMENSIONS (no need to have a special ctx->vec_len
  path if the other one always works)
* new plugin = maturity beta
* remove redundant casts, etc
* moved vector_indexes_fields_enum to the global scope to use it
  for setting schema->idx_field1/schema->idx_field2
* open the hlindex graph table, if needed, otherwise most values
  are unknown unless a user did vector search before
* added TABLE_CATALOG column
* remove CACHE_OVERFLOWS column, doesn't work as implemented,
  the fix is complex and isn't worth it
* add privilege checks (MDEV-40793)

in the test:
* prefer query_vertical for readability
* select all columns at least once
* select INDEX_SIZE even if engine-dependent, use rdiff files
* test how get_all_tables only open one specific table, and
  even only .frm file, if possible
Georgi (Joro) Kodinov
MDEV-39572: Fix small typos in COMMUNITY_CONTRIBUTIONS.md

Fixed some minor header typos in the document.
Andrei Elkin
MDEV-40824 slave_run_triggers_for_rbr enabled slave ignores after-insert trigger's error

MDEV-15990 commit did not handle after-trigger error on
slave_run_triggers_for_rbr slave server.
That made an error from such failing trigger lost.

The reason was a flaw in new logics coded for
Write_rows_log_event::write_row().

It is amended now. For any sql error out of the after-trigger
HA_ERR_GENERIC handler error code is returned instead of zero. That
error-stops serial slave as expected (also by pre-MDEV-15990 code).
Optimistic parallel slave may retry, contingent upon the trigger's sql error.

Note: idempotent-mode tolerance of trigger-internal errors and
the per-row last_errno reset are left for a follow-up.
VasuBhakt
MDEV-40174 Remove unnecessary double parsing JSON document in `json_normalize`

`json_normalize`/`json_equals` unnecessary
double parsing JSON document

Removed the redundant `json_valid_engine` pre-check to eliminate
double-parsing, and integrated error handling directly into the
normalization engine:

* Catch Empty Strings: Return an error directly in
  `json_normalize_engine` if the root type is `JSON_VALUE_UNINITIALIZED`.

* Catch Trailing Garbage on Scalars: Updated `json_norm_build`
  to enforce a full scan to the end of the document for scalar values.
  This prevents edge cases (e.g., raw date strings like 2026-07-17...)
  from being falsely accepted as a valid JSON number without checking
  the remainder of the string for syntax errors.

* Propagate Syntax Errors: Updated `json_normalize_engine` to
  explicitly check the engine's error flag after the build phase.

* Add Edge Case Tests: Added tests in `json_normalize.test` for
  empty strings, whitespace, and trailing garbage on scalars to
  ensure correct error generation.

Testing:
Verified locally using MTR
(`main.json_normalize` and `main.json_equals`).

Signed-off-by: VasuBhakt <[email protected]>
Dave Gosselin
BUGFIX:  Hold FULL JOIN left side conditions until the match

A predicate over the left side of a surviving FULL JOIN has to wait for
the right partner, where the match is recorded.  Choosing which
predicates those are while the WHERE is still being rewritten misses
two kinds.  Distributing the WHERE over the plan builds a condition for
a single table out of a disjunction that spans both sides, and that
condition was never a conjunct of the WHERE.  A HAVING predicate moved
into the WHERE, or a disjunct that folds away, can also leave an
equality over the left side behind after the choice was already made.

Choose again in make_join_select, on whatever condition is about to be
attached to a table, and hold it on the right partner instead.  The
earlier pass stays, since it is what keeps the left side out of ref and
range analysis.
Hemant Dangi
MDEV-40501: Assertion `info->type == READ_CACHE || info->type == WRITE_CACHE' failed in reinit_io_cache upon CHANGE MASTER

Issue:
CHANGE MASTER ... FOR CHANNEL with a channel name within
MAX_CONNECTION_NAME can still overflow the OS file name limit once
escaped into the relay log file name. The failed open then leaves
the relay log's index IO_CACHE uninitialized, but the CHANGE MASTER
error-cleanup path unconditionally calls reset_logs() on it, hitting
the assertion in reinit_io_cache().

Solution:
Guard reinit_io_cache() in find_log_pos() with my_b_inited() so an
unopened index file returns a clean error instead of asserting.
Raise a proper client-visible error from Relay_log_info::init() when
the relay log fails to open, guarding the other error paths that
raise a more generic error so they don't double-set the diagnostics
area. Use MY_SAFE_PATH in open_index_file() so an over-length name
fails deterministically instead of silently falling back to a
mangled one.
Yuchen Pei
MDEV-40168 [wip] Add multi valued index over fulltext

TODOs on top of those in the patch diff:

- EXPLAIN output should not say fulltext
- check type match to avoid false negative / positive bugs in mysql
- transcode the value into the index charset in mvi_encode_key
Marko Mäkelä
MDEV-40985 row_end access out of bounds in ALTER TABLE

ha_innobase_inplace_ctx::create_key_defs():
In the assignment that had been introduced in
commit e056efdd6cfa62cc4c978fce5730af0b8d4c3c6b (MDEV-25004),
account for virtual columns. Until MDEV-22363 hopefully lands
some day, InnoDB maintains two arrays of columns, which
complicates the mapping between TABLE_SHARE::fields and
dict_table_t::cols. This complication was not accounted for here.
Marko Mäkelä
MDEV-40985 row_end access out of bounds in ALTER TABLE

ha_innobase_inplace_ctx::create_key_defs():
In the assignment that had been introduced in
commit e056efdd6cfa62cc4c978fce5730af0b8d4c3c6b (MDEV-25004),
account for virtual columns. Until MDEV-22363 hopefully lands
some day, InnoDB maintains two arrays of columns, which
complicates the mapping between TABLE_SHARE::fields and
dict_table_t::cols. This complication was not accounted for here.

Reviewed by: Thirunarayanan Balathandayuthapani
Dave Gosselin
MDEV-40620:  Run the FULL JOIN tests over more engines and switches

full_join.test runs once for every point of three crossed axes, the
optimizer switch axis in full_join.combinations, the storage engine axis
in full_join_engine.combinations and the index axis in
full_join_index.combinations, thirty runs in all.  The result file in the
tree is the run with the default engine, no added indexes and the
switches at their defaults.  Every other run's expected output is a diff
against it, so a run whose output matches it has no file of its own, and
a query added to the test shows up in all thirty runs.

The index axis gives every column of every base table a non-unique index
on itself.  The work is decided by what the database holds at the point
full_join_add_indexes.inc is sourced, so a section sources it after the
tables it creates.  A non-unique index is the only kind that can be added
without knowing the data, since a primary key or a unique index would
fail on the duplicates and the NULLs that many sections put in a join
column on purpose.

The switch axis holds the four switches at their defaults and each of
them off in turn, which is what makes a wrong result attributable to one
transformation.
Yuchen Pei
MDEV-40168 [wip] Add multi valued index over fulltext

TODOs on top of those in the patch diff:

- EXPLAIN output should not say fulltext
- check type match to avoid false negative / positive bugs in mysql
- transcode the value into the index charset in mvi_encode_key
Kristian Nielsen
MDEV-35691: Invalid access, use-after-free, on rli->description_event_for_exec

This commit rewrites the rpl_master_has_bug() mechanism to solve a problem
with invalid memory access. The rpl_master_has_bug() mechanism detects
certain bugs depending on the master version, and uses that to enable
specific work-arounds on the slave. The problem was that
rpl_master_has_bug() accessed Relay_log_info::description_event_for_exec
that is not valid to access from concurrent parallel replication worker
threads, only from the SQL driver thread. Thus it could use the wrong event
or access invalid/freed memory.

This patch instead computes a bitmask of detected bugs when the SQL driver
thread processes the format description event, and reads that bitmask with
an atomic load from the worker threads. The bitmask of bugs can only change
when the master restarts with a new version, and we do not replicate events
concurrently across a format description event from a master restart. Thus,
the bitmask is safe to read concurrently from the Relay_log_info object
without locking.

This also avoids an expensive match of each entry in the bug list against
the master server version done for every single call to
rpl_master_has_bug(), which could be quite expensive when done eg. per field
in row events as in Field_string::compatible_field_size().

Also remove redundant conditional in table_def::compatible_with().

Thanks to Andrei Elkin for the idea to safely read the bitmask
concurrently from the Relay_log_info.

Reviewed-by: Andrei Elkin <[email protected]>
Signed-off-by: Kristian Nielsen <[email protected]>
Georgi (Joro) Kodinov
MDBF-1224: fix the structure of the plugin MD file

This requires moxygen 2.1.16! Added a check

Implemented a structure for the plugin API documentation.
On the top there's a main page to give top level overview and
concepts.
It eventually references the Moxygen documentation.
The moxygen documentation is a series of nested doxygen groups
that define the structure for the whole Plugin API documentation.

There are top levels like "server plugin API" and "client plugin API".
These branch into futher subgroups as needed.
Addressed githib copilot review comments.
Georgi (Joro) Kodinov
MDEV-39572: Add marking requirements for AI-assisted contributions to COMMUNITY_CONTRIBUTIONS.md

Explained the use of git commit trailers.
Fixed some minor header typos in the document.
Addressed review comments.
Dave Gosselin
Prototype version of FULL OUTER JOIN

This demonstrates FULL OUTER JOIN with nests on either side

There are bugs in the implementation at this point, development ongoing

(this commit intentionally empty)
Kristian Nielsen
MDEV-22848: SET GLOBAL gtid_slave_pos leaves dangling partial transaction

When AUTOCOMMIT=0, SET GLOBAL gtid_slave_pos did not properly commit the
(full) transaction, leaving the InnoDB hton registrered in the ha_list. This
could then later assert when InnoDB was called upon to eg. prepare() a
transaction that it does not participate in.

This patch makes rpl_slave_state::load() properly commit the (full)
transaction to solve the issue.

Signed-off-by: Kristian Nielsen <[email protected]>
Alexander Barkov
MDEV-39518 Allow prepared statements in stored functions in assignment right hand

Allowing prepared statements in stored functions when
a stored function is used in an assignment right hand.

Both DEFAULT clause of a variable initialization and
the right side of the SET statement are supported:

  CREATE PROCEDURE p1()
  BEGIN
    -- case 1: DEFAULT clause
    DECLARE spvar1 INT DEFAULT f1_with_ps(); -- OK

    -- case 2: SP variable assignment statement
    DECLARE spvar2 INT;
    SET spvar2= f1_with_ps(); -- OK
  END;

- Only assignments to SP variables works for now:
  * SET spvar= func_with_ps(); -- OK
  * SET @uvar= func_with_ps(); -- Error

- Only bare function calls are supported for now. Using a function in
  an expression does not make it PS-safe yet:
    SET v= f1()+0;

- The parser now does not reject PS statements in stored functions.
  PS applicability in stored functions is now detected at run time.
  Note, PS statements in triggers are still prohibited by the parser.

- Functions with PS do not acquire MDL locks on tables, and no MDL is
  taken on the routines themselves either. They work like procedures in
  terms of table opening and routine locking: a concurrent DROP FUNCTION
  can complete while such a function is executing.

- Functions with PS are not replicated as a single `SELECT f1()` call.
  They are replicated per-statement, like procedures.

This patch incorporates fixes for the following bugs found during debugging:
MDEV-39518,MDEV-40224,MDEV-40225,MDEV-40226,MDEV-40227,MDEV-40240,
MDEV-40285,MDEV-40288,MDEV-40315,MDEV-40318,MDEV-40890,MDEV-40900,
MDEV-40901,MDEV-40913,MDEV-40914

Assisted-by: Claude - reviews and minor clean-ups
Dave Gosselin
Move FULL JOIN code to separate files
Georgi Kodinov
MDEV-39806: Add a per-push/per-pull-request checker for Markdown API docs

Create a GitHub action into the MariaDB server tree to build the Markdown
documentation using the cmake target provided by MDEV-39718.

This workflow generates API documentation for the plugin using a
Docker container packed with all the extra doxygen/moxygen tools.
Fixed some more doxygen problems.
Moved the repo to ghcr.io/mariadb/mariadb-doc-gen:latest.
Dave Gosselin
Split out the SJM and FULL JOIN run-opening code in get_best_combination

The loop that sets up the join order used to have the code for opening
an SJ-Materialization run and the code for opening a FULL JOIN operand
nest run written directly inside it, side by side.  Both blocks are now
their own functions, open_sjm_run and open_full_join_nest_run, called
from the same spot in the loop.

This does not change behavior.  It only makes the two blocks easier to
read on their own and easier to compare against each other, since they
now have matching shapes.
Dave Gosselin
Look up a FULL JOIN's left-most JOIN_TAB directly instead of walking

find_left_most_join_tab used to walk backward from the FULL JOIN's
right side JOIN_TAB, testing each preceding one to see if it belonged
to the left side, until it fell off the left side's edge.

Most of the time this is unnecessary.  A left side that is a single
table already has its own JOIN_TAB, reachable straight from the
table.  A left side of two or more tables is always computed into its
own run, so that run's placeholder JOIN_TAB is now recorded on the
nest itself and can be read off directly.  The walk is still needed
for the rare remaining case, where table elimination has reduced the
left side to one surviving table without giving it a run of its own.

The walk that finds where a FULL JOIN's left side begins in the join
order runs only when table elimination has reduced the left operand to
one surviving table, and no query in full_join.test had that shape.
Elimination reaches inside a FULL JOIN's left operand because that nest
carries no ON of its own, so a LEFT JOIN written there can lose its
inner table.  Section 37 covers it, once with one table eliminated and
once with two.
Marko Mäkelä
MDEV-40571 fixup: -Wmaybe-uninitialized

The local variable key_part_end that was introduced in
commit 3b1c2e58abab5571bec4ff52773ddc75b1738da9 (MDEV-40571)
would trigger a GCC warning. The warning is bogus; in fact,
before the variable will be read, it will have been initialised
when either keys==0 or i==0, which covers each code path
that does not lead to a return.
Ahmad
MDEV-34805 provide various information about vector indexes

Adds INFORMATION_SCHEMA.VECTOR_INDEXES table exposing statistics for MHNSW vector
indexes via a MYSQL_INFORMATION_SCHEMA_PLUGIN registered alongside
the existing mhnsw daemon plugin. columns covered:
(TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, VECTOR_DIMENSIONS,
SUBDIST_ENABLED, INDEX_SIZE, TOTAL_NODES, DELETED_ROWS,
MEMORY_SIZE, CACHE_OVERFLOWS).
Yuchen Pei
MDEV-40168 [wip] Add multi valued index over fulltext

TODOs on top of those in the patch diff:

- EXPLAIN output should not say fulltext
- check type match to avoid false negative / positive bugs in mysql
- transcode the value into the index charset in mvi_encode_key
Thirunarayanan Balathandayuthapani
MDEV-40915  Table options (PAGE_COMPRESSED, ENCRYPTED) are ignored by ALTER TABLE on partitioned tables

Problem:
=========
ha_partition::check_if_supported_inplace_alter() sourced the
per-partition engine options from m_part_info, which describes
the table as it is now. The engine compares
create_info->option_struct against handler::option_struct
(old options), both are pointing to source table.
It leads to make the engine believe that there is no change
in table structure and allows to proceed PAGE_COMPRESSED=1
with INSTANT algorithm.

Fix:
====
Take the new options from altered_table->part_info, which was opened
from the new .frm with the new table-level options already merged
into every partition_element by parse_engine_part_options().

Do the same in prepare_inplace_alter_table(), so that both phases
agree and a per-partition option override reaches the rebuilt table.
Vladislav Vaintroub
MDEV-38918 Make large pages an explicit per-caller opt-in

my_large_malloc() attempted large pages whenever --large-pages was
enabled, silently rounding the size up and reporting it back via an
in/out parameter. ut_malloc_dontdump() never passed that adjusted
size on to its own callers (the InnoDB redo log buffer and
recv_sys_t::tmp_buf), so freeing later used the original, smaller
size, causing the reported "faux memory leak".

Only the buffer pool and the MyISAM/Aria key caches are documented
to benefit from large pages. Everything else that ended up calling
my_large_malloc() only wanted its "do not dump to core" property and
picked up large pages as an undocumented side effect; those buffers
are also small and sequentially accessed, so they would have gained
little from large pages anyway.

Add MY_TRY_LARGE_PAGES: my_large_malloc() and my_large_virtual_alloc()
now only attempt large pages when a caller passes this flag, instead
of always trying whenever the global option is set. Only the buffer
pool and the key caches pass it. The redo log buffer, tmp_buf, and
row0log.cc's crypt buffers no longer request large pages at all,
which removes the size-rounding bug for them without touching that
code.

my_large_virtual_alloc()'s fallback (no usable large page size) must
also return read-write memory right away, like the Windows large-pages
fallback already does, since my_virtual_mem_commit() is a no-op for
MY_TRY_LARGE_PAGES. my_use_large_pages is now set once, in
my_init_large_pages(), and never changed thereafter, on any platform.

Also fix a broken mtr suppression regex in main.large_pages that
would fail the test on Windows.
bsrikanth-mariadb
MDEV-40553: unprintable gis ranges in trace and context

When ranges were specified in a query for GIS types, the recorded trace
and context couldn't print the range information. Instead, it only
showed unprintable_geometry_value.

This PR extends the geometric field type Field_geom to print key value
in binary form (same as what is done for Blobs today), along with the
comparison operator, when recorded in the range.
For spatial indexes, the operators like MBRWITHIN, MBRCONTAINS, etc...
are stored appropriately, and for normal indexes, operators like
<, <=, >, >=, etc... are recorded appropriately.

Implementation Details: -
  Add an argument imagetype to Field::print_key_part_value(), to determine
  if an index key part value is to be printed in WKT or binary format.
  For Geometric type, imagetype is set to itMBR. When printing ranges,
  the MBR operators are printed as well, as implemented in
  print_mbr_range_operator().
Dave Gosselin
MDEV-40620:  Allow a nested join as a FULL JOIN operand

Phase 2 rejected two shapes.  A FULL JOIN whose right operand was a
nested join raised ER_FULL_JOIN_BASE_TABLES_ONLY, and a FULL JOIN on the
inner side of an enclosing LEFT or RIGHT JOIN raised
ER_FULL_JOIN_NOT_ALLOWED_IN_OUTER_JOIN.  Both shapes are allowed now and
neither error is raised any more.

A FULL JOIN emits the rows of one side that never matched with the other
side null complemented.  An enclosing join's condition has to see those
rows complete, which it cannot do while the operand is only a set of
tables spread through the join order.  An operand that is a nested join
is therefore computed into a temporary table before the enclosing join
runs, so one JOIN_TAB stands for the whole operand and carries the FULL
JOIN's own marks.

The chosen plan has to keep such an operand on an unbroken span of the
join order, and that span becomes a run of JOIN_TABs of its own, the way
a materialized semi join already is.  Nothing outside the operand is
positioned while the operand is computed, so a table inside it can carry
no condition that names an outside table, an equality class that spans
the boundary is split at it, and the outer join scope of a join outside
it stops there.  A nest goes on naming a table that table elimination
removed, and an eliminated table is a const table, so the test for
entering the run leaves the eliminated tables out.  The test for
entering a materialized semi join run reads the same way.

The operand keeps a copy of its own ON expression, since simplifying the
join tree merges an inner join's ON into the enclosing outer join's ON,
which is not equivalent for a FULL JOIN because it changes which rows of
the right side never match.  An operand can itself be built from more
than one join, so an ON expression can sit a level or two below the top
of it, and every such expression is recorded on the operand as a whole,
which is the nest that reads them back.  A predicate over the operand is
checked again at the entry standing for it, once the null complementing
has happened.  A FULL JOIN's left side WHERE predicates are deferred to
the table that completes its right side even when that side is a nest.
The enclosing ON contributes no access path for the operand.

Reading a row back restores what a nest table cannot hold on its own,
whether the row was null complemented for a column declared NOT NULL,
and the status that says whether the table holds a usable row at all.

The JOIN_TAB standing for a run covers every table of the nest, the
eliminated ones included.  The plan output therefore skips only a
JOIN_TAB that is a table of the query, since a JOIN_TAB standing for a
run is never eliminated.

Sections 22 to 28 cover the new shapes.  The section covering more than
one matching right side row becomes Section 28, which adds a nest operand
to the same case, and the two sections that came with the fixes before
this one are renumbered to follow it.  Sections 35, 38, and 39 cover an
ON expression below the top of an operand, an eliminated table inside an
operand nest, and a condition offered to a table inside a run.  The
helper that gives every column an index of its own comes with them,
ahead of the axis that turns it on.
Dave Gosselin
Remove unused errors
Andrei Elkin
MDEV-40824 slave_run_triggers_for_rbr enabled slave ignores after-insert trigger's error

MDEV-15990 commit did not handle after-trigger error on
slave_run_triggers_for_rbr slave server.
That made an error from such failing trigger lost.

The reason was a flaw in new logics coded for
Write_rows_log_event::write_row().

It is amended now. For any sql error out of the after-trigger
HA_ERR_GENERIC handler error code is returned instead of zero. That
error-stops serial slave as expected (also by pre-MDEV-15990 code).
Optimistic parallel slave may retry, contingent upon the trigger's sql error.

Note: idempotent-mode tolerance of trigger-internal errors and
the per-row last_errno reset are left for a follow-up.
bsrikanth-mariadb
MDEV-40553: unprintable gis ranges in trace and context

When ranges were specified in a query for GIS types, the recorded trace
and context couldn't print the range information. Instead, it only
showed unprintable_geometry_value.

This PR extends the geometric field type Field_geom to print key value
in binary form (same as what is done for Blobs today), along with the
comparison operator, when recorded in the range.
For spatial indexes, the operators like MBRWITHIN, MBRCONTAINS, etc...
are stored appropriately, and for normal indexes, operators like
<, <=, >, >=, etc... are recorded appropriately.

Implementation Details: -
  Add an argument imagetype to Field::print_key_part_value(), to determine
  if an index key part value is to be printed in WKT or binary format.
  For Geometric type, imagetype is set to itMBR. When printing ranges,
  the MBR operators are printed as well, as implemented in
  print_mbr_range_operator().