~ubuntu-branches/ubuntu/quantal/mysql-5.5/quantal-updates

« back to all changes in this revision

Viewing changes to sql/sql_load.cc

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-01-16 10:11:37 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20130116101137-w2lant30o21mzi0b
Tags: 5.5.29-0ubuntu0.12.10.1
* SECURITY UPDATE: Update to 5.5.29 to fix security issues (LP: #1100264)
  - http://www.oracle.com/technetwork/topics/security/cpujan2013-1515902.html
* debian/patches/CVE-2012-5611.patch: removed, included upstream.
* debian/patches/38_scripts__mysqld_safe.sh__signals.patch: refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
#include "sql_repl.h"
39
39
#include "sp_head.h"
40
40
#include "sql_trigger.h"
41
 
 
 
41
#include "sql_show.h"
42
42
class XML_TAG {
43
43
public:
44
44
  int level;
678
678
  const char          *tbl= table_name_arg;
679
679
  const char          *tdb= (thd->db != NULL ? thd->db : db_arg);
680
680
  String              string_buf;
681
 
 
682
 
  if (!thd->db || strcmp(db_arg, thd->db)) 
 
681
  if (!thd->db || strcmp(db_arg, thd->db))
683
682
  {
684
683
    /*
685
 
      If used database differs from table's database, 
686
 
      prefix table name with database name so that it 
 
684
      If used database differs from table's database,
 
685
      prefix table name with database name so that it
687
686
      becomes a FQ name.
688
687
     */
689
688
    string_buf.set_charset(system_charset_info);
690
 
    string_buf.append(db_arg);
691
 
    string_buf.append("`");
 
689
    append_identifier(thd, &string_buf, db_arg, strlen(db_arg));
692
690
    string_buf.append(".");
693
 
    string_buf.append("`");
694
 
    string_buf.append(table_name_arg);
695
 
    tbl= string_buf.c_ptr_safe();
696
691
  }
697
 
 
 
692
  append_identifier(thd, &string_buf, table_name_arg,
 
693
                    strlen(table_name_arg));
 
694
  tbl= string_buf.c_ptr_safe();
698
695
  Load_log_event       lle(thd, ex, tdb, tbl, fv, is_concurrent,
699
696
                           duplicates, ignore, transactional_table);
700
697
 
719
716
      if (n++)
720
717
        pfields.append(", ");
721
718
      if (item->type() == Item::FIELD_ITEM)
722
 
      {
723
 
        pfields.append("`");
724
 
        pfields.append(item->name);
725
 
        pfields.append("`");
726
 
      }
 
719
        append_identifier(thd, &pfields, item->name, strlen(item->name));
727
720
      else
728
721
        item->print(&pfields, QT_ORDINARY);
729
722
    }
743
736
      val= lv++;
744
737
      if (n++)
745
738
        pfields.append(", ");
746
 
      pfields.append("`");
747
 
      pfields.append(item->name);
748
 
      pfields.append("`");
 
739
      append_identifier(thd, &pfields, item->name, strlen(item->name));
749
740
      pfields.append(val->name);
750
741
    }
751
742
  }