[vlc-commits] sql_media_library: add missing text indexes
Francois Cartegnie
git at videolan.org
Thu Sep 13 23:04:36 CEST 2012
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Sep 13 22:42:29 2012 +0200| [205fbb22bc4b70835c971bcecb365603f52e0434] | committer: Francois Cartegnie
sql_media_library: add missing text indexes
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=205fbb22bc4b70835c971bcecb365603f52e0434
---
modules/media_library/sql_media_library.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/media_library/sql_media_library.c b/modules/media_library/sql_media_library.c
index 1f17581..55546ea 100644
--- a/modules/media_library/sql_media_library.c
+++ b/modules/media_library/sql_media_library.c
@@ -801,6 +801,10 @@ int CreateEmptyDatabase( media_library_t *p_ml )
if( i_ret != VLC_SUCCESS )
goto quit_createemptydatabase;
+ i_ret = QuerySimple( p_ml, "CREATE INDEX album_title_index ON album (title);" );
+ if( i_ret != VLC_SUCCESS )
+ goto quit_createemptydatabase;
+
/* Add "unknown" entry to albums */
i_ret = QuerySimple( p_ml,
"INSERT INTO album ( id, title, cover, album_artist_id ) "
@@ -843,6 +847,10 @@ int CreateEmptyDatabase( media_library_t *p_ml )
if( i_ret != VLC_SUCCESS )
goto quit_createemptydatabase;
+ i_ret = QuerySimple( p_ml, "CREATE INDEX media_ui_index ON media (uri);" );
+ if( i_ret != VLC_SUCCESS )
+ goto quit_createemptydatabase;
+
/* People */
i_ret = QuerySimple( p_ml,
"CREATE TABLE people ( "
More information about the vlc-commits
mailing list