Code Monkey home page Code Monkey logo

Comments (1)

tangenta avatar tangenta commented on June 2, 2024

The problem is that privilege check on system table mysql is failed:

if !pm.RequestVerificationWithUser(v.db, v.table, v.column, v.privilege, tableInfo.View.Definer) {

When I check the value of tableInfo.View.Definer, it comes to be ''@'', which is not maintained by privilege manager. It will absolutely fail the check.

Since tidb_mdl_view is created during cluster initialization, no user is suitable to be View.Definer. So there is nothing wrong with ''@''.

#48728 changed the definition of tidb_mdl_view. Previously, we joined three system tables from information_schema:

FROM information_schema.ddl_jobs,
    information_schema.cluster_tidb_trx,
    information_schema.cluster_processlist

After #48728, they become

FROM mysql.tidb_ddl_job
    mysql.tidb_mdl_info,
    information_schema.cluster_tidb_trx

RequestVerificationWithUser() skips all checks related to information_schema:

// Skip check for INFORMATION_SCHEMA database.
// See https://dev.mysql.com/doc/refman/5.7/en/information-schema.html
if strings.EqualFold(db, "INFORMATION_SCHEMA") {
return true
}

When it is changed to mysql, the problem occurs.

from tidb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.