Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 315963 Details for
Bug 461403
Index tables after loading data
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Create indexes with IF NOT EXISTS
0003-Create-indexes-with-IF-NOT-EXISTS.patch (text/plain), 3.78 KB, created by
Ville Skyttä
on 2008-09-07 10:55:26 UTC
(
hide
)
Description:
Create indexes with IF NOT EXISTS
Filename:
MIME Type:
Creator:
Ville Skyttä
Created:
2008-09-07 10:55:26 UTC
Size:
3.78 KB
patch
obsolete
>From b1f527e7bdd0cdd84aa407722cac57b89aac9f71 Mon Sep 17 00:00:00 2001 >From: =?utf-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi> >Date: Sun, 7 Sep 2008 11:44:11 +0300 >Subject: [PATCH] Create indexes with IF NOT EXISTS. > >--- > db.c | 20 ++++++++++---------- > 1 files changed, 10 insertions(+), 10 deletions(-) > >diff --git a/db.c b/db.c >index 59fad0e..a6af904 100644 >--- a/db.c >+++ b/db.c >@@ -420,7 +420,7 @@ yum_db_index_primary_tables (sqlite3 *db, GError **err) > int rc; > const char *sql; > >- sql = "CREATE INDEX packagename ON packages (name)"; >+ sql = "CREATE INDEX IF NOT EXISTS packagename ON packages (name)"; > rc = sqlite3_exec (db, sql, NULL, NULL, NULL); > if (rc != SQLITE_OK) { > g_set_error (err, YUM_DB_ERROR, YUM_DB_ERROR, >@@ -429,7 +429,7 @@ yum_db_index_primary_tables (sqlite3 *db, GError **err) > return; > } > >- sql = "CREATE INDEX packageId ON packages (pkgId)"; >+ sql = "CREATE INDEX IF NOT EXISTS packageId ON packages (pkgId)"; > rc = sqlite3_exec (db, sql, NULL, NULL, NULL); > if (rc != SQLITE_OK) { > g_set_error (err, YUM_DB_ERROR, YUM_DB_ERROR, >@@ -438,7 +438,7 @@ yum_db_index_primary_tables (sqlite3 *db, GError **err) > return; > } > >- sql = "CREATE INDEX filenames ON files (name)"; >+ sql = "CREATE INDEX IF NOT EXISTS filenames ON files (name)"; > rc = sqlite3_exec (db, sql, NULL, NULL, NULL); > if (rc != SQLITE_OK) { > g_set_error (err, YUM_DB_ERROR, YUM_DB_ERROR, >@@ -450,8 +450,8 @@ yum_db_index_primary_tables (sqlite3 *db, GError **err) > const char *deps[] = { "requires", "provides", "conflicts", "obsoletes", NULL }; > int i; > >- const char *pkgindexsql = "CREATE INDEX pkg%s on %s (pkgKey)"; >- const char *nameindexsql = "CREATE INDEX %sname ON %s (name)"; >+ const char *pkgindexsql = "CREATE INDEX IF NOT EXISTS pkg%s on %s (pkgKey)"; >+ const char *nameindexsql = "CREATE INDEX IF NOT EXISTS %sname ON %s (name)"; > > for (i = 0; deps[i]; i++) { > char *query; >@@ -711,7 +711,7 @@ yum_db_index_filelist_tables (sqlite3 *db, GError **err) > int rc; > const char *sql; > >- sql = "CREATE INDEX keyfile ON filelist (pkgKey)"; >+ sql = "CREATE INDEX IF NOT EXISTS keyfile ON filelist (pkgKey)"; > rc = sqlite3_exec (db, sql, NULL, NULL, NULL); > if (rc != SQLITE_OK) { > g_set_error (err, YUM_DB_ERROR, YUM_DB_ERROR, >@@ -720,7 +720,7 @@ yum_db_index_filelist_tables (sqlite3 *db, GError **err) > return; > } > >- sql = "CREATE INDEX pkgId ON packages (pkgId)"; >+ sql = "CREATE INDEX IF NOT EXISTS pkgId ON packages (pkgId)"; > rc = sqlite3_exec (db, sql, NULL, NULL, NULL); > if (rc != SQLITE_OK) { > g_set_error (err, YUM_DB_ERROR, YUM_DB_ERROR, >@@ -729,7 +729,7 @@ yum_db_index_filelist_tables (sqlite3 *db, GError **err) > return; > } > >- sql = "CREATE INDEX dirnames ON filelist (dirname)"; >+ sql = "CREATE INDEX IF NOT EXISTS dirnames ON filelist (dirname)"; > rc = sqlite3_exec (db, sql, NULL, NULL, NULL); > if (rc != SQLITE_OK) { > g_set_error (err, YUM_DB_ERROR, YUM_DB_ERROR, >@@ -893,7 +893,7 @@ yum_db_index_other_tables (sqlite3 *db, GError **err) > int rc; > const char *sql; > >- sql = "CREATE INDEX keychange ON changelog (pkgKey)"; >+ sql = "CREATE INDEX IF NOT EXISTS keychange ON changelog (pkgKey)"; > rc = sqlite3_exec (db, sql, NULL, NULL, NULL); > if (rc != SQLITE_OK) { > g_set_error (err, YUM_DB_ERROR, YUM_DB_ERROR, >@@ -902,7 +902,7 @@ yum_db_index_other_tables (sqlite3 *db, GError **err) > return; > } > >- sql = "CREATE INDEX pkgId ON packages (pkgId)"; >+ sql = "CREATE INDEX IF NOT EXISTS pkgId ON packages (pkgId)"; > rc = sqlite3_exec (db, sql, NULL, NULL, NULL); > if (rc != SQLITE_OK) { > g_set_error (err, YUM_DB_ERROR, YUM_DB_ERROR, >-- >1.5.5.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 461403
:
315962
| 315963