Commit 3b562dcf authored by Shishir Jaiswal's avatar Shishir Jaiswal

Bug#16212207 - LOAD XML INFILE PERFORMANCE WITH INDENTED

               XML

DESCRIPTION
===========
LOAD XML INFILE performance becomes painfully slow if the
tags' value has any space(s) in between them. They're
usually kept intentionally for indentation purpose.

ANALYSIS
========
The extra spaces are calling clear_level() many a times
which is having overhead of clearing taglist etc. This can
be avoided altogether by skipping all such spaces.

FIX
===
Trim all the starting whitespaces from the value before
passing it to read_value()
parent f4ce18b0
/*
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2000, 2017, 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
......@@ -1989,6 +1989,13 @@ int READ_INFO::read_xml()
case '>': /* end tag - read tag value */
in_tag= false;
/* Skip all whitespaces */
while (' ' == (chr= my_tospace(GET)));
/*
Push the first non-whitespace char back to Stack. This char would be
read in the upcoming call to read_value()
*/
PUSH(chr);
chr= read_value('<', &value);
if(chr == my_b_EOF)
goto found_eof;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment