Skip to content

Commit

Permalink
revert: "Add MySQL implementation (#803)" (#807)
Browse files Browse the repository at this point in the history
This reverts commit 98710d8.
  • Loading branch information
johanandren authored Mar 21, 2024
1 parent 94ec2a7 commit 423e206
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import akka.persistence.jdbc.config.DurableStateTableConfiguration
lazy val sequenceNextValUpdater = slickProfileToSchemaType(profile) match {
case "H2" => new H2SequenceNextValUpdater(profile, durableStateTableCfg)
case "Postgres" => new PostgresSequenceNextValUpdater(profile, durableStateTableCfg)
case "MySQL" => new MySQLSequenceNextValUpdater(profile, durableStateTableCfg)
case _ => ???
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,3 @@ import slick.sql.SqlStreamingAction

def getSequenceNextValueExpr() = sql"""#$nextValFetcher""".as[String]
}

/**
* INTERNAL API
*/
@InternalApi private[jdbc] class MySQLSequenceNextValUpdater(
profile: JdbcProfile,
val durableStateTableCfg: DurableStateTableConfiguration)
extends SequenceNextValUpdater {
import profile.api._
private val schema = durableStateTableCfg.schemaName.map(n => s"'$n'").getOrElse("DATABASE()")
// Note: for actual MySQL servers (i.e. not MariaDB) the variable information_schema_stats_expiry should be set to zero.
final val nextValFetcher =
s"""(SELECT AUTO_INCREMENT FROM information_schema.tables WHERE table_name = '${durableStateTableCfg.tableName}' AND table_schema = ${schema})"""

def getSequenceNextValueExpr() = sql"""#$nextValFetcher""".as[String]
}

This file was deleted.

This file was deleted.

0 comments on commit 423e206

Please sign in to comment.