githubear / hustbase_2019 Goto Github PK
View Code? Open in Web Editor NEWHustBase DBMS Implementation(Almost Finished)
License: Apache License 2.0
HustBase DBMS Implementation(Almost Finished)
License: Apache License 2.0
Hello, 同学我也是华科计卓13级的,在读研,想重新做下这个课设回味一下。能不能给我邮箱发一份没有修改的的代码(就是还未补全的代码)。如果附上老师课程设计的说明的资料就更好了。 感谢 我的邮箱 [email protected]
虽然 页面管理模块已经是实现好的,但是我在看页面管理模块的时候,有一个地方不太理解,我怀疑是一个bug,想看看你的意见。
在 PF_Manager.cpp 中的 AllocateBlock函数中
if(bf_manager.frame[min].bDirty==true){ offset=(bf_manager.frame[min].page.pageNum)*sizeof(Page); if(_lseek(bf_manager.frame[min].fileDesc,offset,SEEK_SET)==offset-1) return PF_FILEERR; if(_write(bf_manager.frame[min].fileDesc,&(bf_manager.frame[min].page),sizeof(Page))!=sizeof(Page)) return PF_FILEERR; }
我不理解 为什么第一个if语句中 _lseek(bf_manager.frame[min].fileDesc,offset,SEEK_SET)==offset-1
才 return PF_FILEERR。 我觉的 应该是不等于 Offset 就应该 return PF_FILEERR
所以应该写成
if((_lseek(bf_manager.frame[min].fileDesc,offset,SEEK_SET)==offset)-1)
或者
if(_lseek(bf_manager.frame[min].fileDesc,offset,SEEK_SET)!=offset)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.