Notifications

15 views

Description

When searching through a list (or through some code in background script) and using a column with name that is longer than 32 characters long to 'order by' the query is prevented from running because a stack trace error has occurred.

The stack trace would be similar to this:
No such column :u_server_software_preference_index: java.sql.SQLException: No such column :u_server_software_preference_index: org.mariadb.jdbc.internal.common.queryresults.ColumnNameMap.getLabelIndex(ColumnNameMap.java:78)
org.mariadb.jdbc.internal.common.queryresults.ColumnNameMap.getIndex(ColumnNameMap.java:26)
org.mariadb.jdbc.MySQLResultSet.findColumn(MySQLResultSet.java:495)
com.glide.ts.query.TSDocumentInfo.setExtraValues(TSDocumentInfo.java:121)
com.glide.ts.storage.popper.TSDocumentPopper.addWord(TSDocumentPopper.java:89)
com.glide.ts.storage.popper.TSDocumentPopper.pop(TSDocumentPopper.java:63)
com.glide.ts.query.TSRDBMSSortStrategy.loadAndCount(TSRDBMSSortStrategy.java:194)
com.glide.ts.query.TSRDBMSSortStrategy.score(TSRDBMSSortStrategy.java:178)
com.glide.ts.query.TSQueryThread.scoreAnswer(TSQueryThread.java:127)
com.glide.ts.query.TSQueryThread.buildAnswer(TSQueryThread.java:103)
com.glide.ts.query.TSQueryThread.execute(TSQueryThread.java:84)
com.glide.ts.query.TSQueryThread.run0(TSQueryThread.java:66)
com.glide.util.ParentedThread.run(ParentedThread.java:51)

Steps to Reproduce

Reproducible in demonightlylondon (tested 10/09/18)

1) Create a new column in incident table with column name: u_server_software_preference_index

2) Go to incident.list and do a keyword / for text search for 'test'
-->See that records are returned as expected

3) On the same list add an Order by filter by clicking on "Add Sort' button and choose the field that was created in step 1
-->See now that no records are returned
-->Check the System logs and see the stack trace:
No such column :u_server_software_preference_index: java.sql.SQLException: No such column :u_server_software_preference_index: org.mariadb.jdbc.internal.common.queryresults.ColumnNameMap.getLabelIndex(ColumnNameMap.java:78)
org.mariadb.jdbc.internal.common.queryresults.ColumnNameMap.getIndex(ColumnNameMap.java:26)
.
.

4) The same error can also be seen by running the following code in background script:
var gr = new GlideRecord('incident');
gr.addEncodedQuery("IR_AND_OR_QUERY=test^ORDERBYu_server_software_preference_index");
gr.query();
gs.print(gr.getRowCount());
if(gr.next()){
gs.print(gr.getValue('u_server_software_preference_index'));
}

Workaround

This issue is currently being worked on by ServiceNow and targeted for a Madrid fix, which may be subject to change.

To receive notifications when more information is available, subscribe to this Known Error article by clicking the Subscribe button at the top right of the article. If you are able to upgrade, review the Fixed In or Intended Fix Version fields to determine whether any versions have a planned or permanent fix.

 


Related Problem: PRB1309384

Seen In

There is no data to report.

Intended Fix Version

Madrid

Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-10-30 10:10:49
Published:2018-10-30