~ubuntu-branches/ubuntu/natty/mysql-5.1/natty-proposed

« back to all changes in this revision

Viewing changes to sql/sql_class.cc

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 08:30:45 UTC
  • mfrom: (1.4.1)
  • Revision ID: package-import@ubuntu.com-20120222083045-2rd53r4bnyx7qus4
Tags: 5.1.61-0ubuntu0.11.04.1
* SECURITY UPDATE: Update to 5.1.61 to fix multiple security issues
  (LP: #937869)
  - http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
  - CVE-2011-2262
  - CVE-2012-0075
  - CVE-2012-0112
  - CVE-2012-0113
  - CVE-2012-0114
  - CVE-2012-0115
  - CVE-2012-0116
  - CVE-2012-0117
  - CVE-2012-0118
  - CVE-2012-0119
  - CVE-2012-0120
  - CVE-2012-0484
  - CVE-2012-0485
  - CVE-2012-0486
  - CVE-2012-0487
  - CVE-2012-0488
  - CVE-2012-0489
  - CVE-2012-0490
  - CVE-2012-0491
  - CVE-2012-0492
  - CVE-2012-0493
  - CVE-2012-0494
  - CVE-2012-0495
  - CVE-2012-0496

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
 
1
/*
 
2
   Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
2
3
 
3
4
   This program is free software; you can redistribute it and/or modify
4
5
   it under the terms of the GNU General Public License as published by
11
12
 
12
13
   You should have received a copy of the GNU General Public License
13
14
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
 
 
 
15
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
16
*/
16
17
 
17
18
/*****************************************************************************
18
19
**
648
649
  is_slave_error= thread_specific_used= FALSE;
649
650
  hash_clear(&handler_tables_hash);
650
651
  tmp_table=0;
651
 
  used_tables=0;
652
652
  cuted_fields= sent_row_count= row_count= 0L;
653
653
  limit_found_rows= 0;
654
654
  row_count_func= -1;
1196
1196
  return 0;
1197
1197
}
1198
1198
 
 
1199
/*
 
1200
  Remove the thread specific info (THD and mem_root pointer) stored during
 
1201
  store_global call for this thread.
 
1202
*/
 
1203
bool THD::restore_globals()
 
1204
{
 
1205
  /*
 
1206
    Assert that thread_stack is initialized: it's necessary to be able
 
1207
    to track stack overrun.
 
1208
  */
 
1209
  DBUG_ASSERT(thread_stack);
 
1210
  
 
1211
  /* Undocking the thread specific data. */
 
1212
  my_pthread_setspecific_ptr(THR_THD, NULL);
 
1213
  my_pthread_setspecific_ptr(THR_MALLOC, NULL);
 
1214
  
 
1215
  return 0;
 
1216
}
 
1217
 
1199
1218
 
1200
1219
/*
1201
1220
  Cleanup after query.
2040
2059
                            ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
2041
2060
                            ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
2042
2061
                            "string", printable_buff,
2043
 
                            item->name, row_count);
 
2062
                            item->name, static_cast<long>(row_count));
2044
2063
      }
2045
2064
      else if (from_end_pos < res->ptr() + res->length())
2046
2065
      { 
2049
2068
        */
2050
2069
        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
2051
2070
                            WARN_DATA_TRUNCATED, ER(WARN_DATA_TRUNCATED),
2052
 
                            item->full_name(), row_count);
 
2071
                            item->full_name(), static_cast<long>(row_count));
2053
2072
      }
2054
2073
      cvt_str.length(bytes);
2055
2074
      res= &cvt_str;
3383
3402
    xs->xa_state=xa_state;
3384
3403
    xs->xid.set(xid);
3385
3404
    xs->in_thd=0;
 
3405
    xs->rm_error=0;
3386
3406
    res=my_hash_insert(&xid_cache, (uchar*)xs);
3387
3407
  }
3388
3408
  pthread_mutex_unlock(&LOCK_xid_cache);