~eday/drizzle/eday-dev

« back to all changes in this revision

Viewing changes to client/drizzleslap.cc

  • Committer: Eric Day
  • Date: 2010-01-07 20:02:38 UTC
  • mfrom: (971.3.291 staging)
  • Revision ID: eday@oddments.org-20100107200238-uqw8v6kv9pl7nny5
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
#include <stdarg.h>
82
82
#include <sys/types.h>
83
83
#include <sys/wait.h>
 
84
#ifdef HAVE_SYS_STAT_H
 
85
# include <sys/stat.h>
 
86
#endif
 
87
#include <fcntl.h>
 
88
#include <math.h>
84
89
#include <ctype.h>
 
90
#include <cassert>
 
91
#include <cstdlib>
85
92
#include <string>
86
93
 
 
94
#include <pthread.h>
 
95
 
87
96
/* Added this for string translation. */
88
97
#include <drizzled/gettext.h>
89
98
 
174
183
 
175
184
const char *default_dbug_option= "d:t:o,/tmp/drizzleslap.trace";
176
185
const char *opt_csv_str;
177
 
File csv_file;
 
186
int csv_file;
178
187
 
179
188
static int get_options(int *argc,char ***argv);
180
189
static uint32_t opt_drizzle_port= 0;
1527
1536
  {
1528
1537
    if (create_string && !stat(create_string, &sbuf))
1529
1538
    {
1530
 
      File data_file;
 
1539
      int data_file;
1531
1540
      if (!S_ISREG(sbuf.st_mode))
1532
1541
      {
1533
1542
        fprintf(stderr,"%s: Create file was not a regular file\n",
1584
1593
 
1585
1594
    if (user_supplied_query && !stat(user_supplied_query, &sbuf))
1586
1595
    {
1587
 
      File data_file;
 
1596
      int data_file;
1588
1597
      if (!S_ISREG(sbuf.st_mode))
1589
1598
      {
1590
1599
        fprintf(stderr,"%s: User query supplied file was not a regular file\n",
1631
1640
  if (user_supplied_pre_statements
1632
1641
      && !stat(user_supplied_pre_statements, &sbuf))
1633
1642
  {
1634
 
    File data_file;
 
1643
    int data_file;
1635
1644
    if (!S_ISREG(sbuf.st_mode))
1636
1645
    {
1637
1646
      fprintf(stderr,"%s: User query supplied file was not a regular file\n",
1678
1687
  if (user_supplied_post_statements
1679
1688
      && !stat(user_supplied_post_statements, &sbuf))
1680
1689
  {
1681
 
    File data_file;
 
1690
    int data_file;
1682
1691
    if (!S_ISREG(sbuf.st_mode))
1683
1692
    {
1684
1693
      fprintf(stderr,"%s: User query supplied file was not a regular file\n",