Merge gluh.mysql.r18.ru:/home/gluh/MySQL-MERGE/mysql-4.1
into gluh.mysql.r18.ru:/home/gluh/MySQL-MERGE/mysql-5.0
This commit is contained in:
commit
c6f1e9627a
@ -1,6 +1,33 @@
|
|||||||
drop table if exists t1, t2;
|
drop table if exists t1, t2;
|
||||||
SET SQL_WARNINGS=1;
|
SET SQL_WARNINGS=1;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
|
create table t1 (a int);
|
||||||
|
ERROR 42S01: Table 't1' already exists
|
||||||
|
show count(*) errors;
|
||||||
|
@@session.error_count
|
||||||
|
1
|
||||||
|
show errors;
|
||||||
|
Level Code Message
|
||||||
|
Error 1050 Table 't1' already exists
|
||||||
|
show warnings;
|
||||||
|
Level Code Message
|
||||||
|
Error 1050 Table 't1' already exists
|
||||||
|
create table t2(a int) default charset qwerty;
|
||||||
|
ERROR 42000: Unknown character set: 'qwerty'
|
||||||
|
show count(*) errors;
|
||||||
|
@@session.error_count
|
||||||
|
1
|
||||||
|
show errors;
|
||||||
|
Level Code Message
|
||||||
|
Error 1115 Unknown character set: 'qwerty'
|
||||||
|
create table t (i);
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
|
||||||
|
show count(*) errors;
|
||||||
|
@@session.error_count
|
||||||
|
1
|
||||||
|
show errors;
|
||||||
|
Level Code Message
|
||||||
|
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
insert into t1 values ("hej");
|
insert into t1 values ("hej");
|
||||||
Warnings:
|
Warnings:
|
||||||
|
@ -7,6 +7,19 @@ drop table if exists t1, t2;
|
|||||||
SET SQL_WARNINGS=1;
|
SET SQL_WARNINGS=1;
|
||||||
|
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
|
--error 1050
|
||||||
|
create table t1 (a int);
|
||||||
|
show count(*) errors;
|
||||||
|
show errors;
|
||||||
|
show warnings;
|
||||||
|
--error 1115
|
||||||
|
create table t2(a int) default charset qwerty;
|
||||||
|
show count(*) errors;
|
||||||
|
show errors;
|
||||||
|
--error 1064
|
||||||
|
create table t (i);
|
||||||
|
show count(*) errors;
|
||||||
|
show errors;
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
insert into t1 values ("hej");
|
insert into t1 values ("hej");
|
||||||
insert into t1 values ("hej"),("då");
|
insert into t1 values ("hej"),("då");
|
||||||
|
@ -59,6 +59,7 @@ void net_send_error(THD *thd, uint sql_errno, const char *err)
|
|||||||
uint length;
|
uint length;
|
||||||
char buff[MYSQL_ERRMSG_SIZE+2], *pos;
|
char buff[MYSQL_ERRMSG_SIZE+2], *pos;
|
||||||
#endif
|
#endif
|
||||||
|
const char *orig_err= err;
|
||||||
NET *net= &thd->net;
|
NET *net= &thd->net;
|
||||||
DBUG_ENTER("net_send_error");
|
DBUG_ENTER("net_send_error");
|
||||||
DBUG_PRINT("enter",("sql_errno: %d err: %s", sql_errno,
|
DBUG_PRINT("enter",("sql_errno: %d err: %s", sql_errno,
|
||||||
@ -85,6 +86,7 @@ void net_send_error(THD *thd, uint sql_errno, const char *err)
|
|||||||
err=ER(sql_errno); /* purecov: inspected */
|
err=ER(sql_errno); /* purecov: inspected */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
orig_err= err;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EMBEDDED_LIBRARY
|
#ifdef EMBEDDED_LIBRARY
|
||||||
@ -123,6 +125,8 @@ void net_send_error(THD *thd, uint sql_errno, const char *err)
|
|||||||
}
|
}
|
||||||
VOID(net_write_command(net,(uchar) 255, "", 0, (char*) err,length));
|
VOID(net_write_command(net,(uchar) 255, "", 0, (char*) err,length));
|
||||||
#endif /* EMBEDDED_LIBRARY*/
|
#endif /* EMBEDDED_LIBRARY*/
|
||||||
|
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, sql_errno,
|
||||||
|
orig_err ? orig_err : ER(sql_errno));
|
||||||
thd->is_fatal_error=0; // Error message is given
|
thd->is_fatal_error=0; // Error message is given
|
||||||
thd->net.report_error= 0;
|
thd->net.report_error= 0;
|
||||||
|
|
||||||
@ -229,6 +233,8 @@ net_printf_error(THD *thd, uint errcode, ...)
|
|||||||
strmake(net->last_error, text_pos, length);
|
strmake(net->last_error, text_pos, length);
|
||||||
strmake(net->sqlstate, mysql_errno_to_sqlstate(errcode), SQLSTATE_LENGTH);
|
strmake(net->sqlstate, mysql_errno_to_sqlstate(errcode), SQLSTATE_LENGTH);
|
||||||
#endif
|
#endif
|
||||||
|
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, errcode,
|
||||||
|
text_pos ? text_pos : ER(errcode));
|
||||||
thd->is_fatal_error=0; // Error message is given
|
thd->is_fatal_error=0; // Error message is given
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user