Posted by hswong3i on December 9, 2007 at 5:59am
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | database system |
| Category: | task |
| Priority: | critical |
| Assigned: | hswong3i |
| Status: | closed (won't fix) |
Issue Summary
database drivers are split into 3 section:
- common.mysql.inc and common.pgsql.inc: host shared function mysql, mysqli and pdo_mysql database engines. Most are related to queries syntax difference.
- schema.mysql.inc and schema.pgsql.inc: host Schema API. Split for simplify maintenance and upgrade.
- database.mysql.inc, database.mysqli.inc and database.pgsql.inc: host PHP driver specific functions.
Also come with some minor syntax sync between mysql and postgresql, and coding style cleanup.
P.S. The rearrangement is now applying to my personal research project, which is also suitable for D7 PDO development. BTW, no D7 specific changes are added to this patch.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| driver_cleanup-0.1.patch | 103.77 KB | Ignored: Check issue status. | None | None |
Comments
#1
I mark this into my personal research project issue.
#2
Patch reroll via latest CVS HEAD. Test without ill effect. Some additional changes:
#3
Patch reroll based on the change of #178523.
#4
#5
@catch: May I have some detail idea about why we need to postpone a code clean up and splitting ?_?
#6
107.36 KB and these.
#7
@catch: agree about the huge size. So I try to split it into 2 lightweight issues: http://drupal.org/node/202563 and http://drupal.org/node/202560, each include some simple file rename which should be more acceptable. I will update this issue once again when they are able to pass though, and the size of this issue will much reduce :-)
#8
Well I'll let someone else bump those to 7.x, not into fighting hydras.
#9
As Siren is not a project on Drupal.org but an unofficial fork, I am removing it from issue titles to avoid confusion.
#10
subscribe
#11
Since D7 is now open for public development, and this is the common base for most of the other DB API revamp handling, hope it is now the good timing for review this patch.
Patch reroll via latest CVS HEAD (7.x). Only coming with basic cut & paste handling, plus very minor essential change in db_version() of MySQL. I don't give any other syntax change nor clean up within this patch, so it should able to work as a reference point for further more development.
#12
Again a cut & paste update, plus very minor syntax clean up.
Also integrate chx's patch in http://drupal.org/node/212918#comment-739728
#13
Patch reroll via CVS HEAD, based on http://drupal.org/cvs?commit=102333
Please refer to http://groups.drupal.org/node/8907#drupal-7.x for detail of design.
#14
Thanks for the last patch.
It address the problem at the correct direction
#15
#16
We're working on PDO-ification of Drupal 7 -- this patch seems to be deprecated already? I'd prefer for the PDO work to land first.
Crell: any input on timeline?
#17
@Dires: I am totally agree about PDO + D7, and the use of PDO can simplify a lot of complicated programming logic, e.g. ibm_db2 vs pdo_ibm BLOB handling, pdo_sqlite for SQLIte v3 support, pdo_mysql for emulated prepare statement handling, etc. I have no point to deprecate the use of PDO.
BTW, the main focus of this patch is all about a split-brain handling, and this model have already been proved as function and logical with Moodle 1.7+ XMLDB and my personal research. After this split, we can handle our next generation DB API chances within common.*.inc or database.*.inc, or even on top of them as much higher level; but schema.*.inc should be isolated for a more elegant handling. This image should be a good refer for the overall idea: http://edin.no-ip.com/html/files/DrupalDBStack_D7_draft.png
#18
The code going on at http://drupal.org/node/225450 already includes schema manipulation split off to separate include files as part of the larger revamp. So yes, this is redundant.
@Dries: chx is working on making the installer play nice with the new setup even as I write this. Once that's done, we can roll a testable patch. The code itself is already in a publicly-accessible svn repo. See the issue above for the link.
#19
After an indeed review, I think this issues is not redundant.
Since http://drupal.org/node/225450 is a huge issue that even need to host with remote SVN service during development (well, just similar case as http://drupal.org/node/172541), we will need to split it as number of small issues for simple review and quality check. I think it is not a good habit to commit a huge patch without detail and indeed review; on the other hand, that is not our traditional approach, too.
So why don't we keep trace similar idea under single issue, or even commit current strict forward implementation before further more development? Starting from elegant should be much better :-)
P.S. Patch from #13 still apply to CVS HEAD.
#20
The file structure for the database drivers has now changed completely.