~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/charset.c

Merged build changes from Antony.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
#include "mysys_priv.h"
17
17
#include "mysys_err.h"
18
 
#include <m_ctype.h>
19
 
#include <m_string.h>
 
18
#include <mystrings/m_ctype.h>
 
19
#include <mystrings/m_string.h>
20
20
#include <my_dir.h>
21
 
#include <my_xml.h>
 
21
#include <mystrings/my_xml.h>
22
22
 
23
23
 
24
24
/*
113
113
  /* Special handling of hex and binary strings */
114
114
  state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX;
115
115
  state_map[(uchar)'b']= state_map[(uchar)'B']= (uchar) MY_LEX_IDENT_OR_BIN;
116
 
  state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR;
117
116
  return 0;
118
117
}
119
118
 
176
175
  }
177
176
  if (from->tab_to_uni)
178
177
  {
179
 
    uint sz= MY_CS_TO_UNI_TABLE_SIZE*sizeof(uint16);
180
 
    if (!(to->tab_to_uni= (uint16*)  my_once_memdup((char*)from->tab_to_uni,
 
178
    uint sz= MY_CS_TO_UNI_TABLE_SIZE*sizeof(uint16_t);
 
179
    if (!(to->tab_to_uni= (uint16_t*)  my_once_memdup((char*)from->tab_to_uni,
181
180
                                                    sz, MYF(MY_WME))))
182
181
      goto err;
183
182
  }
225
224
      if (!(all_charsets[cs->number]=
226
225
         (CHARSET_INFO*) my_once_alloc(sizeof(CHARSET_INFO),MYF(0))))
227
226
        return MY_XML_ERROR;
228
 
      bzero((void*)all_charsets[cs->number],sizeof(CHARSET_INFO));
 
227
      memset((void*)all_charsets[cs->number], 0, sizeof(CHARSET_INFO));
229
228
    }
230
229
    
231
230
    if (cs->primary_number == cs->number)
441
440
    pthread_mutex_lock(&THR_LOCK_charset);
442
441
    if (!charset_initialized)
443
442
    {
444
 
      bzero(&all_charsets,sizeof(all_charsets));
 
443
      memset(&all_charsets, 0, sizeof(all_charsets));
445
444
      init_compiled_charsets(myflags);
446
445
      
447
446
      /* Copy compiled charsets */