title: Logstash :sql_last_value is showing wrong junk date (Showing 6 month's old date as last run time)
body: <p>I am observing very strange issue
  I am using logstash + jdbc to load data from Oracle db to Elasticsearch
  Below is how my config file looks like</p>
  <pre><code>input{
    jdbc{
      clean_run =&gt; &quot;false&quot;
      jdbc_driver_library =&gt; &quot;&lt;path_to_ojdbc8-12.1.0.jar&gt;&quot;
      jdbc_driver_class =&gt; &quot;Java::oracle.jdbc.driver.OracleDriver&quot;
      jdbc_connection_string =&gt; &quot;&lt;connection_string&gt;&quot;
      jdbc_user =&gt; &quot;&lt;usename&gt;&quot;
      jdbc_password_filepath =&gt; &quot;.\pwd.txt&quot;
      statement=&gt; &quot;SELECT * FROM customers WHERE CUSTOMER_NAME  LIKE 'PE%' AND UPD_DATE  &gt; :sql_last_value &quot;
      schedule=&gt;&quot;*/1 * * * * &quot;
      use_column_value =&gt; true
      tracking_column_type =&gt; &quot;timestamp&quot;
      
      tracking_column =&gt; &quot;upd_date&quot;
      
      last_run_metadata_path =&gt;&quot;&lt;path to logstash_metadata&gt;&quot;
      record_last_run =&gt; true
      }
  }
  
  filter {
    mutate {
      copy =&gt; { &quot;id&quot; =&gt; &quot;[@metadata][_id]&quot;}
      remove_field =&gt; [&quot;@version&quot;,&quot;@timestamp&quot;]
    }
  }
  output {
        elasticsearch{
      hosts =&gt; [&quot;&lt;host&gt;&quot;]
      index =&gt; &quot;&lt;index_name&gt;&quot;
      document_id=&gt;&quot;%{[@metadata][_id]}&quot;
      user =&gt; &quot;&lt;user&gt;&quot;
      password =&gt; &quot;&lt;pwd&gt;&quot;
  }
  
     stdout{
        codec =&gt; dots
     }
  }
  </code></pre>
  <p>Now , i am triggering this file every minute on today that is March 8th 2021.
  when i load for <strong>first-time</strong> , its all good -<strong>:sql_last_value is  '1970-01-01 00:00:00.000000 +00:00'</strong></p>
  <p><strong>But after this first load , ideally logstash_metadata should be showing '2021-03-08 &lt;HH:MM:ss&gt;' But strangely it is getting update as --- 2020-09-11 01:05:09.000000000 Z</strong> in logstash_metadata (:sql_last_value)</p>
  <p>As you can see the difference is near about 180 days</p>
  <p>I tried multiple times but still it is updating in the same way , Due to this my incremental load is getting screwed</p>
  <p>My logstash Version is 7.10.2</p>
  <p>Help is much appreciated!</p>
  <p>NOTE: I am not using pagination as the number of results in the resultset are always very low in number for my query</p>