Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
Zipr Toolchain
Commits
6a05b6a9
Commit
6a05b6a9
authored
13 years ago
by
an7s
Browse files
Options
Downloads
Patches
Plain Diff
Added utility function to dump all tables for the user
parent
85e3979a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitattributes
+1
-0
1 addition, 0 deletions
.gitattributes
tools/db/pdb_info
+1
-0
1 addition, 0 deletions
tools/db/pdb_info
tools/db/pdb_register
+14
-5
14 additions, 5 deletions
tools/db/pdb_register
with
16 additions
and
5 deletions
.gitattributes
+
1
−
0
View file @
6a05b6a9
...
...
@@ -44,6 +44,7 @@ examples/print_ptr.c -text
examples/recover_example.c -text
tools/db/pdb.create.tbl -text
tools/db/pdb.drop.tbl -text
tools/db/pdb_info -text
tools/db/pdb_register -text
tools/db/pdb_setup -text
tools/db/pdb_teardown -text
...
...
This diff is collapsed.
Click to expand it.
tools/db/pdb_info
0 → 100755
+
1
−
0
View file @
6a05b6a9
psql -c "\d"
This diff is collapsed.
Click to expand it.
tools/db/pdb_register
+
14
−
5
View file @
6a05b6a9
...
...
@@ -21,6 +21,11 @@ log_error()
exit 1
}
log_message()
{
echo "pdb_register: MESSAGE: $1"
}
#####################################################
if [ -z $PROGRAM_NAME ]; then
...
...
@@ -45,7 +50,9 @@ fi
MD5HASH=`md5sum $FILENAME | cut -f1 -d' '`
#============================================
# Update program_info table
#============================================
# -q: quiet mode
# -t: tuple only
...
...
@@ -60,16 +67,18 @@ fi
# Update original program id
psql -q -t -c "UPDATE program_info SET orig_program_id = '$PROGRAM_ID' WHERE program_id = '$PROGRAM_ID';"
#
# Update
program_
file_info table
#
#
============================================
# Update file_info table
#
============================================
FILE_ID=`psql -q -t -c "INSERT INTO file_info (url, arch, hash) VALUES ('$URL', '$ARCH', '$MD5HASH') RETURNING file_id;" | sed "s/^[ \t]*//"`
# Update original file id
psql -q -t -c "UPDATE file_info SET orig_file_id = '$FILE_ID' WHERE file_id = '$FILE_ID';"
#
log_message "To do: if shared libs, then need to add them to this table"
#============================================
# Update program_dependency table
#
#
============================================
FILE_ID=`psql -q -t -c "INSERT INTO program_dependency (program_id, file_id) VALUES ('$PROGRAM_ID', '$FILE_ID')"`
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment