ClickHouse/src/Storages/LiveView
bharatnc c3dd968931 fix ALTER LIVE VIEW lock issue
This PR fixes a lock issue that happens while executing
`ALTER LIVE VIEW` query with the `REFRESH` command that
results in a exception. The problem is that lock is currently
being acquired in `InterpreterALterQuery.cpp`
in the `InterpreterAlterQuery::execute()` method and lock
is again being reacquired in `StorageLiveView.cpp` in the
` StorageLiveView::refresh` method. This removes that extra
lock.

Before fix:

```sql
--create table

CREATE TABLE test0 (
    c0 UInt64
) ENGINE = MergeTree() PARTITION BY c0 ORDER BY c0;

-- enable experimental_live_view

:) SET allow_experimental_live_view=1

-- create live view;

:) CREATE LIVE VIEW live1 AS SELECT * FROM table0;

-- alter live view results in exception

:) ALTER LIVE VIEW live1 REFRESH;

...
...

Received exception from server (version 20.8.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: RWLockImpl::getLock(): RWLock is already locked in exclusive mode.

```

After fix:

```sql
:)  ALTER LIVE VIEW live1 REFRESH;

ALTER LIVE VIEW live1
    REFRESH

Ok.

0 rows in set. Elapsed: 0.016 sec.
```
2020-08-31 22:17:58 -07:00
..
LiveViewBlockInputStream.h Fix 99% of typos 2020-08-08 04:01:47 +03:00
LiveViewBlockOutputStream.h
LiveViewCommands.h
LiveViewEventsBlockInputStream.h Fix 99% of typos 2020-08-08 04:01:47 +03:00
StorageBlocks.h Refactor Pipe [part 6] 2020-08-06 15:24:05 +03:00
StorageLiveView.cpp fix ALTER LIVE VIEW lock issue 2020-08-31 22:17:58 -07:00
StorageLiveView.h fix ALTER LIVE VIEW lock issue 2020-08-31 22:17:58 -07:00