[MDEV-17439] @@optimizer_switch = 'join_cache_hashed=off' changes answer of query Created: 2018-10-12  Updated: 2023-01-16

Status: Open
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 10.3.10
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Aria Stewart Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Attachments: File schema1.sql     File schema2.sql     File v_thirdparty_reflektion_categories.sql    

 Description   

mysql aria@127.0.0.1:bi-test (;)> set @@optimizer_switch='join_cache_hashed=off';
Query OK, 0 rows affected (0.017 sec)
 
mysql aria@127.0.0.1:bi-test (;)> select count(*) from v_thirdparty_reflektion_categories where description is not null;
+----------+
| count(*) |
+----------+
|      217 |
+----------+
1 row in set (0.087 sec)
 
mysql aria@127.0.0.1:bi-test (;)> set @@optimizer_switch='join_cache_hashed=on';
Query OK, 0 rows affected (0.016 sec)
 
mysql aria@127.0.0.1:bi-test (;)> select count(*) from v_thirdparty_reflektion_categories where description is not null;
+----------+
| count(*) |
+----------+
|        1 |
+----------+
1 row in set (0.075 sec)



 Comments   
Comment by Alice Sherepa [ 2018-10-17 ]

Could you please provide also the output of SHOW CREATE TABLE catalog_category_entity_url_key;

Comment by Aria Stewart [ 2018-10-19 ]

CREATE TABLE `catalog_category_entity_url_key` (
  `value_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `entity_type_id` smallint(5) unsigned NOT NULL COMMENT 'Entity Type ID',
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `value` varchar(255) DEFAULT NULL COMMENT 'Category Url Key',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `UNQ_CATALOG_CATEGORY_ENTITY_URL_KEY_ENTITY_ID_STORE_ID` (`entity_id`,`store_id`),
  KEY `IDX_CATALOG_CATEGORY_ENTITY_URL_KEY_ATTRIBUTE_ID` (`attribute_id`),
  KEY `IDX_CATALOG_CATEGORY_ENTITY_URL_KEY_STORE_ID` (`store_id`),
  KEY `IDX_CATALOG_CATEGORY_ENTITY_URL_KEY_ENTITY_ID` (`entity_id`),
  CONSTRAINT `FK_CATALOG_CATEGORY_ENTITY_URL_KEY_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_CAT_CTGR_ENTT_URL_KEY_ATTR_ID_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_CAT_CTGR_ENTT_URL_KEY_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1411 DEFAULT CHARSET=utf8 COMMENT='Catalog Category Url Key Attribute Backend Table'

Generated at Thu Feb 08 08:36:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.