1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge bk-internal.mysql.com:/home/bk/mysql-5.1

into  mysql.com:/home/my/mysql-5.1
This commit is contained in:
monty@nosik.monty.fi
2007-08-02 07:55:33 +03:00
93 changed files with 1118 additions and 487 deletions

View File

@@ -69,7 +69,7 @@ TODO:
*/
#define SHOW_VERSION "0.9"
#define SLAP_VERSION "1.0"
#define HUGE_STRING_LENGTH 8196
#define RAND_STRING_SIZE 126
@@ -131,10 +131,8 @@ const char *delimiter= "\n";
const char *create_schema_string= "mysqlslap";
static my_bool opt_preserve;
static my_bool opt_preserve= 0, debug_info_flag= 0, debug_check_flag= 0;
static my_bool opt_only_print= FALSE;
static my_bool opt_compress= FALSE, tty_password= FALSE,
opt_silent= FALSE,
auto_generate_sql_autoincrement= FALSE,
@@ -149,13 +147,14 @@ static uint commit_rate;
static uint detach_rate;
const char *num_int_cols_opt;
const char *num_char_cols_opt;
/* Yes, we do set defaults here */
static unsigned int num_int_cols= 1;
static unsigned int num_char_cols= 1;
static unsigned int num_int_cols_index= 0;
static unsigned int num_char_cols_index= 0;
static unsigned int iterations;
static uint my_end_arg= 0;
static char *default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME;
static ulonglong actual_queries= 0;
static ulonglong auto_actual_queries;
@@ -410,7 +409,7 @@ int main(int argc, char **argv)
my_free(shared_memory_base_name, MYF(MY_ALLOW_ZERO_PTR));
#endif
free_defaults(defaults_argv);
my_end(0);
my_end(my_end_arg);
return 0;
}
@@ -569,6 +568,11 @@ static struct my_option my_long_options[] =
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
(uchar**) &default_dbug_option, (uchar**) &default_dbug_option, 0, GET_STR,
OPT_ARG, 0, 0, 0, 0, 0, 0},
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .",
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"debug-info", 'T', "Print some debug info at exit.", (uchar**) &debug_info_flag,
(uchar**) &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"delimiter", 'F',
"Delimiter to use in SQL statements supplied in file or command line.",
(uchar**) &delimiter, (uchar**) &delimiter, 0, GET_STR, REQUIRED_ARG,
@@ -672,7 +676,7 @@ static struct my_option my_long_options[] =
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,SHOW_VERSION,
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname, SLAP_VERSION,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
}
@@ -731,6 +735,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break;
case '#':
DBUG_PUSH(argument ? argument : default_dbug_option);
debug_check_flag= 1;
break;
#include <sslopt-case.h>
case 'V':
@@ -1126,6 +1131,10 @@ get_options(int *argc,char ***argv)
DBUG_ENTER("get_options");
if ((ho_error= handle_options(argc, argv, my_long_options, get_one_option)))
exit(ho_error);
if (debug_info_flag)
my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
if (debug_check_flag)
my_end_arg= MY_CHECK_ERROR;
if (!user)
user= (char *)"root";