title: Error Code: 1143 SELECT Command Denied Whenever I try Running an Update Query, even Though I Have Both UPDATE and SELECT permissions
body: <p>I get Error Code: 1143. SELECT command denied to user whenever I try to run an UPDATE query with a condition statement.</p>
  <p>I have SELECT permissions on all tables in the database, and UPDATE permissions on certain fields in certain tables.</p>
  <p><code>GRANT SELECT ON `Base`.* TO `php_role`;</code></p>
  <p><code>GRANT UPDATE (`amount`) ON `Base`.`cart` TO `php_role`;</code></p>
  <p>I am able to run the following SELECT query without any errors:</p>
  <p><code>SELECT * FROM `cart` WHERE `subscription_id` = 0;</code></p>
  <p>but when I try running an UPDATE query, I get the error:</p>
  <p><code>UPDATE `cart` SET `amount` = 0 WHERE `subscription_id` = 0;</code></p>
  <p>Even if I grant myself UPDATE permissions on the entire table, I still get the error.
  The only I found to fix it, was by granting UPDATE permissions on the entire database.</p>
  <p><strong>Minimal Reproducible Example:</strong></p>
  <p>As Root, create the database, table, and user</p>
  <pre><code>CREATE DATABASE test_db;
  USE test_db;
  
  CREATE TABLE test(
      p_id INT,
      val INT,
      
      PRIMARY KEY(p_id)
  );
  
  CREATE ROLE test_role;
  CREATE USER test_user IDENTIFIED BY 'password';
  
  GRANT SELECT ON test_db.* TO test_role;
  GRANT INSERT ON test_db.* TO test_role;
  GRANT UPDATE (val) ON test_db.test TO test_role;
  
  GRANT test_role TO test_user;
  SET DEFAULT ROLE test_role TO test_user;
  </code></pre>
  <p>As the newly created user, login and try running an UPDATE query</p>
  <pre><code>USE test_db;
  UPDATE test SET val = 0 WHERE p_id = 0;
  </code></pre>
  <p>The UPDATE query results in the error, while the following query works fine:</p>
  <p><code>SELECT * FROM test;</code></p>