--- parser3/src/classes/table.C 2019/09/06 10:17:07 1.347 +++ parser3/src/classes/table.C 2020/12/07 23:02:07 1.351 @@ -5,6 +5,14 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ +#include "pa_config_includes.h" + +#if (!defined(NO_STRINGSTREAM) && !defined(FREEBSD4) && !defined(PA_DEBUG_DISABLE_GC)) +#include +#include "../lib/gc/include/gc_allocator.h" +#define USE_STRINGSTREAM +#endif + #include "classes.h" #include "pa_vmethod_frame.h" @@ -17,12 +25,7 @@ #include "pa_vbool.h" #include "pa_array.h" -#if (!defined(NO_STRINGSTREAM) && !defined(FREEBSD4) && !defined(PA_DEBUG_DISABLE_GC)) -#include -#define USE_STRINGSTREAM -#endif - -volatile const char * IDENT_TABLE_C="$Id: table.C,v 1.347 2019/09/06 10:17:07 moko Exp $"; +volatile const char * IDENT_TABLE_C="$Id: table.C,v 1.351 2020/12/07 23:02:07 moko Exp $"; // class @@ -406,15 +409,11 @@ static void _load(Request& r, MethodPara HashStringValue *options=0; TableControlChars control_chars; - if(options_param_index, gc_allocator > pa_stringstream; typedef std::basic_string, gc_allocator > pa_string; @@ -637,7 +635,7 @@ static void _save(Request& r, MethodPara --param_index; const String& file_name=params.as_string(param_index++, FILE_NAME_MUST_NOT_BE_CODE); - String file_spec=r.absolute(file_name); + String file_spec=r.full_disk_path(file_name); if(do_append && file_exist(file_spec)) output_column_names=false; @@ -1296,7 +1294,11 @@ public: return true; } } - bool before_rows(SQL_Error& error) { + bool before_rows(SQL_Error& error) { + if(table) { + error=SQL_Error("result must contain exactly one table"); + return true; + } try { table=new Table(&columns); columns_count=columns.count();