--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@
         MYSQL_INC="$MYSQL_INC -I$ac_mysql_source_dir/regex"
         MYSQL_INC="$MYSQL_INC -I$ac_mysql_source_dir"
         AC_SUBST(MYSQL_INC)
-        MYSQL_SOURCE_VERSION=`cat $ac_mysql_source_dir/configure.in | grep "\[[MySQL Server\]]" | sed -e "s|.*\([[0-9]]\+\.[[0-9]]\+\.[[0-9]]\+[[0-9a-zA-Z\_\-]]*\).*|\1|"`
+        MYSQL_SOURCE_VERSION=`cat $ac_mysql_source_dir/configure.in | grep "\[[MariaDB Server\]]" | sed -e "s|.*\([[0-9]]\+\.[[0-9]]\+\.[[0-9]]\+[[0-9a-zA-Z\_\-]]*\).*|\1|"`
         AC_MSG_RESULT([yes: Using $ac_mysql_source_dir, version $MYSQL_SOURCE_VERSION])
       else
         AC_MSG_ERROR([invalid MySQL source directory: $ac_mysql_source_dir])
--- a/handlersocket/database.cpp
+++ b/handlersocket/database.cpp
@@ -686,19 +686,19 @@
   for (uint32_t i = 0; i < limit + skip; ++i) {
     if (i == 0) {
       const key_part_map kpm = (1U << args.kvalslen) - 1;
-      r = hnd->index_read_map(table->record[0], key_buf, kpm, find_flag);
+      r = hnd->ha_index_read_map(table->record[0], key_buf, kpm, find_flag);
     } else {
       switch (find_flag) {
       case HA_READ_BEFORE_KEY:
       case HA_READ_KEY_OR_PREV:
-	r = hnd->index_prev(table->record[0]);
+	r = hnd->ha_index_prev(table->record[0]);
 	break;
       case HA_READ_AFTER_KEY:
       case HA_READ_KEY_OR_NEXT:
-	r = hnd->index_next(table->record[0]);
+	r = hnd->ha_index_next(table->record[0]);
 	break;
       case HA_READ_KEY_EXACT:
-	r = hnd->index_next_same(table->record[0], key_buf, kplen_sum);
+	r = hnd->ha_index_next_same(table->record[0], key_buf, kplen_sum);
 	break;
       default:
 	r = HA_ERR_END_OF_FILE; /* to finish the loop */