From 74e1b50f89ef547a854cc8d42e44eb8b237ec9f9 Mon Sep 17 00:00:00 2001 From: cxl Date: Sat, 25 Oct 2014 17:07:55 +0000 Subject: [PATCH] lz4: improved stats, MSSQL: fixed issue with REFERENCES git-svn-id: svn://ultimatepp.org/upp/trunk@7825 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/MSSQL/MSSQLSchema.h | 10 ++++++++++ uppsrc/plugin/lz4/lib/lz4.c | 2 ++ uppsrc/plugin/lz4/lib/lz4.h | 1 + 3 files changed, 13 insertions(+) diff --git a/uppsrc/MSSQL/MSSQLSchema.h b/uppsrc/MSSQL/MSSQLSchema.h index b07f568a5..f3495595c 100644 --- a/uppsrc/MSSQL/MSSQLSchema.h +++ b/uppsrc/MSSQL/MSSQLSchema.h @@ -73,6 +73,11 @@ #define COMMENT(txt) SCHEMA("-- " #txt "\n", NULL) +#define SEQUENCE(x) SCHEMA("create sequence " #x " start with 1;",\ + "drop sequence " #x ";") \ + UPGRADE("create sequence " #x " start with 1;") +#define SEQUENCE_(x) DOID(x) SEQUENCE(x) + #include #undef BIT @@ -122,5 +127,10 @@ #undef UNIQUE +#undef REFERENCES + #undef TIMESTAMP #undef COMMENT + +#undef SEQUENCE +#undef SEQUENCE_ diff --git a/uppsrc/plugin/lz4/lib/lz4.c b/uppsrc/plugin/lz4/lib/lz4.c index fc4975442..8dbc7df49 100644 --- a/uppsrc/plugin/lz4/lib/lz4.c +++ b/uppsrc/plugin/lz4/lib/lz4.c @@ -431,6 +431,7 @@ static unsigned LZ4_count(const BYTE* pIn, const BYTE* pRef, const BYTE* pInLimi #ifdef LZ4_STATS int lz4stat_LiteralLen; +int lz4stat_Literals; int lz4stat_Matches; int lz4stat_BigMatch; int lz4stat_BigLiteral; @@ -549,6 +550,7 @@ static int LZ4_compress_generic( /* Encode Literal length */ unsigned litLength = (unsigned)(ip - anchor); STATCODE(lz4stat_LiteralLen += litLength;) + STATCODE(lz4stat_Literals += litLength > 0); token = op++; if ((outputLimited) && (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit))) return 0; /* Check output limit */ diff --git a/uppsrc/plugin/lz4/lib/lz4.h b/uppsrc/plugin/lz4/lib/lz4.h index d2bee3a2f..ef1d1fffc 100644 --- a/uppsrc/plugin/lz4/lib/lz4.h +++ b/uppsrc/plugin/lz4/lib/lz4.h @@ -322,6 +322,7 @@ int LZ4_decompress_fast_withPrefix64k (const char* source, char* dest, int origi #endif #ifdef LZ4_STATS +extern int lz4stat_Literals; extern int lz4stat_LiteralLen; extern int lz4stat_Matches; extern int lz4stat_BigMatch;