Zend certified PHP/Magento developer

Cannot update simple product of configurable product, Error in update query of Catalog Inventory Stock status table in Magento 2.4 CE

I created configurable product with variants. Even though I added

  • quantity per source for each sub product > 0
  • manage stock as “Yes”
  • Stock Status as In Stock

It shows Out of Stock.
Also tried clearing cache, reindexing, etc. But nothing solves the issue. What needs to be done to show the product as In Stock?

While updating the sub product (simple product) the following error is shown

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbname.cataloginventory_stock_status' doesn't exist, query was: UPDATE `cataloginventory_stock_status` SET `stock_status` = ?

There is a table prefix used but not generated in the above query.
The product update works fine for other kinds of products.
Any idea to fix this?