title: Why is "Cannot modify setting in readonly mode" thrown when not explicitly modify it in ClickHouse?
body: <p>Applications were using readonly user when the following exception was thrown:</p>
  
  <pre><code>&lt;Error&gt; HTTPHandler: Code: 164, e.displayText() = DB::Exception: Cannot modify 'result_overflow_mode' setting in readonly mode
  </code></pre>
  
  <p>I read ClickHouse code and found that when query goes with <code>set setting</code>, if the user is read-only, this error will be thrown.</p>
  
  <p>I checked the configuration of my read-only-user in <code>users.xml</code> and found that <code>max_result_rows/bytes</code> and <code>result_overflow_mode</code> were not actively set.</p>
  
  <p>However, my query does not go with <code>set setting</code>. </p>
  
  <p>So what logic triggers the change of this setting?</p>