~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to storage/falcon/Stream.cpp

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "Blob.h"
34
34
#include "Log.h"
35
35
 
36
 
#ifdef ENGINE
 
36
#ifdef FALCONDB
37
37
#include "Record.h"
38
38
#else
39
39
#undef ASSERT
40
40
#define ASSERT(a)
41
41
#endif
42
42
 
43
 
#ifdef _WIN32
44
 
#define vsnprintf       _vsnprintf
45
 
#endif
46
 
 
47
43
#ifdef _DEBUG
48
44
#undef THIS_FILE
49
45
static const char THIS_FILE[]=__FILE__;
250
246
        return string;
251
247
}
252
248
 
253
 
#ifdef ENGINE
 
249
#ifdef FALCONDB
254
250
void Stream::compress(int length, void * address)
255
251
{
256
252
        //printShorts ("Original data", (length + 1) / 2, (short*) address);
332
328
                while (p < end)
333
329
                        {
334
330
                        short n = *p++;
335
 
//#ifdef ENGINE
 
331
//#ifdef FALCONDB
336
332
                        if (n == 0 && run == 0)
337
333
                                {
338
334
                                Log::log ("corrupted record (zero run), table %d, record %d\n", tableId, recordNumber);
354
350
                                
355
351
                                if (q + run > limit)
356
352
                                        {
357
 
//#ifdef ENGINE
 
353
//#ifdef FALCONDB
358
354
                                        Log::log ("corrupted record (overrun), table %d, record %d\n", tableId, recordNumber);
359
355
                                        printShorts ("Compressed", (segment->length + 1)/2, (short*) segment->address);
360
356
                                        printChars ("Compressed", segment->length, segment->address);
542
538
 
543
539
        if (seg.remaining > 0)
544
540
                seg.copy (alloc (seg.remaining), seg.remaining);
545
 
#ifdef ENGINE
 
541
#ifdef FALCONDB
546
542
        else if (seg.remaining < 0)
547
543
                Log::debug ("Stream::putSegment: apparent blob overflow\n");
548
544
#endif