title: Generic error [50000-175] caused by NullPointerException
body: <p>I am using H2 database in client-server mode. Server is running with version 1.3.175 and client with 1.3.168.</p>
  
  <p>Everything seems working fine, but I get an exception executing some queries:</p>
  
  <blockquote>
    <p>org.h2.jdbc.JdbcSQLException: General error: "java.lang.NullPointerException" [50000-175]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
        at org.h2.message.DbException.get(DbException.java:161)
        at org.h2.message.DbException.convert(DbException.java:284)
        at org.h2.server.TcpServerThread.sendError(TcpServerThread.java:218)
        at org.h2.server.TcpServerThread.run(TcpServerThread.java:158)
        at java.lang.Thread.run(Unknown Source)</p>
    
    <p>Caused by: java.lang.NullPointerException
        at org.h2.expression.Function.getCost(Function.java:2391)
        at org.h2.expression.CompareLike.getCost(CompareLike.java:417)
        at org.h2.expression.ConditionAndOr.optimize(ConditionAndOr.java:133)
        at org.h2.command.dml.Select.prepare(Select.java:813)
        at org.h2.command.Parser.prepareCommand(Parser.java:240)
        at org.h2.engine.Session.prepareLocal(Session.java:436)
        at org.h2.server.TcpServerThread.process(TcpServerThread.java:260)
        at org.h2.server.TcpServerThread.run(TcpServerThread.java:156)
        ... 1 more</p>
  </blockquote>
  
  <pre><code>at org.h2.engine.SessionRemote.done(SessionRemote.java:567)
  at org.h2.command.CommandRemote.prepare(CommandRemote.java:67)
  at org.h2.command.CommandRemote.&lt;init&gt;(CommandRemote.java:46)
  at org.h2.engine.SessionRemote.prepareCommand(SessionRemote.java:439)
  at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1109)
  at org.h2.jdbc.JdbcPreparedStatement.&lt;init&gt;(JdbcPreparedStatement.java:74)
  at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:264)
  </code></pre>
  
  <p>Thanks for help.</p>