Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Big pass through for standardization and easy generation of a single …
Browse files Browse the repository at this point in the history
…integration file

* The formatting for all comments has been standardized on -- line comments. C-style /* comments */ have been removed
* Each object has been created within it's own file. No longer do x$ views live with their non-x$ counterparts
* Various formatting issues
  • Loading branch information
MarkLeith committed Jan 9, 2015
1 parent a871455 commit 9c5c6f8
Show file tree
Hide file tree
Showing 144 changed files with 5,708 additions and 4,950 deletions.
28 changes: 14 additions & 14 deletions after_setup.sql
Original file line number Original file line Diff line number Diff line change
@@ -1,16 +1,16 @@
/* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -- Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
--
This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. -- the Free Software Foundation; version 2 of the License.
--
This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. -- GNU General Public License for more details.
--
You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


SET @@sql_log_bin = @sql_log_bin; SET @@sql_log_bin = @sql_log_bin;
33 changes: 17 additions & 16 deletions functions/extract_schema_from_file_name.sql
Original file line number Original file line Diff line number Diff line change
@@ -1,17 +1,17 @@
/* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -- Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
--
This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. -- the Free Software Foundation; version 2 of the License.
--
This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. -- GNU General Public License for more details.
--
You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


DROP FUNCTION IF EXISTS extract_schema_from_file_name; DROP FUNCTION IF EXISTS extract_schema_from_file_name;


Expand Down Expand Up @@ -59,7 +59,8 @@ CREATE DEFINER='root'@'localhost' FUNCTION extract_schema_from_file_name (
SQL SECURITY INVOKER SQL SECURITY INVOKER
DETERMINISTIC DETERMINISTIC
NO SQL NO SQL
BEGIN
RETURN LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REPLACE(path, '\\', '/'), '/', -2), '/', 1), 64); RETURN LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REPLACE(path, '\\', '/'), '/', -2), '/', 1), 64);
$$ END$$


DELIMITER ; DELIMITER ;
31 changes: 16 additions & 15 deletions functions/extract_table_from_file_name.sql
Original file line number Original file line Diff line number Diff line change
@@ -1,17 +1,17 @@
/* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -- Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
--
This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. -- the Free Software Foundation; version 2 of the License.
--
This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. -- GNU General Public License for more details.
--
You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


DROP FUNCTION IF EXISTS extract_table_from_file_name; DROP FUNCTION IF EXISTS extract_table_from_file_name;


Expand Down Expand Up @@ -55,7 +55,8 @@ CREATE DEFINER='root'@'localhost' FUNCTION extract_table_from_file_name (
SQL SECURITY INVOKER SQL SECURITY INVOKER
DETERMINISTIC DETERMINISTIC
NO SQL NO SQL
BEGIN
RETURN LEFT(SUBSTRING_INDEX(REPLACE(SUBSTRING_INDEX(REPLACE(path, '\\', '/'), '/', -1), '@0024', '$'), '.', 1), 64); RETURN LEFT(SUBSTRING_INDEX(REPLACE(SUBSTRING_INDEX(REPLACE(path, '\\', '/'), '/', -1), '@0024', '$'), '.', 1), 64);
$$ END$$


DELIMITER ; DELIMITER ;
30 changes: 15 additions & 15 deletions functions/format_bytes.sql
Original file line number Original file line Diff line number Diff line change
@@ -1,17 +1,17 @@
/* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -- Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
--
This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. -- the Free Software Foundation; version 2 of the License.
--
This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. -- GNU General Public License for more details.
--
You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


DROP FUNCTION IF EXISTS format_bytes; DROP FUNCTION IF EXISTS format_bytes;


Expand Down Expand Up @@ -77,6 +77,6 @@ BEGIN
ELSEIF bytes >= 1024 THEN RETURN CONCAT(ROUND(bytes / 1024, 2), ' KiB'); ELSEIF bytes >= 1024 THEN RETURN CONCAT(ROUND(bytes / 1024, 2), ' KiB');
ELSE RETURN CONCAT(bytes, ' bytes'); ELSE RETURN CONCAT(bytes, ' bytes');
END IF; END IF;
END $$ END$$


DELIMITER ; DELIMITER ;
30 changes: 15 additions & 15 deletions functions/format_path.sql
Original file line number Original file line Diff line number Diff line change
@@ -1,17 +1,17 @@
/* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -- Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
--
This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. -- the Free Software Foundation; version 2 of the License.
--
This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. -- GNU General Public License for more details.
--
You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


DROP FUNCTION IF EXISTS format_path; DROP FUNCTION IF EXISTS format_path;


Expand Down Expand Up @@ -67,7 +67,7 @@ CREATE DEFINER='root'@'localhost' FUNCTION format_path (
BEGIN BEGIN
DECLARE v_path VARCHAR(260); DECLARE v_path VARCHAR(260);


/* OSX hides /private/ in variables, but Performance Schema does not */ -- OSX hides /private/ in variables, but Performance Schema does not
IF path LIKE '/private/%' IF path LIKE '/private/%'
THEN SET v_path = REPLACE(path, '/private', ''); THEN SET v_path = REPLACE(path, '/private', '');
ELSE SET v_path = path; ELSE SET v_path = path;
Expand Down
32 changes: 16 additions & 16 deletions functions/format_statement.sql
Original file line number Original file line Diff line number Diff line change
@@ -1,17 +1,17 @@
/* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -- Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
--
This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. -- the Free Software Foundation; version 2 of the License.
--
This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. -- GNU General Public License for more details.
--
You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


DROP FUNCTION IF EXISTS format_statement; DROP FUNCTION IF EXISTS format_statement;


Expand Down Expand Up @@ -66,7 +66,7 @@ CREATE DEFINER='root'@'localhost' FUNCTION format_statement (
DETERMINISTIC DETERMINISTIC
NO SQL NO SQL
BEGIN BEGIN
/* Check if we have the configured length, if not, init it */ -- Check if we have the configured length, if not, init it
IF @sys.statement_truncate_len IS NULL THEN IF @sys.statement_truncate_len IS NULL THEN
SET @sys.statement_truncate_len = sys_get_config('statement_truncate_len', 64); SET @sys.statement_truncate_len = sys_get_config('statement_truncate_len', 64);
END IF; END IF;
Expand All @@ -76,6 +76,6 @@ BEGIN
ELSE ELSE
RETURN REPLACE(statement, '\n', ' '); RETURN REPLACE(statement, '\n', ' ');
END IF; END IF;
END $$ END$$


DELIMITER ; DELIMITER ;
30 changes: 15 additions & 15 deletions functions/format_time.sql
Original file line number Original file line Diff line number Diff line change
@@ -1,17 +1,17 @@
/* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -- Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
--
This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. -- the Free Software Foundation; version 2 of the License.
--
This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. -- GNU General Public License for more details.
--
You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


DROP FUNCTION IF EXISTS format_time; DROP FUNCTION IF EXISTS format_time;


Expand Down Expand Up @@ -82,6 +82,6 @@ BEGIN
ELSEIF picoseconds >= 1000 THEN RETURN CONCAT(ROUND(picoseconds / 1000, 2), ' ns'); ELSEIF picoseconds >= 1000 THEN RETURN CONCAT(ROUND(picoseconds / 1000, 2), ' ns');
ELSE RETURN CONCAT(picoseconds, ' ps'); ELSE RETURN CONCAT(picoseconds, ' ps');
END IF; END IF;
END $$ END$$


DELIMITER ; DELIMITER ;
32 changes: 16 additions & 16 deletions functions/ps_is_account_enabled.sql
Original file line number Original file line Diff line number Diff line change
@@ -1,17 +1,17 @@
/* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -- Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
--
This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. -- the Free Software Foundation; version 2 of the License.
--
This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. -- GNU General Public License for more details.
--
You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


DROP FUNCTION IF EXISTS ps_is_account_enabled; DROP FUNCTION IF EXISTS ps_is_account_enabled;


Expand Down Expand Up @@ -64,6 +64,6 @@ BEGIN
), ),
'YES', 'NO' 'YES', 'NO'
); );
END $$ END$$


DELIMITER ; DELIMITER ;
30 changes: 15 additions & 15 deletions functions/ps_is_instrument_default_enabled.sql
Original file line number Original file line Diff line number Diff line change
@@ -1,17 +1,17 @@
/* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -- Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
--
This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. -- the Free Software Foundation; version 2 of the License.
--
This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. -- GNU General Public License for more details.
--
You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


DROP FUNCTION IF EXISTS ps_is_instrument_default_enabled; DROP FUNCTION IF EXISTS ps_is_instrument_default_enabled;


Expand Down Expand Up @@ -67,4 +67,4 @@ BEGIN
RETURN v_enabled; RETURN v_enabled;
END$$ END$$


DELIMITER ; DELIMITER ;
Loading

0 comments on commit 9c5c6f8

Please sign in to comment.