So if the driver internally handle fetch size 0 == fetch size 100, that's what i call an hidden inconsistent behavior.
Don't get me wrong, it make sense to switch defaultRowFetchSize to "100", but a call to getFetchSize() should be == 100, not 0.
And that is how it should work, however according to the JDBC specification (or at least: that is how I read it), Statement.setFetchSize(0) means "use driver default fetch size".
"If the value specified is zero, then the hint is ignored. The default value is zero."
It don't really said "use default fetch size", it said the hint is ignored. IMO the api is a little ambiguous but the api and specification in "13.5 Performance Hints" reads:
The methods getFetchDirection and getFetchSize return the current value of the hints. If either of these methods is called before the corresponding setter method has been called, the value returned is implementation-defined.
So is up to drivers choice what to return as "default"
if a setFetchSize is not called, so again IMO it should return 100 not 0.
Anyway, as Dave mentioned, this is just a "hint", and most apps need a certain scenario to actually use it (autocommit=off, type_forward_only, single statement). "What we do inside the driver is our business" is fine as long as you stick with the standard.
On the other hand, drivers are also free to ignore fetch size hints.