trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmar...@apache.org
Subject [13/20] incubator-trafodion git commit: TRAFODION-1087 & TRAFODION-1671 fixes
Date Tue, 12 Jan 2016 22:47:13 GMT
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/e3d65c15/core/sql/regress/catman1/EXPECTED140
----------------------------------------------------------------------
diff --git a/core/sql/regress/catman1/EXPECTED140 b/core/sql/regress/catman1/EXPECTED140
deleted file mode 100644
index a7ee967..0000000
--- a/core/sql/regress/catman1/EXPECTED140
+++ /dev/null
@@ -1,926 +0,0 @@
->>env;
-----------------------------------
-Current Environment
-----------------------------------
-AUTHENTICATION     disabled
-AUTHORIZATION      enabled
-CURRENT DIRECTORY  /opt/home/rmarton/git_ws/core/sql/regress/rundir/catman1
-LIST_COUNT         4294967295
-LOG FILE           LOG140
-MESSAGEFILE        /opt/home/rmarton/git_ws/core/sqf/export/bin64d/mxcierr ...
-MESSAGEFILE LANG   US English
-MESSAGEFILE VRSN   {2015-05-22 10:41 LINUX:G4T3035.HOUSTON.HP.COM/rmarton} 
-SQL CATALOG        TRAFODION
-SQL SCHEMA         SCH
-SQL USER CONNECTED user not connected
-SQL USER DB NAME   DB__ROOT
-SQL USER ID        33333
-TERMINAL CHARSET   ISO88591
-TRANSACTION ID     
-TRANSACTION STATE  not in progress
-WARNINGS           on
->>obey TEST140(create_db);
->>-- create roles
->>create role priv1;
-
---- SQL operation complete.
->>create role priv2;
-
---- SQL operation complete.
->>create role priv3;
-
---- SQL operation complete.
->>create role priv4;
-
---- SQL operation complete.
->>create role metadata_access;
-
---- SQL operation complete.
->>grant role priv1, priv2, priv3, priv4 to sql_user5;
-
---- SQL operation complete.
->>grant role metadata_access to sql_user1, sql_user2, sql_user3,
-+>   sql_user4, sql_user5, sql_user6, sql_user7, sql_user8, sql_user9;
-
---- SQL operation complete.
->>
->>grant select on "_MD_".objects to metadata_access;
-
---- SQL operation complete.
->>grant select on "_PRIVMGR_MD_".object_privileges to metadata_access;
-
---- SQL operation complete.
->>grant select on "_MD_".auths to metadata_access;
-
---- SQL operation complete.
->>
->>create shared schema t140_shared_views;
-
---- SQL operation complete.
->>
->>-- compile cpp program for function
->>sh rm -f ./etest140.dll;
->>sh sh $$scriptsdir$$/tools/dll-compile.ksh etest140.cpp
-+>  2>&1 | tee LOG140-SECONDARY;
->>set pattern $$DLL$$ etest140.dll;
->>set pattern $$QUOTE$$ '''';
->>
->>-- create the library and udf
->>set schema sch;
-
---- SQL operation complete.
->>create library t140_l1 file $$QUOTE$$ $$REGRRUNDIR$$/$$DLL$$ $$QUOTE$$ ;
-
---- SQL operation complete.
->>create function t140_translatePrivsBitmap(bitmap largeint) returns (bitmap_string
char (20))
-+>language c parameter style sql external name 'translateBitmap'
-+>library t140_l1
-+>deterministic no sql final call allow any parallelism state area size 1024 ;
-
---- SQL operation complete.
->>grant execute on function sch.t140_translatePrivsBitmap to "PUBLIC";
-
---- SQL operation complete.
->>
->>-- private schema owned by sql_user1
->>create schema t140_user1_private authorization sql_user1;
-
---- SQL operation complete.
->>set schema t140_user1_private;
-
---- SQL operation complete.
->>obey TEST140(create_tables);
->>
->>-- Creates and loads three tables:  teams, games, players
->>-- All tables have a check constraint (other than NOT NULL)
->>-- Table games has an index
->>-- Table players has a RI contraint referencing teams
->>-- A view exists between games & teams
->>
->>create table teams
-+>  (team_number int not null primary key,
-+>   team_name char(20) not null,
-+>   team_contact varchar(50) not null,
-+>   team_contact_number char (10) not null
-+>   )
-+>  ;
-
---- SQL operation complete.
->>
->>alter table teams add constraint valid_team_no check (team_number > 0);
-
---- SQL operation complete.
->>
->>insert into teams values
-+>   (1, 'White Socks', 'Sam','4082282222'),
-+>   (2, 'Giants', 'Joe', '5102839483'),
-+>   (3, 'Cardinals', 'Stella', '9513849384'),
-+>   (4, 'Indians', 'Matt', '5128383748'),
-+>   (5, 'Tigers', 'Ronit', '6198273827');
-
---- 5 row(s) inserted.
->>
->>create table games
-+>   ( home_team_number int not null,
-+>     visitor_team_number int not null,
-+>     game_number int not null primary key,
-+>     game_time timestamp not null,
-+>     game_location varchar(50) not null)
-+>  ;
-
---- SQL operation complete.
->>create index home_games on games (home_team_number);
-
---- SQL operation complete.
->>
->>alter table games add constraint valid_game_number check (game_number > 0);
-
---- SQL operation complete.
->>
->>insert into games values
-+>   (1, 2, 1, timestamp '2009-04-23 19:30:00', 'California'),
-+>   (1, 3, 2, timestamp '2009-04-24 19:30:00', 'California'),
-+>   (1, 4, 3, timestamp '2009-04-25 10:00:00', 'Oklahoma'),
-+>   (2, 3, 4, timestamp '2009-04-25 13:30:00', 'Michigan'),
-+>   (1, 5, 5, timestamp '2009-04-25 15:00:00', 'Oklahoma'),
-+>   (2, 5, 6, timestamp '2009-04-27 17:00:00', 'New York'),
-+>   (3, 4, 7, timestamp '2009-04-28 17:00:00', 'Florida'),
-+>   (4, 2, 8, current_timestamp, 'Missouri');
-
---- 8 row(s) inserted.
->>
->>create view t140_shared_views.home_team_games as
-+>  select t.team_number, g.game_number, g.game_time
-+>  from "TEAMS" t,
-+>       "GAMES" g
-+>  where t.team_number = g.home_team_number
-+>  order by 1, game_number, game_time;
-
---- SQL operation complete.
->>grant select on t140_shared_views.home_team_games to sql_user1 with grant option;
-
---- SQL operation complete.
->>
->>create table players
-+>  (player_number int not null,
-+>   player_name varchar (50) not null,
-+>   player_team_number int not null,
-+>   player_phone_number char (10) not null,
-+>   player_details varchar(50),
-+>   primary key (player_number, player_team_number))
-+>  no partition;
-
---- SQL operation complete.
->>
->>alter table players add constraint valid_player_number check(player_number > 0);
-
---- SQL operation complete.
->>
->>alter table players add constraint players_teams
-+>   foreign key (player_team_number) references teams (team_number);
-
---- SQL operation complete.
->>
->>insert into players values
-+>   (1, 'Tom', 1, '4083948394', null),
-+>   (2, 'Bob', 1, '4089483948', null),
-+>   (3, 'Toby',1, '4082938493', 'pitcher'),
-+>   (3, 'Toby',2, '4082938493', null),
-+>   (4, 'Julie', 2, '5108394839', 'catcher'),
-+>   (5, 'Joanne', 2, '5103849384', null),
-+>   (6, 'Pete', 2, '5102839483', null),
-+>   (6, 'Pete', 3, '5102839483', 'third base'),
-+>   (7, 'Jared',4, '9518293849', 'short stop'),
-+>   (8, 'Zachary', 4, '9518293840', null),
-+>   (9, 'Lynne', 5, '9518293892', 'pitcher'),
-+>   (10, 'Omar', 5, '5128394893', null);
-
---- 12 row(s) inserted.
->>
->>get tables in schema t140_user1_private;
-
-Tables in Schema TRAFODION.T140_USER1_PRIVATE
-=============================================
-
-GAMES
-PLAYERS
-TEAMS
-
---- SQL operation complete.
->>
->>
->>-- shared schema owned by sql_user5
->>--create shared schema t140_user1_shared authorization sql_user5;
->>--set schema t140_user5_shared;
->>--obey TEST140(create_tables);
->>--get tables in schema t140_user5_shared;
->>
->>-- private schema owned by role priv1
->>--create private schema t140_priv1_private authorization priv1;
->>--set schema t140_priv1_private;
->>--obey TEST140(create_tables);
->>--get tables in schema t140_priv1_private;
->>
->>-- shared schema owner by role priv2
->>--create shared schema t140_priv2_shared authorization priv2;
->>--set schema t140_priv2_shared;
->>--obey TEST140(create_tables);
->>--get tables in schema t140_priv2_shared;
->>
->>obey TEST140(set_up);
->>prepare get_privs from
-+>select distinct
-+>   substring (object_name,1,40) as object_name,
-+>   object_type as type,
-+>   substring(authname(grantor_id),1,10) as grantor,
-+>   substring(authname(grantee_id),1,10) as grantee,
-+>   sch.t140_translatePrivsBitmap(privileges_bitmap) as granted_privs,
-+>   sch.t140_translatePrivsBitmap(grantable_bitmap) as grantable_privs
-+>from "_PRIVMGR_MD_".object_privileges 
-+>where object_uid in 
-+>     (select object_uid
-+>      from "_MD_".objects
-+>      where schema_name like 'T140_%')
-+>  order by 1, 2, 3, 4, 5
-+>;
-
---- SQL command prepared.
->>
->>obey TEST140(tests);
->>values (user);
-
-(EXPR)
----------------------------------------------------------------------------------------------------------------------------------
-
-DB__ROOT                                                                                
                                        
-
---- 1 row(s) selected.
->>
->>-- user1 owns everything, start of by doing initial grants
->>sh sqlci -i "TEST140(user1_cmds)" -u sql_user1;
->>values (user);
-
-(EXPR)
----------------------------------------------------------------------------------------------------------------------------------
-
-SQL_USER1                                                                               
                                        
-
---- 1 row(s) selected.
->>set schema t140_user1_private;
-
---- SQL operation complete.
->>
->>grant select on games to sql_user2;
-
---- SQL operation complete.
->>
->>-- grants to handle table requests
->>grant all on teams to sql_user2 with grant option;
-
---- SQL operation complete.
->>grant select, insert on players to sql_user2 with grant option;
-
---- SQL operation complete.
->>
->>-- grants to handle view requests
->>grant select on t140_shared_views.home_team_games to sql_user2;
-
---- SQL operation complete.
->>
->>obey TEST140(set_up);
->>prepare get_privs from
-+>select distinct
-+>   substring (object_name,1,40) as object_name,
-+>   object_type as type,
-+>   substring(authname(grantor_id),1,10) as grantor,
-+>   substring(authname(grantee_id),1,10) as grantee,
-+>   sch.t140_translatePrivsBitmap(privileges_bitmap) as granted_privs,
-+>   sch.t140_translatePrivsBitmap(grantable_bitmap) as grantable_privs
-+>from "_PRIVMGR_MD_".object_privileges 
-+>where object_uid in 
-+>     (select object_uid
-+>      from "_MD_".objects
-+>      where schema_name like 'T140_%')
-+>  order by 1, 2, 3, 4, 5
-+>;
-
---- SQL command prepared.
->>
->>execute get_privs;
-
-OBJECT_NAME                                                                             
                                                                         TYPE  GRANTOR   
 GRANTEE     GRANTED_PRIVS         GRANTABLE_PRIVS
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
 ----  ----------  ----------  --------------------  --------------------
-
-TRAFODION.T140_SHARED_VIEWS.HOME_TEAM_GA                                                
                                                                         VI    -2        
 DB__ROOT    S----R-
Mime
View raw message