1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Merge branch 'develop-1.1' into 1.1-merge-up

This commit is contained in:
Andrew Hutchings
2017-12-13 09:09:39 +00:00
11 changed files with 147 additions and 65 deletions

View File

@ -22,6 +22,7 @@
#include "config.h"
#include <string>
#include <boost/algorithm/string.hpp>
#include <stdexcept>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
@ -45,13 +46,17 @@ const string XMLParser::getConfig(const xmlDocPtr doc, const string& section, co
while (cur1 != NULL)
{
if ((!xmlStrcmp(cur1->name, (const xmlChar*)section.c_str())))
string cur1name = (const char*)cur1->name;
if ((boost::iequals(cur1name, section)))
{
xmlNodePtr cur2 = cur1->xmlChildrenNode;
while (cur2 != NULL)
{
if ((!xmlStrcmp(cur2->name, (const xmlChar*)name.c_str())))
string cur2name = (const char*)cur2->name;
if ((boost::iequals(cur2name, name)))
{
xmlNodePtr cur3 = cur2->xmlChildrenNode;
@ -85,13 +90,17 @@ void XMLParser::getConfig(const xmlDocPtr doc, const string& section, const stri
while (cur1 != NULL)
{
if ((!xmlStrcmp(cur1->name, (const xmlChar*)section.c_str())))
string cur1name = (const char*)cur1->name;
if ((boost::iequals(cur1name, section)))
{
xmlNodePtr cur2 = cur1->xmlChildrenNode;
while (cur2 != NULL)
{
if ((!xmlStrcmp(cur2->name, (const xmlChar*)name.c_str())))
string cur2name = (const char*)cur2->name;
if ((boost::iequals(cur2name, name)))
{
res.clear();
xmlNodePtr cur3 = cur2->xmlChildrenNode;
@ -123,13 +132,17 @@ void XMLParser::setConfig(xmlDocPtr doc, const string& section, const string& na
while (cur1 != NULL)
{
if (xmlStrcmp(cur1->name, (const xmlChar*)section.c_str()) == 0)
string cur1name = (const char*)cur1->name;
if (boost::iequals(cur1name, section))
{
cur2 = cur1->xmlChildrenNode;
while (cur2 != NULL)
{
if (xmlStrcmp(cur2->name, (const xmlChar*)name.c_str()) == 0)
string cur2name = (const char*)cur2->name;
if (boost::iequals(cur2name, name))
{
xmlNodePtr cur3 = cur2->xmlChildrenNode;
@ -185,7 +198,9 @@ void XMLParser::delConfig(xmlDocPtr doc, const string& section, const string& na
while (cur1 != NULL)
{
if ((!xmlStrcmp(cur1->name, (const xmlChar*)section.c_str())))
string cur1name = (const char*)cur1->name;
if ((boost::iequals(cur1name, section)))
{
xmlNodePtr cur2 = cur1->xmlChildrenNode;
@ -193,8 +208,9 @@ void XMLParser::delConfig(xmlDocPtr doc, const string& section, const string& na
{
xmlNodePtr tmp = cur2;
cur2 = cur2->next;
string tmpname = (const char*)tmp->name;
if ((!xmlStrcmp(tmp->name, (const xmlChar*)name.c_str())))
if ((boost::iequals(tmpname, name)))
{
xmlUnlinkNode(tmp);
xmlFreeNode(tmp);