Skip to content

Instantly share code, notes, and snippets.

@yoku0825
Last active December 19, 2015 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoku0825/5932320 to your computer and use it in GitHub Desktop.
Save yoku0825/5932320 to your computer and use it in GitHub Desktop.
*** client/mysql.cc.org 2013-05-22 00:18:39.000000000 +0900
--- client/mysql.cc 2013-07-10 12:22:42.008765722 +0900
***************
*** 151,157 ****
default_pager_set= 0, opt_sigint_ignore= 0,
auto_vertical_output= 0,
show_warnings= 0, executing_query= 0, interrupted_query= 0,
! ignore_spaces= 0;
static my_bool debug_info_flag, debug_check_flag;
static my_bool column_types_flag;
static my_bool preserve_comments= 0;
--- 151,157 ----
default_pager_set= 0, opt_sigint_ignore= 0,
auto_vertical_output= 0,
show_warnings= 0, executing_query= 0, interrupted_query= 0,
! ignore_spaces= 0, decosuke= 0;
static my_bool debug_info_flag, debug_check_flag;
static my_bool column_types_flag;
static my_bool preserve_comments= 0;
***************
*** 1979,1984 ****
--- 1979,1992 ----
int ho_error;
MYSQL_PARAMETERS *mysql_params= mysql_get_parameters();
+ size_t pnlen= strlen(my_progname);
+ if (!strcmp("-san", my_progname + pnlen - strlen("-san")))
+ decosuke= 0;
+ else if (!strcmp("-sun", my_progname + pnlen - strlen("-sun")))
+ decosuke= 2;
+ else
+ decosuke= 1;
+
tmp= (char *) getenv("MYSQL_HOST");
if (tmp)
current_host= my_strdup(tmp, MYF(MY_WME));
***************
*** 2159,2164 ****
--- 2167,2190 ----
break;
}
+ if (line_length != 0)
+ {
+ if (decosuke== 1)
+ {
+ fputs("_人人人人人人人人人人人人人人人_\n", stderr);
+ fputs("> さんをつけろよデコ助野郎! <\n", stderr);
+ fputs(" ̄Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y ̄ \n", stderr);
+ continue;
+ }
+ else if (decosuke== 2)
+ {
+ fputs("_人人人人人人人人人人人人人人人人人人_\n", stderr);
+ fputs("> 黙れ小僧! お前にSunを救えるか! <\n", stderr);
+ fputs(" ̄Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y ̄ \n", stderr);
+ continue;
+ }
+ }
+
/*
Check if line is a mysql command line
(We want to allow help, print and clear anywhere at line start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment