[Commits] a738ed518dd: postreview

Oleksandr Byelkin sanja at mariadb.com
Thu Apr 25 19:02:04 EEST 2019


revision-id: a738ed518dd7d0d0e2d699829e71c3c9fd49c690 (mariadb-10.2.23-80-ga738ed518dd)
parent(s): 2babe7a2adb2ed0d57eb7b44bd92113e64413bb6
author: Oleksandr Byelkin
committer: Oleksandr Byelkin
timestamp: 2019-04-25 18:02:04 +0200
message:

postreview

---
 sql/handler.cc   | 8 ++++++--
 sql/log_event.cc | 6 ++----
 sql/sql_load.cc  | 6 ++----
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/sql/handler.cc b/sql/handler.cc
index 2c7c9d26324..e5b452f9649 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -3321,7 +3321,9 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment,
     (void) extra(HA_EXTRA_NO_KEYREAD);
     *first_value= ULONGLONG_MAX;
     if (rnd_inited && ha_rnd_init_with_error(0))
-      DBUG_ASSERT(0);
+    {
+      //TODO: it would be nice to return here an error
+    }
     return;
   }
 
@@ -3369,7 +3371,9 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment,
   table->restore_column_maps_after_keyread(old_read_set);
   *first_value= nr;
   if (rnd_inited && ha_rnd_init_with_error(0))
-    DBUG_ASSERT(0);
+  {
+    //TODO: it would be nice to return here an error
+  }
   return;
 }
 
diff --git a/sql/log_event.cc b/sql/log_event.cc
index c17c7ef6e06..7ebc75dd1bf 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -12845,11 +12845,9 @@ Rows_log_event::write_row(rpl_group_info *rgi,
     if (table->file->ha_table_flags() & HA_DUPLICATE_POS)
     {
       DBUG_PRINT("info",("Locating offending record using rnd_pos()"));
-      error= table->file->ha_rnd_init(0);
-      if (error)
+
+      if ((error= table->file->ha_rnd_init_with_error(0)))
       {
-        DBUG_PRINT("info",("rnd_init() returns error %d",error));
-        table->file->print_error(error, MYF(0));
         DBUG_RETURN(error);
       }
 
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 8994b436cab..0fcc4efbccd 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -661,11 +661,9 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
     thd->abort_on_warning= !ignore && thd->is_strict_mode();
 
     if ((table_list->table->file->ha_table_flags() & HA_DUPLICATE_POS) &&
-        (error= table_list->table->file->ha_rnd_init(0)))
-    {
-      table->file->print_error(error, MYF(0));
+        (error= table_list->table->file->ha_rnd_init_with_error(0)))
       goto err;
-    }
+
     thd_progress_init(thd, 2);
     if (table_list->table->validate_default_values_of_unset_fields(thd))
     {


More information about the commits mailing list