This error message indicates a problem with a subquery within the SQL statement executed by vttablet on the 'liveweb.-.primary' server. The subquery returns more than one row, resulting in a 'FailedPrecondition' error.

The SQL statement selects all columns from the 'products' table where the 'category_id' matches the subquery result. The subquery itself selects the 'id' column from the 'Categories' table where the 'parent_id' matches a parameter value.

This suggests that multiple categories share the same parent ID, causing the subquery to return multiple rows. To address this:

  1. Modify the SQL statement: Ensure the subquery only returns a single row, potentially using aggregation or limiting results.
  2. Change database data: Eliminate duplicate parent IDs in the 'Categories' table to prevent multiple results from the subquery.

原文地址: https://www.cveoy.top/t/topic/nJAd 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录