~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_class.cc

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
359
359
 
360
360
void
361
361
Diagnostics_area::set_error_status(THD *thd __attribute__((unused)),
362
 
                                   uint sql_errno_arg,
 
362
                                   uint32_t sql_errno_arg,
363
363
                                   const char *message_arg)
364
364
{
365
365
  /*
522
522
}
523
523
 
524
524
 
525
 
bool THD::handle_error(uint sql_errno, const char *message,
 
525
bool THD::handle_error(uint32_t sql_errno, const char *message,
526
526
                       DRIZZLE_ERROR::enum_warning_level level)
527
527
{
528
528
  if (m_internal_handler)
922
922
  @return  NULL on failure, or pointer to the LEX_STRING object
923
923
*/
924
924
LEX_STRING *THD::make_lex_string(LEX_STRING *lex_str,
925
 
                                 const char* str, uint length,
 
925
                                 const char* str, uint32_t length,
926
926
                                 bool allocate_lex_string)
927
927
{
928
928
  if (allocate_lex_string)
956
956
*/
957
957
 
958
958
bool THD::convert_string(LEX_STRING *to, const CHARSET_INFO * const to_cs,
959
 
                         const char *from, uint from_length,
 
959
                         const char *from, uint32_t from_length,
960
960
                         const CHARSET_INFO * const from_cs)
961
961
{
962
962
  size_t new_length= to_cs->mbmaxlen * from_length;
963
 
  uint dummy_errors;
 
963
  uint32_t dummy_errors;
964
964
  if (!(to->str= (char*) alloc(new_length+1)))
965
965
  {
966
966
    to->length= 0;                              // Safety fix
991
991
bool THD::convert_string(String *s, const CHARSET_INFO * const from_cs,
992
992
                         const CHARSET_INFO * const to_cs)
993
993
{
994
 
  uint dummy_errors;
 
994
  uint32_t dummy_errors;
995
995
  if (convert_buffer.copy(s->ptr(), s->length(), from_cs, to_cs, &dummy_errors))
996
996
    return true;
997
997
  /* If convert_buffer >> s copying is more efficient long term */
1212
1212
  thd=current_thd;
1213
1213
}
1214
1214
 
1215
 
void select_result::send_error(uint errcode,const char *err)
 
1215
void select_result::send_error(uint32_t errcode,const char *err)
1216
1216
{
1217
1217
  my_message(errcode, err, MYF(0));
1218
1218
}
1246
1246
  cs= NULL;
1247
1247
}
1248
1248
 
1249
 
bool select_send::send_fields(List<Item> &list, uint flags)
 
1249
bool select_send::send_fields(List<Item> &list, uint32_t flags)
1250
1250
{
1251
1251
  bool res;
1252
1252
  if (!(res= thd->protocol->send_fields(&list, flags)))
1340
1340
  Handling writing to file
1341
1341
************************************************************************/
1342
1342
 
1343
 
void select_to_file::send_error(uint errcode,const char *err)
 
1343
void select_to_file::send_error(uint32_t errcode,const char *err)
1344
1344
{
1345
1345
  my_message(errcode, err, MYF(0));
1346
1346
  if (file > 0)
1426
1426
                        IO_CACHE *cache)
1427
1427
{
1428
1428
  File file;
1429
 
  uint option= MY_UNPACK_FILENAME | MY_RELATIVE_PATH;
 
1429
  uint32_t option= MY_UNPACK_FILENAME | MY_RELATIVE_PATH;
1430
1430
 
1431
1431
#ifdef DONT_ALLOW_FULL_LOAD_DATA_PATHS
1432
1432
  option|= MY_REPLACE_DIR;                      // Force use of db directory
1555
1555
  }
1556
1556
  row_count++;
1557
1557
  Item *item;
1558
 
  uint used_length=0,items_left=items.elements;
 
1558
  uint32_t used_length=0,items_left=items.elements;
1559
1559
  List_iterator_fast<Item> li(items);
1560
1560
 
1561
1561
  if (my_b_write(&cache,(unsigned char*) exchange->line_start->ptr(),
1697
1697
          space_inited=1;
1698
1698
          memset(space, ' ', sizeof(space));
1699
1699
        }
1700
 
        uint length=item->max_length-used_length;
 
1700
        uint32_t length=item->max_length-used_length;
1701
1701
        for (; length > sizeof(space) ; length-=sizeof(space))
1702
1702
        {
1703
1703
          if (my_b_write(&cache,(unsigned char*) space,sizeof(space)))
1802
1802
  }
1803
1803
  List_iterator_fast<Item> li(items);
1804
1804
  Item *val_item;
1805
 
  for (uint i= 0; (val_item= li++); i++)
 
1805
  for (uint32_t i= 0; (val_item= li++); i++)
1806
1806
    it->store(i, val_item);
1807
1807
  it->assigned(1);
1808
1808
  return(0);
2508
2508
      return m_memory != 0;
2509
2509
    }
2510
2510
 
2511
 
    unsigned char *slot(uint s)
 
2511
    unsigned char *slot(uint32_t s)
2512
2512
    {
2513
2513
      assert(s < sizeof(m_ptr)/sizeof(*m_ptr));
2514
2514
      assert(m_ptr[s] != 0);