Commit 2189df3c authored by Michael Widenius's avatar Michael Widenius

Fixed compiler warnings

parent 031e3442
...@@ -1122,7 +1122,6 @@ static enum enum_server_command fetch_command(THD *thd, char *packet) ...@@ -1122,7 +1122,6 @@ static enum enum_server_command fetch_command(THD *thd, char *packet)
{ {
enum enum_server_command enum enum_server_command
command= (enum enum_server_command) (uchar) packet[0]; command= (enum enum_server_command) (uchar) packet[0];
NET *net= &thd->net;
DBUG_ENTER("fetch_command"); DBUG_ENTER("fetch_command");
if (command >= COM_END || if (command >= COM_END ||
...@@ -1130,7 +1129,7 @@ static enum enum_server_command fetch_command(THD *thd, char *packet) ...@@ -1130,7 +1129,7 @@ static enum enum_server_command fetch_command(THD *thd, char *packet)
command= COM_END; // Wrong command command= COM_END; // Wrong command
DBUG_PRINT("info",("Command on %s = %d (%s)", DBUG_PRINT("info",("Command on %s = %d (%s)",
vio_description(net->vio), command, vio_description(thd->net.vio), command,
command_name[command].str)); command_name[command].str));
DBUG_RETURN(command); DBUG_RETURN(command);
} }
......
...@@ -6817,7 +6817,7 @@ lock_clust_rec_modify_check_and_lock( ...@@ -6817,7 +6817,7 @@ lock_clust_rec_modify_check_and_lock(
lock_rec_convert_impl_to_expl(block, rec, index, offsets); lock_rec_convert_impl_to_expl(block, rec, index, offsets);
lock_mutex_enter(); lock_mutex_enter();
trx_t* trx = thr_get_trx(thr); trx_t* trx __attribute__((unused))= thr_get_trx(thr);
ut_ad(lock_table_has(trx, index->table, LOCK_IX)); ut_ad(lock_table_has(trx, index->table, LOCK_IX));
...@@ -6877,7 +6877,7 @@ lock_sec_rec_modify_check_and_lock( ...@@ -6877,7 +6877,7 @@ lock_sec_rec_modify_check_and_lock(
index record, and this would not have been possible if another active index record, and this would not have been possible if another active
transaction had modified this secondary index record. */ transaction had modified this secondary index record. */
trx_t* trx = thr_get_trx(thr); trx_t* trx __attribute__((unused))= thr_get_trx(thr);
lock_mutex_enter(); lock_mutex_enter();
ut_ad(lock_table_has(trx, index->table, LOCK_IX)); ut_ad(lock_table_has(trx, index->table, LOCK_IX));
...@@ -6977,7 +6977,7 @@ lock_sec_rec_read_check_and_lock( ...@@ -6977,7 +6977,7 @@ lock_sec_rec_read_check_and_lock(
lock_rec_convert_impl_to_expl(block, rec, index, offsets); lock_rec_convert_impl_to_expl(block, rec, index, offsets);
} }
trx_t* trx = thr_get_trx(thr); trx_t* trx __attribute__((unused))= thr_get_trx(thr);
lock_mutex_enter(); lock_mutex_enter();
ut_ad(mode != LOCK_X ut_ad(mode != LOCK_X
...@@ -7051,7 +7051,7 @@ lock_clust_rec_read_check_and_lock( ...@@ -7051,7 +7051,7 @@ lock_clust_rec_read_check_and_lock(
} }
lock_mutex_enter(); lock_mutex_enter();
trx_t* trx = thr_get_trx(thr); trx_t* trx __attribute__((unused))= thr_get_trx(thr);
ut_ad(mode != LOCK_X ut_ad(mode != LOCK_X
|| lock_table_has(trx, index->table, LOCK_IX)); || lock_table_has(trx, index->table, LOCK_IX));
......
...@@ -6890,7 +6890,7 @@ lock_clust_rec_modify_check_and_lock( ...@@ -6890,7 +6890,7 @@ lock_clust_rec_modify_check_and_lock(
lock_rec_convert_impl_to_expl(block, rec, index, offsets); lock_rec_convert_impl_to_expl(block, rec, index, offsets);
lock_mutex_enter(); lock_mutex_enter();
trx_t* trx = thr_get_trx(thr); trx_t* trx __attribute__((unused))= thr_get_trx(thr);
ut_ad(lock_table_has(trx, index->table, LOCK_IX)); ut_ad(lock_table_has(trx, index->table, LOCK_IX));
...@@ -6954,7 +6954,7 @@ lock_sec_rec_modify_check_and_lock( ...@@ -6954,7 +6954,7 @@ lock_sec_rec_modify_check_and_lock(
index record, and this would not have been possible if another active index record, and this would not have been possible if another active
transaction had modified this secondary index record. */ transaction had modified this secondary index record. */
trx_t* trx = thr_get_trx(thr); trx_t* trx __attribute__((unused))= thr_get_trx(thr);
lock_mutex_enter(); lock_mutex_enter();
ut_ad(lock_table_has(trx, index->table, LOCK_IX)); ut_ad(lock_table_has(trx, index->table, LOCK_IX));
...@@ -7063,7 +7063,7 @@ lock_sec_rec_read_check_and_lock( ...@@ -7063,7 +7063,7 @@ lock_sec_rec_read_check_and_lock(
lock_rec_convert_impl_to_expl(block, rec, index, offsets); lock_rec_convert_impl_to_expl(block, rec, index, offsets);
} }
trx_t* trx = thr_get_trx(thr); trx_t* trx __attribute__((unused))= thr_get_trx(thr);
lock_mutex_enter(); lock_mutex_enter();
ut_ad(mode != LOCK_X ut_ad(mode != LOCK_X
...@@ -7146,7 +7146,7 @@ lock_clust_rec_read_check_and_lock( ...@@ -7146,7 +7146,7 @@ lock_clust_rec_read_check_and_lock(
} }
lock_mutex_enter(); lock_mutex_enter();
trx_t* trx = thr_get_trx(thr); trx_t* trx __attribute__((unused))= thr_get_trx(thr);
ut_ad(mode != LOCK_X ut_ad(mode != LOCK_X
|| lock_table_has(trx, index->table, LOCK_IX)); || lock_table_has(trx, index->table, LOCK_IX));
......
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