#1 mORMot 1 » Typo in SynTable.pas function TSynAuthenticationAbstract.CreateSession » 2020-04-13 01:36:06

KevinChen
Replies: 1
try
    if not CheckCredentials(User, Hash) then; <-- ";" is typo
      exit;
    repeat
      result := fSessionGenerator;

#2 Re: mORMot 1 » External database Test failed » 2020-03-26 11:34:07

Oops, seems I was late for latest commit. The problem is solved. Thanks.

#3 mORMot 1 » External database Test failed » 2020-03-26 02:42:24

KevinChen
Replies: 4

Hi,

Two places need to be fixed:

1. TSQLDBConnectionProperties.ColumnTypeNativeToDB (SynDB.pas)

begin
  case DBMS of
  dOracle: ColumnTypeNativeToDBOracle; <-- should be "result := ColumnTypeNativeToDBOracle"
  ..... 
end;

2. TSQLASource, TSQLADest (SynTests)

  property SignatureTime; <-- should be "property SignatureTime: TTimeLog read fSignatureTime write fSignatureTime;
  property Signature; <-- should be "property Signature: RawUTF8 read fSignature write fSignature;

#4 mORMot 1 » Test hang on _SynDBRemote caused by THttpApiServer.Destroy » 2020-03-11 09:09:07

KevinChen
Replies: 4

Hi,

The new changes related to (fClones: THttpApiServers) resulted the test process hang at THttpApiServer.Destroy (...finally inherited Destroy ...).
When I restored the code back to the version (fClones: TObjectList), the test passed as usual.
Any help would be appreciated.

#5 mORMot 1 » SynCommons QuotedStr bug report » 2019-12-19 05:09:12

KevinChen
Replies: 1

Hi,

The newly revised QuotedStr(const S: RawUTF8; Quote: AnsiChar; var result: RawUTF8);
has bug:

PWord(P)^ := ord('"')+ord('"')shl 8;

It should be:

PWord(P)^ := ord(Quote)+ord(Quote)shl 8;

#6 mORMot 1 » Issue on update of MoveSmall() in SynCommons.pas » 2019-10-25 15:34:08

KevinChen
Replies: 1

Hi,

I have merged this update but my test result on the JSON content returned from Oracle DB was not correct as before.
The difference was that the column with ftCurrency data type lost its value in JSON.
After trace, I found the problem was caused by following:

procedure TTextWriter.AddFloatStr(P: PUTF8Char);

old:    {$ifdef FPC}Move{$else}MoveFast{$endif}(P^,B^,L);
new:   MoveSmall(P,B+1,L);

If I revise the new to MoveSmall(P,B,L), the correct JSON result is back.
I'm not good at pointer technique, any help would be appreciated.

#7 mORMot 1 » Incorrect Oracle "NUMBER" convert in ColumnTypeNativeToDBOracle » 2016-12-29 07:32:58

KevinChen
Replies: 1

Oracle datatype "NUMBER" is different from "NUMBER(n)".
Neither of them have Scale but "NUMBER" should be converted to ftDouble, not ftInt64.

procedure ColumnTypeNativeToDBOracle;
begin
  if PosEx('CHAR',aNativeType)>0 then
    result := ftUTF8 else
  if aNativeType = 'NUMBER' then
    result := ftDouble else
  if IdemPropNameU(aNativeType,'NUMBER') then
  ... 

#8 Re: mORMot 1 » ODBC with SQL_VARBINARY(MAX) gives "Invalid precision value" » 2016-12-29 01:57:19

I got the error "Invalid precision: cbColDef value out of range (0)" when tested on VARCHAR column in Teradata database.
Then I restored the change back and it worked.
I'm not sure if the change should be like this:

case VType of
ftBlob:
  status := ODBC.BindParameter(fStatement, p+1, InputOutputType, CValueType,
   CType2SQL(CValueType), 0, 0, ParameterValue, ColumnSize, StrLen_or_Ind[p]);
else
  status := ODBC.BindParameter(fStatement, p+1, InputOutputType, CValueType,
   CType2SQL(CValueType), ColumnSize, 0, ParameterValue, ColumnSize, StrLen_or_Ind[p]);
end;

#9 Re: mORMot 1 » Got Oracle Error ORA-01406 while fetching large data set » 2016-09-13 01:41:12

The NLS_LANG of my Oracle DB is AMERICAN_AMERICA.ZHT16BIG5. I have traced the code and it worked well to deal with the Character Set.

Yesterday, I unknowingly adjusted fInternalBufferSize to 128*1024*256 and it just succeeded for 193868 rows (57.2 MB).

With my limited capability, I couldn't figure out how does it run within the section "3. Dispatch data in row buffer".
Would someone give me more hints?

Much appreciated.

#10 mORMot 1 » Got Oracle Error ORA-01406 while fetching large data set » 2016-09-10 04:55:51

KevinChen
Replies: 2

Hi,

I've run a test using the Sample "12 - SynDB Explorer".
I tried to fetch a large dataset through Oracle DB which contained more than 200,000 rows and with 35 columns.
The program got the error "ORA-01406: fetched column value was truncated" unless I limited the returned rows to around 110,000.

I thought the error came by client buffer shortage and tried to adjust some buffersize parameters like
"fRowsPrefetchSize", "fInternalBufferSize", RowCount, RowSize ...etc.
But I still can't find the solution.

Any help would be appreciated.

Board footer

Powered by FluxBB