| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
| 0009276 | CDash | public | 2009-07-16 10:25 | 2010-01-28 11:04 | |||||||||
| Reporter | Rolf Eike Beer | ||||||||||||
| Assigned To | Julien Jomier | ||||||||||||
| Priority | normal | Severity | major | Reproducibility | always | ||||||||
| Status | feedback | Resolution | reopened | ||||||||||
| Platform | OS | OS Version | |||||||||||
| Product Version | 1.6 | ||||||||||||
| Target Version | Fixed in Version | 1.6 | |||||||||||
| Summary | 0009276: Postgres does not like the build warnings with '\\' in them | ||||||||||||
| Description | The second build warning (XML below) always leads to postgres rejecting it: [220-1] WARNING: nonstandard use of \\ in a string literal at character 142 [220-2] HINT: Use the escape string syntax for backslashes, e.g., E'\\'. [221-1] WARNING: nonstandard use of \\ in a string literal at character 142 [221-2] HINT: Use the escape string syntax for backslashes, e.g., E'\\'. [222-1] WARNING: nonstandard use of \\ in a string literal at character 371 [222-2] HINT: Use the escape string syntax for backslashes, e.g., E'\\'. [223-1] ERROR: null value in column "postcontext" violates not-null constraint [223-2] STATEMENT: INSERT INTO builderror (buildid,type,logline,text,sourcefile,sourceline,precontext,postcontext,repeatcount) [223-3] VALUES (8001,1,227,'C:\\Programme\\boost\\boost_1_38\\boost/test/impl/execution_monitor.ipp(825) : warning C4535: [223-4] calling _set_se_translator() requires /EHa [223-5] ','C:/Programme/boost/boost_1_38/boost/test/impl/execution_monitor.ipp',825, [223-6] 'Linking CXX shared library ..\\bin\\haprt.dll [223-7] LINK : ..\\bin\\haprt.dll not found or not built by the last incremental link; performing full link [223-8] Creating library ..\\lib\\haprt.lib and object ..\\lib\\haprt.exp [223-9] [ 9%] Built target haprt [223-10] [ 9%] Building CXX object haprt/haplib/tests/CMakeFiles/HapLibTestcases.dir/hap_create_save_load_test.cpp.obj [223-11] hap_create_save_load_test.cpp [223-12] ',NULL,0) The interesting part is: the first warning is correctly accepted even if it has backslashes in them. The funny values in <StartDateTime> are already reported in 0007925 Cdash is r1911 | ||||||||||||
| Additional Information | ?xml version="1.0" encoding="UTF-8"?> <Site BuildName="Win32-nmake" BuildStamp="20090716-1201-Experimental" Name="YM-WORK1" Generator="ctest2.6-patch 4" OSName="Windows" Hostname="ym-work1" OSRelease="XP Professional" OSVersion="Service Pack 3 (Build 2600)" OSPlatform="" Is64Bits="0" VendorString="GenuineIntel" VendorID="Intel Corporation" FamilyID="6" ModelID="15" ProcessorCacheSize="-1" NumberOfLogicalCPU="1" NumberOfPhysicalCPU="2" TotalVirtualMemory="2047" TotalPhysicalMemory="16" LogicalProcessorsPerPhysical="2" ProcessorClockFrequency="1866" > <Build> <StartDateTime>Jul 16 14:01 Westeurop<-28>ische Sommerzeit</StartDateTime> <StartBuildTime>1247745714</StartBuildTime> <BuildCommand>nmake /NOLOGO -i</BuildCommand> <Warning> <BuildLogLine>190</BuildLogLine> <Text>D:\ymortier\siso_svn\Common\haplib\src\HAP_multi_data.cpp(95) : warning C4146: unary minus operator applied to unsigned type, result still unsigned </Text> <SourceFile>D:/ymortier/siso_svn/Common/haplib/src/HAP_multi_data.cpp</SourceFile> <SourceLineNumber>95</SourceLineNumber> <PreContext>[ 8%] Building CXX object haprt/haplib/CMakeFiles/sisohap.dir/src/HAP_localintreg.cpp.obj HAP_localintreg.cpp [ 8%] Building CXX object haprt/haplib/CMakeFiles/sisohap.dir/src/HAP_module.cpp.obj HAP_module.cpp [ 8%] Building CXX object haprt/haplib/CMakeFiles/sisohap.dir/src/HAP_multi_data.cpp.obj HAP_multi_data.cpp </PreContext> <PostContext>[ 9%] Building CXX object haprt/haplib/CMakeFiles/sisohap.dir/src/HAP_multi_head.cpp.obj HAP_multi_head.cpp [ 9%] Building CXX object haprt/haplib/CMakeFiles/sisohap.dir/src/HAP_param.cpp.obj HAP_param.cpp [ 9%] Building CXX object haprt/haplib/CMakeFiles/sisohap.dir/src/HAP_param_link.cpp.obj HAP_param_link.cpp</PostContext> <RepeatCount>0</RepeatCount> </Warning> <Warning> <BuildLogLine>227</BuildLogLine> <Text>C:\Programme\boost\boost_1_38\boost/test/impl/execution_monitor.ipp(825) : warning C4535: calling _set_se_translator() requires /EHa </Text> <SourceFile>C:/Programme/boost/boost_1_38/boost/test/impl/execution_monitor.ipp</SourceFile> <SourceLineNumber>825</SourceLineNumber> <PreContext>Linking CXX shared library ..\bin\haprt.dll LINK : ..\bin\haprt.dll not found or not built by the last incremental link; performing full link Creating library ..\lib\haprt.lib and object ..\lib\haprt.exp [ 9%] Built target haprt [ 9%] Building CXX object haprt/haplib/tests/CMakeFiles/HapLibTestcases.dir/hap_create_save_load_test.cpp.obj hap_create_save_load_test.cpp </PreContext> <PostContext></PostContext> <RepeatCount>0</RepeatCount> </Warning> | ||||||||||||
| Tags | No tags attached. | ||||||||||||
| Attached Files | |||||||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0016923) Rolf Eike Beer (reporter) 2009-07-21 12:05 |
Looks like the string escaping as done in pdo_real_escape_string() is not enough. Backslash sequences in those strings seem to be not allowed by SQL standard. Postgres has an extension to allow this when you write E'string\\' instead of 'string\\'. I sent the patch that I did to make it work with PostgreSQL for me but I know this will not work with mysql anymore since I hard-coded the E on some places. IMHO the only fix is to make pdo_real_escape_string() the whole string including quotes and E if required. The other functions calling this need to be fixed accordingly. |
|
(0016936) Rolf Eike Beer (reporter) 2009-07-22 11:47 |
Found one more place with the same problem in models/buildupdatefile.php |
|
(0017054) Julien Jomier (manager) 2009-08-04 10:43 |
I cannot reproduce the problem with both PgSQL 8.3 on Linux and 8.4beta on Windows. Which version of PgSQL are you using? |
|
(0017055) Rolf Eike Beer (reporter) 2009-08-04 10:51 |
8.2.13 |
|
(0018636) Julien Jomier (manager) 2009-12-01 18:03 |
Could you check the value of "standard_conforming_strings" in your postgresql.conf? It seems that by default PostgreSQL is setting this one to ON but it was set to off in previous versions. One easy fix is to add: standard_conforming_strings = on Let me know. |
|
(0019345) Rolf Eike Beer (reporter) 2010-01-28 06:44 |
I've upgraded my postgres to 8.4.2 and still see a lot of errors like this one: Jan 28 12:45:09 agis postgres[725]: [2-1] ERROR: syntax error at or near "\" at character 327 Jan 28 12:45:09 agis postgres[725]: [2-2] STATEMENT: INSERT INTO builderror (buildid,type,logline,text,sourcefile,sourceline,precontext, Jan 28 12:45:09 agis postgres[725]: [2-3] postcontext,repeatcount,newstatus,crc32) Jan 28 12:45:09 agis postgres[725]: [2-4] VALUES (8,1,40,'C:\\Dokumente und Einstellungen\\testcase\\Eigene Dateien\\siso\\trunk\\tools\\libtiff\\libtiff\\tif_close.c(81) : warning C4018: \'<\' : signed/unsigned mismatch Jan 28 12:45:09 agis postgres[725]: [2-5] ','C:/Dokumente und Einstellungen/testcase/Eigene Dateien/siso/trunk/tools/libtiff/libtiff/tif_close.c',81, Jan 28 12:45:09 agis postgres[725]: [2-6] '[ 2%] Built target zlib Jan 28 12:45:09 agis postgres[725]: [2-7] Scanning dependencies of target libtiff Jan 28 12:45:09 agis postgres[725]: [2-8] [ 2%] Building C object iolib/libtiff/CMakeFiles/libtiff.dir/tif_aux.c.obj Jan 28 12:45:09 agis postgres[725]: [2-9] tif_aux.c Jan 28 12:45:09 agis postgres[725]: [2-10] [ 2%] Building C object iolib/libtiff/CMakeFiles/libtiff.dir/tif_close.c.obj Jan 28 12:45:09 agis postgres[725]: [2-11] tif_close.c Jan 28 12:45:09 agis postgres[725]: [2-12] ','[ 2%] Building C object iolib/libtiff/CMakeFiles/libtiff.dir/tif_codec.c.obj Jan 28 12:45:09 agis postgres[725]: [2-13] tif_codec.c Jan 28 12:45:09 agis postgres[725]: [2-14] [ 2%] Building C object iolib/libtiff/CMakeFiles/libtiff.dir/tif_color.c.obj Jan 28 12:45:09 agis postgres[725]: [2-15] tif_color.c Jan 28 12:45:09 agis postgres[725]: [2-16] [ 3%] Building C object iolib/libtiff/CMakeFiles/libtiff.dir/tif_compress.c.obj Jan 28 12:45:09 agis postgres[725]: [2-17] tif_compress.c',0,0,3264989515) |
|
(0019346) Rolf Eike Beer (reporter) 2010-01-28 06:51 |
This is not limited to '\' anymore, '[' now also causes errors. So if the warning has any of CMakes "[ xx%]" messages in it it will not make it to the database. |
|
(0019348) Julien Jomier (manager) 2010-01-28 08:57 |
Can you check value of standard_conforming_strings? |
|
(0019349) Rolf Eike Beer (reporter) 2010-01-28 09:17 |
It's on as suggested. |
|
(0019350) Julien Jomier (manager) 2010-01-28 09:31 |
Is it the default value in your 8.4.2 installation? if not maybe try to remove it... |
|
(0019352) Rolf Eike Beer (reporter) 2010-01-28 09:58 |
Setting it to off generates these again: Jan 28 15:57:44 agis postgres[19532]: [22-1] WARNING: nonstandard use of \' in a string literal at character 407 Jan 28 15:57:44 agis postgres[19532]: [22-2] HINT: Use '' to write quotes in strings, or use the escape string syntax (E'...'). |
|
(0019353) Julien Jomier (manager) 2010-01-28 10:05 |
It seems to be only a warning, is the string inserted in the database? |
|
(0019354) Rolf Eike Beer (reporter) 2010-01-28 10:34 |
Currently hard too tell (too many other warnings). I'll look what happens when the windows host reports it's next results. Nevertheless I don't want my postgres logs getting flooded with these message... |
|
(0019355) Julien Jomier (manager) 2010-01-28 11:04 |
You can turn it off: escape_string_warning = off and restart the server. That said I agree with you, we should try to fix it from the code |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2009-07-16 10:25 | Rolf Eike Beer | New Issue | |
| 2009-07-21 12:05 | Rolf Eike Beer | File Added: cdash_escape.diff | |
| 2009-07-21 12:05 | Rolf Eike Beer | Note Added: 0016923 | |
| 2009-07-22 11:47 | Rolf Eike Beer | File Added: filename_escape.diff | |
| 2009-07-22 11:47 | Rolf Eike Beer | Note Added: 0016936 | |
| 2009-08-02 19:08 | Julien Jomier | Status | new => assigned |
| 2009-08-02 19:08 | Julien Jomier | Assigned To | => Julien Jomier |
| 2009-08-04 10:43 | Julien Jomier | Note Added: 0017054 | |
| 2009-08-04 10:51 | Rolf Eike Beer | Note Added: 0017055 | |
| 2009-12-01 18:03 | Julien Jomier | Note Added: 0018636 | |
| 2010-01-15 14:18 | Julien Jomier | Status | assigned => resolved |
| 2010-01-15 14:18 | Julien Jomier | Fixed in Version | => 1.6 |
| 2010-01-15 14:18 | Julien Jomier | Resolution | open => fixed |
| 2010-01-28 06:44 | Rolf Eike Beer | Note Added: 0019345 | |
| 2010-01-28 06:44 | Rolf Eike Beer | Status | resolved => feedback |
| 2010-01-28 06:44 | Rolf Eike Beer | Resolution | fixed => reopened |
| 2010-01-28 06:51 | Rolf Eike Beer | Note Added: 0019346 | |
| 2010-01-28 08:57 | Julien Jomier | Note Added: 0019348 | |
| 2010-01-28 09:17 | Rolf Eike Beer | Note Added: 0019349 | |
| 2010-01-28 09:31 | Julien Jomier | Note Added: 0019350 | |
| 2010-01-28 09:58 | Rolf Eike Beer | Note Added: 0019352 | |
| 2010-01-28 10:05 | Julien Jomier | Note Added: 0019353 | |
| 2010-01-28 10:34 | Rolf Eike Beer | Note Added: 0019354 | |
| 2010-01-28 11:04 | Julien Jomier | Note Added: 0019355 | |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |