From 4ebf4b43b651def1b27ca49a87e5f9082563d6fb Mon Sep 17 00:00:00 2001 From: Michael Link Date: Fri, 20 May 2022 19:05:03 -0500 Subject: [PATCH] [#46] Use lowercase select in checksum metadata query Avoids crash due to https://github.com/irods/irods/issues/4697 --- DSI/globus_gridftp_server_iRODS.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DSI/globus_gridftp_server_iRODS.cpp b/DSI/globus_gridftp_server_iRODS.cpp index afe2b93..e24b279 100644 --- a/DSI/globus_gridftp_server_iRODS.cpp +++ b/DSI/globus_gridftp_server_iRODS.cpp @@ -1465,9 +1465,11 @@ globus_l_gfs_iRODS_command( } //SELECT META_DATA_ATTR_VALUE, META_DATA_ATTR_UNITS, MIN(DATA_MODIFY_TIME) where COLL_NAME = '/tempZone/home/rods' and DATA_NAME = 'medium_file' and DATA_REPL_STATUS = '1' + // use lowercase 'select' to work around + // https://github.com/irods/irods/issues/4697 std::string metadata_query_str = boost::str(boost::format( - "SELECT META_DATA_ATTR_VALUE, META_DATA_ATTR_UNITS, MIN(DATA_MODIFY_TIME) " + "select META_DATA_ATTR_VALUE, META_DATA_ATTR_UNITS, MIN(DATA_MODIFY_TIME) " "WHERE META_DATA_ATTR_NAME = '%s' AND DATA_NAME = '%s' AND COLL_NAME = '%s' AND DATA_REPL_STATUS = '1'") % checksum_avu_name % data_name %