Hi,

I noticed an inefficiency in the code for loading content.xml:
before every insert, the whole table content seems to be read just to
get the metadata - see ContentLoaderHandler.getParameters():

57         Map<String, Integer> colTypes = jdbcTemplate.query("SELECT * FROM " 
+ tableName,
58                 new ResultSetExtractor<Map<String, Integer>>() {

...

This usually shouldn't be a big problem, but could be awkward if one e.g. wants 
to use this
mechanism to insert large amounts of test data, or if it is used during 
migration from 1.1 -> 1.2
to insert records into tables which are already filled.

I suggest adding "WHERE 0=1". I tried this and it does not affect the build and 
integration test.

If it's ok, I can make the corresponding change - but I'd need to know if I 
should open a JIRA,
and if there's anything special to consider when merging from 1.2 because of 
the code reorganization
(SYNCOPE-620).

WDYT?

Cheers,
  Guido

Reply via email to