~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

Viewing changes to sql/sp_head.cc

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-02-14 23:59:22 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120214235922-cux5uek1e5l0hje9
Tags: 5.5.20-0ubuntu1
* New upstream release.
* d/mysql-server-5.5.mysql.upstart: Fix stop on to make sure mysql is
  fully stopped before shutdown commences. (LP: #688541) Also simplify
  start on as it is redundant.
* d/control: Depend on upstart version which has apparmor profile load
  script to prevent failure on upgrade from lucid to precise.
  (LP: #907465)
* d/apparmor-profile: need to allow /run since that is the true path
  of /var/run files. (LP: #917542)
* d/control: mysql-server-5.5 has files in it that used to be owned
  by libmysqlclient-dev, so it must break/replace it. (LP: #912487)
* d/rules, d/control: 5.5.20 Fixes segfault on tests with gcc 4.6,
  change compiler back to system default.
* d/rules: Turn off embedded libedit/readline.(Closes: #659566)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1005
1005
    if ((*splocal)->limit_clause_param)
1006
1006
    {
1007
1007
      res|= qbuf.append_ulonglong((*splocal)->val_uint());
 
1008
      if (res)
 
1009
        break;
1008
1010
      continue;
1009
1011
    }
1010
1012
 
1029
1031
 
1030
1032
    thd->query_name_consts++;
1031
1033
  }
1032
 
  res|= qbuf.append(cur + prev_pos, query_str->length - prev_pos);
1033
 
  if (res)
 
1034
  if (res ||
 
1035
      qbuf.append(cur + prev_pos, query_str->length - prev_pos))
1034
1036
    DBUG_RETURN(TRUE);
1035
1037
 
1036
1038
  /*
1037
1039
    Allocate additional space at the end of the new query string for the
1038
1040
    query_cache_send_result_to_client function.
 
1041
 
 
1042
    The query buffer layout is:
 
1043
       buffer :==
 
1044
            <statement>   The input statement(s)
 
1045
            '\0'          Terminating null char
 
1046
            <length>      Length of following current database name (size_t)
 
1047
            <db_name>     Name of current database
 
1048
            <flags>       Flags struct
1039
1049
  */
1040
 
  buf_len= qbuf.length() + thd->db_length + 1 + QUERY_CACHE_FLAGS_SIZE + 1;
 
1050
  buf_len= qbuf.length() + 1 + sizeof(size_t) + thd->db_length + 
 
1051
           QUERY_CACHE_FLAGS_SIZE + 1;
1041
1052
  if ((pbuf= (char *) alloc_root(thd->mem_root, buf_len)))
1042
1053
  {
1043
1054
    memcpy(pbuf, qbuf.ptr(), qbuf.length());
1044
1055
    pbuf[qbuf.length()]= 0;
 
1056
    memcpy(pbuf+qbuf.length()+1, (char *) &thd->db_length, sizeof(size_t));
1045
1057
  }
1046
1058
  else
1047
1059
    DBUG_RETURN(TRUE);