@@ -91,6 +91,21 @@ class Price implements DimensionalIndexerInterface
91
91
*/
92
92
private $ moduleManager ;
93
93
94
+ /**
95
+ * @var string
96
+ */
97
+ private $ tmpBundlePriceTable ;
98
+
99
+ /**
100
+ * @var string
101
+ */
102
+ private $ tmpBundleSelectionTable ;
103
+
104
+ /**
105
+ * @var string
106
+ */
107
+ private $ tmpBundleOptionTable ;
108
+
94
109
/**
95
110
* @param IndexTableStructureFactory $indexTableStructureFactory
96
111
* @param TableMaintainer $tableMaintainer
@@ -184,7 +199,16 @@ public function executeByDimensions(array $dimensions, \Traversable $entityIds)
184
199
*/
185
200
private function getBundlePriceTable ()
186
201
{
187
- return $ this ->getTable ('catalog_product_index_price_bundle_tmp ' );
202
+ if ($ this ->tmpBundlePriceTable === null ) {
203
+ $ this ->tmpBundlePriceTable = 'catalog_product_index_price_bundle_temp ' ;
204
+ $ this ->getConnection ()->createTemporaryTableLike (
205
+ $ this ->tmpBundlePriceTable ,
206
+ $ this ->getTable ('catalog_product_index_price_bundle_tmp ' ),
207
+ true
208
+ );
209
+ }
210
+
211
+ return $ this ->tmpBundlePriceTable ;
188
212
}
189
213
190
214
/**
@@ -194,7 +218,16 @@ private function getBundlePriceTable()
194
218
*/
195
219
private function getBundleSelectionTable ()
196
220
{
197
- return $ this ->getTable ('catalog_product_index_price_bundle_sel_tmp ' );
221
+ if ($ this ->tmpBundleSelectionTable === null ) {
222
+ $ this ->tmpBundleSelectionTable = 'catalog_product_index_price_bundle_sel_temp ' ;
223
+ $ this ->getConnection ()->createTemporaryTableLike (
224
+ $ this ->tmpBundleSelectionTable ,
225
+ $ this ->getTable ('catalog_product_index_price_bundle_sel_tmp ' ),
226
+ true
227
+ );
228
+ }
229
+
230
+ return $ this ->tmpBundleSelectionTable ;
198
231
}
199
232
200
233
/**
@@ -204,7 +237,16 @@ private function getBundleSelectionTable()
204
237
*/
205
238
private function getBundleOptionTable ()
206
239
{
207
- return $ this ->getTable ('catalog_product_index_price_bundle_opt_tmp ' );
240
+ if ($ this ->tmpBundleOptionTable === null ) {
241
+ $ this ->tmpBundleOptionTable = 'catalog_product_index_price_bundle_opt_temp ' ;
242
+ $ this ->getConnection ()->createTemporaryTableLike (
243
+ $ this ->tmpBundleOptionTable ,
244
+ $ this ->getTable ('catalog_product_index_price_bundle_opt_tmp ' ),
245
+ true
246
+ );
247
+ }
248
+
249
+ return $ this ->tmpBundleOptionTable ;
208
250
}
209
251
210
252
/**
0 commit comments