~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/mysqlbinlog.cc

  • Committer: Stewart Smith
  • Date: 2008-06-30 05:33:25 UTC
  • mfrom: (12.2.8 drizzle)
  • mto: This revision was merged to the branch mainline in revision 19.
  • Revision ID: stewart@flamingspork.com-20080630053325-mwrv6bjaufcpvj8n
merge my work

Show diffs side-by-side

added added

removed removed

Lines of Context:
924
924
{
925
925
  {"help", '?', "Display this help and exit.",
926
926
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
927
 
#ifdef __NETWARE__
928
 
  {"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.",
929
 
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
930
 
#endif
931
927
  {"base64-output", OPT_BASE64_OUTPUT_MODE,
932
928
   "Determine when the output statements should be base64-encoded BINLOG "
933
929
   "statements: 'never' disables it and works only for binlogs without "
1154
1150
static void print_version()
1155
1151
{
1156
1152
  printf("%s Ver 3.3 for %s at %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE);
1157
 
  NETWARE_SET_SCREEN_MODE(1);
1158
1153
}
1159
1154
 
1160
1155
 
1204
1199
{
1205
1200
  bool tty_password=0;
1206
1201
  switch (optid) {
1207
 
#ifdef __NETWARE__
1208
 
  case OPT_AUTO_CLOSE:
1209
 
    setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
1210
 
    break;
1211
 
#endif
1212
1202
#ifndef DBUG_OFF
1213
1203
  case '#':
1214
1204
    DBUG_PUSH(argument ? argument : default_dbug_option);
1822
1812
  }
1823
1813
  else
1824
1814
  {
1825
 
    /* read from stdin */
1826
 
    /*
1827
 
      Windows opens stdin in text mode by default. Certain characters
1828
 
      such as CTRL-Z are interpeted as events and the read() method
1829
 
      will stop. CTRL-Z is the EOF marker in Windows. to get past this
1830
 
      you have to open stdin in binary mode. Setmode() is used to set
1831
 
      stdin in binary mode. Errors on setting this mode result in 
1832
 
      halting the function and printing an error message to stderr.
1833
 
    */
1834
 
#if defined (__WIN__) || (_WIN64)
1835
 
    if (_setmode(fileno(stdin), O_BINARY) == -1)
1836
 
    {
1837
 
      error("Could not set binary mode on stdin.");
1838
 
      return ERROR_STOP;
1839
 
    }
1840
 
#endif 
1841
1815
    if (init_io_cache(file, fileno(stdin), 0, READ_CACHE, (my_off_t) 0,
1842
1816
                      0, MYF(MY_WME | MY_NABP | MY_DONT_CHECK_FILESIZE)))
1843
1817
    {