diff --git a/include/mariadb_stmt.h b/include/mariadb_stmt.h
index 9e67ad8..dc49048 100644
--- a/include/mariadb_stmt.h
+++ b/include/mariadb_stmt.h
@@ -81,7 +81,8 @@ enum enum_indicator_type
   STMT_INDICATOR_NONE=0,
   STMT_INDICATOR_NULL=1,
   STMT_INDICATOR_DEFAULT=2,
-  STMT_INDICATOR_IGNORE=3
+  STMT_INDICATOR_IGNORE=3,
+  STMT_INDICATOR_SKIP_SET=4
 };
 
 /*
diff --git a/libmariadb/ma_default.c b/libmariadb/ma_default.c
index 59d811d..268b556 100644
--- a/libmariadb/ma_default.c
+++ b/libmariadb/ma_default.c
@@ -292,7 +292,6 @@ my_bool _mariadb_read_options(MYSQL *mysql,
       exts,
       errors= 0;
   char filename[FN_REFLEN + 1];
-  char *env;
 
   if (config_file)
     return _mariadb_read_options_from_file(mysql, config_file, group);
@@ -308,7 +307,10 @@ my_bool _mariadb_read_options(MYSQL *mysql,
     }
   }
 #ifndef _WIN32
+  {
     /* special case: .my.cnf in Home directory */
+    char *env;
+
     if ((env= getenv("HOME")))
     {
       for (exts= 0; ini_exts[exts]; exts++)
@@ -319,6 +321,8 @@ my_bool _mariadb_read_options(MYSQL *mysql,
           errors+= _mariadb_read_options_from_file(mysql, filename, group);
       }
     }
+  }
+
 #endif
   return errors;
 }
diff --git a/libmariadb/mariadb_stmt.c b/libmariadb/mariadb_stmt.c
index 792e942..24cb6dd 100644
--- a/libmariadb/mariadb_stmt.c
+++ b/libmariadb/mariadb_stmt.c
@@ -795,7 +795,21 @@ mem_error:
 }
 /* }}} */
 
-/* {{{ mysqlnd_stmt_execute_generate_bulk_request */
+/* {{{ mysql_stmt_skip_paramset */
+my_bool mysql_stmt_skip_paramset(MYSQL_STMT *stmt, uint row)
+{
+  uint i;
+  for (i=0; i < stmt->param_count; i++)
+  {
+    if (ma_get_indicator(stmt, i, row) == STMT_INDICATOR_SKIP_SET)
+      return '\1';
+  }
+  
+  return '\0';
+}
+/* }}} */
+
+/* {{{ mysql_stmt_execute_generate_bulk_request */
 unsigned char* mysql_stmt_execute_generate_bulk_request(MYSQL_STMT *stmt, size_t *request_len)
 {
   /* execute packet has the following format:
@@ -818,6 +832,7 @@ unsigned char* mysql_stmt_execute_generate_bulk_request(MYSQL_STMT *stmt, size_t
                             STMT_INDICATOR_NULL 1
                             STMT_INDICATOR_DEFAULT 2
                             STMT_INDICATOR_IGNORE 3
+                            STMT_INDICATOR_SKIP_SET 4
                    n      data from bind buffer
 
      */
@@ -892,6 +907,9 @@ unsigned char* mysql_stmt_execute_generate_bulk_request(MYSQL_STMT *stmt, size_t
     /* calculate data size */
     for (j=0; j < stmt->array_size; j++)
     {
+      if (mysql_stmt_skip_paramset(stmt, j))
+        continue;
+
       for (i=0; i < stmt->param_count; i++)
       {
         size_t size= 0;
diff --git a/unittest/libmariadb/bulk1.c b/unittest/libmariadb/bulk1.c
index ad39458..ff6ae63 100644
--- a/unittest/libmariadb/bulk1.c
+++ b/unittest/libmariadb/bulk1.c
@@ -588,7 +588,7 @@ static int test_conc243(MYSQL *mysql)
   if (strcmp(row[0], "Monty") || strcmp(row[1], "Widenius"))
   {
     mysql_free_result(result);
-    diag("Wrong walues");
+    diag("Wrong values");
     return FAIL;
   }
   mysql_free_result(result);
@@ -767,6 +767,92 @@ static int test_char_conv2(MYSQL *mysql)
   return OK;
 }
 
+
+static int bulk_skip_row(MYSQL *mysql)
+{
+  MYSQL_STMT *stmt;
+  MYSQL_BIND bind[3];
+  MYSQL_RES  *result;
+  MYSQL_ROW  row;
+
+  struct st_data {
+    unsigned long id;
+    char id_ind;
+    char forename[30];
+    char forename_ind;
+    char surname[30];
+    char surname_ind;
+  };
+
+  struct st_data data[]={
+    { 0, STMT_INDICATOR_NULL, "Monty", STMT_INDICATOR_NTS, "Widenius", STMT_INDICATOR_SKIP_SET },
+    { 0, STMT_INDICATOR_SKIP_SET, "David", STMT_INDICATOR_NTS, "Axmark", STMT_INDICATOR_NTS },
+    { 0, STMT_INDICATOR_NULL, "default", STMT_INDICATOR_DEFAULT, "N.N.", STMT_INDICATOR_NTS },
+  };
+
+  unsigned int array_size= 3;
+  size_t row_size= sizeof(struct st_data);
+  int rc;
+
+  rc= mysql_query(mysql, "DROP TABLE IF EXISTS bulk_example2");
+  check_mysql_rc(rc, mysql);
+
+  rc= mysql_query(mysql, "CREATE TABLE bulk_example2 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,"\
+    "forename CHAR(30) NOT NULL DEFAULT 'unknown', surname CHAR(30))");
+  check_mysql_rc(rc, mysql);
+
+  stmt= mysql_stmt_init(mysql);
+  rc= mysql_stmt_prepare(stmt, "INSERT INTO bulk_example2 VALUES (?,?,?)", -1);
+  check_stmt_rc(rc, stmt);
+
+  memset(bind, 0, sizeof(MYSQL_BIND) * 3);
+
+  /* We autogenerate id's, so all indicators are STMT_INDICATOR_NULL */
+  bind[0].u.indicator= &data[0].id_ind;
+  bind[0].buffer_type= MYSQL_TYPE_LONG;
+
+  bind[1].buffer= &data[0].forename;
+  bind[1].buffer_type= MYSQL_TYPE_STRING;
+  bind[1].u.indicator= &data[0].forename_ind;
+
+  bind[2].buffer_type= MYSQL_TYPE_STRING;
+  bind[2].buffer= &data[0].surname;
+  bind[2].u.indicator= &data[0].surname_ind;
+
+  /* set array size */
+  mysql_stmt_attr_set(stmt, STMT_ATTR_ARRAY_SIZE, &array_size);
+
+  /* set row size */
+  mysql_stmt_attr_set(stmt, STMT_ATTR_ROW_SIZE, &row_size);
+
+  /* bind parameter */
+  mysql_stmt_bind_param(stmt, bind);
+
+  /* execute */
+  rc= mysql_stmt_execute(stmt);
+  check_stmt_rc(rc, stmt);
+
+  mysql_stmt_close(stmt);
+
+  rc= mysql_query(mysql, "SELECT forename, surname FROM bulk_example2");
+  check_mysql_rc(rc, mysql);
+
+  result= mysql_store_result(mysql);
+  FAIL_IF(!result || mysql_num_rows(result) != 1, "Invalid resultset");
+  
+  row = mysql_fetch_row(result);
+  if (strcmp(row[0], "unknown") || strcmp(row[1], "N.N."))
+  {
+    mysql_free_result(result);
+    diag("Wrong values");
+    return FAIL;
+  }
+  mysql_free_result(result);
+  rc= mysql_query(mysql, "DROP TABLE bulk_example2");
+  check_mysql_rc(rc, mysql);
+  return OK;
+}
+
 struct my_tests_st my_tests[] = {
   {"check_bulk", check_bulk, TEST_CONNECTION_DEFAULT, 0,  NULL,  NULL},
   {"test_char_conv1", test_char_conv1, TEST_CONNECTION_NEW, 0,  NULL,  NULL},
@@ -780,6 +866,7 @@ struct my_tests_st my_tests[] = {
   {"bulk3", bulk3, TEST_CONNECTION_DEFAULT, 0,  NULL,  NULL},
   {"bulk4", bulk4, TEST_CONNECTION_DEFAULT, 0,  NULL,  NULL},
   {"bulk_null", bulk_null, TEST_CONNECTION_DEFAULT, 0,  NULL,  NULL},
+  {"bulk_skip_row", bulk_skip_row, TEST_CONNECTION_DEFAULT, 0,  NULL,  NULL},
   {NULL, NULL, 0, 0, NULL, NULL}
 };
 
