~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_class.cc

  • Committer: Brian Aker
  • Date: 2008-10-15 16:30:14 UTC
  • Revision ID: brian@tangent.org-20081015163014-ua75zeqwk2xe80jh
Firt pass to remove C/C++ funkiness around declaration of THD.

Show diffs side-by-side

added added

removed removed

Lines of Context:
597
597
}
598
598
 
599
599
extern "C"
600
 
void *thd_alloc(DRIZZLE_THD thd, unsigned int size)
 
600
void *thd_alloc(THD *thd, unsigned int size)
601
601
{
602
602
  return thd->alloc(size);
603
603
}
604
604
 
605
605
extern "C"
606
 
void *thd_calloc(DRIZZLE_THD thd, unsigned int size)
 
606
void *thd_calloc(THD *thd, unsigned int size)
607
607
{
608
608
  return thd->calloc(size);
609
609
}
610
610
 
611
611
extern "C"
612
 
char *thd_strdup(DRIZZLE_THD thd, const char *str)
 
612
char *thd_strdup(THD *thd, const char *str)
613
613
{
614
614
  return thd->strdup(str);
615
615
}
616
616
 
617
617
extern "C"
618
 
char *thd_strmake(DRIZZLE_THD thd, const char *str, unsigned int size)
 
618
char *thd_strmake(THD *thd, const char *str, unsigned int size)
619
619
{
620
620
  return thd->strmake(str, size);
621
621
}
630
630
}
631
631
 
632
632
extern "C"
633
 
void *thd_memdup(DRIZZLE_THD thd, const void* str, unsigned int size)
 
633
void *thd_memdup(THD *thd, const void* str, unsigned int size)
634
634
{
635
635
  return thd->memdup(str, size);
636
636
}
637
637
 
638
638
extern "C"
639
 
void thd_get_xid(const DRIZZLE_THD thd, DRIZZLE_XID *xid)
 
639
void thd_get_xid(const THD *thd, DRIZZLE_XID *xid)
640
640
{
641
641
  *xid = *(DRIZZLE_XID *) &thd->transaction.xid_state.xid;
642
642
}
2226
2226
  @retval 0 the user thread is active
2227
2227
  @retval 1 the user thread has been killed
2228
2228
*/
2229
 
extern "C" int thd_killed(const DRIZZLE_THD thd)
 
2229
extern "C" int thd_killed(const THD *thd)
2230
2230
{
2231
2231
  return(thd->killed);
2232
2232
}
2236
2236
  @param thd user thread
2237
2237
  @return thread id
2238
2238
*/
2239
 
extern "C" unsigned long thd_get_thread_id(const DRIZZLE_THD thd)
 
2239
extern "C" unsigned long thd_get_thread_id(const THD *thd)
2240
2240
{
2241
2241
  return((unsigned long)thd->thread_id);
2242
2242
}
2243
2243
 
2244
2244
 
2245
2245
#ifdef INNODB_COMPATIBILITY_HOOKS
2246
 
extern "C" const struct charset_info_st *thd_charset(DRIZZLE_THD thd)
 
2246
extern "C" const struct charset_info_st *thd_charset(THD *thd)
2247
2247
{
2248
2248
  return(thd->charset());
2249
2249
}
2250
2250
 
2251
 
extern "C" char **thd_query(DRIZZLE_THD thd)
 
2251
extern "C" char **thd_query(THD *thd)
2252
2252
{
2253
2253
  return(&thd->query);
2254
2254
}
2255
2255
 
2256
 
extern "C" int thd_slave_thread(const DRIZZLE_THD thd)
 
2256
extern "C" int thd_slave_thread(const THD *thd)
2257
2257
{
2258
2258
  return(thd->slave_thread);
2259
2259
}
2260
2260
 
2261
 
extern "C" int thd_non_transactional_update(const DRIZZLE_THD thd)
 
2261
extern "C" int thd_non_transactional_update(const THD *thd)
2262
2262
{
2263
2263
  return(thd->transaction.all.modified_non_trans_table);
2264
2264
}
2265
2265
 
2266
 
extern "C" int thd_binlog_format(const DRIZZLE_THD thd)
 
2266
extern "C" int thd_binlog_format(const THD *thd)
2267
2267
{
2268
2268
  return (int) thd->variables.binlog_format;
2269
2269
}
2270
2270
 
2271
 
extern "C" void thd_mark_transaction_to_rollback(DRIZZLE_THD thd, bool all)
 
2271
extern "C" void thd_mark_transaction_to_rollback(THD *thd, bool all)
2272
2272
{
2273
2273
  mark_transaction_to_rollback(thd, all);
2274
2274
}