Plugin: MySQL database provider - better performance and no size limit for your MP2-MediaLibrary (2 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

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • 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

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • 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

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • 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

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • 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,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    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

    Users who are viewing this thread

    Top Bottom