Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 2582a2e

Browse files
authored
Merge branch 'master' into fix-create-index
2 parents 634e58c + 828dd50 commit 2582a2e

File tree

15 files changed

+65
-88
lines changed

15 files changed

+65
-88
lines changed

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pipeline {
119119
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
120120
// sh 'python ./script/validators/source_validator.py'
121121
// sh 'mkdir build'
122-
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
122+
// sh 'cd build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
123123
// }
124124
// }
125125

@@ -129,7 +129,7 @@ pipeline {
129129
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
130130
// sh 'python ./script/validators/source_validator.py'
131131
// sh 'mkdir build'
132-
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
132+
// sh 'cd build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
133133
// }
134134
// }
135135

script/docker/fedora27/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN dnf -q -y install sudo
66

77
RUN /bin/bash -c "source ./peloton/script/installation/packages.sh"
88

9-
RUN mkdir /peloton/build && cd /peloton/build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4 && make install
9+
RUN mkdir /peloton/build && cd /peloton/build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4 && make install
1010

1111
ENV PATH=$(BUILD_DIR)/bin:$PATH
1212
ENV LD_LIBRARY_PATH=$(BUILD_DIR)/lib:$LD_LIBRARY_PATH

script/docker/fedora27/Dockerfile-jenkins

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ RUN dnf -q -y install sudo clang
77
RUN /bin/bash -c "source ./peloton/script/installation/packages.sh"
88

99
RUN echo -n "Peloton Debug build with "; g++ --version | head -1
10-
RUN mkdir /peloton/build && cd /peloton/build && cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4 && make install
10+
RUN mkdir /peloton/build && cd /peloton/build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4 && make install
1111

1212
RUN echo -n "Peloton Release build with "; g++ --version | head -1
13-
RUN rm -rf /peloton/build && mkdir /peloton/build && cd /peloton/build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4 && make install
13+
RUN rm -rf /peloton/build && mkdir /peloton/build && cd /peloton/build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4 && make install
1414

1515
RUN echo -n "Peloton Debug build with "; clang++ --version | head -1
16-
RUN rm -rf /peloton/build && mkdir /peloton/build && cd /peloton/build && CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4 && make install
16+
RUN rm -rf /peloton/build && mkdir /peloton/build && cd /peloton/build && PATH=/usr/lib64/llvm4.0/bin:$PATH CC=clang CXX=clang++ cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4 && make install
1717

1818
RUN echo -n "Peloton Release build with "; clang++ --version | head -1
19-
RUN rm -rf /peloton/build && mkdir /peloton/build && cd /peloton/build && CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4 && make install
19+
RUN rm -rf /peloton/build && mkdir /peloton/build && cd /peloton/build && PATH=/usr/lib64/llvm4.0/bin:$PATH CC=clang CXX=clang++ cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4 && make install

script/installation/packages.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ elif [ "$DISTRO" = "DEBIAN OS" ]; then
136136
## FEDORA
137137
## ------------------------------------------------
138138
elif [[ "$DISTRO" == *"FEDORA"* ]]; then
139+
case $DISTRO_VER in
140+
26) LLVM="llvm";;
141+
*) LLVM="llvm4.0";;
142+
esac
143+
139144
sudo dnf -q install -y \
140145
git \
141146
gcc-c++ \
@@ -153,9 +158,9 @@ elif [[ "$DISTRO" == *"FEDORA"* ]]; then
153158
lcov \
154159
libpqxx-devel \
155160
libpqxx \
156-
llvm \
157-
llvm-devel \
158-
llvm-static \
161+
${LLVM} \
162+
${LLVM}-devel \
163+
${LLVM}-static \
159164
libedit-devel \
160165
postgresql \
161166
libatomic

src/binder/bind_node_visitor.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ void BindNodeVisitor::Visit(parser::CreateStatement *node) {
175175
}
176176
void BindNodeVisitor::Visit(parser::InsertStatement *node) {
177177
node->TryBindDatabaseName(default_database_name_);
178+
context_ = std::make_shared<BinderContext>(nullptr);
179+
context_->AddRegularTable(node->GetDatabaseName(), node->GetTableName(),
180+
node->GetTableName(), txn_);
178181
if (node->select != nullptr) {
179182
node->select->Accept(this);
180183
}

src/include/common/exception.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ enum class ExceptionType {
5757
CONNECTION = 21, // connection related
5858
SYNTAX = 22, // syntax related
5959
SETTINGS = 23, // settings related
60-
BINDER = 24, // settings related
60+
BINDER = 24, // settings related
6161
NETWORK = 25
6262
};
6363

@@ -71,8 +71,8 @@ class Exception : public std::runtime_error {
7171
Exception(ExceptionType exception_type, std::string message)
7272
: std::runtime_error(message), type(exception_type) {
7373
exception_message_ = "Exception Type :: " +
74-
ExceptionTypeToString(exception_type) +
75-
"\nMessage :: " + message;
74+
ExceptionTypeToString(exception_type) +
75+
"\nMessage :: " + message;
7676
}
7777

7878
std::string ExceptionTypeToString(ExceptionType type) {
@@ -199,7 +199,7 @@ class Exception : public std::runtime_error {
199199
}
200200
}
201201

202-
friend std::ostream& operator<<(std::ostream& os, const Exception& e);
202+
friend std::ostream &operator<<(std::ostream &os, const Exception &e);
203203

204204
private:
205205
// type
@@ -432,8 +432,9 @@ class ConnectionException : public Exception {
432432
class NetworkProcessException : public Exception {
433433
NetworkProcessException() = delete;
434434

435-
public:
436-
NetworkProcessException(std::string msg) : Exception(ExceptionType::NETWORK, msg) {}
435+
public:
436+
NetworkProcessException(std::string msg)
437+
: Exception(ExceptionType::NETWORK, msg) {}
437438
};
438439

439440
class SettingsException : public Exception {

src/include/settings/settings.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ SETTING_bool(ssl, "Enable SSL connection (default: true)", true, false, false)
4747
// The same applies to certificate file
4848
SETTING_string(private_key_file,
4949
"path to private key file",
50-
"server.key",
50+
"peloton_insecure_server.key",
5151
false, false)
5252

5353
// Peloton certificate file
5454
SETTING_string(certificate_file,
5555
"path to certificate file",
56-
"server.crt",
56+
"peloton_insecure_server.crt",
5757
false, false)
5858

5959
// Peloton root certificate file

src/network/peloton_server.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,10 @@
66
//
77
// Identification: src/network/peloton_server.cpp
88
//
9-
// Copyright (c) 2015-2017, Carnegie Mellon University Database Group
9+
// Copyright (c) 2015-2018, Carnegie Mellon University Database Group
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
//===----------------------------------------------------------------------===//
14-
//
15-
// Peloton
16-
//
17-
// peloton_server.cpp
18-
//
19-
// Identification: src/network/peloton_server.cpp
20-
//
21-
// Copyright (c) 2015-17, Carnegie Mellon University Database Group
22-
//
23-
//===----------------------------------------------------------------------===//
2413
#include "event2/thread.h"
2514
#include <fstream>
2615

0 commit comments

Comments
 (0)