Commit b9a609ac authored by unknown's avatar unknown

Fixed unsafe define of uint4korr()

Fixed that --extern works with mysql-test-run.pl
Small trivial cleanups


include/my_global.h:
  Fixed unsafe define of uint4korr()
mysql-test/lib/mtr_report.pl:
  Removed wrong messages when using --extern
mysql-test/mysql-test-run.pl:
  Fixed that --extern works
  Print help on stdout instead of stderr (make it easier to pipe it to less)
mysql-test/t/ndb_lock.test:
  Added other possible error code
sql/sql_prepare.cc:
  Removed not needed casts
parent f3f82ef5
...@@ -1078,7 +1078,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */ ...@@ -1078,7 +1078,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */
*/ */
#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF) #define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF)
#endif #endif
#define uint4korr(A) (*((unsigned long *) (A))) #define uint4korr(A) (*((uint32 *) (A)))
#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ #define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
(((uint32) ((uchar) (A)[1])) << 8) +\ (((uint32) ((uchar) (A)[1])) << 8) +\
(((uint32) ((uchar) (A)[2])) << 16) +\ (((uint32) ((uchar) (A)[2])) << 16) +\
......
...@@ -236,8 +236,10 @@ sub mtr_report_stats ($) { ...@@ -236,8 +236,10 @@ sub mtr_report_stats ($) {
"the documentation at\n", "the documentation at\n",
"http://www.mysql.com/doc/en/MySQL_test_suite.html\n"; "http://www.mysql.com/doc/en/MySQL_test_suite.html\n";
} }
print if (!$::opt_extern)
"The servers were restarted $tot_restarts times\n"; {
print "The servers where restarted $tot_restarts times\n";
}
if ( $::opt_timer ) if ( $::opt_timer )
{ {
......
This diff is collapsed.
...@@ -149,7 +149,7 @@ begin; ...@@ -149,7 +149,7 @@ begin;
# Have to check with pk access here since scans take locks on # Have to check with pk access here since scans take locks on
# all rows and then release them in chunks # all rows and then release them in chunks
select * from t1 where x = 1 for update; select * from t1 where x = 1 for update;
--error 1205 --error 1105,1205
select * from t1 where x = 2 for update; select * from t1 where x = 2 for update;
rollback; rollback;
......
...@@ -2203,11 +2203,11 @@ void mysql_stmt_execute(THD *thd, char *packet_arg, uint packet_length) ...@@ -2203,11 +2203,11 @@ void mysql_stmt_execute(THD *thd, char *packet_arg, uint packet_length)
{ {
uchar *packet= (uchar*)packet_arg; // GCC 4.0.1 workaround uchar *packet= (uchar*)packet_arg; // GCC 4.0.1 workaround
ulong stmt_id= uint4korr(packet); ulong stmt_id= uint4korr(packet);
ulong flags= (ulong) ((uchar) packet[4]); ulong flags= (ulong) packet[4];
/* Query text for binary, general or slow log, if any of them is open */ /* Query text for binary, general or slow log, if any of them is open */
String expanded_query; String expanded_query;
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
uchar *packet_end= (uchar *) packet + packet_length - 1; uchar *packet_end= packet + packet_length - 1;
#endif #endif
Prepared_statement *stmt; Prepared_statement *stmt;
bool error; bool error;
......
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