You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/12/08 09:10:35 UTC

[GitHub] [shardingsphere] strongduanmu commented on issue #22432: When the federation function is enabled, an exception occurs when tpcc is executed.

strongduanmu commented on issue #22432:
URL: https://github.com/apache/shardingsphere/issues/22432#issuecomment-1342311864

   ```sql
   	// PreparedStatements for STOCK_LEVEL
   	switch (dbType)
   	{
   	    case jTPCCConfig.DB_POSTGRES:
   		stmtStockLevelSelectLow = dbConn.prepareStatement(
   		    "SELECT count(*) AS low_stock FROM (" +
   		    "    SELECT s_w_id, s_i_id, s_quantity " +
   		    "        FROM bmsql_stock " +
   		    "        WHERE s_w_id = ? AND s_quantity < ? AND s_i_id IN (" +
   		    "            SELECT ol_i_id " +
   		    "                FROM bmsql_district " +
   		    "                JOIN bmsql_order_line ON ol_w_id = d_w_id " +
   		    "                 AND ol_d_id = d_id " +
   		    "                 AND ol_o_id >= d_next_o_id - 20 " +
   		    "                 AND ol_o_id < d_next_o_id " +
   		    "                WHERE d_w_id = ? AND d_id = ? " +
   		    "        ) " +
   		    "    ) AS L");
   		break;
   
   	    default:
   		stmtStockLevelSelectLow = dbConn.prepareStatement(
   		    "SELECT count(*) AS low_stock FROM (" +
   		    "    SELECT s_w_id, s_i_id, s_quantity " +
   		    "        FROM bmsql_stock " +
   		    "        WHERE s_w_id = ? AND s_quantity < ? AND s_i_id IN (" +
   		    "            SELECT ol_i_id " +
   		    "                FROM bmsql_district " +
   		    "                JOIN bmsql_order_line ON ol_w_id = d_w_id " +
   		    "                 AND ol_d_id = d_id " +
   		    "                 AND ol_o_id >= d_next_o_id - 20 " +
   		    "                 AND ol_o_id < d_next_o_id " +
   		    "                WHERE d_w_id = ? AND d_id = ? " +
   		    "        ) " +
   		    "    )");
   		break;
   	}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org