maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #07565
Re: [Commits] 00ed367: MDEV-4262 - P_S discovery
Hi, Sergey!
On Jul 22, Sergey Vojtovich wrote:
> >
> > > diff --git a/scripts/mysql_performance_tables.sql b/scripts/mysql_performance_tables.sql
> > > index d495578..3061603 100644
> > > --- a/scripts/mysql_performance_tables.sql
> > > +++ b/scripts/mysql_performance_tables.sql
> > > @@ -53,1427 +53,3 @@ SET @str = IF(@broken_pfs = 0, @cmd, 'SET @dummy = 0');
> > > PREPARE stmt FROM @str;
> > > EXECUTE stmt;
> > > DROP PREPARE stmt;
> >
> > Why did you keep the above? I'd think that a simple
> >
> > DROP DATABASE IF EXISTS performance_schema
> >
> > should be enough to replace the whole file.
> > And it could be moved back to mysql_system_tables.sql,
> > so this file could be completely removed.
> I thought we can't discover database name and it needs to be created manually.
> But if you say it is possible: I'll try it.
> There are also additional checks that would prevent dropping P_S database if
> there are non-PFS tables/views/events/routines. Should we abandon these checks
> too?
I'm not sure. P_S doesn't allow anyone to create table in the P_S
database. But yes, one can copy files manually. So, the options are
1. db is not needed, don't preserve files:
DROP DATABASE IF EXISTS performance_schema
2. db is needed, don't preserve files:
DROP DATABASE IF EXISTS performance_schema
CREATE DATABASE performance_schema
3. preserve files:
CREATE DATABASE IF NOT EXISTS performance_schema
Either way, there's no need to do any IF's and checks.
I tend to agree, it's better to preserve user's files (and other
objects) in P_S.
> > > diff --git a/storage/perfschema/pfs_engine_table.cc b/storage/perfschema/pfs_engine_table.cc
> > > index 958a2bd..6f0a363 100644
> > > --- a/storage/perfschema/pfs_engine_table.cc
> > > +++ b/storage/perfschema/pfs_engine_table.cc
> > > @@ -1440,5 +1319,17 @@ end:
> > > DBUG_RETURN(false);
> > > }
> > >
> > > +int pfs_discover_table_names(handlerton *hton, LEX_STRING *db,
> > > + MY_DIR *dir,
> >
> > hm, no "unused argument" compiler warnings? okay...
> Strange indeed. It was compiled like:
> cmake -DCMAKE_BUILD_TYPE=Debug -DMYSQL_MAINTAINER_MODE=ON && make
>
> It adds -Wno-unused-parameter gcc flag. Same flag seem to be added in release
> builds. Did we decide not to hunt for unused arguments?
Seems like this was done in 5.5 by Oracle in 2010
> > > diff --git a/storage/perfschema/table_file_summary.cc b/storage/perfschema/table_file_summary.cc
> > > deleted file mode 100644
> > > index 104fa0f..0000000
> > > --- a/storage/perfschema/table_file_summary.cc
> > > +++ /dev/null
> > > @@ -1,372 +0,0 @@
> >
> > Why did you remove this file?
> It had file_summary_by_event_name and file_summary_by_instance which were moved
> to table_file_summary_by_event_name.cc and table_file_summary_by_instance.cc.
>
> Otherwise it wasn't even listed in CMakeLists.txt.
Yes, I've noticed that you only removed pfs_check.cc from
CMakeLists.txt, that was also puzzling. Okay then.
Regards,
Sergei
Follow ups
References