Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336406

Summary: ParameterMarkers substituteParameters() generates "VAR0" names in random order.
Product: [Tools] Data Tools Reporter: Gary Gregory <ggregory>
Component: SQL Query BuilderAssignee: dtp.sqldevtools-inbox <dtp.sqldevtools-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Gary Gregory CLA 2011-02-04 17:44:26 EST
Build Identifier: M20100211-1343

ParameterMarkers substituteParameters() generates "VAR0" names in random order.

Reproducible: Always

Steps to Reproduce:
With the SQL:

INSERT INTO FOO
  VALUES (?,?,?,?,?,?,?,?,?,?,?)

The method rewrites the SQL to be:

INSERT INTO FOO
  VALUES (:VAR07, :VAR05, :VAR09, :VAR03, :VAR011, :VAR06, :VAR01,
    :VAR010, :VAR02, :VAR04, :VAR08)

Which is very hard for users to deal with in the UI.

I expect the VAR names to be 1, 2, 3, and so on, not in random order.

This because a Set is used internally instead of a list.