summaryrefslogtreecommitdiff
path: root/sql/ha_innodb.cc
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2002-12-26 18:26:37 +0200
committermonty@mashka.mysql.fi <>2002-12-26 18:26:37 +0200
commit3ca695ea0bc5a4cac6feba7aeee9e87fda79afc4 (patch)
tree52c14204adc0f3d7ef9707add0e6d1da72ed37d8 /sql/ha_innodb.cc
parent0a5338614a1d4a4edde88c24b55c4879332f7e4d (diff)
downloadmariadb-git-3ca695ea0bc5a4cac6feba7aeee9e87fda79afc4.tar.gz
Cut hostnames at HOSTNAME_LENGTH to avoid theoretical hostname overruns
Changed long packat handling to check for packets of length 0xffffff. This does however break packet handling for older clients. If you are using packets >= 16M then you need to upgrade client and server after this patch.
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r--sql/ha_innodb.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index dd718f02ba9..b34de8cb831 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -1907,12 +1907,9 @@ ha_innobase::write_row(
the counter here. */
skip_auto_inc_decr = FALSE;
-
- if (error == DB_DUPLICATE_KEY) {
- ut_a(user_thd->query);
- dict_accept(user_thd->query, "REPLACE",
- &skip_auto_inc_decr);
- }
+ if (error == DB_DUPLICATE_KEY &&
+ user_thd->lex.sql_command == SQLCOM_REPLACE)
+ skip_auto_inc_decr= TRUE;
if (!skip_auto_inc_decr && incremented_auto_inc_counter
&& prebuilt->trx->auto_inc_lock) {