Plugin: MySQL database provider - better performance and no size limit for your MP2-MediaLibrary (3 Viewers)

Valk

Portal Pro
February 25, 2006
302
108
Home Country
Australia Australia
Definitely a nice speed improvement on imports.

Sadly having an issue when trying to view videos in the client (only tried video so far).

It seems to work all the way up until you try and view the episodes of a show (movie or series).

Attached are the server and client logs (the interesting part is in the server log).

Code:
[2012-12-01 20:39:55,145] [391038 ] [23       ] [WARN ] - SOAPHandler: Error invoking UPnP action 'Search'
System.ArgumentException: The datatype 'Byte[]' is not supported as a DB datatype
   at MediaPortal.Backend.Services.Database.DBUtils.ReadSimpleDBValue(Type type, IDataReader reader, Int32 colIndex)
   at MediaPortal.Database.MySQL.MySQLDatabase.ReadDBValue(Type type, IDataReader reader, Int32 colIndex)
   at MediaPortal.Backend.Services.MediaLibrary.QueryEngine.CompiledMediaItemQuery.QueryList()
   at MediaPortal.Backend.Services.MediaLibrary.MediaLibrary.Search(MediaItemQuery query, Boolean filterOnlyOnline)
   at MediaPortal.Backend.Services.ClientCommunication.UPnPContentDirectoryServiceImpl.OnSearch(DvAction action, IList`1 inParams, IList`1& outParams, CallContext context)
   at UPnP.Infrastructure.Dv.DeviceTree.DvAction.FireActionInvoked(IList`1 inParams, IList`1& outParams, CallContext context)
   at UPnP.Infrastructure.Dv.DeviceTree.DvAction.InvokeAction(IList`1 inParameters, IList`1& outParameters, Boolean checkSignature, CallContext context)
   at UPnP.Infrastructure.Dv.SOAP.SOAPHandler.HandleRequest(DvService service, Stream messageStream, Encoding streamEncoding, Boolean subscriberSupportsUPnP11, CallContext context, String& result)

The server is run on my NAS running win2k12 std x64 and the shares are local (not that any of that should matter based on the error).

Oh and I just installed the latest stable MySQL 5.5 x64 binary.

Very stock setup, just installed the NAS and media portal 2 (with latest locally compiled dlna plugin) and the MySQL provider changes applied.
 

morpheus_xx

Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,752
    7,115
    Home Country
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #12
    Thanks, this issue needs to be fixes, it's only a "3 line" change. Will take care for it this weekend :)
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,752
    7,115
    Home Country
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #13
    Bug is fixed already (and it were only 2 lines :D). New DB plugin attached in first post (_v02). Thanks for reporting!
     

    Valk

    Portal Pro
    February 25, 2006
    302
    108
    Home Country
    Australia Australia
    Thanks works much better now. Still got a few general issues with mp2 but I'll try to identify the causes for those and submit bug reports when I have time.
     

    MaxMan23

    MP Donator
  • Premium Supporter
  • September 8, 2007
    380
    48
    Home Country
    Germany Germany
    Does it work with the NativeTVTest? I got an Error.

    System.TypeInitializationException: Der Typeninitialisierer für "Mediaportal.TV.Server.TVDatabase.EntityModel.ObjContext.ObjectContextManager" hat eine Ausnahme verursacht. ---> System.Configuration.ConfigurationErrorsException: Der registrierte .Net Framework-Datenprovider kann nicht gefunden bzw. geladen werden.
    bei System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
    bei System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
    bei System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
    bei System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
    bei System.Data.EntityClient.EntityConnection..ctor(String connectionString)
    bei System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString)
    bei System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)
    bei Mediaportal.TV.Server.TVDatabase.Entities.Model..ctor()
    bei Mediaportal.TV.Server.TVDatabase.EntityModel.ObjContext.ObjectContextManager..cctor()
    --- Ende der internen Ausnahmestapelüberwachung ---
    bei Mediaportal.TV.Server.TVLibrary.TvController.Init()
    bei Mediaportal.TV.Server.TVLibrary.TvServiceThread.DoStart()
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,752
    7,115
    Home Country
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #16
    You can get this to work, but you need to make small modifications. I've added instructions to the 1st post!

    The problem with NativeTv is, that it uses the EntityFramework in parallel to MP2-Servers DB-connection. For this issue we still try to find a common solution.
     

    MaxMan23

    MP Donator
  • Premium Supporter
  • September 8, 2007
    380
    48
    Home Country
    Germany Germany
    I changed all, but i got another error:

    [2012-12-04 16:48:21,070] [1759 ] [Main ] [ERROR] - PluginManager: Error building plugin item 'MySQLDatabase' at location '/Services'
    System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.IO.FileLoadException: Die Datei oder Assembly "MySql.Data, Version=6.6.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)
    bei MediaPortal.Database.MySQL.MySQLDatabase.ExecuteScalar(String command)
    bei MediaPortal.Database.MySQL.MySQLDatabase.CheckOrCreateDatabase(String databaseName)
    bei MediaPortal.Database.MySQL.MySQLDatabase..ctor()
    --- Ende der internen Ausnahmestapelüberwachung ---
    bei System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
    bei System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
    bei System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
    bei System.Activator.CreateInstance(Type type, Boolean nonPublic)
    bei System.Activator.CreateInstance(Type type)
    bei MediaPortal.Common.PluginManager.PluginRuntime.InstantiatePluginObject(String typeName)
    bei MediaPortal.Common.Services.PluginManager.Builders.ServiceBuilder.BuildItem(PluginItemMetadata itemData, PluginRuntime plugin)
    bei MediaPortal.Common.Services.PluginManager.PluginManager.RequestItem(PluginItemRegistration itemRegistration, Type type, IPluginItemStateTracker stateTracker)
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,752
    7,115
    Home Country
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #18
    First post got updated with a version for MP2 Alpha 1 Winter Release!

    To use it follow the instructions from first post, in principle it is enough to delete SQLCE and place this plugin into server folder. This version also works for new "MP2 NativeTv" test builds.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,330
    3,792
    Lehmden
    Home Country
    Germany Germany
    Country flag
    Hi.
    Tried MySQL Plugin with Alpha 2 Pre-Release. It did not work, server crashes. Crash- Logs attached.
    I wanted to try MySQL instead of SQLite to get not that much trouble when testing TVE3.5. Now I've switched back to SQLite again...
     

    Attachments

    • Crash_10.06.2013_1141.zip
      6.4 KB · Views: 115

    Users who are viewing this thread

    Similar threads

    It is looking and working very well now and I am almost at the point of switching my HTPC to MP2, madvr would definitely push me over the edge for sure.;)
    It is looking and working very well now and I am almost at the point of switching my HTPC to MP2, madvr would definitely push me...
    We are proud to present MediaPortal 2.3 MediaPortal 2.3 is a full-blown media center software that addresses the most common user...
    Replies
    4
    Views
    2K
    MP1 MP2 MediaPortal2-Buddy DE
    That’s what Lehmden said. Watched flags get migrated when updating to 2.2. Also a new plugin is almost finished to backup watched flags and restore later.
    That’s what Lehmden said. Watched flags get migrated when updating to 2.2. Also a new plugin is almost finished to backup watched...
    Hi. And here is another "Buddy"... Today's Buddy is "MediaPortal2-Buddy" (or short, MP2-Buddy), a tool to do some work around...
    Replies
    4
    Views
    9K
    Also being in the U.S. (Chicagoland) I would be very interested in knowing what you have or plan to work on... ATSC is a real pain for us and if you have the experience in making it easier, I am sure the other Dev's would love the help. Are you on ATCS, cable card, etc????
    Also being in the U.S. (Chicagoland) I would be very interested in knowing what you have or plan to work on... ATSC is a real pain...
    After having failed to create a plugin for MP1; rather than dive into it to figure out why I decided why not bring up mediaportal 2...
    Replies
    9
    Views
    2K
    We are proud to present MediaPortal 2.2 Pre-Release It has been some time since last release, but we were intensively working on the implementation of new features and some fundamental changes in the core of MediaPortal 2. As a result, we proudly present the next major release of MediaPortal 2 in version 2.2. MediaPortal 2.2 is a...
    We are proud to present MediaPortal 2.2 Pre-Release It has been some time since last release, but we were intensively working on...
    We are proud to present MediaPortal 2.2 Pre-Release It has been some time since last release, but we were intensively working on...
    Replies
    0
    Views
    3K
    Attention WMC skin users: a very minor optical bug got introduced that leads to some navigation buttons being permanently visible when playing TV. We will exchange the download version on SourceForge as soon as possible.
    Attention WMC skin users: a very minor optical bug got introduced that leads to some navigation buttons being permanently visible...
    The MP2 team is proud to present the release of MediaPortal 2.1.2 MediaPortal 2.1.2 is a full-blown media center software that...
    Replies
    1
    Views
    11K
    Top Bottom