[Commits] 619623b: MariaRocks: SET GLOBAL rocksdb_strict_collation_exceptions=null crashes

Sergei Petrunia psergey at askmonty.org
Fri Mar 17 13:44:05 EET 2017


revision-id: 619623b86234e768421476cdfa53a53796deb18d
parent(s): 131d858206525cd6fa3296fd1b025ccee396beac
committer: Sergei Petrunia
branch nick: 10.2-mariarocks
timestamp: 2017-03-17 14:44:05 +0300
message:

MariaRocks: SET GLOBAL rocksdb_strict_collation_exceptions=null crashes

A trivial fix

---
 storage/rocksdb/ha_rocksdb.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index 5cb2097..35e91a9 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -10517,7 +10517,7 @@ void rocksdb_set_collation_exception_list(THD *const thd,
   rdb_set_collation_exception_list(val == nullptr ? "" : val);
 
   //psergey-todo: what is the purpose of the below??
-  const char *val_copy= my_strdup(val, MYF(0));
+  const char *val_copy= val? my_strdup(val, MYF(0)): nullptr;
   my_free(*static_cast<char**>(var_ptr));
   *static_cast<const char**>(var_ptr) = val_copy;
 }


More information about the commits mailing list