Merge pull request #8696 from andyque/fixJenkinsSql

fix sql syntax error
add back
Merge pull request #8697 from andyque/fixJenkinsSql

add back