0

The following sql statement raises a syntax error:

analyze table my_table sample_size 0;

This is the raised error:

Syntax error in SQL statement "ANALYZE TABLE MY_TABLE SAMPLE_SIZE[*] 0 "; expected "integer";

The official documentation gives the following:

ANALYZE [TABLE tableName] [SAMPLE_SIZE rowCountInt]

(...) The value 0 means all rows are read.

How to workaround this problem?

H2 1.4.196

Stephan
  • 41,764
  • 65
  • 238
  • 329

1 Answers1

0

The error results from a bug in the h2 database parsing code. A fix has been sent.

I don't know in which version it willl be available.

Stephan
  • 41,764
  • 65
  • 238
  • 329
  • 1
    According to the [Change Log](http://h2database.com/html/changelog.html?highlight=fix%20bug%20in%20parsing&search=fix%20bug%20in%20parsing#firstFound), it's fixed in 1.4.197 (2018-03-18) – Sonata Apr 19 '18 at 10:57