29 lines
681 B
MySQL
29 lines
681 B
MySQL
|
/*
|
||
|
* Test privileges on sys.logs
|
||
|
*/
|
||
|
BEGIN;
|
||
|
SELECT plan( 4 );
|
||
|
|
||
|
SELECT diag_test_name( 'sys.logs - INSERT privileges' );
|
||
|
SELECT throws_ok(
|
||
|
$$ INSERT INTO sys.logs( component , level , message )
|
||
|
VALUES ( 'test' , 'WARNING'::log_level , 'test' );
|
||
|
$$ , 42501 );
|
||
|
|
||
|
SELECT diag_test_name( 'sys.logs - UPDATE privileges' );
|
||
|
SELECT throws_ok(
|
||
|
$$ UPDATE sys.logs SET component = 'retest'; $$ ,
|
||
|
42501 );
|
||
|
|
||
|
SELECT diag_test_name( 'sys.logs - SELECT privileges' );
|
||
|
SELECT lives_ok(
|
||
|
$$ SELECT * FROM sys.logs; $$
|
||
|
);
|
||
|
|
||
|
SELECT diag_test_name( 'sys.logs - DELETE privileges' );
|
||
|
SELECT throws_ok(
|
||
|
$$ DELETE FROM sys.logs; $$ ,
|
||
|
42501 );
|
||
|
|
||
|
SELECT * FROM finish( );
|
||
|
ROLLBACK;
|