-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BASE assumes that a set $use_referential_integrity conf var indicates presence of RI DB functionality.. #215
Comments
Code Cleanup. File(s): base_conf.php.dist : base_maintenance.php : includes/base_action.inc.php : setup/base_conf_contents.php Issue(s): #103 #212 #214 #215 Code Cleanup. File(s): includes/base_auth.inc.php Code Cleanup. File(s): includes/base_db.inc.php Issue(s): #103 #212 #214 #215 Added DB connection awarenes to multiple functions. This allows us to log transient DB connection errors. Code Cleanup. Function(s): baseisDBUp( LogError ) Returns true if DB connection is up, false otherwise. Optionally logs the connection error. : baseSetRI( State ) DB Referential Integrity (RI) Control. Enables / Disables RI on DB server software that supports it. Adding / removing the necessary RI structure to the DB. Respects the $use_referential_integrity conf var. : baseGetRI() Returns the RI status of the connected DB. : baseTSE( table ) Returns the MySQL/MariaDB storage engine of the requested table, empty string otherwise. File(s): includes/base_krnl.php Bumped Kernel Version to 0.0.7 Code Cleanup. Function(s): function VS2SV( VS ) Returns Semantic Version Array determined from supplied Version string, false if unsucessful. File(s): includes/base_rtl.php Bumped Kernel Version to 0.0.11 Code Cleanup. Function(s): function VS2SV( VS ) Returns Semantic Version Array determined from supplied Version string, false if unsucessful. File(s): sql/create_snort_tbls_*.sql Added DB creation scripts from the SNORT project. Schema 107 Now it is possible to manually initialize the entire DB from a BASE snapshot. File(s): sql/disable_RI*.sql Scripts to manually disable RI in the DB. Unit Test(s): Covers the following in the baseCon Class baseisDBUp() baseSetRI() baseGetRI() baseTSE()
I need some clarification on this added and updated feature: On an existing or new DB if I set BASE to $use_referential_integrity = 1 will BASE add the RI tables to the DB? |
That's the idea, if the DB server can support it, it enables RI when set. However, I WOULD NOT deploy what is currently in devel into the wild yet. Thank God I built Unit Tests around this, when it hit travis-CI, it went off the rails and is a train wreck. We are currently having issues with the RI structure verification code on PostgreSQL and RI structure teardown on MySQL which does things just a "little bit" differently than MariaDB. The PostgreSQL issue is the one I'm working on right now, because on PostgreSQL, enabling RI will crash BASE with this feature. 💩 🔥 🧯 🚒 😄 |
I'm confused, but that doesn't take much :) Would you feel comfortable putting out the one listed in the "Master" release to the wild or should the last version released by secureideas be used? I'm assuming that the Master is the last PHP7 compatible version? |
Code Cleanup. File(s): includes/base_db.inc.php Function(s): baseFKeyExists( $key ) Returns true if RI is enabled and the RI Foreign Key exists in the DB structure, false otherwise. Unit Test(s): Covers the following in the baseCon Class baseFKeyExists()
The code in master is OK. The code in devel is all the work around getting RI working on MySQL/ MariaDB, and making sure that even if the end user sets
There are no plans to drop PHP 7x compatibility. |
Good news, the last commit to devel passed CI checks. I'll go over the RI stuff again, sorry about the confusion earlier. Classic BASE 'secureideas' behavior.
New BASE behavior.
Hope that clarifies things for you. 😄 |
Sorry, the Master has no PHP 8 code included, or does it? Is the Master what we call stable? |
As far as I know master will work with PHP 5x or earlier through PHP 8x. When a PHP forward compatibility bug, ( PHP 7x or 8x breakage ), gets fixed, I try to find a way of doing it that does not break backwards compatibility ( PHP 5x or earlier ).
It is more stable than devel, although at times mistakes get merged into master, eg. #194 |
Expected Behavior:
BASE ONLY uses RI functionality when it is in the DB.
Current Behavior:
BASE assumes that a set
$use_referential_integrity
conf var indicates presence of RI DB functionality..The text was updated successfully, but these errors were encountered: