同步操作将从 mirrors_cmu-db/bustub 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
BusTub is a relational database management system built at Carnegie Mellon University for the Introduction to Database Systems (15-445/645) course. This system was developed for educational purposes and should not be used in production environments.
WARNING: IF YOU ARE A STUDENT IN THE CLASS, DO NOT DIRECTLY FORK THIS REPO. DO NOT PUSH PROJECT SOLUTIONS PUBLICLY. THIS IS AN ACADEMIC INTEGRITY VIOLATION AND CAN LEAD TO GETTING YOUR DEGREE REVOKED, EVEN AFTER YOU GRADUATE.
The following instructions are adapted from the Github documentation on duplicating a repository. The procedure below walks you through creating a private BusTub repository that you can use for development.
bustub-private
) and select Private for the repository visibility level.$ git clone --bare https://github.com/cmu-db/bustub.git bustub-public
student
and your repository name is bustub-private
. The procedure for mirroring the repository is then:
$ cd bustub-public
# If you pull / push over HTTPS
$ git push --mirror https://github.com/student/bustub-private.git
# If you pull / push over SSH
$ git push --mirror git@github.com:student/bustub-private.git
$ cd ..
$ rm -rf bustub-public
# If you pull / push over HTTPS
$ git clone https://github.com/student/bustub-private.git
# If you pull / push over SSH
$ git clone git@github.com:student/bustub-private.git
$ git remote add public https://github.com/cmu-db/bustub.git
$ git remote -v
origin https://github.com/student/bustub-private.git (fetch)
origin https://github.com/student/bustub-private.git (push)
public https://github.com/cmu-db/bustub.git (fetch)
public https://github.com/cmu-db/bustub.git (push)
$ git pull public master
We suggest working on your projects in separate branches. If you do not understand how Git branches work, learn how. If you fail to do this, you might lose all your work at some point in the semester, and nobody will be able to help you.
To ensure that you have the proper packages on your machine, run the following script to automatically install them:
$ sudo build_support/packages.sh
Then run the following commands to build the system:
$ mkdir build
$ cd build
$ cmake ..
$ make
If you want to compile the system in debug mode, pass in the following flag to cmake: Debug mode:
$ cmake -DCMAKE_BUILD_TYPE=Debug ..
$ make
This enables AddressSanitizer, which can generate false positives for overflow on STL containers. If you encounter this, define the environment variable ASAN_OPTIONS=detect_container_overflow=0
.
If you are using Windows 10, you can use the Windows Subsystem for Linux (WSL) to develop, build, and test Bustub. All you need is to Install WSL. You can just choose "Ubuntu" (no specific version) in Microsoft Store. Then, enter WSL and follow the above instructions.
If you are using CLion, it also works with WSL.
$ cd build
$ make check-tests
If you have trouble getting cmake or make to run, an easy solution is to create a virtual container to build in. There are two options available:
First, make sure you have Vagrant and Virtualbox installed
$ sudo apt update
$ sudo apt install vagrant virtualbox
From the repository directory, run this command to create and start a Vagrant box:
$ vagrant up
This will start a Vagrant box running Ubuntu 20.02 in the background with all the packages needed. To access it, type
$ vagrant ssh
to open a shell within the box. You can find Bustub's code mounted at /bustub
and run the commands mentioned above like normal.
First, make sure that you have docker installed:
$ sudo apt update
$ sudo apt install docker
From the repository directory, run these commands to create a Docker image and container:
$ docker build . -t bustub
$ docker create -t -i --name bustub -v $(pwd):/bustub bustub bash
This will create a Docker image and container. To run it, type:
$ docker start -a -i bustub
to open a shell within the box. You can find Bustub's code mounted at /bustub
and run the commands mentioned above like normal.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。