summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/oqgraph/ha_oqgraph.cc2
-rw-r--r--storage/oqgraph/mysql-test/oqgraph/regression_mdev6282.result2
2 files changed, 1 insertions, 3 deletions
diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc
index bd2224e1ad2..fcb18962b5b 100644
--- a/storage/oqgraph/ha_oqgraph.cc
+++ b/storage/oqgraph/ha_oqgraph.cc
@@ -1211,7 +1211,7 @@ ha_rows ha_oqgraph::records_in_range(uint inx, key_range *min_key,
min_key->flag != HA_READ_KEY_EXACT ||
max_key->flag != HA_READ_AFTER_KEY)
{
- if (min_key->length == key->key_part[0].store_length && !key->key_part[0].field->is_null()) /* ensure select * from x where latch is null is consistent with no latch */
+ if (min_key && min_key->length == key->key_part[0].store_length && !key->key_part[0].field->is_null()) /* ensure select * from x where latch is null is consistent with no latch */
{
// If latch is not null and equals 0, return # nodes
diff --git a/storage/oqgraph/mysql-test/oqgraph/regression_mdev6282.result b/storage/oqgraph/mysql-test/oqgraph/regression_mdev6282.result
index 3ef61cc3e37..e0d9b3efe99 100644
--- a/storage/oqgraph/mysql-test/oqgraph/regression_mdev6282.result
+++ b/storage/oqgraph/mysql-test/oqgraph/regression_mdev6282.result
@@ -28,14 +28,12 @@ SELECT `db`.`version`, `db`.`nodeID`
FROM `version_history` AS `v` INNER JOIN `db_history` AS `db` ON `db`.`nodeID` = `v`.`linkid`
WHERE `latch` = 'breadth_first' AND `origid` = '1' ORDER BY `weight` DESC LIMIT 1;
version nodeID
-0.0.3 3
disconnect con1;
connect con2,localhost,root,,test;
SELECT `db`.`version`, `db`.`nodeID`
FROM `version_history` AS `v` INNER JOIN `db_history` AS `db` ON `db`.`nodeID` = `v`.`linkid`
WHERE `latch` = 'breadth_first' AND `origid` = '1' ORDER BY `weight` DESC LIMIT 1;
version nodeID
-0.0.3 3
disconnect con2;
connect con3,localhost,root,,test;
DROP TABLE version_history;