~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/uncompress/uncompressudf.cc

  • Committer: Brian Aker
  • Date: 2008-10-20 04:28:21 UTC
  • mto: (492.3.21 drizzle-clean-code)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: brian@tangent.org-20081020042821-rqqdrccuu8195k3y
Second pass of thd cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
15
 
16
 
#define DRIZZLE_SERVER 1 /* for thd variable max_allowed_packet */
 
16
#define DRIZZLE_SERVER 1 /* for session variable max_allowed_packet */
17
17
#include <drizzled/server_includes.h>
18
18
#include <drizzled/drizzled_error_messages.h>
19
19
 
46
46
  /* If length is less than 4 bytes, data is corrupt */
47
47
  if (res->length() <= 4)
48
48
  {
49
 
    push_warning_printf(current_thd, DRIZZLE_ERROR::WARN_LEVEL_ERROR,
 
49
    push_warning_printf(current_session, DRIZZLE_ERROR::WARN_LEVEL_ERROR,
50
50
                        ER_ZLIB_Z_DATA_ERROR,
51
51
                        ER(ER_ZLIB_Z_DATA_ERROR));
52
52
    goto err;
54
54
 
55
55
  /* Size of uncompressed data is stored as first 4 bytes of field */
56
56
  new_size= uint4korr(res->ptr()) & 0x3FFFFFFF;
57
 
  if (new_size > current_thd->variables.max_allowed_packet)
 
57
  if (new_size > current_session->variables.max_allowed_packet)
58
58
  {
59
 
    push_warning_printf(current_thd, DRIZZLE_ERROR::WARN_LEVEL_ERROR,
 
59
    push_warning_printf(current_session, DRIZZLE_ERROR::WARN_LEVEL_ERROR,
60
60
                        ER_TOO_BIG_FOR_UNCOMPRESS,
61
61
                        ER(ER_TOO_BIG_FOR_UNCOMPRESS),
62
 
                        current_thd->variables.max_allowed_packet);
 
62
                        current_session->variables.max_allowed_packet);
63
63
    goto err;
64
64
  }
65
65
  if (buffer.realloc((uint32_t)new_size))
74
74
 
75
75
  code= ((err == Z_BUF_ERROR) ? ER_ZLIB_Z_BUF_ERROR :
76
76
         ((err == Z_MEM_ERROR) ? ER_ZLIB_Z_MEM_ERROR : ER_ZLIB_Z_DATA_ERROR));
77
 
  push_warning(current_thd, DRIZZLE_ERROR::WARN_LEVEL_ERROR, code, ER(code));
 
77
  push_warning(current_session, DRIZZLE_ERROR::WARN_LEVEL_ERROR, code, ER(code));
78
78
 
79
79
err:
80
80
  null_value= 1;