Commit 033eed84 authored by unknown's avatar unknown

Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint

into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


client/mysqltest.c:
  Auto merged
mysql-test/t/rpl_slave_status.test:
  Auto merged
mysql-test/t/system_mysql_db_fix.test:
  Auto merged
parents a3a05104 9e4e7023
...@@ -1498,6 +1498,7 @@ void do_exec(struct st_command *command) ...@@ -1498,6 +1498,7 @@ void do_exec(struct st_command *command)
DBUG_ENTER("do_exec"); DBUG_ENTER("do_exec");
DBUG_PRINT("enter", ("cmd: '%s'", cmd)); DBUG_PRINT("enter", ("cmd: '%s'", cmd));
/* Skip leading space */
while (*cmd && my_isspace(charset_info, *cmd)) while (*cmd && my_isspace(charset_info, *cmd))
cmd++; cmd++;
if (!*cmd) if (!*cmd)
...@@ -1507,7 +1508,6 @@ void do_exec(struct st_command *command) ...@@ -1507,7 +1508,6 @@ void do_exec(struct st_command *command)
init_dynamic_string(&ds_cmd, 0, command->query_len+256, 256); init_dynamic_string(&ds_cmd, 0, command->query_len+256, 256);
/* Eval the command, thus replacing all environment variables */ /* Eval the command, thus replacing all environment variables */
do_eval(&ds_cmd, cmd, command->end, TRUE); do_eval(&ds_cmd, cmd, command->end, TRUE);
cmd= ds_cmd.str;
DBUG_PRINT("info", ("Executing '%s' as '%s'", DBUG_PRINT("info", ("Executing '%s' as '%s'",
command->first_argument, cmd)); command->first_argument, cmd));
...@@ -2544,11 +2544,11 @@ void do_get_errcodes(struct st_command *command) ...@@ -2544,11 +2544,11 @@ void do_get_errcodes(struct st_command *command)
- May contain only digits[0-9] and _uppercase_ letters - May contain only digits[0-9] and _uppercase_ letters
*/ */
p++; /* Step past the S */ p++; /* Step past the S */
if (end - p != SQLSTATE_LENGTH) if ((end - p) != SQLSTATE_LENGTH)
die("The sqlstate must be exactly %d chars long", SQLSTATE_LENGTH); die("The sqlstate must be exactly %d chars long", SQLSTATE_LENGTH);
/* Check sqlstate string validity */ /* Check sqlstate string validity */
while (*p && p != end) while (*p && p < end)
{ {
if (my_isdigit(charset_info, *p) || my_isupper(charset_info, *p)) if (my_isdigit(charset_info, *p) || my_isupper(charset_info, *p))
*to_ptr++= *p++; *to_ptr++= *p++;
...@@ -4652,7 +4652,8 @@ void handle_error(struct st_command *command, ...@@ -4652,7 +4652,8 @@ void handle_error(struct st_command *command,
*/ */
if (err_errno == CR_SERVER_LOST || if (err_errno == CR_SERVER_LOST ||
err_errno == CR_SERVER_GONE_ERROR) err_errno == CR_SERVER_GONE_ERROR)
die("require query '%s' failed: %d: %s", command->query, err_errno, err_error); die("require query '%s' failed: %d: %s", command->query,
err_errno, err_error);
/* Abort the run of this test, pass the failed query as reason */ /* Abort the run of this test, pass the failed query as reason */
abort_not_supported_test("Query '%s' failed, required functionality" \ abort_not_supported_test("Query '%s' failed, required functionality" \
...@@ -4669,8 +4670,8 @@ void handle_error(struct st_command *command, ...@@ -4669,8 +4670,8 @@ void handle_error(struct st_command *command,
if (((command->expected_errors.err[i].type == ERR_ERRNO) && if (((command->expected_errors.err[i].type == ERR_ERRNO) &&
(command->expected_errors.err[i].code.errnum == err_errno)) || (command->expected_errors.err[i].code.errnum == err_errno)) ||
((command->expected_errors.err[i].type == ERR_SQLSTATE) && ((command->expected_errors.err[i].type == ERR_SQLSTATE) &&
(strcmp(command->expected_errors.err[i].code.sqlstate, (strncmp(command->expected_errors.err[i].code.sqlstate,
err_sqlstate) == 0))) err_sqlstate, SQLSTATE_LENGTH) == 0)))
{ {
if (!disable_result_log) if (!disable_result_log)
{ {
...@@ -4695,7 +4696,7 @@ void handle_error(struct st_command *command, ...@@ -4695,7 +4696,7 @@ void handle_error(struct st_command *command,
} }
DBUG_PRINT("info",("i: %d expected_errors: %d", i, DBUG_PRINT("info",("i: %d expected_errors: %d", i,
command->expected_errors)); command->expected_errors.count));
if (!disable_result_log) if (!disable_result_log)
{ {
...@@ -5423,6 +5424,9 @@ int main(int argc, char **argv) ...@@ -5423,6 +5424,9 @@ int main(int argc, char **argv)
save_file[0]= 0; save_file[0]= 0;
TMPDIR[0]= 0; TMPDIR[0]= 0;
/* Init expected errors */
memset(&saved_expected_errors, 0, sizeof(saved_expected_errors));
/* Init connections */ /* Init connections */
memset(connections, 0, sizeof(connections)); memset(connections, 0, sizeof(connections));
connections_end= connections + connections_end= connections +
......
...@@ -9,7 +9,7 @@ start slave; ...@@ -9,7 +9,7 @@ start slave;
connection master; connection master;
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
--enable_warning --enable_warnings
create table t1 (n int); create table t1 (n int);
insert into t1 values (1); insert into t1 values (1);
save_master_pos; save_master_pos;
......
...@@ -38,7 +38,7 @@ CREATE TABLE db ( ...@@ -38,7 +38,7 @@ CREATE TABLE db (
KEY User (User) KEY User (User)
) )
type=ISAM; type=ISAM;
--enable-warnings --enable_warnings
INSERT INTO db VALUES ('%','test', '','Y','Y','Y','Y','Y','Y'); INSERT INTO db VALUES ('%','test', '','Y','Y','Y','Y','Y','Y');
INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y'); INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y');
...@@ -56,7 +56,7 @@ CREATE TABLE host ( ...@@ -56,7 +56,7 @@ CREATE TABLE host (
PRIMARY KEY Host (Host,Db) PRIMARY KEY Host (Host,Db)
) )
type=ISAM; type=ISAM;
--enable-warnings --enable_warnings
--disable_warnings --disable_warnings
CREATE TABLE user ( CREATE TABLE user (
...@@ -75,7 +75,7 @@ CREATE TABLE user ( ...@@ -75,7 +75,7 @@ CREATE TABLE user (
PRIMARY KEY Host (Host,User) PRIMARY KEY Host (Host,User)
) )
type=ISAM; type=ISAM;
--enable-warnings --enable_warnings
INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y'); INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y');
INSERT INTO user VALUES ('localhost','', '','N','N','N','N','N','N','N','N','N'); INSERT INTO user VALUES ('localhost','', '','N','N','N','N','N','N','N','N','N');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment