Skip to content

Commit 2ec45c5

Browse files
committed
Patch to v2.4.0.1
1 parent 3743f32 commit 2ec45c5

File tree

16 files changed

+72
-33
lines changed

16 files changed

+72
-33
lines changed

query_templates/ansi.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@
3535
define __LIMITA = "";
3636
define __LIMITB = "top %d";
3737
define __LIMITC = "";
38+
define _BEGIN = "-- start query " + [_QUERY] + " in stream " + [_STREAM] + " using template " + [_TEMPLATE];
39+
define _END = "-- end query " + [_QUERY] + " in stream " + [_STREAM] + " using template " + [_TEMPLATE];

query_templates/db2.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@
3535
define __LIMITA = "";
3636
define __LIMITB = "";
3737
define __LIMITC = " fetch first %d rows only";
38+
define _BEGIN = "-- start query " + [_QUERY] + " in stream " + [_STREAM] + " using template " + [_TEMPLATE];
39+
define _END = "-- end query " + [_QUERY] + " in stream " + [_STREAM] + " using template " + [_TEMPLATE];

query_templates/netezza.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@
3535
define __LIMITA = "";
3636
define __LIMITB = "";
3737
define __LIMITC = "limit %d";
38+
define _BEGIN = "-- start query " + [_QUERY] + " in stream " + [_STREAM] + " using template " + [_TEMPLATE];
39+
define _END = "-- end query " + [_QUERY] + " in stream " + [_STREAM] + " using template " + [_TEMPLATE];

query_templates/oracle.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@
3535
define __LIMITA = "select * from (";
3636
define __LIMITB = "";
3737
define __LIMITC = " ) where rownum <= %d";
38+
define _BEGIN = "-- start query " + [_QUERY] + " in stream " + [_STREAM] + " using template " + [_TEMPLATE];
39+
define _END = "-- end query " + [_QUERY] + " in stream " + [_STREAM] + " using template " + [_TEMPLATE];

query_templates/sqlserver.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@
3535
define __LIMITA = "";
3636
define __LIMITB = "top %d";
3737
define __LIMITC = "";
38+
define _BEGIN = "-- start query " + [_QUERY] + " in stream " + [_STREAM] + " using template " + [_TEMPLATE];
39+
define _END = "-- end query " + [_QUERY] + " in stream " + [_STREAM] + " using template " + [_TEMPLATE];

tools/Makefile.suite

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,18 @@
3838
################
3939
## TARGET OS HERE
4040
################
41-
# OS Values: AIX, LINUX, SOLARIS, NCR, HPUX
42-
OS = LINUX
41+
# OS Values: AIX, LINUX, SOLARIS, NCR, HPUX, MACOS
42+
OS = LINUX
4343
###########
4444
# No changes should be necessary below this point
4545
# Each compile variable is adjusted for the target platform using the OS setting above
4646
###########
4747
# CC
4848
AIX_CC = xlC
4949
HPUX_CC = gcc
50-
LINUX_CC = gcc
50+
LINUX_CC = gcc
5151
NCR_CC = cc
52+
MACOS_CC = gcc
5253
SOLARIS_CC = gcc
5354
SOL86_CC = cc
5455
CC = $($(OS)_CC)
@@ -57,31 +58,35 @@ AIX_CFLAGS = -q64 -O3 -D_LARGE_FILES
5758
HPUX_CFLAGS = -O3 -Wall
5859
LINUX_CFLAGS = -g -Wall
5960
NCR_CFLAGS = -g
61+
MACOS_CFLAGS = -g -Wall
6062
SOLARIS_CFLAGS = -O3 -Wall
6163
SOL86_CFLAGS = -O3
62-
BASE_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DYYDEBUG #-maix64 -DMEM_TEST
64+
BASE_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DYYDEBUG #-maix64 -DMEM_TEST
6365
CFLAGS = $(BASE_CFLAGS) -D$(OS) $($(OS)_CFLAGS)
6466
# EXE
65-
AIX_EXE =
67+
AIX_EXE =
6668
HPUX_EXE =
6769
LINUX_EXE =
6870
NCR_EXE =
71+
MACOS_EXE =
6972
SOLARIS_EXE =
7073
SOL86_EXE =
71-
EXE = $($(OS)_EXE)
74+
EXE = $($(OS)_EXE)
7275
# LEX
7376
AIX_LEX = flex
7477
HPUX_LEX = flex
7578
LINUX_LEX = lex
7679
NCR_LEX = lex
80+
MACOS_LEX = lex
7781
SOLARIS_LEX = lex
7882
SOL86_LEX = lex
79-
LEX = $($(OS)_LEX)
83+
LEX = $($(OS)_LEX)
8084
# LIBS
8185
AIX_LIBS = -lm
8286
HPUX_LIBS = -lm -ll
8387
LINUX_LIBS = -lm
8488
NCR_LIBS = -lm -lc89
89+
MACOS_LIBS = -lm
8590
SOLARIS_LIBS = -ly -ll -lm
8691
SOL86_LIBS = -ly -ll -lm
8792
LIBS = $($(OS)_LIBS)
@@ -90,6 +95,7 @@ AIX_YACC = yacc
9095
HPUX_YACC = bison -y
9196
LINUX_YACC = yacc
9297
NCR_YACC = yacc
98+
MACOS_YACC = yacc
9399
SOLARIS_YACC = yacc
94100
SOL86_YACC = yacc
95101
YACC = $($(OS)_YACC)
@@ -98,6 +104,7 @@ AIX_YFLAGS = -d -v
98104
HPUX_YFLAGS = -y -d -v
99105
LINUX_YFLAGS = -d -v
100106
NCR_YFLAGS = -d -v
107+
MACOS_YFLAGS = -d -v
101108
SOLARIS_YFLAGS = -d -v
102109
SOL86_YFLAGS = -d -v
103110
YFLAGS = $($(OS)_YFLAGS)
@@ -221,7 +228,7 @@ TESTS = tests/*.sh tests/*.sql
221228
ANS = answer_sets/*.ans
222229
QUERY_SRC = $(FQD) $(VARIANTS)
223230
TREE_DOC =
224-
JUNK = tags *.idx columns.h streams.h y.tab.h y.tab.c tokenizer.c \
231+
JUNK = tags *.idx columns.h streams.h tables.h y.tab.h y.tab.c tokenizer.c \
225232
y.output .ctags_updated tpcds.idx.h
226233
DBGENSRC = $(SRC) $(HDR) $(OTHER) $(DOC) $(DDL) $(IDXSRC) $(WIN_MAKE) $(QUERY_SRC) $(TESTS) $(ANS)
227234
GENERATED = tables.h streams.h columns.h
@@ -250,10 +257,10 @@ clean:
250257
current_source:
251258
cvs update
252259
depend: $(SRC) $(HDR)
253-
touch columns.h streams.h
260+
touch columns.h streams.h tables.h
254261
-makedepend -f Makefile.suite -Y -- $(CFLAGS) -- $(SRC) 2> /dev/null
255262
date > .depend_updated
256-
rm -f columns.h streams.h
263+
rm -f columns.h streams.h tables.h
257264
lint:
258265
lint $(CFLAGS) -u -x -wO -p $(SRC1)
259266
lint $(CFLAGS) -u -x -wO -p $(SRC2)

tools/config.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@
3737
#ifndef CONFIG_H
3838
#define CONFIG_H
3939

40+
#ifdef MACOS
41+
#define SUPPORT_64BITS
42+
#define HUGE_TYPE int64_t
43+
#define HUGE_FORMAT "%lld"
44+
#define HUGE_COUNT 1
45+
#define USE_STRING_H
46+
#define USE_STDLIB_H
47+
#define FLEX
48+
#endif /* MACOS */
49+
4050
#ifdef NCR
4151
#define STDLIB_HAS_GETOPT
4252
#define USE_STRING_H

tools/date.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@
3535
*/
3636

3737
/*** includes ***/
38+
#include "config.h"
39+
#include "porting.h"
3840
#include <stdlib.h>
3941
#ifndef USE_STDLIB_H
4042
#include <malloc.h>
4143
#endif
4244
#include <stdio.h>
4345
#include <math.h>
44-
#include "config.h"
45-
#include "porting.h"
4646
#include "date.h"
4747
#include "mathops.h"
4848
#include "dist.h"

tools/dist.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
#include <stdio.h>
3939
#include <fcntl.h>
4040
#include <assert.h>
41-
#include <malloc.h>
4241
#ifdef WIN32
4342
#include <io.h>
4443
#include <stdlib.h>

tools/makefile

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,18 @@
3838
################
3939
## TARGET OS HERE
4040
################
41-
# OS Values: AIX, LINUX, SOLARIS, NCR, HPUX
42-
OS = LINUX
41+
# OS Values: AIX, LINUX, SOLARIS, NCR, HPUX, MACOS
42+
OS = LINUX
4343
###########
4444
# No changes should be necessary below this point
4545
# Each compile variable is adjusted for the target platform using the OS setting above
4646
###########
4747
# CC
4848
AIX_CC = xlC
4949
HPUX_CC = gcc
50-
LINUX_CC = gcc
50+
LINUX_CC = gcc
5151
NCR_CC = cc
52+
MACOS_CC = gcc
5253
SOLARIS_CC = gcc
5354
SOL86_CC = cc
5455
CC = $($(OS)_CC)
@@ -57,31 +58,35 @@ AIX_CFLAGS = -q64 -O3 -D_LARGE_FILES
5758
HPUX_CFLAGS = -O3 -Wall
5859
LINUX_CFLAGS = -g -Wall
5960
NCR_CFLAGS = -g
61+
MACOS_CFLAGS = -g -Wall
6062
SOLARIS_CFLAGS = -O3 -Wall
6163
SOL86_CFLAGS = -O3
62-
BASE_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DYYDEBUG #-maix64 -DMEM_TEST
64+
BASE_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DYYDEBUG #-maix64 -DMEM_TEST
6365
CFLAGS = $(BASE_CFLAGS) -D$(OS) $($(OS)_CFLAGS)
6466
# EXE
65-
AIX_EXE =
67+
AIX_EXE =
6668
HPUX_EXE =
6769
LINUX_EXE =
6870
NCR_EXE =
71+
MACOS_EXE =
6972
SOLARIS_EXE =
7073
SOL86_EXE =
71-
EXE = $($(OS)_EXE)
74+
EXE = $($(OS)_EXE)
7275
# LEX
7376
AIX_LEX = flex
7477
HPUX_LEX = flex
7578
LINUX_LEX = lex
7679
NCR_LEX = lex
80+
MACOS_LEX = lex
7781
SOLARIS_LEX = lex
7882
SOL86_LEX = lex
79-
LEX = $($(OS)_LEX)
83+
LEX = $($(OS)_LEX)
8084
# LIBS
8185
AIX_LIBS = -lm
8286
HPUX_LIBS = -lm -ll
8387
LINUX_LIBS = -lm
8488
NCR_LIBS = -lm -lc89
89+
MACOS_LIBS = -lm
8590
SOLARIS_LIBS = -ly -ll -lm
8691
SOL86_LIBS = -ly -ll -lm
8792
LIBS = $($(OS)_LIBS)
@@ -90,6 +95,7 @@ AIX_YACC = yacc
9095
HPUX_YACC = bison -y
9196
LINUX_YACC = yacc
9297
NCR_YACC = yacc
98+
MACOS_YACC = yacc
9399
SOLARIS_YACC = yacc
94100
SOL86_YACC = yacc
95101
YACC = $($(OS)_YACC)
@@ -98,6 +104,7 @@ AIX_YFLAGS = -d -v
98104
HPUX_YFLAGS = -y -d -v
99105
LINUX_YFLAGS = -d -v
100106
NCR_YFLAGS = -d -v
107+
MACOS_YFLAGS = -d -v
101108
SOLARIS_YFLAGS = -d -v
102109
SOL86_YFLAGS = -d -v
103110
YFLAGS = $($(OS)_YFLAGS)
@@ -221,7 +228,7 @@ TESTS = tests/*.sh tests/*.sql
221228
ANS = answer_sets/*.ans
222229
QUERY_SRC = $(FQD) $(VARIANTS)
223230
TREE_DOC =
224-
JUNK = tags *.idx columns.h streams.h y.tab.h y.tab.c tokenizer.c \
231+
JUNK = tags *.idx columns.h streams.h tables.h y.tab.h y.tab.c tokenizer.c \
225232
y.output .ctags_updated tpcds.idx.h
226233
DBGENSRC = $(SRC) $(HDR) $(OTHER) $(DOC) $(DDL) $(IDXSRC) $(WIN_MAKE) $(QUERY_SRC) $(TESTS) $(ANS)
227234
GENERATED = tables.h streams.h columns.h
@@ -250,10 +257,10 @@ clean:
250257
current_source:
251258
cvs update
252259
depend: $(SRC) $(HDR)
253-
touch columns.h streams.h
260+
touch columns.h streams.h tables.h
254261
-makedepend -f Makefile.suite -Y -- $(CFLAGS) -- $(SRC) 2> /dev/null
255262
date > .depend_updated
256-
rm -f columns.h streams.h
263+
rm -f columns.h streams.h tables.h
257264
lint:
258265
lint $(CFLAGS) -u -x -wO -p $(SRC1)
259266
lint $(CFLAGS) -u -x -wO -p $(SRC2)

0 commit comments

Comments
 (0)