Merge lp:~stewart/drizzle/bug723653 into lp:drizzle

Proposed by Stewart Smith on 2013-08-08
Status: Merged
Merged at revision: 2638
Proposed branch: lp:~stewart/drizzle/bug723653
Merge into: lp:drizzle
Diff against target: 157 lines (+101/-5)
4 files modified
docs/functions/current_time_functions.rst (+23/-1)
docs/functions/extract_date_functions.rst (+64/-1)
docs/mysql_differences.rst (+8/-1)
docs/orderby.rst (+6/-2)
To merge this branch: bzr merge lp:~stewart/drizzle/bug723653
Reviewer Review Type Date Requested Status
Drizzle Trunk 2013-08-08 Pending
Review via email: mp+179101@code.launchpad.net

Description of the change

a bunch of docs updates from an old TODO list.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'docs/functions/current_time_functions.rst'
2--- docs/functions/current_time_functions.rst 2012-06-22 06:36:34 +0000
3+++ docs/functions/current_time_functions.rst 2013-08-08 06:26:19 +0000
4@@ -1,4 +1,26 @@
5 CURRENT TIME FUNCTIONS
6 =======================
7
8-'TODO'
9\ No newline at end of file
10+==================== ================================
11+Function Description
12+==================== ================================
13+NOW() Returns the current time (UTC)
14+UTC_TIMESTAMP() Synonym for NOW()
15+CURRENT_TIMESTAMP() Synonym for NOW()
16+==================== ================================
17+
18+.. _now:
19+
20+NOW
21+---
22+
23+You can call `NOW()`, `UTC_TIMESTAMP()` or `CURRENT_TIMESTAMP()` to get the current time. All time in Drizzle is UTC.
24+
25+.. code-block:: mysql
26+
27+ drizzle> select NOW(), UTC_TIMESTAMP(), CURRENT_TIMESTAMP()\G
28+ *************************** 1. row ***************************
29+ now(): 2013-08-08 06:11:41.442568
30+ UTC_timestamp(): 2013-08-08 06:11:41.442568
31+ current_timestamp(): 2013-08-08 06:11:41.442568
32+ 1 row in set (0.000468 sec)
33
34=== modified file 'docs/functions/extract_date_functions.rst'
35--- docs/functions/extract_date_functions.rst 2012-06-22 06:36:34 +0000
36+++ docs/functions/extract_date_functions.rst 2013-08-08 06:26:19 +0000
37@@ -8,4 +8,67 @@
38
39 EXTRACT(field FROM source)
40
41-'TODO'
42\ No newline at end of file
43+You can extract a field from a datetime. The fields you can extract are:
44+ * YEAR
45+ * YEAR_MONTH (year and month)
46+ * QUARTER
47+ * MONTH
48+ * WEEK
49+ * DAY
50+ * DAY_HOUR (day and hour)
51+ * DAY_MINUTE (day and minute)
52+ * DAY_SECOND (day and second)
53+ * HOUR
54+ * HOUR_MINUTE (hour and minute)
55+ * HOUR_SECOND (hour and second)
56+ * MINUTE
57+ * MINUTE_SECOND (minute and second)
58+ * SECOND
59+ * MICROSECOND
60+ * DAY_MICROSECOND
61+ * HOUR_MICROSECOND
62+ * MINUTE_MICROSECOND
63+ * SECOND_MICROSECOND
64+
65+Examples
66+--------
67+
68+.. code-block:: mysql
69+
70+ drizzle> SELECT EXTRACT(YEAR FROM '1982-01-29');
71+ +---------------------------------+
72+ | EXTRACT(YEAR FROM '1982-01-29') |
73+ +---------------------------------+
74+ | 1982 |
75+ +---------------------------------+
76+ 1 row in set (0.000494 sec)
77+
78+.. code-block:: mysql
79+
80+ drizzle> SELECT EXTRACT(MONTH FROM '1982-01-29');
81+ +----------------------------------+
82+ | EXTRACT(MONTH FROM '1982-01-29') |
83+ +----------------------------------+
84+ | 1 |
85+ +----------------------------------+
86+ 1 row in set (0.000484 sec)
87+
88+.. code-block:: mysql
89+
90+ drizzle> SELECT EXTRACT(YEAR_MONTH FROM '1982-01-29');
91+ +---------------------------------------+
92+ | EXTRACT(YEAR_MONTH FROM '1982-01-29') |
93+ +---------------------------------------+
94+ | 198201 |
95+ +---------------------------------------+
96+ 1 row in set (0.000492 sec)
97+
98+.. code-block:: mysql
99+
100+ drizzle> SELECT EXTRACT(SECOND_MICROSECOND FROM NOW());
101+ +----------------------------------------+
102+ | EXTRACT(SECOND_MICROSECOND FROM NOW()) |
103+ +----------------------------------------+
104+ | 13761098 |
105+ +----------------------------------------+
106+ 1 row in set (0.000499 sec)
107
108=== modified file 'docs/mysql_differences.rst'
109--- docs/mysql_differences.rst 2012-03-08 00:54:48 +0000
110+++ docs/mysql_differences.rst 2013-08-08 06:26:19 +0000
111@@ -104,6 +104,10 @@
112 Partitioning
113 ------------
114
115+Drizzle does not support table partitioning at this time. This is due to
116+deficiencies in the architecture of MySQL partitioning. We think it should
117+be implemented as a rewrite engine rather than a storage engine.
118+
119 INFORMATION_SCHEMA
120 ------------------
121
122@@ -134,7 +138,10 @@
123 No gotcha of using the unix socket when localhost is specified and then
124 connecting you to the wrong database server.
125
126-There is no Drizzle admin command.
127+After a survey of commands from `mysqladmin` we determined that by adding
128+an option to the normal drizzle command line client to shutdown the server
129+we could negate the need for a `drizzleadmin` command and so there is none.
130+You can achieve all the same results via SQL.
131
132 Storage Engines
133 ---------------
134
135=== modified file 'docs/orderby.rst'
136--- docs/orderby.rst 2012-06-22 06:36:34 +0000
137+++ docs/orderby.rst 2013-08-08 06:26:19 +0000
138@@ -1,7 +1,11 @@
139 ORDER BY
140 ========
141
142-'TODO'
143+You can use `ORDER BY` to specify the order of the rows returned for a query.
144+Without an `ORDER BY` clause, rows may be returned in any order. Some storage
145+engines are more deterministic about the order they return rows than others,
146+so while it may appear that you always get rows back in the same order without
147+an `ORDER BY` clause, this is a coincidence.
148
149 SQL ORDER BY Syntax:
150
151@@ -11,4 +15,4 @@
152 FROM table_name
153 ORDER BY column_name(s) ASC|DESC;
154
155-'TODO'
156\ No newline at end of file
157+You can provide a list of columns and if results should be in ascending or descending order.

Subscribers

People subscribed via source and target branches

to all changes: